From 8b2f97fcf18d3f95a7b8c9cc13bbc8495bcca091 Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Jul 12 2015 17:44:29 +0000 Subject: Update to release 3.1.1 (rhbz#1206371) - Remove upstreamed patches - Correct python package names - Use license macro --- diff --git a/.gitignore b/.gitignore index 5a58404..110e96c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /assimp--3.0.1270-source-only.zip /assimp-3.0.1270-f849f6d.tar.gz /assimp-f849f6d9bd21efe802fa456184b1c3173e74a050-free.tar.bz2 +/assimp-3.1.1_no_test_models.zip diff --git a/assimp-1.1.700.docfix.patch b/assimp-1.1.700.docfix.patch deleted file mode 100644 index e3717ff..0000000 --- a/assimp-1.1.700.docfix.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up ./doc/Doxyfile.docfix ./doc/Doxyfile ---- ./doc/Doxyfile.docfix 2010-09-20 20:16:34.273588329 -0400 -+++ ./doc/Doxyfile 2010-09-20 20:29:36.654459555 -0400 -@@ -160,7 +160,7 @@ IGNORE_PREFIX = - # configuration options related to the HTML output - #--------------------------------------------------------------------------- - GENERATE_HTML = YES --HTML_OUTPUT = AssimpDoc_Html -+HTML_OUTPUT = html - HTML_FILE_EXTENSION = .html - HTML_HEADER = - HTML_FOOTER = -@@ -170,7 +170,7 @@ HTML_DYNAMIC_SECTIONS = NO - GENERATE_DOCSET = NO - DOCSET_FEEDNAME = "Doxygen generated docs" - DOCSET_BUNDLE_ID = org.doxygen.Project --GENERATE_HTMLHELP = YES -+GENERATE_HTMLHELP = NO - CHM_FILE = AssimpDoc.chm - HHC_LOCATION = "C:\Program Files (x86)\HTML Help Workshop/hhc.exe" - GENERATE_CHI = NO diff --git a/assimp-1071-gcc47.patch b/assimp-1071-gcc47.patch deleted file mode 100644 index dd74e51..0000000 --- a/assimp-1071-gcc47.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -up ./code/PolyTools.h.gcc47 ./code/PolyTools.h ---- ./code/PolyTools.h.gcc47 2012-04-12 00:03:17.653420693 -0400 -+++ ./code/PolyTools.h 2012-04-12 00:13:22.410132366 -0400 -@@ -44,6 +44,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE - #define AI_POLYTOOLS_H_INCLUDED - - namespace Assimp { -+// ------------------------------------------------------------------------------- -+/** Compute the signed area of a triangle. -+ * The function accepts an unconstrained template parameter for use with -+ * both aiVector3D and aiVector2D, but generally ignores the third coordinate.*/ -+template -+inline double GetArea2D(const T& v1, const T& v2, const T& v3) -+{ -+ return 0.5 * (v1.x * ((double)v3.y - v2.y) + v2.x * ((double)v1.y - v3.y) + v3.x * ((double)v2.y - v1.y)); -+} -+ - - // ------------------------------------------------------------------------------- - /** Test if a given point p2 is on the left side of the line formed by p0-p1. -@@ -55,6 +65,7 @@ inline bool OnLeftSideOfLine2D(const T& - return GetArea2D(p0,p2,p1) > 0; - } - -+ - // ------------------------------------------------------------------------------- - /** Test if a given point is inside a given triangle in R2. - * The function accepts an unconstrained template parameter for use with -@@ -81,17 +92,6 @@ inline bool PointInTriangle2D(const T& p - } - - --// ------------------------------------------------------------------------------- --/** Compute the signed area of a triangle. -- * The function accepts an unconstrained template parameter for use with -- * both aiVector3D and aiVector2D, but generally ignores the third coordinate.*/ --template --inline double GetArea2D(const T& v1, const T& v2, const T& v3) --{ -- return 0.5 * (v1.x * ((double)v3.y - v2.y) + v2.x * ((double)v1.y - v3.y) + v3.x * ((double)v2.y - v1.y)); --} -- -- - // ------------------------------------------------------------------------------- - /** Check whether the winding order of a given polygon is counter-clockwise. - * The function accepts an unconstrained template parameter, but is intended diff --git a/assimp-2.0.863.pkgconfig.patch b/assimp-2.0.863.pkgconfig.patch deleted file mode 100644 index 3dba2df..0000000 --- a/assimp-2.0.863.pkgconfig.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up ./assimp.pc.in.pkgconfig ./assimp.pc.in ---- ./assimp.pc.in.pkgconfig 2011-12-16 20:06:44.272286603 -0500 -+++ ./assimp.pc.in 2011-12-16 20:07:06.063011349 -0500 -@@ -1,7 +1,7 @@ - prefix=@CMAKE_INSTALL_PREFIX@ --exec_prefix=@CMAKE_INSTALL_PREFIX@/@BIN_INSTALL_DIR@ --libdir=@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@ --includedir=@CMAKE_INSTALL_PREFIX@/@INCLUDE_INSTALL_DIR@/assimp -+exec_prefix=@BIN_INSTALL_DIR@ -+libdir=@LIB_INSTALL_DIR@ -+includedir=@INCLUDE_INSTALL_DIR@/assimp - - Name: @CMAKE_PROJECT_NAME@ - Description: Import various well-known 3D model formats in an uniform manner. diff --git a/assimp-3.0.1270-unbundle.patch b/assimp-3.0.1270-unbundle.patch deleted file mode 100644 index e6ccf99..0000000 --- a/assimp-3.0.1270-unbundle.patch +++ /dev/null @@ -1,1538 +0,0 @@ -diff -ruN assimp--3.0.1270-source-only/CMakeLists.txt assimp--3.0.1270-source-only-fedora/CMakeLists.txt ---- assimp--3.0.1270-source-only/CMakeLists.txt 2012-07-07 18:15:42.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/CMakeLists.txt 2013-05-28 22:51:02.968721353 -0400 -@@ -117,6 +117,36 @@ - PKG_CHECK_MODULES(UNZIP minizip) - endif (PKG_CONFIG_FOUND) - -+# Search for irrXML -+FIND_LIBRARY(IRRXML_LIB IrrXML HINTS ${IRRXML_LIB_PATH}) -+FIND_FILE(IRRXML_H irrXML.h PATHS ${IRRXML_INCLUDE_PATH}) -+IF(IRRXML_LIB AND IRRXML_H) -+ message (STATUS "Found External IrrXML") -+ set(HAVE_IRRXML true) -+ELSE (IRRXML_LIB AND IRRXML_H) -+ SET(HAVE_IRRXML false) -+ENDIF(IRRXML_LIB AND IRRXML_H) -+ -+# Search for poly2tri -+FIND_LIBRARY(POLY2TRI_LIB poly2tri HINTS ${POLY2TRI_LIB_PATH}) -+FIND_FILE(POLY2TRI_H poly2tri.h PATHS ${POLY2TRI_INCLUDE_PATH}) -+IF (POLY2TRI_LIB AND POLY2TRI_H) -+ message(status "Found External poly2tri") -+ SET(HAVE_POLY2TRI true) -+ELSE(POLY2TRI_LIB AND POLY2TRI_H) -+ SET(HAVE_POLY2TRI false) -+ENDIF(POLY2TRI_LIB AND POLY2TRI_H) -+ -+# Search for clipper -+FIND_LIBRARY(CLIPPER_LIB polyclipping HINTS ${CLIPPER_LIB_PATH}) -+FIND_FILE(CLIPPER_H clipper.hpp PATHS ${CLIPPER_INCLUDE_PATH}) -+IF (CLIPPER_LIB AND CLIPPER_H) -+ message(status "Found External clipper") -+ SET(HAVE_CLIPPER true) -+ELSE(CLIPPER_LIB AND CLIPPER_H) -+ SET(HAVE_CLIPPER false) -+ENDIF(CLIPPER_LIB AND CLIPPER_H) -+ - IF ( NO_EXPORT ) - ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT) - MESSAGE( STATUS "Build an import-only version of Assimp." ) -diff -ruN assimp--3.0.1270-source-only/code/ACLoader.cpp assimp--3.0.1270-source-only-fedora/code/ACLoader.cpp ---- assimp--3.0.1270-source-only/code/ACLoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/ACLoader.cpp 2013-05-01 19:28:57.600184042 -0400 -@@ -49,7 +49,7 @@ - // internal headers - #include "ACLoader.h" - #include "ParsingUtils.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - #include "Subdivision.h" - - using namespace Assimp; -diff -ruN assimp--3.0.1270-source-only/code/ASELoader.cpp assimp--3.0.1270-source-only-fedora/code/ASELoader.cpp ---- assimp--3.0.1270-source-only/code/ASELoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/ASELoader.cpp 2013-05-01 19:28:57.604184199 -0400 -@@ -53,7 +53,7 @@ - #include "TargetAnimation.h" - - // utilities --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - using namespace Assimp; - using namespace Assimp::ASE; -diff -ruN assimp--3.0.1270-source-only/code/ASEParser.cpp assimp--3.0.1270-source-only-fedora/code/ASEParser.cpp ---- assimp--3.0.1270-source-only/code/ASEParser.cpp 2012-02-03 05:38:32.000000000 -0500 -+++ assimp--3.0.1270-source-only-fedora/code/ASEParser.cpp 2013-05-01 19:28:57.609184395 -0400 -@@ -49,7 +49,7 @@ - #include "TextureTransform.h" - #include "ASELoader.h" - #include "MaterialSystem.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - using namespace Assimp; - using namespace Assimp::ASE; -diff -ruN assimp--3.0.1270-source-only/code/BlenderDNA.cpp assimp--3.0.1270-source-only-fedora/code/BlenderDNA.cpp ---- assimp--3.0.1270-source-only/code/BlenderDNA.cpp 2012-02-03 05:38:32.000000000 -0500 -+++ assimp--3.0.1270-source-only-fedora/code/BlenderDNA.cpp 2013-05-01 19:28:57.616184669 -0400 -@@ -47,7 +47,7 @@ - #ifndef ASSIMP_BUILD_NO_BLEND_IMPORTER - #include "BlenderDNA.h" - #include "StreamReader.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - using namespace Assimp; - using namespace Assimp::Blender; -diff -ruN assimp--3.0.1270-source-only/code/BVHLoader.cpp assimp--3.0.1270-source-only-fedora/code/BVHLoader.cpp ---- assimp--3.0.1270-source-only/code/BVHLoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/BVHLoader.cpp 2013-05-01 19:28:57.623184944 -0400 -@@ -44,7 +44,7 @@ - #ifndef ASSIMP_BUILD_NO_BVH_IMPORTER - - #include "BVHLoader.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - #include "SkeletonMeshBuilder.h" - - using namespace Assimp; -diff -ruN assimp--3.0.1270-source-only/code/CMakeLists.txt assimp--3.0.1270-source-only-fedora/code/CMakeLists.txt ---- assimp--3.0.1270-source-only/code/CMakeLists.txt 2012-06-21 20:38:10.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/CMakeLists.txt 2013-05-29 21:50:50.883117497 -0400 -@@ -88,7 +88,7 @@ - SOURCE_GROUP(Logging FILES ${Logging_SRCS}) - - SET( Common_SRCS -- fast_atof.h -+ fast_atof_assimp.h - qnan.h - BaseImporter.cpp - BaseImporter.h -@@ -533,12 +533,15 @@ - ) - SOURCE_GROUP( ConvertUTF FILES ${ConvertUTF_SRCS}) - -+if (NOT HAVE_CLIPPER) - SET( Clipper_SRCS - ../contrib/clipper/clipper.hpp - ../contrib/clipper/clipper.cpp - ) - SOURCE_GROUP( Clipper FILES ${Clipper_SRCS}) -- -+else (NOT HAVE_CLIPPER) -+ SET(Clipper_SRCS "") -+endif(NOT HAVE_CLIPPER) - - SET( Poly2Tri_SRCS - ../contrib/poly2tri/poly2tri/common/shapes.cc -@@ -633,11 +636,8 @@ - ${XGL_SRCS} - - # Third-party libraries -- ${IrrXML_SRCS} - ${ConvertUTF_SRCS} -- ${unzip_compile_SRCS} -- ${Poly2Tri_SRCS} -- ${Clipper_SRCS} -+ ${Clipper_SRCS} - # Necessary to show the headers in the project when using the VC++ generator: - ${Boost_SRCS} - -@@ -670,6 +670,26 @@ - INCLUDE_DIRECTORIES("../contrib/unzip") - endif (UNZIP_FOUND) - -+if (HAVE_IRRXML) -+ INCLUDE_DIRECTORIES(${IRRXML_INCLUDE_PATH}) -+ TARGET_LINK_LIBRARIES(assimp ${IRRXML_LIB}) -+else (HAVE_IRRXML) -+ INCLUDE_DIRECTORIES("../contrib/irrXML") -+endif (HAVE_IRRXML) -+ -+if (HAVE_POLY2TRI) -+ INCLUDE_DIRECTORIES(${POLY2TRI_INCLUDE_PATH}) -+ TARGET_LINK_LIBRARIES(assimp ${POLY2TRI_LIB}) -+endif(HAVE_POLY2TRI) -+ -+if (HAVE_CLIPPER) -+ INCLUDE_DIRECTORIES(${CLIPPER_INCLUDE_PATH}) -+ TARGET_LINK_LIBRARIES(assimp ${CLIPPER_LIB}) -+else (HAVE_CLIPPER) -+ INCLUDE_DIRECTORIES(../contrib/clipper) -+endif(HAVE_CLIPPER) -+ -+ - INSTALL( TARGETS assimp DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${LIBASSIMP_COMPONENT}) - INSTALL( FILES ${PUBLIC_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/assimp COMPONENT assimp-dev) - INSTALL( FILES ${COMPILER_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/assimp/Compiler COMPONENT assimp-dev) -diff -ruN assimp--3.0.1270-source-only/code/COBLoader.cpp assimp--3.0.1270-source-only-fedora/code/COBLoader.cpp ---- assimp--3.0.1270-source-only/code/COBLoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/COBLoader.cpp 2013-05-01 19:28:57.627185100 -0400 -@@ -49,7 +49,7 @@ - - #include "StreamReader.h" - #include "ParsingUtils.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - #include "LineSplitter.h" - #include "TinyFormatter.h" -diff -ruN assimp--3.0.1270-source-only/code/ColladaLoader.cpp assimp--3.0.1270-source-only-fedora/code/ColladaLoader.cpp ---- assimp--3.0.1270-source-only/code/ColladaLoader.cpp 2012-05-05 09:38:16.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/ColladaLoader.cpp 2013-05-01 19:28:57.632185296 -0400 -@@ -48,7 +48,7 @@ - #include "ColladaLoader.h" - #include "ColladaParser.h" - --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - #include "ParsingUtils.h" - #include "SkeletonMeshBuilder.h" - -diff -ruN assimp--3.0.1270-source-only/code/ColladaParser.cpp assimp--3.0.1270-source-only-fedora/code/ColladaParser.cpp ---- assimp--3.0.1270-source-only/code/ColladaParser.cpp 2012-05-05 09:38:16.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/ColladaParser.cpp 2013-05-01 19:28:57.639185571 -0400 -@@ -47,7 +47,7 @@ - #ifndef ASSIMP_BUILD_NO_DAE_IMPORTER - - #include "ColladaParser.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - #include "ParsingUtils.h" - - using namespace Assimp; -diff -ruN assimp--3.0.1270-source-only/code/CSMLoader.cpp assimp--3.0.1270-source-only-fedora/code/CSMLoader.cpp ---- assimp--3.0.1270-source-only/code/CSMLoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/CSMLoader.cpp 2013-05-01 19:28:57.642185688 -0400 -@@ -50,7 +50,7 @@ - #include "CSMLoader.h" - #include "SkeletonMeshBuilder.h" - #include "ParsingUtils.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - using namespace Assimp; - -diff -ruN assimp--3.0.1270-source-only/code/DXFLoader.cpp assimp--3.0.1270-source-only-fedora/code/DXFLoader.cpp ---- assimp--3.0.1270-source-only/code/DXFLoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/DXFLoader.cpp 2013-05-01 19:28:57.648185924 -0400 -@@ -49,7 +49,7 @@ - #include "DXFLoader.h" - #include "ParsingUtils.h" - #include "ConvertToLHProcess.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - #include "DXFHelper.h" - -diff -ruN assimp--3.0.1270-source-only/code/fast_atof_assimp.h assimp--3.0.1270-source-only-fedora/code/fast_atof_assimp.h ---- assimp--3.0.1270-source-only/code/fast_atof_assimp.h 1969-12-31 19:00:00.000000000 -0500 -+++ assimp--3.0.1270-source-only-fedora/code/fast_atof_assimp.h 2013-05-28 22:01:04.368372806 -0400 -@@ -0,0 +1,264 @@ -+// Copyright (C) 2002-2007 Nikolaus Gebhardt -+// This file is part of the "Irrlicht Engine" and the "irrXML" project. -+// For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h -+ -+// ------------------------------------------------------------------------------------ -+// Original description: (Schrompf) -+// Adapted to the ASSIMP library because the builtin atof indeed takes AGES to parse a -+// float inside a large string. Before parsing, it does a strlen on the given point. -+// Changes: -+// 22nd October 08 (Aramis_acg): Added temporary cast to double, added strtoul10_64 -+// to ensure long numbers are handled correctly -+// ------------------------------------------------------------------------------------ -+ -+ -+#ifndef __ASSIMP_FAST_A_TO_F_H_INCLUDED__ -+#define __ASSIMP_FAST_A_TO_F_H_INCLUDED__ -+ -+#include -+#include "fast_atof.h" -+ -+namespace Assimp -+{ -+ -+// ------------------------------------------------------------------------------------ -+// Convert a string in decimal format to a number -+// ------------------------------------------------------------------------------------ -+inline unsigned int strtoul10( const char* in, const char** out=0) -+{ -+ return irr::core::strtoul10(in, out); -+} -+ -+// ------------------------------------------------------------------------------------ -+// Convert a string in octal format to a number -+// ------------------------------------------------------------------------------------ -+inline unsigned int strtoul8( const char* in, const char** out=0) -+{ -+ return irr::core::strtoul8(in, out); -+} -+ -+// ------------------------------------------------------------------------------------ -+// Convert a string in hex format to a number -+// ------------------------------------------------------------------------------------ -+inline unsigned int strtoul16( const char* in, const char** out=0) -+{ -+ return irr::core::strtoul16(in, out); -+} -+ -+// ------------------------------------------------------------------------------------ -+// Convert just one hex digit -+// Return value is UINT_MAX if the input character is not a hex digit. -+// ------------------------------------------------------------------------------------ -+inline unsigned int HexDigitToDecimal(char in) -+{ -+ unsigned int out = UINT_MAX; -+ if (in >= '0' && in <= '9') -+ out = in - '0'; -+ -+ else if (in >= 'a' && in <= 'f') -+ out = 10u + in - 'a'; -+ -+ else if (in >= 'A' && in <= 'F') -+ out = 10u + in - 'A'; -+ -+ // return value is UINT_MAX if the input is not a hex digit -+ return out; -+} -+ -+// ------------------------------------------------------------------------------------ -+// Convert a hex-encoded octet (2 characters, i.e. df or 1a). -+// ------------------------------------------------------------------------------------ -+inline uint8_t HexOctetToDecimal(const char* in) -+{ -+ return ((uint8_t)HexDigitToDecimal(in[0])<<4)+(uint8_t)HexDigitToDecimal(in[1]); -+} -+ -+ -+// ------------------------------------------------------------------------------------ -+// signed variant of strtoul10 -+// ------------------------------------------------------------------------------------ -+inline int strtol10( const char* in, const char** out=0) -+{ -+ return irr::core::strtol10(in, out); -+} -+ -+// ------------------------------------------------------------------------------------ -+// Parse a C++-like integer literal - hex and oct prefixes. -+// 0xNNNN - hex -+// 0NNN - oct -+// NNN - dec -+// ------------------------------------------------------------------------------------ -+inline unsigned int strtoul_cppstyle( const char* in, const char** out=0) -+{ -+ if ('0' == in[0]) -+ { -+ return 'x' == in[1] ? strtoul16(in+2,out) : strtoul8(in+1,out); -+ } -+ return strtoul10(in, out); -+} -+ -+// ------------------------------------------------------------------------------------ -+// Special version of the function, providing higher accuracy and safety -+// It is mainly used by fast_atof to prevent ugly and unwanted integer overflows. -+// ------------------------------------------------------------------------------------ -+inline uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int* max_inout=0) -+{ -+ unsigned int cur = 0; -+ uint64_t value = 0; -+ -+ bool running = true; -+ while ( running ) -+ { -+ if ( *in < '0' || *in > '9' ) -+ break; -+ -+ const uint64_t new_value = ( value * 10 ) + ( *in - '0' ); -+ -+ if (new_value < value) /* numeric overflow, we rely on you */ -+ return value; -+ -+ value = new_value; -+ -+ ++in; -+ ++cur; -+ -+ if (max_inout && *max_inout == cur) { -+ -+ if (out) { /* skip to end */ -+ while (*in >= '0' && *in <= '9') -+ ++in; -+ *out = in; -+ } -+ -+ return value; -+ } -+ } -+ if (out) -+ *out = in; -+ -+ if (max_inout) -+ *max_inout = cur; -+ -+ return value; -+} -+ -+// Number of relevant decimals for floating-point parsing. -+#define AI_FAST_ATOF_RELAVANT_DECIMALS 15 -+ -+// ------------------------------------------------------------------------------------ -+//! Provides a fast function for converting a string into a float, -+//! about 6 times faster than atof in win32. -+// If you find any bugs, please send them to me, niko (at) irrlicht3d.org. -+// ------------------------------------------------------------------------------------ -+template -+inline const char* fast_atoreal_move( const char* c, Real& out) -+{ -+ Real f; -+ -+ bool inv = (*c=='-'); -+ if (inv || *c=='+') { -+ ++c; -+ } -+ -+ f = static_cast( strtoul10_64 ( c, &c) ); -+ if (*c == '.' || (c[0] == ',' && c[1] >= '0' && c[1] <= '9')) // allow for commas, too -+ { -+ ++c; -+ -+ // NOTE: The original implementation is highly inaccurate here. The precision of a single -+ // IEEE 754 float is not high enough, everything behind the 6th digit tends to be more -+ // inaccurate than it would need to be. Casting to double seems to solve the problem. -+ // strtol_64 is used to prevent integer overflow. -+ -+ // Another fix: this tends to become 0 for long numbers if we don't limit the maximum -+ // number of digits to be read. AI_FAST_ATOF_RELAVANT_DECIMALS can be a value between -+ // 1 and 15. -+ unsigned int diff = AI_FAST_ATOF_RELAVANT_DECIMALS; -+ double pl = static_cast( strtoul10_64 ( c, &c, &diff )); -+ -+ pl *= irr::core::fast_atof_table[diff]; -+ f += static_cast( pl ); -+ } -+ -+ // A major 'E' must be allowed. Necessary for proper reading of some DXF files. -+ // Thanks to Zhao Lei to point out that this if() must be outside the if (*c == '.' ..) -+ if (*c == 'e' || *c == 'E') { -+ -+ ++c; -+ const bool einv = (*c=='-'); -+ if (einv || *c=='+') { -+ ++c; -+ } -+ -+ // The reason float constants are used here is that we've seen cases where compilers -+ // would perform such casts on compile-time constants at runtime, which would be -+ // bad considering how frequently fast_atoreal_move is called in Assimp. -+ Real exp = static_cast( strtoul10_64(c, &c) ); -+ if (einv) { -+ exp = -exp; -+ } -+ f *= pow(static_cast(10.0f), exp); -+ } -+ -+ if (inv) { -+ f = -f; -+ } -+ out = f; -+ return c; -+} -+ -+// ------------------------------------------------------------------------------------ -+// The same but more human. -+inline float fast_atof(const char* c) -+{ -+ float ret; -+ fast_atoreal_move(c, ret); -+ return ret; -+} -+ -+ -+inline float fast_atof( const char* c, const char** cout) -+{ -+ float ret; -+ *cout = fast_atoreal_move(c, ret); -+ -+ return ret; -+} -+ -+inline float fast_atof( const char** inout) -+{ -+ float ret; -+ *inout = fast_atoreal_move(*inout, ret); -+ -+ return ret; -+} -+ -+ -+inline double fast_atod(const char* c) -+{ -+ double ret; -+ fast_atoreal_move(c, ret); -+ return ret; -+} -+ -+ -+inline double fast_atod( const char* c, const char** cout) -+{ -+ double ret; -+ *cout = fast_atoreal_move(c, ret); -+ -+ return ret; -+} -+ -+inline double fast_atod( const char** inout) -+{ -+ double ret; -+ *inout = fast_atoreal_move(*inout, ret); -+ -+ return ret; -+} -+ -+} // end of namespace Assimp -+ -+#endif -+ -diff -ruN assimp--3.0.1270-source-only/code/fast_atof.h assimp--3.0.1270-source-only-fedora/code/fast_atof.h ---- assimp--3.0.1270-source-only/code/fast_atof.h 2012-03-20 18:29:58.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/fast_atof.h 1969-12-31 19:00:00.000000000 -0500 -@@ -1,336 +0,0 @@ --// Copyright (C) 2002-2007 Nikolaus Gebhardt --// This file is part of the "Irrlicht Engine" and the "irrXML" project. --// For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h -- --// ------------------------------------------------------------------------------------ --// Original description: (Schrompf) --// Adapted to the ASSIMP library because the builtin atof indeed takes AGES to parse a --// float inside a large string. Before parsing, it does a strlen on the given point. --// Changes: --// 22nd October 08 (Aramis_acg): Added temporary cast to double, added strtoul10_64 --// to ensure long numbers are handled correctly --// ------------------------------------------------------------------------------------ -- -- --#ifndef __FAST_A_TO_F_H_INCLUDED__ --#define __FAST_A_TO_F_H_INCLUDED__ -- --#include -- --namespace Assimp --{ -- --const float fast_atof_table[16] = { // we write [16] here instead of [] to work around a swig bug -- 0.f, -- 0.1f, -- 0.01f, -- 0.001f, -- 0.0001f, -- 0.00001f, -- 0.000001f, -- 0.0000001f, -- 0.00000001f, -- 0.000000001f, -- 0.0000000001f, -- 0.00000000001f, -- 0.000000000001f, -- 0.0000000000001f, -- 0.00000000000001f, -- 0.000000000000001f --}; -- -- --// ------------------------------------------------------------------------------------ --// Convert a string in decimal format to a number --// ------------------------------------------------------------------------------------ --inline unsigned int strtoul10( const char* in, const char** out=0) --{ -- unsigned int value = 0; -- -- bool running = true; -- while ( running ) -- { -- if ( *in < '0' || *in > '9' ) -- break; -- -- value = ( value * 10 ) + ( *in - '0' ); -- ++in; -- } -- if (out)*out = in; -- return value; --} -- --// ------------------------------------------------------------------------------------ --// Convert a string in octal format to a number --// ------------------------------------------------------------------------------------ --inline unsigned int strtoul8( const char* in, const char** out=0) --{ -- unsigned int value = 0; -- -- bool running = true; -- while ( running ) -- { -- if ( *in < '0' || *in > '7' ) -- break; -- -- value = ( value << 3 ) + ( *in - '0' ); -- ++in; -- } -- if (out)*out = in; -- return value; --} -- --// ------------------------------------------------------------------------------------ --// Convert a string in hex format to a number --// ------------------------------------------------------------------------------------ --inline unsigned int strtoul16( const char* in, const char** out=0) --{ -- unsigned int value = 0; -- -- bool running = true; -- while ( running ) -- { -- if ( *in >= '0' && *in <= '9' ) -- { -- value = ( value << 4u ) + ( *in - '0' ); -- } -- else if (*in >= 'A' && *in <= 'F') -- { -- value = ( value << 4u ) + ( *in - 'A' ) + 10; -- } -- else if (*in >= 'a' && *in <= 'f') -- { -- value = ( value << 4u ) + ( *in - 'a' ) + 10; -- } -- else break; -- ++in; -- } -- if (out)*out = in; -- return value; --} -- --// ------------------------------------------------------------------------------------ --// Convert just one hex digit --// Return value is UINT_MAX if the input character is not a hex digit. --// ------------------------------------------------------------------------------------ --inline unsigned int HexDigitToDecimal(char in) --{ -- unsigned int out = UINT_MAX; -- if (in >= '0' && in <= '9') -- out = in - '0'; -- -- else if (in >= 'a' && in <= 'f') -- out = 10u + in - 'a'; -- -- else if (in >= 'A' && in <= 'F') -- out = 10u + in - 'A'; -- -- // return value is UINT_MAX if the input is not a hex digit -- return out; --} -- --// ------------------------------------------------------------------------------------ --// Convert a hex-encoded octet (2 characters, i.e. df or 1a). --// ------------------------------------------------------------------------------------ --inline uint8_t HexOctetToDecimal(const char* in) --{ -- return ((uint8_t)HexDigitToDecimal(in[0])<<4)+(uint8_t)HexDigitToDecimal(in[1]); --} -- -- --// ------------------------------------------------------------------------------------ --// signed variant of strtoul10 --// ------------------------------------------------------------------------------------ --inline int strtol10( const char* in, const char** out=0) --{ -- bool inv = (*in=='-'); -- if (inv || *in=='+') -- ++in; -- -- int value = strtoul10(in,out); -- if (inv) { -- value = -value; -- } -- return value; --} -- --// ------------------------------------------------------------------------------------ --// Parse a C++-like integer literal - hex and oct prefixes. --// 0xNNNN - hex --// 0NNN - oct --// NNN - dec --// ------------------------------------------------------------------------------------ --inline unsigned int strtoul_cppstyle( const char* in, const char** out=0) --{ -- if ('0' == in[0]) -- { -- return 'x' == in[1] ? strtoul16(in+2,out) : strtoul8(in+1,out); -- } -- return strtoul10(in, out); --} -- --// ------------------------------------------------------------------------------------ --// Special version of the function, providing higher accuracy and safety --// It is mainly used by fast_atof to prevent ugly and unwanted integer overflows. --// ------------------------------------------------------------------------------------ --inline uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int* max_inout=0) --{ -- unsigned int cur = 0; -- uint64_t value = 0; -- -- bool running = true; -- while ( running ) -- { -- if ( *in < '0' || *in > '9' ) -- break; -- -- const uint64_t new_value = ( value * 10 ) + ( *in - '0' ); -- -- if (new_value < value) /* numeric overflow, we rely on you */ -- return value; -- -- value = new_value; -- -- ++in; -- ++cur; -- -- if (max_inout && *max_inout == cur) { -- -- if (out) { /* skip to end */ -- while (*in >= '0' && *in <= '9') -- ++in; -- *out = in; -- } -- -- return value; -- } -- } -- if (out) -- *out = in; -- -- if (max_inout) -- *max_inout = cur; -- -- return value; --} -- --// Number of relevant decimals for floating-point parsing. --#define AI_FAST_ATOF_RELAVANT_DECIMALS 15 -- --// ------------------------------------------------------------------------------------ --//! Provides a fast function for converting a string into a float, --//! about 6 times faster than atof in win32. --// If you find any bugs, please send them to me, niko (at) irrlicht3d.org. --// ------------------------------------------------------------------------------------ --template --inline const char* fast_atoreal_move( const char* c, Real& out) --{ -- Real f; -- -- bool inv = (*c=='-'); -- if (inv || *c=='+') { -- ++c; -- } -- -- f = static_cast( strtoul10_64 ( c, &c) ); -- if (*c == '.' || (c[0] == ',' && c[1] >= '0' && c[1] <= '9')) // allow for commas, too -- { -- ++c; -- -- // NOTE: The original implementation is highly inaccurate here. The precision of a single -- // IEEE 754 float is not high enough, everything behind the 6th digit tends to be more -- // inaccurate than it would need to be. Casting to double seems to solve the problem. -- // strtol_64 is used to prevent integer overflow. -- -- // Another fix: this tends to become 0 for long numbers if we don't limit the maximum -- // number of digits to be read. AI_FAST_ATOF_RELAVANT_DECIMALS can be a value between -- // 1 and 15. -- unsigned int diff = AI_FAST_ATOF_RELAVANT_DECIMALS; -- double pl = static_cast( strtoul10_64 ( c, &c, &diff )); -- -- pl *= fast_atof_table[diff]; -- f += static_cast( pl ); -- } -- -- // A major 'E' must be allowed. Necessary for proper reading of some DXF files. -- // Thanks to Zhao Lei to point out that this if() must be outside the if (*c == '.' ..) -- if (*c == 'e' || *c == 'E') { -- -- ++c; -- const bool einv = (*c=='-'); -- if (einv || *c=='+') { -- ++c; -- } -- -- // The reason float constants are used here is that we've seen cases where compilers -- // would perform such casts on compile-time constants at runtime, which would be -- // bad considering how frequently fast_atoreal_move is called in Assimp. -- Real exp = static_cast( strtoul10_64(c, &c) ); -- if (einv) { -- exp = -exp; -- } -- f *= pow(static_cast(10.0f), exp); -- } -- -- if (inv) { -- f = -f; -- } -- out = f; -- return c; --} -- --// ------------------------------------------------------------------------------------ --// The same but more human. --inline float fast_atof(const char* c) --{ -- float ret; -- fast_atoreal_move(c, ret); -- return ret; --} -- -- --inline float fast_atof( const char* c, const char** cout) --{ -- float ret; -- *cout = fast_atoreal_move(c, ret); -- -- return ret; --} -- --inline float fast_atof( const char** inout) --{ -- float ret; -- *inout = fast_atoreal_move(*inout, ret); -- -- return ret; --} -- -- --inline double fast_atod(const char* c) --{ -- double ret; -- fast_atoreal_move(c, ret); -- return ret; --} -- -- --inline double fast_atod( const char* c, const char** cout) --{ -- double ret; -- *cout = fast_atoreal_move(c, ret); -- -- return ret; --} -- --inline double fast_atod( const char** inout) --{ -- double ret; -- *inout = fast_atoreal_move(*inout, ret); -- -- return ret; --} -- --} // end of namespace Assimp -- --#endif -- -diff -ruN assimp--3.0.1270-source-only/code/fast_atof.h.NO assimp--3.0.1270-source-only-fedora/code/fast_atof.h.NO ---- assimp--3.0.1270-source-only/code/fast_atof.h.NO 1969-12-31 19:00:00.000000000 -0500 -+++ assimp--3.0.1270-source-only-fedora/code/fast_atof.h.NO 2013-05-01 19:45:21.118989917 -0400 -@@ -0,0 +1,336 @@ -+// Copyright (C) 2002-2007 Nikolaus Gebhardt -+// This file is part of the "Irrlicht Engine" and the "irrXML" project. -+// For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h -+ -+// ------------------------------------------------------------------------------------ -+// Original description: (Schrompf) -+// Adapted to the ASSIMP library because the builtin atof indeed takes AGES to parse a -+// float inside a large string. Before parsing, it does a strlen on the given point. -+// Changes: -+// 22nd October 08 (Aramis_acg): Added temporary cast to double, added strtoul10_64 -+// to ensure long numbers are handled correctly -+// ------------------------------------------------------------------------------------ -+ -+ -+#ifndef __FAST_A_TO_F_H_INCLUDED__ -+#define __FAST_A_TO_F_H_INCLUDED__ -+ -+#include -+ -+namespace Assimp -+{ -+ -+const float fast_atof_table[16] = { // we write [16] here instead of [] to work around a swig bug -+ 0.f, -+ 0.1f, -+ 0.01f, -+ 0.001f, -+ 0.0001f, -+ 0.00001f, -+ 0.000001f, -+ 0.0000001f, -+ 0.00000001f, -+ 0.000000001f, -+ 0.0000000001f, -+ 0.00000000001f, -+ 0.000000000001f, -+ 0.0000000000001f, -+ 0.00000000000001f, -+ 0.000000000000001f -+}; -+ -+ -+// ------------------------------------------------------------------------------------ -+// Convert a string in decimal format to a number -+// ------------------------------------------------------------------------------------ -+inline unsigned int strtoul10( const char* in, const char** out=0) -+{ -+ unsigned int value = 0; -+ -+ bool running = true; -+ while ( running ) -+ { -+ if ( *in < '0' || *in > '9' ) -+ break; -+ -+ value = ( value * 10 ) + ( *in - '0' ); -+ ++in; -+ } -+ if (out)*out = in; -+ return value; -+} -+ -+// ------------------------------------------------------------------------------------ -+// Convert a string in octal format to a number -+// ------------------------------------------------------------------------------------ -+inline unsigned int strtoul8( const char* in, const char** out=0) -+{ -+ unsigned int value = 0; -+ -+ bool running = true; -+ while ( running ) -+ { -+ if ( *in < '0' || *in > '7' ) -+ break; -+ -+ value = ( value << 3 ) + ( *in - '0' ); -+ ++in; -+ } -+ if (out)*out = in; -+ return value; -+} -+ -+// ------------------------------------------------------------------------------------ -+// Convert a string in hex format to a number -+// ------------------------------------------------------------------------------------ -+inline unsigned int strtoul16( const char* in, const char** out=0) -+{ -+ unsigned int value = 0; -+ -+ bool running = true; -+ while ( running ) -+ { -+ if ( *in >= '0' && *in <= '9' ) -+ { -+ value = ( value << 4u ) + ( *in - '0' ); -+ } -+ else if (*in >= 'A' && *in <= 'F') -+ { -+ value = ( value << 4u ) + ( *in - 'A' ) + 10; -+ } -+ else if (*in >= 'a' && *in <= 'f') -+ { -+ value = ( value << 4u ) + ( *in - 'a' ) + 10; -+ } -+ else break; -+ ++in; -+ } -+ if (out)*out = in; -+ return value; -+} -+ -+// ------------------------------------------------------------------------------------ -+// Convert just one hex digit -+// Return value is UINT_MAX if the input character is not a hex digit. -+// ------------------------------------------------------------------------------------ -+inline unsigned int HexDigitToDecimal(char in) -+{ -+ unsigned int out = UINT_MAX; -+ if (in >= '0' && in <= '9') -+ out = in - '0'; -+ -+ else if (in >= 'a' && in <= 'f') -+ out = 10u + in - 'a'; -+ -+ else if (in >= 'A' && in <= 'F') -+ out = 10u + in - 'A'; -+ -+ // return value is UINT_MAX if the input is not a hex digit -+ return out; -+} -+ -+// ------------------------------------------------------------------------------------ -+// Convert a hex-encoded octet (2 characters, i.e. df or 1a). -+// ------------------------------------------------------------------------------------ -+inline uint8_t HexOctetToDecimal(const char* in) -+{ -+ return ((uint8_t)HexDigitToDecimal(in[0])<<4)+(uint8_t)HexDigitToDecimal(in[1]); -+} -+ -+ -+// ------------------------------------------------------------------------------------ -+// signed variant of strtoul10 -+// ------------------------------------------------------------------------------------ -+inline int strtol10( const char* in, const char** out=0) -+{ -+ bool inv = (*in=='-'); -+ if (inv || *in=='+') -+ ++in; -+ -+ int value = strtoul10(in,out); -+ if (inv) { -+ value = -value; -+ } -+ return value; -+} -+ -+// ------------------------------------------------------------------------------------ -+// Parse a C++-like integer literal - hex and oct prefixes. -+// 0xNNNN - hex -+// 0NNN - oct -+// NNN - dec -+// ------------------------------------------------------------------------------------ -+inline unsigned int strtoul_cppstyle( const char* in, const char** out=0) -+{ -+ if ('0' == in[0]) -+ { -+ return 'x' == in[1] ? strtoul16(in+2,out) : strtoul8(in+1,out); -+ } -+ return strtoul10(in, out); -+} -+ -+// ------------------------------------------------------------------------------------ -+// Special version of the function, providing higher accuracy and safety -+// It is mainly used by fast_atof to prevent ugly and unwanted integer overflows. -+// ------------------------------------------------------------------------------------ -+inline uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int* max_inout=0) -+{ -+ unsigned int cur = 0; -+ uint64_t value = 0; -+ -+ bool running = true; -+ while ( running ) -+ { -+ if ( *in < '0' || *in > '9' ) -+ break; -+ -+ const uint64_t new_value = ( value * 10 ) + ( *in - '0' ); -+ -+ if (new_value < value) /* numeric overflow, we rely on you */ -+ return value; -+ -+ value = new_value; -+ -+ ++in; -+ ++cur; -+ -+ if (max_inout && *max_inout == cur) { -+ -+ if (out) { /* skip to end */ -+ while (*in >= '0' && *in <= '9') -+ ++in; -+ *out = in; -+ } -+ -+ return value; -+ } -+ } -+ if (out) -+ *out = in; -+ -+ if (max_inout) -+ *max_inout = cur; -+ -+ return value; -+} -+ -+// Number of relevant decimals for floating-point parsing. -+#define AI_FAST_ATOF_RELAVANT_DECIMALS 15 -+ -+// ------------------------------------------------------------------------------------ -+//! Provides a fast function for converting a string into a float, -+//! about 6 times faster than atof in win32. -+// If you find any bugs, please send them to me, niko (at) irrlicht3d.org. -+// ------------------------------------------------------------------------------------ -+template -+inline const char* fast_atoreal_move( const char* c, Real& out) -+{ -+ Real f; -+ -+ bool inv = (*c=='-'); -+ if (inv || *c=='+') { -+ ++c; -+ } -+ -+ f = static_cast( strtoul10_64 ( c, &c) ); -+ if (*c == '.' || (c[0] == ',' && c[1] >= '0' && c[1] <= '9')) // allow for commas, too -+ { -+ ++c; -+ -+ // NOTE: The original implementation is highly inaccurate here. The precision of a single -+ // IEEE 754 float is not high enough, everything behind the 6th digit tends to be more -+ // inaccurate than it would need to be. Casting to double seems to solve the problem. -+ // strtol_64 is used to prevent integer overflow. -+ -+ // Another fix: this tends to become 0 for long numbers if we don't limit the maximum -+ // number of digits to be read. AI_FAST_ATOF_RELAVANT_DECIMALS can be a value between -+ // 1 and 15. -+ unsigned int diff = AI_FAST_ATOF_RELAVANT_DECIMALS; -+ double pl = static_cast( strtoul10_64 ( c, &c, &diff )); -+ -+ pl *= fast_atof_table[diff]; -+ f += static_cast( pl ); -+ } -+ -+ // A major 'E' must be allowed. Necessary for proper reading of some DXF files. -+ // Thanks to Zhao Lei to point out that this if() must be outside the if (*c == '.' ..) -+ if (*c == 'e' || *c == 'E') { -+ -+ ++c; -+ const bool einv = (*c=='-'); -+ if (einv || *c=='+') { -+ ++c; -+ } -+ -+ // The reason float constants are used here is that we've seen cases where compilers -+ // would perform such casts on compile-time constants at runtime, which would be -+ // bad considering how frequently fast_atoreal_move is called in Assimp. -+ Real exp = static_cast( strtoul10_64(c, &c) ); -+ if (einv) { -+ exp = -exp; -+ } -+ f *= pow(static_cast(10.0f), exp); -+ } -+ -+ if (inv) { -+ f = -f; -+ } -+ out = f; -+ return c; -+} -+ -+// ------------------------------------------------------------------------------------ -+// The same but more human. -+inline float fast_atof(const char* c) -+{ -+ float ret; -+ fast_atoreal_move(c, ret); -+ return ret; -+} -+ -+ -+inline float fast_atof( const char* c, const char** cout) -+{ -+ float ret; -+ *cout = fast_atoreal_move(c, ret); -+ -+ return ret; -+} -+ -+inline float fast_atof( const char** inout) -+{ -+ float ret; -+ *inout = fast_atoreal_move(*inout, ret); -+ -+ return ret; -+} -+ -+ -+inline double fast_atod(const char* c) -+{ -+ double ret; -+ fast_atoreal_move(c, ret); -+ return ret; -+} -+ -+ -+inline double fast_atod( const char* c, const char** cout) -+{ -+ double ret; -+ *cout = fast_atoreal_move(c, ret); -+ -+ return ret; -+} -+ -+inline double fast_atod( const char** inout) -+{ -+ double ret; -+ *inout = fast_atoreal_move(*inout, ret); -+ -+ return ret; -+} -+ -+} // end of namespace Assimp -+ -+#endif -+ -diff -ruN assimp--3.0.1270-source-only/code/FileSystemFilter.h assimp--3.0.1270-source-only-fedora/code/FileSystemFilter.h ---- assimp--3.0.1270-source-only/code/FileSystemFilter.h 2012-03-11 22:04:36.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/FileSystemFilter.h 2013-05-01 19:29:06.695540600 -0400 -@@ -46,7 +46,7 @@ - #define AI_FILESYSTEMFILTER_H_INC - - #include "../include/assimp/IOSystem.hpp" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - #include "ParsingUtils.h" - namespace Assimp { - -diff -ruN assimp--3.0.1270-source-only/code/IFCGeometry.cpp assimp--3.0.1270-source-only-fedora/code/IFCGeometry.cpp ---- assimp--3.0.1270-source-only/code/IFCGeometry.cpp 2012-03-20 23:31:58.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/IFCGeometry.cpp 2013-05-29 21:49:47.663383209 -0400 -@@ -49,8 +49,8 @@ - #include "PolyTools.h" - #include "ProcessHelper.h" - --#include "../contrib/poly2tri/poly2tri/poly2tri.h" --#include "../contrib/clipper/clipper.hpp" -+#include "poly2tri/poly2tri.h" -+#include "clipper.hpp" - - #include - -diff -ruN assimp--3.0.1270-source-only/code/IRRLoader.cpp assimp--3.0.1270-source-only-fedora/code/IRRLoader.cpp ---- assimp--3.0.1270-source-only/code/IRRLoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/IRRLoader.cpp 2013-05-01 19:28:57.687187452 -0400 -@@ -47,7 +47,7 @@ - - #include "IRRLoader.h" - #include "ParsingUtils.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - #include "GenericProperty.h" - - #include "SceneCombiner.h" -diff -ruN assimp--3.0.1270-source-only/code/IRRMeshLoader.cpp assimp--3.0.1270-source-only-fedora/code/IRRMeshLoader.cpp ---- assimp--3.0.1270-source-only/code/IRRMeshLoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/IRRMeshLoader.cpp 2013-05-01 19:28:57.688187492 -0400 -@@ -45,7 +45,7 @@ - - #include "IRRMeshLoader.h" - #include "ParsingUtils.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - using namespace Assimp; - using namespace irr; -diff -ruN assimp--3.0.1270-source-only/code/IRRShared.cpp assimp--3.0.1270-source-only-fedora/code/IRRShared.cpp ---- assimp--3.0.1270-source-only/code/IRRShared.cpp 2012-02-03 05:38:32.000000000 -0500 -+++ assimp--3.0.1270-source-only-fedora/code/IRRShared.cpp 2013-05-01 19:28:57.690187570 -0400 -@@ -47,7 +47,7 @@ - - #include "IRRShared.h" - #include "ParsingUtils.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - using namespace Assimp; - using namespace irr; -diff -ruN assimp--3.0.1270-source-only/code/irrXMLWrapper.h assimp--3.0.1270-source-only-fedora/code/irrXMLWrapper.h ---- assimp--3.0.1270-source-only/code/irrXMLWrapper.h 2012-02-03 19:04:08.000000000 -0500 -+++ assimp--3.0.1270-source-only-fedora/code/irrXMLWrapper.h 2013-05-01 19:52:02.683902014 -0400 -@@ -42,7 +42,7 @@ - #define INCLUDED_AI_IRRXML_WRAPPER - - // some long includes .... --#include "./../contrib/irrXML/irrXML.h" -+#include "irrXML.h" - #include "./../include/assimp/IOStream.hpp" - namespace Assimp { - -@@ -115,7 +115,7 @@ - - // ---------------------------------------------------------------------------------- - //! Returns size of file in bytes -- virtual int getSize() { -+ virtual long getSize() const { - return (int)data.size(); - } - -diff -ruN assimp--3.0.1270-source-only/code/LWSLoader.cpp assimp--3.0.1270-source-only-fedora/code/LWSLoader.cpp ---- assimp--3.0.1270-source-only/code/LWSLoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/LWSLoader.cpp 2013-05-01 19:28:57.702188040 -0400 -@@ -47,7 +47,7 @@ - - #include "LWSLoader.h" - #include "ParsingUtils.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - #include "SceneCombiner.h" - #include "GenericProperty.h" -diff -ruN assimp--3.0.1270-source-only/code/MaterialSystem.cpp assimp--3.0.1270-source-only-fedora/code/MaterialSystem.cpp ---- assimp--3.0.1270-source-only/code/MaterialSystem.cpp 2012-02-03 05:38:32.000000000 -0500 -+++ assimp--3.0.1270-source-only-fedora/code/MaterialSystem.cpp 2013-05-01 19:28:57.706188197 -0400 -@@ -45,7 +45,7 @@ - #include "AssimpPCH.h" - - #include "Hash.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - #include "ParsingUtils.h" - #include "MaterialSystem.h" - -diff -ruN assimp--3.0.1270-source-only/code/MD5Loader.cpp assimp--3.0.1270-source-only-fedora/code/MD5Loader.cpp ---- assimp--3.0.1270-source-only/code/MD5Loader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/MD5Loader.cpp 2013-05-01 19:28:57.712188432 -0400 -@@ -50,7 +50,7 @@ - #include "RemoveComments.h" - #include "MD5Loader.h" - #include "StringComparison.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - #include "SkeletonMeshBuilder.h" - - using namespace Assimp; -diff -ruN assimp--3.0.1270-source-only/code/MD5Parser.cpp assimp--3.0.1270-source-only-fedora/code/MD5Parser.cpp ---- assimp--3.0.1270-source-only/code/MD5Parser.cpp 2012-02-03 05:38:32.000000000 -0500 -+++ assimp--3.0.1270-source-only-fedora/code/MD5Parser.cpp 2013-05-01 19:28:57.713188472 -0400 -@@ -47,7 +47,7 @@ - // internal headers - #include "MD5Loader.h" - #include "MaterialSystem.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - #include "ParsingUtils.h" - #include "StringComparison.h" - -diff -ruN assimp--3.0.1270-source-only/code/NFFLoader.cpp assimp--3.0.1270-source-only-fedora/code/NFFLoader.cpp ---- assimp--3.0.1270-source-only/code/NFFLoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/NFFLoader.cpp 2013-05-01 19:28:57.727189020 -0400 -@@ -48,7 +48,7 @@ - #include "NFFLoader.h" - #include "ParsingUtils.h" - #include "StandardShapes.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - #include "RemoveComments.h" - - using namespace Assimp; -diff -ruN assimp--3.0.1270-source-only/code/ObjFileMtlImporter.cpp assimp--3.0.1270-source-only-fedora/code/ObjFileMtlImporter.cpp ---- assimp--3.0.1270-source-only/code/ObjFileMtlImporter.cpp 2012-05-01 11:39:52.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/ObjFileMtlImporter.cpp 2013-05-01 19:28:57.730189138 -0400 -@@ -45,7 +45,7 @@ - #include "ObjFileMtlImporter.h" - #include "ObjTools.h" - #include "ObjFileData.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - namespace Assimp { - -diff -ruN assimp--3.0.1270-source-only/code/ObjTools.h assimp--3.0.1270-source-only-fedora/code/ObjTools.h ---- assimp--3.0.1270-source-only/code/ObjTools.h 2012-06-03 08:10:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/ObjTools.h 2013-05-01 19:29:06.742542443 -0400 -@@ -44,7 +44,7 @@ - #ifndef OBJ_TOOLS_H_INC - #define OBJ_TOOLS_H_INC - --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - namespace Assimp - { -diff -ruN assimp--3.0.1270-source-only/code/OFFLoader.cpp assimp--3.0.1270-source-only-fedora/code/OFFLoader.cpp ---- assimp--3.0.1270-source-only/code/OFFLoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/OFFLoader.cpp 2013-05-01 19:28:57.733189256 -0400 -@@ -49,7 +49,7 @@ - // internal headers - #include "OFFLoader.h" - #include "ParsingUtils.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - - using namespace Assimp; -diff -ruN assimp--3.0.1270-source-only/code/OgreXmlHelper.hpp assimp--3.0.1270-source-only-fedora/code/OgreXmlHelper.hpp ---- assimp--3.0.1270-source-only/code/OgreXmlHelper.hpp 2012-05-23 11:23:36.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/OgreXmlHelper.hpp 2013-05-01 19:29:05.535495114 -0400 -@@ -1,6 +1,6 @@ - - #include "irrXMLWrapper.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - namespace Assimp - { -diff -ruN assimp--3.0.1270-source-only/code/PlyParser.cpp assimp--3.0.1270-source-only-fedora/code/PlyParser.cpp ---- assimp--3.0.1270-source-only/code/PlyParser.cpp 2012-02-03 05:38:32.000000000 -0500 -+++ assimp--3.0.1270-source-only-fedora/code/PlyParser.cpp 2013-05-01 19:28:57.745189726 -0400 -@@ -45,7 +45,7 @@ - #ifndef ASSIMP_BUILD_NO_PLY_IMPORTER - - #include "PlyLoader.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - using namespace Assimp; - -diff -ruN assimp--3.0.1270-source-only/code/Q3BSPZipArchive.h assimp--3.0.1270-source-only-fedora/code/Q3BSPZipArchive.h ---- assimp--3.0.1270-source-only/code/Q3BSPZipArchive.h 2012-02-03 19:04:08.000000000 -0500 -+++ assimp--3.0.1270-source-only-fedora/code/Q3BSPZipArchive.h 2013-05-01 20:01:06.929473083 -0400 -@@ -40,7 +40,7 @@ - #ifndef AI_Q3BSP_ZIPARCHIVE_H_INC - #define AI_Q3BSP_ZIPARCHIVE_H_INC - --#include "../contrib/unzip/unzip.h" -+#include "unzip.h" - #include "../include/assimp/IOStream.hpp" - #include "../include/assimp/IOSystem.hpp" - #include -diff -ruN assimp--3.0.1270-source-only/code/Q3DLoader.cpp assimp--3.0.1270-source-only-fedora/code/Q3DLoader.cpp ---- assimp--3.0.1270-source-only/code/Q3DLoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/Q3DLoader.cpp 2013-05-01 19:28:57.754190079 -0400 -@@ -49,7 +49,7 @@ - // internal headers - #include "Q3DLoader.h" - #include "StreamReader.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - using namespace Assimp; - -diff -ruN assimp--3.0.1270-source-only/code/RawLoader.cpp assimp--3.0.1270-source-only-fedora/code/RawLoader.cpp ---- assimp--3.0.1270-source-only/code/RawLoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/RawLoader.cpp 2013-05-01 19:28:57.755190118 -0400 -@@ -49,7 +49,7 @@ - // internal headers - #include "RawLoader.h" - #include "ParsingUtils.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - using namespace Assimp; - -diff -ruN assimp--3.0.1270-source-only/code/SceneCombiner.cpp assimp--3.0.1270-source-only-fedora/code/SceneCombiner.cpp ---- assimp--3.0.1270-source-only/code/SceneCombiner.cpp 2012-02-03 05:38:32.000000000 -0500 -+++ assimp--3.0.1270-source-only-fedora/code/SceneCombiner.cpp 2013-05-01 19:28:57.760190314 -0400 -@@ -48,7 +48,7 @@ - // ---------------------------------------------------------------------------- - #include "AssimpPCH.h" - #include "SceneCombiner.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - #include "Hash.h" - #include "time.h" - -diff -ruN assimp--3.0.1270-source-only/code/SMDLoader.cpp assimp--3.0.1270-source-only-fedora/code/SMDLoader.cpp ---- assimp--3.0.1270-source-only/code/SMDLoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/SMDLoader.cpp 2013-05-01 19:28:57.765190510 -0400 -@@ -48,7 +48,7 @@ - - // internal headers - #include "SMDLoader.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - #include "SkeletonMeshBuilder.h" - - using namespace Assimp; -diff -ruN assimp--3.0.1270-source-only/code/STEPFileReader.cpp assimp--3.0.1270-source-only-fedora/code/STEPFileReader.cpp ---- assimp--3.0.1270-source-only/code/STEPFileReader.cpp 2012-06-17 14:15:50.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/STEPFileReader.cpp 2013-05-01 19:28:57.773190824 -0400 -@@ -45,7 +45,7 @@ - #include "AssimpPCH.h" - #include "STEPFileReader.h" - #include "TinyFormatter.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - using namespace Assimp; - namespace EXPRESS = STEP::EXPRESS; -diff -ruN assimp--3.0.1270-source-only/code/STLLoader.cpp assimp--3.0.1270-source-only-fedora/code/STLLoader.cpp ---- assimp--3.0.1270-source-only/code/STLLoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/STLLoader.cpp 2013-05-01 19:28:57.774190863 -0400 -@@ -47,7 +47,7 @@ - // internal headers - #include "STLLoader.h" - #include "ParsingUtils.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - using namespace Assimp; - -diff -ruN assimp--3.0.1270-source-only/code/UnrealLoader.cpp assimp--3.0.1270-source-only-fedora/code/UnrealLoader.cpp ---- assimp--3.0.1270-source-only/code/UnrealLoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/UnrealLoader.cpp 2013-05-01 19:28:57.782191176 -0400 -@@ -53,7 +53,7 @@ - #include "UnrealLoader.h" - #include "StreamReader.h" - #include "ParsingUtils.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - #include "ConvertToLHProcess.h" - - using namespace Assimp; -diff -ruN assimp--3.0.1270-source-only/code/ValidateDataStructure.cpp assimp--3.0.1270-source-only-fedora/code/ValidateDataStructure.cpp ---- assimp--3.0.1270-source-only/code/ValidateDataStructure.cpp 2012-02-03 05:38:32.000000000 -0500 -+++ assimp--3.0.1270-source-only-fedora/code/ValidateDataStructure.cpp 2013-05-01 19:28:57.784191255 -0400 -@@ -49,7 +49,7 @@ - // internal headers - #include "ValidateDataStructure.h" - #include "BaseImporter.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - #include "ProcessHelper.h" - - // CRT headers -diff -ruN assimp--3.0.1270-source-only/code/XFileParser.cpp assimp--3.0.1270-source-only-fedora/code/XFileParser.cpp ---- assimp--3.0.1270-source-only/code/XFileParser.cpp 2012-04-23 01:22:42.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/XFileParser.cpp 2013-05-01 19:28:57.790191490 -0400 -@@ -46,7 +46,7 @@ - - #include "XFileParser.h" - #include "XFileHelper.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - using namespace Assimp; - using namespace Assimp::XFile; -diff -ruN assimp--3.0.1270-source-only/code/XGLLoader.cpp assimp--3.0.1270-source-only-fedora/code/XGLLoader.cpp ---- assimp--3.0.1270-source-only/code/XGLLoader.cpp 2012-04-23 00:26:28.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/code/XGLLoader.cpp 2013-05-01 19:28:57.792191568 -0400 -@@ -46,7 +46,7 @@ - - #include "XGLLoader.h" - #include "ParsingUtils.h" --#include "fast_atof.h" -+#include "fast_atof_assimp.h" - - #include "StreamReader.h" - #include "MemoryIOWrapper.h" -diff -ruN assimp--3.0.1270-source-only/tools/assimp_cmd/CMakeLists.txt assimp--3.0.1270-source-only-fedora/tools/assimp_cmd/CMakeLists.txt ---- assimp--3.0.1270-source-only/tools/assimp_cmd/CMakeLists.txt 2012-02-18 12:55:48.000000000 -0500 -+++ assimp--3.0.1270-source-only-fedora/tools/assimp_cmd/CMakeLists.txt 2013-05-28 22:04:01.204077041 -0400 -@@ -18,8 +18,9 @@ - ) - - SET_PROPERTY(TARGET assimp_cmd PROPERTY DEBUG_POSTFIX ${DEBUG_POSTFIX}) -- --TARGET_LINK_LIBRARIES( assimp_cmd assimp ${ZLIB_LIBRARIES}) -+INCLUDE_DIRECTORIES(${IRRXML_INCLUDE_PATH}) -+TARGET_LINK_LIBRARIES( assimp_cmd assimp ${ZLIB_LIBRARIES} ${POLY2TRI_LIB}) -+TARGET_LINK_LIBRARIES( assimp_cmd ${IRRXML_LIB}) - SET_TARGET_PROPERTIES( assimp_cmd PROPERTIES - OUTPUT_NAME assimp - ) -diff -ruN assimp--3.0.1270-source-only/tools/assimp_cmd/ImageExtractor.cpp assimp--3.0.1270-source-only-fedora/tools/assimp_cmd/ImageExtractor.cpp ---- assimp--3.0.1270-source-only/tools/assimp_cmd/ImageExtractor.cpp 2012-03-21 00:41:40.000000000 -0400 -+++ assimp--3.0.1270-source-only-fedora/tools/assimp_cmd/ImageExtractor.cpp 2013-05-01 20:06:46.771944353 -0400 -@@ -44,7 +44,7 @@ - */ - - #include "Main.h" --#include <../code/fast_atof.h> -+#include - #include <../code/StringComparison.h> - - const char* AICMD_MSG_DUMP_HELP_E = diff --git a/assimp-3.1.1-docfix.patch b/assimp-3.1.1-docfix.patch new file mode 100644 index 0000000..6b494bd --- /dev/null +++ b/assimp-3.1.1-docfix.patch @@ -0,0 +1,21 @@ +diff -up ./doc/Doxyfile.docfix ./doc/Doxyfile +--- ./doc/Doxyfile.docfix 2015-07-03 12:13:24.824791264 -0400 ++++ ./doc/Doxyfile 2015-07-03 12:15:15.933883243 -0400 +@@ -919,7 +919,7 @@ GENERATE_HTML = YES + # If a relative path is entered the value of OUTPUT_DIRECTORY will be + # put in front of it. If left blank `html' will be used as the default path. + +-HTML_OUTPUT = AssimpDoc_Html ++HTML_OUTPUT = html + + # The HTML_FILE_EXTENSION tag can be used to specify the file extension for + # each generated HTML page (for example: .htm,.php,.asp). If it is left blank +@@ -1064,7 +1064,7 @@ DOCSET_PUBLISHER_NAME = Publisher + # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) + # of the generated HTML documentation. + +-GENERATE_HTMLHELP = YES ++GENERATE_HTMLHELP = NO + + # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can + # be used to specify the file name of the resulting .chm file. You diff --git a/assimp-3.1.1-pythonpath.patch b/assimp-3.1.1-pythonpath.patch new file mode 100644 index 0000000..becaabe --- /dev/null +++ b/assimp-3.1.1-pythonpath.patch @@ -0,0 +1,18 @@ +diff -up ./port/PyAssimp/pyassimp/helper.py.pythonpath ./port/PyAssimp/pyassimp/helper.py +--- ./port/PyAssimp/pyassimp/helper.py.pythonpath 2015-07-03 12:17:19.850506767 -0400 ++++ ./port/PyAssimp/pyassimp/helper.py 2015-07-03 12:19:16.248849772 -0400 +@@ -21,12 +21,14 @@ additional_dirs, ext_whitelist = [],[] + # depending on the platform we're running on. + if os.name=='posix': + additional_dirs.append('/usr/lib/') ++ additional_dirs.append('/usr/lib64') + additional_dirs.append('/usr/local/lib/') + + # note - this won't catch libassimp.so.N.n, but + # currently there's always a symlink called + # libassimp.so in /usr/local/lib. + ext_whitelist.append('.so') ++ ext_whitelist.append('0') + # libassimp.dylib in /usr/local/lib + ext_whitelist.append('.dylib') + diff --git a/assimp-3.1.1-unbundle.patch b/assimp-3.1.1-unbundle.patch new file mode 100644 index 0000000..e9dda96 --- /dev/null +++ b/assimp-3.1.1-unbundle.patch @@ -0,0 +1,935 @@ +diff -up ./CMakeLists.txt.unbundle ./CMakeLists.txt +--- ./CMakeLists.txt.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./CMakeLists.txt 2015-07-03 12:23:40.221699014 -0400 +@@ -156,6 +156,36 @@ if (PKG_CONFIG_FOUND) + PKG_CHECK_MODULES(UNZIP minizip) + endif (PKG_CONFIG_FOUND) + ++# Search for irrXML ++FIND_LIBRARY(IRRXML_LIB IrrXML HINTS ${IRRXML_LIB_PATH}) ++FIND_FILE(IRRXML_H irrXML.h PATHS ${IRRXML_INCLUDE_PATH}) ++IF(IRRXML_LIB AND IRRXML_H) ++ message (STATUS "Found External IrrXML") ++ set(HAVE_IRRXML true) ++ELSE (IRRXML_LIB AND IRRXML_H) ++ SET(HAVE_IRRXML false) ++ENDIF(IRRXML_LIB AND IRRXML_H) ++ ++# Search for poly2tri ++FIND_LIBRARY(POLY2TRI_LIB poly2tri HINTS ${POLY2TRI_LIB_PATH}) ++FIND_FILE(POLY2TRI_H poly2tri.h PATHS ${POLY2TRI_INCLUDE_PATH}) ++IF (POLY2TRI_LIB AND POLY2TRI_H) ++ message(status "Found External poly2tri") ++ SET(HAVE_POLY2TRI true) ++ELSE(POLY2TRI_LIB AND POLY2TRI_H) ++ SET(HAVE_POLY2TRI false) ++ENDIF(POLY2TRI_LIB AND POLY2TRI_H) ++ ++# Search for clipper ++FIND_LIBRARY(CLIPPER_LIB polyclipping HINTS ${CLIPPER_LIB_PATH}) ++FIND_FILE(CLIPPER_H clipper.hpp PATHS ${CLIPPER_INCLUDE_PATH}) ++IF (CLIPPER_LIB AND CLIPPER_H) ++ message(status "Found External clipper") ++ SET(HAVE_CLIPPER true) ++ELSE(CLIPPER_LIB AND CLIPPER_H) ++ SET(HAVE_CLIPPER false) ++ENDIF(CLIPPER_LIB AND CLIPPER_H) ++ + IF ( ASSIMP_NO_EXPORT ) + ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT) + MESSAGE( STATUS "Build an import-only version of Assimp." ) +diff -up ./code/ACLoader.cpp.unbundle ./code/ACLoader.cpp +--- ./code/ACLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/ACLoader.cpp 2015-07-03 12:23:40.222699052 -0400 +@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + // internal headers + #include "ACLoader.h" + #include "ParsingUtils.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + #include "Subdivision.h" + + using namespace Assimp; +diff -up ./code/ASELoader.cpp.unbundle ./code/ASELoader.cpp +--- ./code/ASELoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/ASELoader.cpp 2015-07-03 12:23:40.222699052 -0400 +@@ -53,7 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "TargetAnimation.h" + + // utilities +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + using namespace Assimp; + using namespace Assimp::ASE; +diff -up ./code/ASEParser.cpp.unbundle ./code/ASEParser.cpp +--- ./code/ASEParser.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/ASEParser.cpp 2015-07-03 12:23:40.223699089 -0400 +@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "TextureTransform.h" + #include "ASELoader.h" + #include "MaterialSystem.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + using namespace Assimp; + using namespace Assimp::ASE; +diff -up ./code/BlenderDNA.cpp.unbundle ./code/BlenderDNA.cpp +--- ./code/BlenderDNA.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/BlenderDNA.cpp 2015-07-03 12:23:40.224699126 -0400 +@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #ifndef ASSIMP_BUILD_NO_BLEND_IMPORTER + #include "BlenderDNA.h" + #include "StreamReader.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + using namespace Assimp; + using namespace Assimp::Blender; +diff -up ./code/BlenderScene.cpp.unbundle ./code/BlenderScene.cpp +diff -up ./code/BlenderTessellator.h.unbundle ./code/BlenderTessellator.h +--- ./code/BlenderTessellator.h.unbundle 2015-07-03 12:52:16.084396913 -0400 ++++ ./code/BlenderTessellator.h 2015-07-03 12:52:21.680900278 -0400 +@@ -142,7 +142,7 @@ namespace Assimp + + #if ASSIMP_BLEND_WITH_POLY_2_TRI + +-#include "../contrib/poly2tri/poly2tri/poly2tri.h" ++#include "poly2tri/poly2tri.h" + + namespace Assimp + { +diff -up ./code/BVHLoader.cpp.unbundle ./code/BVHLoader.cpp +--- ./code/BVHLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/BVHLoader.cpp 2015-07-03 12:23:40.224699126 -0400 +@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #ifndef ASSIMP_BUILD_NO_BVH_IMPORTER + + #include "BVHLoader.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + #include "SkeletonMeshBuilder.h" + + using namespace Assimp; +diff -up ./code/CMakeLists.txt.unbundle ./code/CMakeLists.txt +--- ./code/CMakeLists.txt.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/CMakeLists.txt 2015-07-03 12:23:40.224699126 -0400 +@@ -88,7 +88,7 @@ SET( Logging_SRCS + SOURCE_GROUP(Logging FILES ${Logging_SRCS}) + + SET( Common_SRCS +- fast_atof.h ++ fast_atof_assimp.h + qnan.h + BaseImporter.cpp + BaseImporter.h +@@ -576,12 +576,15 @@ SET( ConvertUTF_SRCS + ) + SOURCE_GROUP( ConvertUTF FILES ${ConvertUTF_SRCS}) + ++if (NOT HAVE_CLIPPER) + SET( Clipper_SRCS + ../contrib/clipper/clipper.hpp + ../contrib/clipper/clipper.cpp + ) + SOURCE_GROUP( Clipper FILES ${Clipper_SRCS}) +- ++else (NOT HAVE_CLIPPER) ++ SET(Clipper_SRCS "") ++endif(NOT HAVE_CLIPPER) + + SET( Poly2Tri_SRCS + ../contrib/poly2tri/poly2tri/common/shapes.cc +@@ -679,10 +682,7 @@ SET( assimp_src + ${FBX_SRCS} + + # Third-party libraries +- ${IrrXML_SRCS} + ${ConvertUTF_SRCS} +- ${unzip_compile_SRCS} +- ${Poly2Tri_SRCS} + ${Clipper_SRCS} + # Necessary to show the headers in the project when using the VC++ generator: + ${Boost_SRCS} +@@ -722,6 +722,25 @@ else (UNZIP_FOUND) + INCLUDE_DIRECTORIES("../contrib/unzip") + endif (UNZIP_FOUND) + ++if (HAVE_IRRXML) ++ INCLUDE_DIRECTORIES(${IRRXML_INCLUDE_PATH}) ++ TARGET_LINK_LIBRARIES(assimp ${IRRXML_LIB}) ++else (HAVE_IRRXML) ++ INCLUDE_DIRECTORIES("../contrib/irrXML") ++endif (HAVE_IRRXML) ++ ++if (HAVE_POLY2TRI) ++ INCLUDE_DIRECTORIES(${POLY2TRI_INCLUDE_PATH}) ++ TARGET_LINK_LIBRARIES(assimp ${POLY2TRI_LIB}) ++endif(HAVE_POLY2TRI) ++ ++if (HAVE_CLIPPER) ++ INCLUDE_DIRECTORIES(${CLIPPER_INCLUDE_PATH}) ++ TARGET_LINK_LIBRARIES(assimp ${CLIPPER_LIB}) ++else (HAVE_CLIPPER) ++ INCLUDE_DIRECTORIES(../contrib/clipper) ++endif(HAVE_CLIPPER) ++ + INSTALL( TARGETS assimp + LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR} +diff -up ./code/COBLoader.cpp.unbundle ./code/COBLoader.cpp +--- ./code/COBLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/COBLoader.cpp 2015-07-03 12:23:40.225699164 -0400 +@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + + #include "StreamReader.h" + #include "ParsingUtils.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + #include "LineSplitter.h" + #include "TinyFormatter.h" +diff -up ./code/ColladaExporter.cpp.unbundle ./code/ColladaExporter.cpp +--- ./code/ColladaExporter.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/ColladaExporter.cpp 2015-07-03 12:23:40.225699164 -0400 +@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "ColladaExporter.h" + + #include "Bitmap.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + #include "SceneCombiner.h" + + #include +diff -up ./code/ColladaLoader.cpp.unbundle ./code/ColladaLoader.cpp +--- ./code/ColladaLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/ColladaLoader.cpp 2015-07-03 12:23:40.225699164 -0400 +@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "ColladaLoader.h" + #include "ColladaParser.h" + +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + #include "ParsingUtils.h" + #include "SkeletonMeshBuilder.h" + +diff -up ./code/ColladaParser.cpp.unbundle ./code/ColladaParser.cpp +--- ./code/ColladaParser.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/ColladaParser.cpp 2015-07-03 12:23:40.226699201 -0400 +@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #ifndef ASSIMP_BUILD_NO_COLLADA_IMPORTER + + #include "ColladaParser.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + #include "ParsingUtils.h" + + using namespace Assimp; +diff -up ./code/CSMLoader.cpp.unbundle ./code/CSMLoader.cpp +--- ./code/CSMLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/CSMLoader.cpp 2015-07-03 12:23:40.226699201 -0400 +@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "CSMLoader.h" + #include "SkeletonMeshBuilder.h" + #include "ParsingUtils.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + using namespace Assimp; + +diff -up ./code/DXFLoader.cpp.unbundle ./code/DXFLoader.cpp +--- ./code/DXFLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/DXFLoader.cpp 2015-07-03 12:23:40.227699238 -0400 +@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "DXFLoader.h" + #include "ParsingUtils.h" + #include "ConvertToLHProcess.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + #include "DXFHelper.h" + +diff -up ./code/fast_atof_assimp.h.unbundle ./code/fast_atof_assimp.h +--- ./code/fast_atof_assimp.h.unbundle 2015-07-03 12:23:40.227699238 -0400 ++++ ./code/fast_atof_assimp.h 2015-07-03 12:23:40.227699238 -0400 +@@ -0,0 +1,264 @@ ++// Copyright (C) 2002-2007 Nikolaus Gebhardt ++// This file is part of the "Irrlicht Engine" and the "irrXML" project. ++// For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h ++ ++// ------------------------------------------------------------------------------------ ++// Original description: (Schrompf) ++// Adapted to the ASSIMP library because the builtin atof indeed takes AGES to parse a ++// float inside a large string. Before parsing, it does a strlen on the given point. ++// Changes: ++// 22nd October 08 (Aramis_acg): Added temporary cast to double, added strtoul10_64 ++// to ensure long numbers are handled correctly ++// ------------------------------------------------------------------------------------ ++ ++ ++#ifndef __ASSIMP_FAST_A_TO_F_H_INCLUDED__ ++#define __ASSIMP_FAST_A_TO_F_H_INCLUDED__ ++ ++#include ++#include "fast_atof.h" ++ ++namespace Assimp ++{ ++ ++// ------------------------------------------------------------------------------------ ++// Convert a string in decimal format to a number ++// ------------------------------------------------------------------------------------ ++inline unsigned int strtoul10( const char* in, const char** out=0) ++{ ++ return irr::core::strtoul10(in, out); ++} ++ ++// ------------------------------------------------------------------------------------ ++// Convert a string in octal format to a number ++// ------------------------------------------------------------------------------------ ++inline unsigned int strtoul8( const char* in, const char** out=0) ++{ ++ return irr::core::strtoul8(in, out); ++} ++ ++// ------------------------------------------------------------------------------------ ++// Convert a string in hex format to a number ++// ------------------------------------------------------------------------------------ ++inline unsigned int strtoul16( const char* in, const char** out=0) ++{ ++ return irr::core::strtoul16(in, out); ++} ++ ++// ------------------------------------------------------------------------------------ ++// Convert just one hex digit ++// Return value is UINT_MAX if the input character is not a hex digit. ++// ------------------------------------------------------------------------------------ ++inline unsigned int HexDigitToDecimal(char in) ++{ ++ unsigned int out = UINT_MAX; ++ if (in >= '0' && in <= '9') ++ out = in - '0'; ++ ++ else if (in >= 'a' && in <= 'f') ++ out = 10u + in - 'a'; ++ ++ else if (in >= 'A' && in <= 'F') ++ out = 10u + in - 'A'; ++ ++ // return value is UINT_MAX if the input is not a hex digit ++ return out; ++} ++ ++// ------------------------------------------------------------------------------------ ++// Convert a hex-encoded octet (2 characters, i.e. df or 1a). ++// ------------------------------------------------------------------------------------ ++inline uint8_t HexOctetToDecimal(const char* in) ++{ ++ return ((uint8_t)HexDigitToDecimal(in[0])<<4)+(uint8_t)HexDigitToDecimal(in[1]); ++} ++ ++ ++// ------------------------------------------------------------------------------------ ++// signed variant of strtoul10 ++// ------------------------------------------------------------------------------------ ++inline int strtol10( const char* in, const char** out=0) ++{ ++ return irr::core::strtol10(in, out); ++} ++ ++// ------------------------------------------------------------------------------------ ++// Parse a C++-like integer literal - hex and oct prefixes. ++// 0xNNNN - hex ++// 0NNN - oct ++// NNN - dec ++// ------------------------------------------------------------------------------------ ++inline unsigned int strtoul_cppstyle( const char* in, const char** out=0) ++{ ++ if ('0' == in[0]) ++ { ++ return 'x' == in[1] ? strtoul16(in+2,out) : strtoul8(in+1,out); ++ } ++ return strtoul10(in, out); ++} ++ ++// ------------------------------------------------------------------------------------ ++// Special version of the function, providing higher accuracy and safety ++// It is mainly used by fast_atof to prevent ugly and unwanted integer overflows. ++// ------------------------------------------------------------------------------------ ++inline uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int* max_inout=0) ++{ ++ unsigned int cur = 0; ++ uint64_t value = 0; ++ ++ bool running = true; ++ while ( running ) ++ { ++ if ( *in < '0' || *in > '9' ) ++ break; ++ ++ const uint64_t new_value = ( value * 10 ) + ( *in - '0' ); ++ ++ if (new_value < value) /* numeric overflow, we rely on you */ ++ return value; ++ ++ value = new_value; ++ ++ ++in; ++ ++cur; ++ ++ if (max_inout && *max_inout == cur) { ++ ++ if (out) { /* skip to end */ ++ while (*in >= '0' && *in <= '9') ++ ++in; ++ *out = in; ++ } ++ ++ return value; ++ } ++ } ++ if (out) ++ *out = in; ++ ++ if (max_inout) ++ *max_inout = cur; ++ ++ return value; ++} ++ ++// Number of relevant decimals for floating-point parsing. ++#define AI_FAST_ATOF_RELAVANT_DECIMALS 15 ++ ++// ------------------------------------------------------------------------------------ ++//! Provides a fast function for converting a string into a float, ++//! about 6 times faster than atof in win32. ++// If you find any bugs, please send them to me, niko (at) irrlicht3d.org. ++// ------------------------------------------------------------------------------------ ++template ++inline const char* fast_atoreal_move( const char* c, Real& out) ++{ ++ Real f; ++ ++ bool inv = (*c=='-'); ++ if (inv || *c=='+') { ++ ++c; ++ } ++ ++ f = static_cast( strtoul10_64 ( c, &c) ); ++ if (*c == '.' || (c[0] == ',' && c[1] >= '0' && c[1] <= '9')) // allow for commas, too ++ { ++ ++c; ++ ++ // NOTE: The original implementation is highly inaccurate here. The precision of a single ++ // IEEE 754 float is not high enough, everything behind the 6th digit tends to be more ++ // inaccurate than it would need to be. Casting to double seems to solve the problem. ++ // strtol_64 is used to prevent integer overflow. ++ ++ // Another fix: this tends to become 0 for long numbers if we don't limit the maximum ++ // number of digits to be read. AI_FAST_ATOF_RELAVANT_DECIMALS can be a value between ++ // 1 and 15. ++ unsigned int diff = AI_FAST_ATOF_RELAVANT_DECIMALS; ++ double pl = static_cast( strtoul10_64 ( c, &c, &diff )); ++ ++ pl *= irr::core::fast_atof_table[diff]; ++ f += static_cast( pl ); ++ } ++ ++ // A major 'E' must be allowed. Necessary for proper reading of some DXF files. ++ // Thanks to Zhao Lei to point out that this if() must be outside the if (*c == '.' ..) ++ if (*c == 'e' || *c == 'E') { ++ ++ ++c; ++ const bool einv = (*c=='-'); ++ if (einv || *c=='+') { ++ ++c; ++ } ++ ++ // The reason float constants are used here is that we've seen cases where compilers ++ // would perform such casts on compile-time constants at runtime, which would be ++ // bad considering how frequently fast_atoreal_move is called in Assimp. ++ Real exp = static_cast( strtoul10_64(c, &c) ); ++ if (einv) { ++ exp = -exp; ++ } ++ f *= pow(static_cast(10.0f), exp); ++ } ++ ++ if (inv) { ++ f = -f; ++ } ++ out = f; ++ return c; ++} ++ ++// ------------------------------------------------------------------------------------ ++// The same but more human. ++inline float fast_atof(const char* c) ++{ ++ float ret; ++ fast_atoreal_move(c, ret); ++ return ret; ++} ++ ++ ++inline float fast_atof( const char* c, const char** cout) ++{ ++ float ret; ++ *cout = fast_atoreal_move(c, ret); ++ ++ return ret; ++} ++ ++inline float fast_atof( const char** inout) ++{ ++ float ret; ++ *inout = fast_atoreal_move(*inout, ret); ++ ++ return ret; ++} ++ ++ ++inline double fast_atod(const char* c) ++{ ++ double ret; ++ fast_atoreal_move(c, ret); ++ return ret; ++} ++ ++ ++inline double fast_atod( const char* c, const char** cout) ++{ ++ double ret; ++ *cout = fast_atoreal_move(c, ret); ++ ++ return ret; ++} ++ ++inline double fast_atod( const char** inout) ++{ ++ double ret; ++ *inout = fast_atoreal_move(*inout, ret); ++ ++ return ret; ++} ++ ++} // end of namespace Assimp ++ ++#endif ++ +diff -up ./code/FBXParser.cpp.unbundle ./code/FBXParser.cpp +--- ./code/FBXParser.cpp.unbundle 2015-07-03 12:55:50.916058976 -0400 ++++ ./code/FBXParser.cpp 2015-07-03 12:56:08.168713640 -0400 +@@ -58,7 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "FBXUtil.h" + + #include "ParsingUtils.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + using namespace Assimp; + using namespace Assimp::FBX; +diff -up ./code/FileSystemFilter.h.unbundle ./code/FileSystemFilter.h +--- ./code/FileSystemFilter.h.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/FileSystemFilter.h 2015-07-03 12:23:40.227699238 -0400 +@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #define AI_FILESYSTEMFILTER_H_INC + + #include "../include/assimp/IOSystem.hpp" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + #include "ParsingUtils.h" + namespace Assimp { + +diff -up ./code/IFCGeometry.cpp.unbundle ./code/IFCGeometry.cpp +--- ./code/IFCGeometry.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/IFCGeometry.cpp 2015-07-03 12:23:40.228699276 -0400 +@@ -49,8 +49,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "PolyTools.h" + #include "ProcessHelper.h" + +-#include "../contrib/poly2tri/poly2tri/poly2tri.h" +-#include "../contrib/clipper/clipper.hpp" ++#include "poly2tri/poly2tri.h" ++#include "clipper.hpp" + + #include + +diff -up ./code/IFCLoader.cpp.unbundle ./code/IFCLoader.cpp +--- ./code/IFCLoader.cpp.unbundle 2015-07-03 12:52:43.948903124 -0400 ++++ ./code/IFCLoader.cpp 2015-07-03 12:53:06.348917844 -0400 +@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include + + #ifndef ASSIMP_BUILD_NO_COMPRESSED_IFC +-# include "../contrib/unzip/unzip.h" ++# include "unzip.h" + #endif + + #include "IFCLoader.h" +diff -up ./code/IFCOpenings.cpp.unbundle ./code/IFCOpenings.cpp +--- ./code/IFCOpenings.cpp.unbundle 2015-07-03 12:54:28.992893618 -0400 ++++ ./code/IFCOpenings.cpp 2015-07-03 12:54:40.277332548 -0400 +@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "PolyTools.h" + #include "ProcessHelper.h" + +-#include "../contrib/poly2tri/poly2tri/poly2tri.h" ++#include "poly2tri/poly2tri.h" + #include "../contrib/clipper/clipper.hpp" + + #include +@@ -1741,4 +1741,4 @@ bool TryAddOpenings_Poly2Tri(const std:: + #undef from_int64 + #undef one_vec + +-#endif +\ No newline at end of file ++#endif +diff -up ./code/IRRLoader.cpp.unbundle ./code/IRRLoader.cpp +--- ./code/IRRLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/IRRLoader.cpp 2015-07-03 12:23:40.228699276 -0400 +@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + + #include "IRRLoader.h" + #include "ParsingUtils.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + #include "GenericProperty.h" + + #include "SceneCombiner.h" +diff -up ./code/IRRMeshLoader.cpp.unbundle ./code/IRRMeshLoader.cpp +--- ./code/IRRMeshLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/IRRMeshLoader.cpp 2015-07-03 12:23:40.228699276 -0400 +@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + + #include "IRRMeshLoader.h" + #include "ParsingUtils.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + using namespace Assimp; + using namespace irr; +diff -up ./code/IRRShared.cpp.unbundle ./code/IRRShared.cpp +--- ./code/IRRShared.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/IRRShared.cpp 2015-07-03 12:23:40.229699313 -0400 +@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + + #include "IRRShared.h" + #include "ParsingUtils.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + using namespace Assimp; + using namespace irr; +diff -up ./code/irrXMLWrapper.h.unbundle ./code/irrXMLWrapper.h +--- ./code/irrXMLWrapper.h.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/irrXMLWrapper.h 2015-07-03 12:23:40.229699313 -0400 +@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #define INCLUDED_AI_IRRXML_WRAPPER + + // some long includes .... +-#include "./../contrib/irrXML/irrXML.h" ++#include "irrXML.h" + #include "./../include/assimp/IOStream.hpp" + namespace Assimp { + +@@ -125,7 +125,7 @@ public: + + // ---------------------------------------------------------------------------------- + //! Returns size of file in bytes +- virtual int getSize() { ++ virtual long getSize() const { + return (int)data.size(); + } + +diff -up ./code/LWSLoader.cpp.unbundle ./code/LWSLoader.cpp +--- ./code/LWSLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/LWSLoader.cpp 2015-07-03 12:23:40.229699313 -0400 +@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + + #include "LWSLoader.h" + #include "ParsingUtils.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + #include "SceneCombiner.h" + #include "GenericProperty.h" +diff -up ./code/MaterialSystem.cpp.unbundle ./code/MaterialSystem.cpp +--- ./code/MaterialSystem.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/MaterialSystem.cpp 2015-07-03 12:23:40.230699350 -0400 +@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "AssimpPCH.h" + + #include "Hash.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + #include "ParsingUtils.h" + #include "MaterialSystem.h" + +diff -up ./code/MD5Loader.cpp.unbundle ./code/MD5Loader.cpp +--- ./code/MD5Loader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/MD5Loader.cpp 2015-07-03 12:23:40.230699350 -0400 +@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "RemoveComments.h" + #include "MD5Loader.h" + #include "StringComparison.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + #include "SkeletonMeshBuilder.h" + + using namespace Assimp; +diff -up ./code/MD5Parser.cpp.unbundle ./code/MD5Parser.cpp +--- ./code/MD5Parser.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/MD5Parser.cpp 2015-07-03 12:23:40.230699350 -0400 +@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + // internal headers + #include "MD5Loader.h" + #include "MaterialSystem.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + #include "ParsingUtils.h" + #include "StringComparison.h" + +diff -up ./code/NFFLoader.cpp.unbundle ./code/NFFLoader.cpp +--- ./code/NFFLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/NFFLoader.cpp 2015-07-03 12:23:40.231699388 -0400 +@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "NFFLoader.h" + #include "ParsingUtils.h" + #include "StandardShapes.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + #include "RemoveComments.h" + + using namespace Assimp; +diff -up ./code/ObjFileMtlImporter.cpp.unbundle ./code/ObjFileMtlImporter.cpp +--- ./code/ObjFileMtlImporter.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/ObjFileMtlImporter.cpp 2015-07-03 12:23:40.231699388 -0400 +@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "ObjFileMtlImporter.h" + #include "ObjTools.h" + #include "ObjFileData.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + namespace Assimp { + +diff -up ./code/ObjTools.h.unbundle ./code/ObjTools.h +--- ./code/ObjTools.h.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/ObjTools.h 2015-07-03 12:23:40.231699388 -0400 +@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #ifndef OBJ_TOOLS_H_INC + #define OBJ_TOOLS_H_INC + +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + namespace Assimp + { +diff -up ./code/OFFLoader.cpp.unbundle ./code/OFFLoader.cpp +--- ./code/OFFLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/OFFLoader.cpp 2015-07-03 12:23:40.232699425 -0400 +@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + // internal headers + #include "OFFLoader.h" + #include "ParsingUtils.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + + using namespace Assimp; +diff -up ./code/OgreMaterial.cpp.unbundle ./code/OgreMaterial.cpp +--- ./code/OgreMaterial.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/OgreMaterial.cpp 2015-07-03 12:23:40.232699425 -0400 +@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "OgreImporter.h" + #include "TinyFormatter.h" + +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + #include + #include +diff -up ./code/PlyParser.cpp.unbundle ./code/PlyParser.cpp +--- ./code/PlyParser.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/PlyParser.cpp 2015-07-03 12:23:40.232699425 -0400 +@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #ifndef ASSIMP_BUILD_NO_PLY_IMPORTER + + #include "PlyLoader.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + using namespace Assimp; + +diff -up ./code/Q3BSPZipArchive.h.unbundle ./code/Q3BSPZipArchive.h +--- ./code/Q3BSPZipArchive.h.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/Q3BSPZipArchive.h 2015-07-03 12:23:40.232699425 -0400 +@@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #ifndef AI_Q3BSP_ZIPARCHIVE_H_INC + #define AI_Q3BSP_ZIPARCHIVE_H_INC + +-#include "../contrib/unzip/unzip.h" ++#include "unzip.h" + #include "../include/assimp/IOStream.hpp" + #include "../include/assimp/IOSystem.hpp" + #include +diff -up ./code/Q3DLoader.cpp.unbundle ./code/Q3DLoader.cpp +--- ./code/Q3DLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/Q3DLoader.cpp 2015-07-03 12:23:40.233699462 -0400 +@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + // internal headers + #include "Q3DLoader.h" + #include "StreamReader.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + using namespace Assimp; + +diff -up ./code/RawLoader.cpp.unbundle ./code/RawLoader.cpp +--- ./code/RawLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/RawLoader.cpp 2015-07-03 12:23:40.233699462 -0400 +@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + // internal headers + #include "RawLoader.h" + #include "ParsingUtils.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + using namespace Assimp; + +diff -up ./code/SceneCombiner.cpp.unbundle ./code/SceneCombiner.cpp +--- ./code/SceneCombiner.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/SceneCombiner.cpp 2015-07-03 12:23:40.233699462 -0400 +@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + // ---------------------------------------------------------------------------- + #include "AssimpPCH.h" + #include "SceneCombiner.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + #include "Hash.h" + #include "time.h" + +diff -up ./code/SMDLoader.cpp.unbundle ./code/SMDLoader.cpp +--- ./code/SMDLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/SMDLoader.cpp 2015-07-03 12:23:40.234699499 -0400 +@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + + // internal headers + #include "SMDLoader.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + #include "SkeletonMeshBuilder.h" + + using namespace Assimp; +diff -up ./code/STEPFileEncoding.cpp.unbundle ./code/STEPFileEncoding.cpp +--- ./code/STEPFileEncoding.cpp.unbundle 2015-07-03 12:55:15.808714609 -0400 ++++ ./code/STEPFileEncoding.cpp 2015-07-03 12:55:26.876145098 -0400 +@@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + */ + #include "AssimpPCH.h" + #include "STEPFileEncoding.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + #include "../contrib/ConvertUTF/ConvertUTF.h" + +diff -up ./code/STEPFileReader.cpp.unbundle ./code/STEPFileReader.cpp +--- ./code/STEPFileReader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/STEPFileReader.cpp 2015-07-03 12:23:40.234699499 -0400 +@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "STEPFileReader.h" + #include "STEPFileEncoding.h" + #include "TinyFormatter.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + + using namespace Assimp; +diff -up ./code/STLLoader.cpp.unbundle ./code/STLLoader.cpp +--- ./code/STLLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/STLLoader.cpp 2015-07-03 12:23:40.234699499 -0400 +@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + // internal headers + #include "STLLoader.h" + #include "ParsingUtils.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + using namespace Assimp; + +diff -up ./code/UnrealLoader.cpp.unbundle ./code/UnrealLoader.cpp +--- ./code/UnrealLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/UnrealLoader.cpp 2015-07-03 12:23:40.234699499 -0400 +@@ -53,7 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "UnrealLoader.h" + #include "StreamReader.h" + #include "ParsingUtils.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + #include "ConvertToLHProcess.h" + + using namespace Assimp; +diff -up ./code/ValidateDataStructure.cpp.unbundle ./code/ValidateDataStructure.cpp +--- ./code/ValidateDataStructure.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/ValidateDataStructure.cpp 2015-07-03 12:23:40.235699537 -0400 +@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + // internal headers + #include "ValidateDataStructure.h" + #include "BaseImporter.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + #include "ProcessHelper.h" + + // CRT headers +diff -up ./code/XFileParser.cpp.unbundle ./code/XFileParser.cpp +--- ./code/XFileParser.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/XFileParser.cpp 2015-07-03 12:23:40.235699537 -0400 +@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + + #include "XFileParser.h" + #include "XFileHelper.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + using namespace Assimp; + using namespace Assimp::XFile; +diff -up ./code/XGLLoader.cpp.unbundle ./code/XGLLoader.cpp +--- ./code/XGLLoader.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./code/XGLLoader.cpp 2015-07-03 12:23:40.235699537 -0400 +@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + + #include "XGLLoader.h" + #include "ParsingUtils.h" +-#include "fast_atof.h" ++#include "fast_atof_assimp.h" + + #include "StreamReader.h" + #include "MemoryIOWrapper.h" +diff -up ./tools/assimp_cmd/CMakeLists.txt.unbundle ./tools/assimp_cmd/CMakeLists.txt +--- ./tools/assimp_cmd/CMakeLists.txt.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./tools/assimp_cmd/CMakeLists.txt 2015-07-03 12:23:40.236699574 -0400 +@@ -28,7 +28,9 @@ IF( WIN32 ) + MAIN_DEPENDENCY assimp) + ENDIF( WIN32 ) + +-TARGET_LINK_LIBRARIES( assimp_cmd assimp ${ZLIB_LIBRARIES}) ++INCLUDE_DIRECTORIES(${IRRXML_INCLUDE_PATH}) ++TARGET_LINK_LIBRARIES( assimp_cmd assimp ${ZLIB_LIBRARIES} ${POLY2TRI_LIB}) ++TARGET_LINK_LIBRARIES( assimp_cmd ${IRRXML_LIB}) + SET_TARGET_PROPERTIES( assimp_cmd PROPERTIES + OUTPUT_NAME assimp + ) +diff -up ./tools/assimp_cmd/ImageExtractor.cpp.unbundle ./tools/assimp_cmd/ImageExtractor.cpp +--- ./tools/assimp_cmd/ImageExtractor.cpp.unbundle 2014-06-14 19:00:10.000000000 -0400 ++++ ./tools/assimp_cmd/ImageExtractor.cpp 2015-07-03 12:23:40.236699574 -0400 +@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + */ + + #include "Main.h" +-#include <../code/fast_atof.h> ++#include + #include <../code/StringComparison.h> + + const char* AICMD_MSG_DUMP_HELP_E = diff --git a/assimp-pythonpath.patch b/assimp-pythonpath.patch deleted file mode 100644 index 6b63466..0000000 --- a/assimp-pythonpath.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -up ./port/PyAssimp/pyassimp/helper.py.pythonpath ./port/PyAssimp/pyassimp/helper.py ---- ./port/PyAssimp/pyassimp/helper.py.pythonpath 2012-10-24 22:04:36.698871141 -0400 -+++ ./port/PyAssimp/pyassimp/helper.py 2012-10-24 22:05:44.265445828 -0400 -@@ -17,11 +17,12 @@ additional_dirs, ext_whitelist = [],[] - # populate search directories and lists of allowed file extensions - # depending on the platform we're running on. - if os.name=='posix': -- additional_dirs.append('/usr/local/lib/') -- -+ additional_dirs.append('/usr/lib64/') -+ additional_dirs.append('/usr/lib/') - # note - this won't catch libassimp.so.N.n, but - # currently there's always a symlink called - # libassimp.so in /usr/local/lib. -+ ext_whitelist.append('.0') - ext_whitelist.append('.so') - - elif os.name=='nt': -diff -up ./port/PyAssimp3/pyassimp/helper.py.pythonpath ./port/PyAssimp3/pyassimp/helper.py ---- ./port/PyAssimp3/pyassimp/helper.py.pythonpath 2012-07-11 06:53:04.000000000 -0600 -+++ ./port/PyAssimp3/pyassimp/helper.py 2014-03-02 02:50:14.253038683 -0700 - # populate search directories and lists of allowed file extensions - # depending on the platform we're running on. - if os.name=='posix': -- additional_dirs.append('/usr/local/lib/') -+ additional_dirs.append('/usr/lib/') -+ additional_dirs.append('/usr/lib64/') - - if sys.platform.lower() == 'darwin': - ext_whitelist.append('.dylib') -@@ -25,6 +26,7 @@ - # note - this won't catch libassimp.so.N.n, but - # currently there's always a symlink called - # libassimp.so in /usr/local/lib. -+ ext_whitelist.append('.0') - ext_whitelist.append('.so') - - elif os.name=='nt': diff --git a/assimp.spec b/assimp.spec index e1d4ad2..b3ae7df 100644 --- a/assimp.spec +++ b/assimp.spec @@ -1,29 +1,21 @@ -%global commit f849f6d9bd21efe802fa456184b1c3173e74a050 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - Name: assimp -Version: 3.0.1270 -Release: 11%{?dist} +Version: 3.1.1 +Release: 1%{?dist} Summary: Library to import various 3D model formats into applications Group: Development/Libraries License: BSD URL: http://assimp.sourceforge.net -# This is the source location, but use assimp_generate_tarball to remove the non-free -# model files from the source distribution. -#Source0: https://github.com/%{name}/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz -Source0: %{name}-%{commit}-free.tar.bz2 -# Assimp tarball comes with non-free models which must be removed from the source distribution -Source1: assimp_generate_tarball.sh +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}_no_test_models.zip # Strips bundled irrXML out of build files, and allows project to build # against system versions of the libraries (not yet submitted upstream) -Patch0: %{name}-3.0.1270-unbundle.patch -# Change a doxygen setting so CHM help isn't generated -Patch1: %{name}-1.1.700.docfix.patch -Patch2: %{name}-2.0.863.pkgconfig.patch -Patch3: %{name}-1071-gcc47.patch -Patch4: %{name}-pythonpath.patch +Patch0: %{name}-3.1.1-unbundle.patch +# Change a doxygen setting so CHM help isn't generated. Fedora-only +Patch1: %{name}-3.1.1-docfix.patch +# Add /usr/lib64 to library lookup paths for python modules +Patch4: %{name}-3.1.1-pythonpath.patch + BuildRequires: boost-devel BuildRequires: cmake BuildRequires: dos2unix @@ -34,7 +26,7 @@ BuildRequires: doxygen BuildRequires: minizip-devel BuildRequires: poly2tri-devel BuildRequires: polyclipping-devel -BuildRequires: python-devel +BuildRequires: python2-devel BuildRequires: python3-devel %description @@ -54,44 +46,53 @@ This package contains the header files and libraries for assimp. If you would like to develop programs using assimp, you will need to install assimp-devel. -%package python +%package -n python2-%{name} Summary: Python bindings for assimp Group: Development/Libraries BuildArch: noarch Requires: %{name} = %{version}-%{release} -Requires: python +Requires: python2 +Provides: %{name}-python = %{version}-%{release} +Obsoletes: %{name}-python < 3.1.1 -%description python +%description -n python2-%{name} This package contains the PyAssimp python bindings -%package python3 +%package -n python3-%{name} Summary: Python 3 bindings for assimp Group: Development/Libraries BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: python3 +Provides: %{name}-python3 = %{version}-%{release} +Obsoletes: %{name}-python3 < 3.1.1 -%description python3 +%description -n python3-%{name} This package contains the PyAssimp3 python bindings %prep -%setup -q -n %{name}-%{commit} +%setup -q # Get rid of bundled libs so we can't accidently build against them +rm -f code/fast_atof.h rm -rf contrib/cppunit-1.12.1 rm -rf contrib/irrXML rm -rf contrib/zlib rm -rf contrib/unzip rm -rf contrib/poly2tri %patch0 -p1 -b .unbundle -%patch1 -p1 -%patch2 -p1 -#%patch3 -p0 -%patch4 -p0 +%patch1 -p1 -b .docfix +%patch4 -p1 -b .pythonpath %build mkdir build pushd build -%cmake -DLIB_INSTALL_DIR=%{_libdir} -DINCLUDE_INSTALL_DIR=%{_includedir} -DBIN_INSTALL_DIR=%{_bindir} -DIRRXML_LIB_PATH=%{_libdir} -DIRRXML_INCLUDE_PATH=%{_includedir}/irrlicht/ -DPOLY2TRI_INCLUDE_PATH=%{_includedir}/poly2tri -DUSE_EXTERNAL_LIBS=ON .. +%cmake .. \ + -DASSIMP_LIB_INSTALL_DIR=%{_libdir} \ + -DIRRXML_LIB_PATH=%{_libdir} \ + -DIRRXML_INCLUDE_PATH=%{_includedir}/irrlicht/ \ + -DPOLY2TRI_INCLUDE_PATH=%{_includedir}/poly2tri \ + -DCLIPPER_INCLUDE_PATH=%{_includedir}/clipper \ + -DUSE_EXTERNAL_LIBS=ON popd make %{?_smp_mflags} -C build @@ -102,7 +103,7 @@ cp AssimpDoc_Html/dragonsplash.png html/dragonsplash.png popd # Fix file encoding -dos2unix README LICENSE CREDITS port/PyAssimp/README port/PyAssimp3/README +dos2unix README LICENSE CREDITS port/PyAssimp/README.md iconv -f iso8859-1 -t utf-8 CREDITS > CREDITS.conv && mv -f CREDITS.conv CREDITS %install @@ -111,7 +112,7 @@ make -C build install DESTDIR=%{buildroot} mkdir -p %{buildroot}%{python2_sitelib}/pyassimp/ install -m0644 port/PyAssimp/pyassimp/*.py %{buildroot}%{python2_sitelib}/pyassimp/ mkdir -p %{buildroot}%{python3_sitelib}/pyassimp/ -install -m0644 port/PyAssimp3/pyassimp/*.py %{buildroot}%{python3_sitelib}/pyassimp/ +install -m0644 port/PyAssimp/pyassimp/*.py %{buildroot}%{python3_sitelib}/pyassimp/ %clean rm -rf %{buildroot} @@ -122,28 +123,33 @@ rm -rf %{buildroot} %files -%defattr(-,root,root,-) -%doc README LICENSE CREDITS +%license LICENSE +%doc README CREDITS %{_bindir}/assimp %{_libdir}/*.so.* %files devel -%defattr(-,root,root,-) %doc doc/html %{_includedir}/assimp %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc -%{_libdir}/cmake/%{name}-3.0 +%{_libdir}/cmake/%{name}-3.1 -%files python -%doc port/PyAssimp/README +%files -n python2-%{name} +%doc port/PyAssimp/README.md %{python_sitelib}/pyassimp -%files python3 -%doc port/PyAssimp3/README +%files -n python3-%{name} +%doc port/PyAssimp/README.md %{python3_sitelib}/pyassimp %changelog +* Fri Jul 03 2015 Rich Mattes - 3.1.1-1 +- Update to release 3.1.1 (rhbz#1206371) +- Remove upstreamed patches +- Correct python package names +- Use license macro + * Wed Jun 17 2015 Fedora Release Engineering - 3.0.1270-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index 5d604ec..1809819 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -30a97f5b249a3f74a869fea1b81874ab assimp-f849f6d9bd21efe802fa456184b1c3173e74a050-free.tar.bz2 +ccd4788204509da58a3a53c7aeda7a8b assimp-3.1.1_no_test_models.zip