diff --git a/.gitignore b/.gitignore index ec9d09d..dd475f8 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /assimp-c318d648ff73aa2e32b783709d69740ac3e8c072-free.tar.bz2 /assimp-5.0.1-free.tar.xz /assimp-5.2.5-free.tar.xz +/assimp-5.3.1-free.tar.xz diff --git a/assimp-5.2.5-tests.patch b/assimp-5.2.5-tests.patch deleted file mode 100644 index 956336c..0000000 --- a/assimp-5.2.5-tests.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -up ./CMakeLists.txt.tests ./CMakeLists.txt ---- ./CMakeLists.txt.tests 2022-09-08 14:13:43.000000000 -0400 -+++ ./CMakeLists.txt 2023-11-23 23:51:52.739981462 -0500 -@@ -56,7 +56,7 @@ IF(ASSIMP_HUNTER_ENABLED) - add_definitions(-DASSIMP_USE_HUNTER) - ENDIF() - --PROJECT(Assimp VERSION 5.2.4) -+PROJECT(Assimp VERSION 5.2.5) - - # All supported options ############################################### - -@@ -715,6 +715,7 @@ IF ( ASSIMP_BUILD_SAMPLES ) - ENDIF () - - IF ( ASSIMP_BUILD_TESTS ) -+ ENABLE_TESTING() - ADD_SUBDIRECTORY( test/ ) - ENDIF () - -diff -up ./test/CMakeLists.txt.tests ./test/CMakeLists.txt ---- ./test/CMakeLists.txt.tests 2022-09-08 14:13:43.000000000 -0400 -+++ ./test/CMakeLists.txt 2023-11-23 23:51:52.739981462 -0500 -@@ -36,6 +36,7 @@ - # - #---------------------------------------------------------------------- - cmake_minimum_required( VERSION 3.10 ) -+include(GoogleTest) - - INCLUDE_DIRECTORIES( - ${Assimp_SOURCE_DIR}/test/unit -@@ -267,4 +268,4 @@ target_link_libraries( unit assimp ${pla - - add_subdirectory(headercheck) - --add_test( unittests unit ) -+gtest_discover_tests(unit) -diff -up ./test/unit/utVersion.cpp.tests ./test/unit/utVersion.cpp ---- ./test/unit/utVersion.cpp.tests 2023-11-23 23:52:48.048239100 -0500 -+++ ./test/unit/utVersion.cpp 2023-11-23 23:53:04.050313640 -0500 -@@ -61,7 +61,7 @@ TEST_F( utVersion, aiGetVersionMajorTest - } - - TEST_F( utVersion, aiGetVersionPatchTest ) { -- EXPECT_EQ(aiGetVersionPatch(), 4U ); -+ EXPECT_EQ(aiGetVersionPatch(), 5U ); - } - - TEST_F( utVersion, aiGetCompileFlagsTest ) { diff --git a/assimp-5.2.5-unbundle.patch b/assimp-5.2.5-unbundle.patch deleted file mode 100644 index 3054e65..0000000 --- a/assimp-5.2.5-unbundle.patch +++ /dev/null @@ -1,338 +0,0 @@ ---- ./CMakeLists.txt.unbundle 2020-01-12 06:56:40.000000000 -0500 -+++ ./CMakeLists.txt 2021-09-11 12:22:08.270359054 -0400 - MESSAGE( STATUS "Build an import-only version of Assimp." ) - ENDIF() - -+# 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) -+ -+ - SET ( ASSIMP_BUILD_ARCHITECTURE "" CACHE STRING - "describe the current architecture." - ) ---- ./code/AssetLib/Blender/BlenderTessellator.h.unbundle 2020-01-12 06:56:40.000000000 -0500 -+++ ./code/AssetLib/Blender/BlenderTessellator.h 2021-09-11 12:22:08.271359063 -0400 -@@ -144,11 +144,7 @@ namespace Assimp - - #if ASSIMP_BLEND_WITH_POLY_2_TRI - --#ifdef ASSIMP_USE_HUNTER - # include --#else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --#endif - - namespace Assimp - { ---- ./code/CMakeLists.txt.unbundle 2020-01-12 06:56:40.000000000 -0500 -+++ ./code/CMakeLists.txt 2021-09-11 12:22:08.271359063 -0400 -@@ -902,12 +902,7 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(pugixml) - find_package(pugixml CONFIG REQUIRED) - ELSE() -- SET( Pugixml_SRCS -- ../contrib/pugixml/src/pugiconfig.hpp -- ../contrib/pugixml/src/pugixml.hpp -- ) -- INCLUDE_DIRECTORIES("../contrib/pugixml/src") -- SOURCE_GROUP( Contrib\\Pugixml FILES ${Pugixml_SRCS}) -+ find_package(pugixml REQUIRED) - ENDIF() - - # utf8 -@@ -915,7 +910,7 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(utf8) - find_package(utf8cpp CONFIG REQUIRED) - ELSE() -- # utf8 is header-only, so Assimp doesn't need to do anything. -+ find_package(utf8cpp) - ENDIF() - - # polyclipping -@@ -923,11 +918,11 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(polyclipping) - find_package(polyclipping CONFIG REQUIRED) - ELSE() -- SET( Clipper_SRCS -- ../contrib/clipper/clipper.hpp -- ../contrib/clipper/clipper.cpp -- ) -- SOURCE_GROUP( Contrib\\Clipper FILES ${Clipper_SRCS}) -+ SET( Clipper_SRCS -+ ../contrib/clipper/clipper.hpp -+ ../contrib/clipper/clipper.cpp -+ ) -+ SOURCE_GROUP( Contrib\\Clipper FILES ${Clipper_SRCS}) - ENDIF() - - # poly2tri -@@ -935,20 +930,25 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(poly2tri) - find_package(poly2tri CONFIG REQUIRED) - ELSE() -- SET( Poly2Tri_SRCS -- ../contrib/poly2tri/poly2tri/common/shapes.cc -- ../contrib/poly2tri/poly2tri/common/shapes.h -- ../contrib/poly2tri/poly2tri/common/utils.h -- ../contrib/poly2tri/poly2tri/sweep/advancing_front.h -- ../contrib/poly2tri/poly2tri/sweep/advancing_front.cc -- ../contrib/poly2tri/poly2tri/sweep/cdt.cc -- ../contrib/poly2tri/poly2tri/sweep/cdt.h -- ../contrib/poly2tri/poly2tri/sweep/sweep.cc -- ../contrib/poly2tri/poly2tri/sweep/sweep.h -- ../contrib/poly2tri/poly2tri/sweep/sweep_context.cc -- ../contrib/poly2tri/poly2tri/sweep/sweep_context.h -- ) -- SOURCE_GROUP( Contrib\\Poly2Tri FILES ${Poly2Tri_SRCS}) -+ if (HAVE_POLY2TRI) -+ include_directories(${POLY2TRI_INCLUDE_PATH}) -+ set(Poly2Tri_SRCS "") -+ elseif(HAVE_POLY2TRI) -+ SET( Poly2Tri_SRCS -+ ../contrib/poly2tri/poly2tri/common/shapes.cc -+ ../contrib/poly2tri/poly2tri/common/shapes.h -+ ../contrib/poly2tri/poly2tri/common/utils.h -+ ../contrib/poly2tri/poly2tri/sweep/advancing_front.h -+ ../contrib/poly2tri/poly2tri/sweep/advancing_front.cc -+ ../contrib/poly2tri/poly2tri/sweep/cdt.cc -+ ../contrib/poly2tri/poly2tri/sweep/cdt.h -+ ../contrib/poly2tri/poly2tri/sweep/sweep.cc -+ ../contrib/poly2tri/poly2tri/sweep/sweep.h -+ ../contrib/poly2tri/poly2tri/sweep/sweep_context.cc -+ ../contrib/poly2tri/poly2tri/sweep/sweep_context.h -+ ) -+ SOURCE_GROUP( Contrib\\Poly2Tri FILES ${Poly2Tri_SRCS}) -+ endif(HAVE_POLY2TRI) - ENDIF() - - # minizip/unzip -@@ -956,15 +956,20 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(minizip) - find_package(minizip CONFIG REQUIRED) - ELSE() -- SET( unzip_SRCS -- ../contrib/unzip/crypt.c -- ../contrib/unzip/crypt.h -- ../contrib/unzip/ioapi.c -- ../contrib/unzip/ioapi.h -- ../contrib/unzip/unzip.c -- ../contrib/unzip/unzip.h -- ) -- SOURCE_GROUP(Contrib\\unzip FILES ${unzip_SRCS}) -+ #if (MINIZIP_FOUND) -+ # SET( unzip_SRCS "") -+ # INCLUDE_DIRECTORIES(${MINIZIP_INCLUDE_DIRS}) -+ #elseif(MINIZIP_FOUND) -+ SET( unzip_SRCS -+ ../contrib/unzip/crypt.c -+ ../contrib/unzip/crypt.h -+ ../contrib/unzip/ioapi.c -+ ../contrib/unzip/ioapi.h -+ ../contrib/unzip/unzip.c -+ ../contrib/unzip/unzip.h -+ ) -+ SOURCE_GROUP(Contrib\\unzip FILES ${unzip_SRCS}) -+ #endif(HAVE_MINIZIP) - ENDIF() - - # zip (https://github.com/kuba--/zip) -@@ -1061,6 +1066,7 @@ ENDIF () - IF (NOT ASSIMP_HUNTER_ENABLED AND (RT_FOUND OR WIN32)) - SET( ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC 1 ) - ADD_DEFINITIONS( -DASSIMP_IMPORTER_GLTF_USE_OPEN3DGC=1 ) -+ INCLUDE_DIRECTORIES( "../contrib" ) - ELSE () - SET (open3dgc_SRCS "") - MESSAGE (INFO " Hunter enabled or RT-extension not found. glTF import/export will be built without Open3DGC-compression.") -@@ -1072,7 +1078,8 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(RapidJSON) - find_package(RapidJSON CONFIG REQUIRED) - ELSE() -- INCLUDE_DIRECTORIES("../contrib/rapidjson/include") -+ find_package(RapidJSON REQUIRED) -+ include_directories(${RapidJSON_INCLUDE_DIRS}) - ADD_DEFINITIONS( -DRAPIDJSON_HAS_STDSTRING=1) - option( ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR "Suppress rapidjson warning on MSVC (NOTE: breaks android build)" ON ) - if(ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR) -@@ -1085,11 +1092,6 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(stb) - find_package(stb CONFIG REQUIRED) - ELSE() -- SET( stb_SRCS -- ../contrib/stb/stb_image.h -- ) -- INCLUDE_DIRECTORIES("../contrib") -- SOURCE_GROUP( Contrib\\stb FILES ${stb_SRCS}) - ENDIF() - - # VC2010 fixes -@@ -1209,7 +1211,7 @@ IF(ASSIMP_HUNTER_ENABLED) - polyclipping::polyclipping - openddlparser::openddl_parser - poly2tri::poly2tri -- minizip::minizip -+ #minizip::minizip - ZLIB::zlib - RapidJSON::rapidjson - utf8cpp -@@ -1228,6 +1230,16 @@ ELSE() - if (ASSIMP_BUILD_DRACO) - target_link_libraries(assimp ${draco_LIBRARIES}) - endif() -+ -+ TARGET_LINK_LIBRARIES(assimp pugixml) -+ -+ IF (HAVE_POLY2TRI) -+ TARGET_LINK_LIBRARIES(assimp ${POLY2TRI_LIB}) -+ ENDIF() -+ -+ IF (HAVE_CLIPPER) -+ TARGET_LINK_LIBRARIES(assimp ${CLIPPER_LIB}) -+ ENDIF() - ENDIF() - - if(ASSIMP_ANDROID_JNIIOSYSTEM) ---- ./code/Common/BaseImporter.cpp.unbundle 2020-01-12 06:56:40.000000000 -0500 -+++ ./code/Common/BaseImporter.cpp 2021-09-11 12:22:08.272359072 -0400 -@@ -331,11 +331,7 @@ std::string BaseImporter::GetExtension(const std::string &file) { - return false; - } - --#ifdef ASSIMP_USE_HUNTER - #include --#else --#include "../contrib/utf8cpp/source/utf8.h" --#endif - - // ------------------------------------------------------------------------------------------------ - // Convert to UTF8 data ---- ./code/AssetLib/IFC/IFCGeometry.cpp.unbundle 2020-01-12 06:56:40.000000000 -0500 -+++ ./code/AssetLib/IFC/IFCGeometry.cpp 2021-09-11 12:22:08.272359072 -0400 -@@ -49,13 +49,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE - #include "Common/PolyTools.h" - #include "PostProcessing/ProcessHelper.h" - --#ifdef ASSIMP_USE_HUNTER --# include --# include --#else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" --#endif -+#include -+#include <../contrib/clipper/clipper.hpp> - - #include - #include ---- ./code/AssetLib/IFC/IFCOpenings.cpp.unbundle 2020-01-12 06:56:40.000000000 -0500 -+++ ./code/AssetLib/IFC/IFCOpenings.cpp 2021-09-11 12:22:08.273359081 -0400 -@@ -49,13 +49,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE - #include "Common/PolyTools.h" - #include "PostProcessing/ProcessHelper.h" - --#ifdef ASSIMP_USE_HUNTER --# include --# include --#else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" --#endif -+#include -+#include <../contrib/clipper/clipper.hpp> - - #include - #include ---- ./code/AssetLib/STEPParser/STEPFileEncoding.cpp.unbundle 2020-01-12 06:56:40.000000000 -0500 -+++ ./code/AssetLib/STEPParser/STEPFileEncoding.cpp 2021-09-11 12:22:08.273359081 -0400 -@@ -45,11 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE - */ - #include "STEPFileEncoding.h" - #include --#ifdef ASSIMP_USE_HUNTER --# include --#else --# include --#endif -+#include - - #include - ---- ./code/AssetLib/MMD/MMDPmxParser.cpp.unbundle 2020-01-12 06:56:40.000000000 -0500 -+++ ./code/AssetLib/MMD/MMDPmxParser.cpp 2021-09-11 12:22:08.273359081 -0400 -@@ -42,11 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE - #include - #include "MMDPmxParser.h" - #include --#ifdef ASSIMP_USE_HUNTER --# include --#else --# include "../contrib/utf8cpp/source/utf8.h" --#endif -+#include - #include - - namespace pmx ---- ./code/AssetLib/SIB/SIBImporter.cpp.unbundle 2020-01-12 06:56:40.000000000 -0500 -+++ ./code/AssetLib/SIB/SIBImporter.cpp 2021-09-11 12:22:08.274359089 -0400 -@@ -56,11 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE - #include - #include - #include --#ifdef ASSIMP_USE_HUNTER - #include --#else --#include "../contrib/utf8cpp/source/utf8.h" --#endif - #include - #include - #include ---- ./code/AssetLib/glTF2/glTF2Asset.inl.unbundle 2021-11-13 00:30:32.000000000 -0800 -+++ ./code/AssetLib/glTF2/glTF2Asset.inl 2022-11-11 11:02:25.220173286 -0800 -@@ -46,6 +46,8 @@ - #include - #include - -+#include -+ - // clang-format off - #ifdef ASSIMP_ENABLE_DRACO - ---- ./samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp.unbundle 2021-09-11 12:47:39.249727225 -0400 -+++ ./samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp 2021-09-11 12:22:39.456631581 -0400 -@@ -23,7 +23,7 @@ - #endif // _MSC_VER - - #define STB_IMAGE_IMPLEMENTATION --#include "contrib/stb/stb_image.h" -+#include "stb_image.h" - - #ifdef _MSC_VER - #pragma warning(default: 4100) // Enable warning 'unreferenced formal parameter' ---- ./test/unit/utglTF2ImportExport.cpp.unbundle 2021-11-13 00:30:32.000000000 -0800 -+++ ./test/unit/utglTF2ImportExport.cpp 2022-11-11 11:01:44.595630077 -0800 -@@ -787,7 +787,7 @@ - rapidjson::Document schemaDoc; - schemaDoc.Parse(R"==({"properties":{"scene" : { "type" : "integer" }}, "required": [ "scene" ]})=="); - EXPECT_FALSE(schemaDoc.HasParseError()); -- m_schema.reset(new rapidjson::SchemaDocument(schemaDoc, m_schemaName.c_str(), static_cast(m_schemaName.size()), this)); -+ m_schema.reset(new rapidjson::SchemaDocument(schemaDoc, this)); - } - - const rapidjson::SchemaDocument* GetRemoteDocument(const char* uri, rapidjson::SizeType) override { diff --git a/assimp-5.3.1-tests.patch b/assimp-5.3.1-tests.patch new file mode 100644 index 0000000..0be1e8f --- /dev/null +++ b/assimp-5.3.1-tests.patch @@ -0,0 +1,49 @@ +diff -up ./CMakeLists.txt.tests ./CMakeLists.txt +--- ./CMakeLists.txt.tests 2023-09-25 10:46:51.000000000 -0400 ++++ ./CMakeLists.txt 2024-03-31 20:49:21.960500757 -0400 +@@ -55,7 +55,7 @@ IF(ASSIMP_HUNTER_ENABLED) + add_definitions(-DASSIMP_USE_HUNTER) + ENDIF() + +-PROJECT(Assimp VERSION 5.3.0) ++PROJECT(Assimp VERSION 5.3.1) + + # All supported options ############################################### + +@@ -725,6 +725,7 @@ IF ( ASSIMP_BUILD_SAMPLES ) + ENDIF () + + IF ( ASSIMP_BUILD_TESTS ) ++ ENABLE_TESTING() + ADD_SUBDIRECTORY( test/ ) + ENDIF () + +diff -up ./test/CMakeLists.txt.tests ./test/CMakeLists.txt +--- ./test/CMakeLists.txt.tests 2023-09-25 10:46:51.000000000 -0400 ++++ ./test/CMakeLists.txt 2024-03-31 20:48:33.624049363 -0400 +@@ -36,6 +36,7 @@ + # + #---------------------------------------------------------------------- + cmake_minimum_required( VERSION 3.10 ) ++include(GoogleTest) + + INCLUDE_DIRECTORIES( + ${Assimp_SOURCE_DIR}/test/unit +@@ -281,4 +282,4 @@ target_link_libraries( unit assimp ${pla + + add_subdirectory(headercheck) + +-add_test( unittests unit ) ++gtest_discover_tests(unit) +diff -up ./test/unit/utVersion.cpp.tests ./test/unit/utVersion.cpp +--- ./test/unit/utVersion.cpp.tests 2024-03-31 20:48:33.624049363 -0400 ++++ ./test/unit/utVersion.cpp 2024-03-31 20:50:08.025156444 -0400 +@@ -61,7 +61,7 @@ TEST_F( utVersion, aiGetVersionMajorTest + } + + TEST_F( utVersion, aiGetVersionPatchTest ) { +- EXPECT_EQ(aiGetVersionPatch(), 0U ); ++ EXPECT_EQ(aiGetVersionPatch(), 1U ); + } + + TEST_F( utVersion, aiGetCompileFlagsTest ) { diff --git a/assimp-5.3.1-unbundle.patch b/assimp-5.3.1-unbundle.patch new file mode 100644 index 0000000..27e6853 --- /dev/null +++ b/assimp-5.3.1-unbundle.patch @@ -0,0 +1,249 @@ +diff -up ./code/AssetLib/Blender/BlenderTessellator.h.unbundle ./code/AssetLib/Blender/BlenderTessellator.h +--- ./code/AssetLib/Blender/BlenderTessellator.h.unbundle 2024-03-31 20:36:05.293864981 -0400 ++++ ./code/AssetLib/Blender/BlenderTessellator.h 2024-03-31 20:38:26.958995165 -0400 +@@ -143,7 +143,7 @@ namespace Assimp + + #if ASSIMP_BLEND_WITH_POLY_2_TRI + +-#include "contrib/poly2tri/poly2tri/poly2tri.h" ++#include + + namespace Assimp + { +diff -up ./code/AssetLib/glTF2/glTF2Asset.inl.unbundle ./code/AssetLib/glTF2/glTF2Asset.inl +diff -up ./code/AssetLib/IFC/IFCGeometry.cpp.unbundle ./code/AssetLib/IFC/IFCGeometry.cpp +--- ./code/AssetLib/IFC/IFCGeometry.cpp.unbundle 2024-03-31 20:36:05.294864983 -0400 ++++ ./code/AssetLib/IFC/IFCGeometry.cpp 2024-03-31 20:37:34.819951544 -0400 +@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "IFCUtil.h" + #include "Common/PolyTools.h" + #include "PostProcessing/ProcessHelper.h" +-#include "contrib/poly2tri/poly2tri/poly2tri.h" ++#include + #include "contrib/clipper/clipper.hpp" + + #include +diff -up ./code/AssetLib/IFC/IFCOpenings.cpp.unbundle ./code/AssetLib/IFC/IFCOpenings.cpp +--- ./code/AssetLib/IFC/IFCOpenings.cpp.unbundle 2024-03-31 20:36:05.295864985 -0400 ++++ ./code/AssetLib/IFC/IFCOpenings.cpp 2024-03-31 20:38:37.290002919 -0400 +@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include "IFCUtil.h" + #include "Common/PolyTools.h" + #include "PostProcessing/ProcessHelper.h" +-#include "contrib/poly2tri/poly2tri/poly2tri.h" ++#include + #include "contrib/clipper/clipper.hpp" + + #include +diff -up ./code/AssetLib/MMD/MMDPmxParser.cpp.unbundle ./code/AssetLib/MMD/MMDPmxParser.cpp +--- ./code/AssetLib/MMD/MMDPmxParser.cpp.unbundle 2023-09-25 10:46:51.000000000 -0400 ++++ ./code/AssetLib/MMD/MMDPmxParser.cpp 2024-03-31 20:36:05.295864985 -0400 +@@ -42,11 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include + #include "MMDPmxParser.h" + #include +-#ifdef ASSIMP_USE_HUNTER +-# include +-#else +-# include "../contrib/utf8cpp/source/utf8.h" +-#endif ++#include + #include + + namespace pmx +diff -up ./code/AssetLib/SIB/SIBImporter.cpp.unbundle ./code/AssetLib/SIB/SIBImporter.cpp +--- ./code/AssetLib/SIB/SIBImporter.cpp.unbundle 2023-09-25 10:46:51.000000000 -0400 ++++ ./code/AssetLib/SIB/SIBImporter.cpp 2024-03-31 20:36:05.296864986 -0400 +@@ -56,11 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #include + #include + #include +-#ifdef ASSIMP_USE_HUNTER + #include +-#else +-#include "../contrib/utf8cpp/source/utf8.h" +-#endif + #include + #include + #include +diff -up ./code/AssetLib/STEPParser/STEPFileEncoding.cpp.unbundle ./code/AssetLib/STEPParser/STEPFileEncoding.cpp +--- ./code/AssetLib/STEPParser/STEPFileEncoding.cpp.unbundle 2023-09-25 10:46:51.000000000 -0400 ++++ ./code/AssetLib/STEPParser/STEPFileEncoding.cpp 2024-03-31 20:36:05.295864985 -0400 +@@ -45,11 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + */ + #include "STEPFileEncoding.h" + #include +-#ifdef ASSIMP_USE_HUNTER +-# include +-#else +-# include +-#endif ++#include + + #include + +diff -up ./code/CMakeLists.txt.unbundle ./code/CMakeLists.txt +--- ./code/CMakeLists.txt.unbundle 2023-09-25 10:46:51.000000000 -0400 ++++ ./code/CMakeLists.txt 2024-03-31 20:41:45.135187104 -0400 +@@ -910,12 +910,7 @@ IF(ASSIMP_HUNTER_ENABLED) + hunter_add_package(pugixml) + find_package(pugixml CONFIG REQUIRED) + ELSE() +- SET( Pugixml_SRCS +- ../contrib/pugixml/src/pugiconfig.hpp +- ../contrib/pugixml/src/pugixml.hpp +- ) +- INCLUDE_DIRECTORIES("../contrib/pugixml/src") +- SOURCE_GROUP( Contrib\\Pugixml FILES ${Pugixml_SRCS}) ++ find_package(pugixml REQUIRED) + ENDIF() + + # utf8 +@@ -923,7 +918,7 @@ IF(ASSIMP_HUNTER_ENABLED) + hunter_add_package(utf8) + find_package(utf8cpp CONFIG REQUIRED) + ELSE() +- # utf8 is header-only, so Assimp doesn't need to do anything. ++ find_package(utf8cpp) + ENDIF() + + # polyclipping +@@ -939,10 +934,10 @@ ENDIF() + #ENDIF() + + # poly2tri +-#IF(ASSIMP_HUNTER_ENABLED) +-# hunter_add_package(poly2tri) +-# find_package(poly2tri CONFIG REQUIRED) +-#ELSE() ++IF(HAVE_POLY2TRI) ++ include_directories(${POLY2TRI_INCLUDE_PATH}) ++ set(Poly2Tri_SRCS "") ++ELSE() + SET( Poly2Tri_SRCS + ../contrib/poly2tri/poly2tri/common/shapes.cc + ../contrib/poly2tri/poly2tri/common/shapes.h +@@ -957,13 +952,13 @@ ENDIF() + ../contrib/poly2tri/poly2tri/sweep/sweep_context.h + ) + SOURCE_GROUP( Contrib\\Poly2Tri FILES ${Poly2Tri_SRCS}) +-#ENDIF() ++ENDIF() + + # minizip/unzip +-IF(ASSIMP_HUNTER_ENABLED) +- hunter_add_package(minizip) +- find_package(minizip CONFIG REQUIRED) +-ELSE() ++#IF(ASSIMP_HUNTER_ENABLED) ++# hunter_add_package(minizip) ++# find_package(minizip CONFIG REQUIRED) ++#ELSE() + SET( unzip_SRCS + ../contrib/unzip/crypt.h + ../contrib/unzip/ioapi.c +@@ -972,7 +967,7 @@ ELSE() + ../contrib/unzip/unzip.h + ) + SOURCE_GROUP(Contrib\\unzip FILES ${unzip_SRCS}) +-ENDIF() ++#ENDIF() + + # zip (https://github.com/kuba--/zip) + separate_arguments(ASSIMP_EXPORTERS_LIST UNIX_COMMAND ${ASSIMP_EXPORTERS_ENABLED}) +@@ -1068,6 +1063,7 @@ ENDIF () + IF (NOT ASSIMP_HUNTER_ENABLED AND (RT_FOUND OR WIN32)) + SET( ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC 1 ) + ADD_DEFINITIONS( -DASSIMP_IMPORTER_GLTF_USE_OPEN3DGC=1 ) ++ INCLUDE_DIRECTORIES( "../contrib" ) + ELSE () + SET (open3dgc_SRCS "") + MESSAGE (INFO " Hunter enabled or RT-extension not found. glTF import/export will be built without Open3DGC-compression.") +@@ -1079,7 +1075,8 @@ IF(ASSIMP_HUNTER_ENABLED) + hunter_add_package(RapidJSON) + find_package(RapidJSON CONFIG REQUIRED) + ELSE() +- INCLUDE_DIRECTORIES("../contrib/rapidjson/include") ++ find_package(RapidJSON REQUIRED) ++ include_directories(${RapidJSON_INCLUDE_DIRS}) + ADD_DEFINITIONS( -DRAPIDJSON_HAS_STDSTRING=1) + option( ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR "Suppress rapidjson warning on MSVC (NOTE: breaks android build)" ON ) + if(ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR) +@@ -1092,11 +1089,6 @@ IF(ASSIMP_HUNTER_ENABLED) + hunter_add_package(stb) + find_package(stb CONFIG REQUIRED) + ELSE() +- SET( stb_SRCS +- ../contrib/stb/stb_image.h +- ) +- INCLUDE_DIRECTORIES("../contrib") +- SOURCE_GROUP( Contrib\\stb FILES ${stb_SRCS}) + ENDIF() + + # VC2010 fixes +@@ -1269,8 +1261,7 @@ IF(ASSIMP_HUNTER_ENABLED) + PUBLIC + #polyclipping::polyclipping + openddlparser::openddl_parser +- #poly2tri::poly2tri +- minizip::minizip ++ poly2tri::poly2tri + ZLIB::zlib + RapidJSON::rapidjson + utf8cpp +@@ -1289,6 +1280,16 @@ ELSE() + if (ASSIMP_BUILD_DRACO) + target_link_libraries(assimp ${draco_LIBRARIES}) + endif() ++ ++ TARGET_LINK_LIBRARIES(assimp pugixml) ++ ++ IF (HAVE_POLY2TRI) ++ TARGET_LINK_LIBRARIES(assimp ${POLY2TRI_LIB}) ++ ENDIF() ++ ++ IF (HAVE_CLIPPER) ++ TARGET_LINK_LIBRARIES(assimp ${CLIPPER_LIB}) ++ ENDIF() + ENDIF() + + if(ASSIMP_ANDROID_JNIIOSYSTEM) +diff -up ./code/Common/BaseImporter.cpp.unbundle ./code/Common/BaseImporter.cpp +--- ./code/Common/BaseImporter.cpp.unbundle 2023-09-25 10:46:51.000000000 -0400 ++++ ./code/Common/BaseImporter.cpp 2024-03-31 20:36:05.294864983 -0400 +@@ -357,11 +357,7 @@ std::string BaseImporter::GetExtension(c + return false; + } + +-#ifdef ASSIMP_USE_HUNTER + #include +-#else +-#include "../contrib/utf8cpp/source/utf8.h" +-#endif + + // ------------------------------------------------------------------------------------------------ + // Convert to UTF8 data +diff -up ./samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp.unbundle ./samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp +--- ./samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp.unbundle 2023-09-25 10:46:51.000000000 -0400 ++++ ./samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp 2024-03-31 20:36:05.297864988 -0400 +@@ -23,7 +23,7 @@ + #endif // _MSC_VER + + #define STB_IMAGE_IMPLEMENTATION +-#include "contrib/stb/stb_image.h" ++#include "stb_image.h" + + #ifdef _MSC_VER + #pragma warning(default: 4100) // Enable warning 'unreferenced formal parameter' +diff -up ./test/unit/utglTF2ImportExport.cpp.unbundle ./test/unit/utglTF2ImportExport.cpp +--- ./test/unit/utglTF2ImportExport.cpp.unbundle 2023-09-25 10:46:51.000000000 -0400 ++++ ./test/unit/utglTF2ImportExport.cpp 2024-03-31 20:36:05.297864988 -0400 +@@ -805,7 +805,7 @@ namespace { + rapidjson::Document schemaDoc; + schemaDoc.Parse(R"==({"properties":{"scene" : { "type" : "integer" }}, "required": [ "scene" ]})=="); + EXPECT_FALSE(schemaDoc.HasParseError()); +- m_schema.reset(new rapidjson::SchemaDocument(schemaDoc, m_schemaName.c_str(), static_cast(m_schemaName.size()), this)); ++ m_schema.reset(new rapidjson::SchemaDocument(schemaDoc, this)); + } + + const rapidjson::SchemaDocument* GetRemoteDocument(const char* uri, rapidjson::SizeType) override { diff --git a/assimp.spec b/assimp.spec index aceead6..958a2a1 100644 --- a/assimp.spec +++ b/assimp.spec @@ -1,9 +1,8 @@ -%undefine __cmake_in_source_build %define soversion 5 Name: assimp -Version: 5.2.5 -Release: 4%{?dist} +Version: 5.3.1 +Release: 1%{?dist} Summary: Library to import various 3D model formats into applications # Assimp is BSD @@ -23,15 +22,15 @@ Source0: %{name}-%{version}-free.tar.xz Source1: assimp_generate_tarball.sh # Un-bundle libraries that are provided by the distribution. -Patch0: %{name}-5.2.5-unbundle.patch +Patch0: %{name}-5.3.1-unbundle.patch # Add /usr/lib64 to library lookup paths for python modules Patch1: %{name}-5.1.0-pythonpath.patch # Prevent export of bundled zlibstatic library Patch2: %{name}-5.2.5-nozlib.patch # Exclude the build directory from the doxygen-generated documentation Patch3: %{name}-5.1.0-doxyfile.patch -# Enable ctest -Patch4: %{name}-5.2.5-tests.patch +# Enable ctest and correct the project version +Patch4: %{name}-5.3.1-tests.patch BuildRequires: boost-devel BuildRequires: cmake @@ -199,6 +198,10 @@ rm -f %{buildroot}%{_libdir}/libzlibstatic.a %endif %changelog +* Sun Mar 31 2024 Rich Mattes - 5.3.1-1 +- Update to release 5.3.1 +- Resolves: rhbz#2256587 + * Mon Jan 22 2024 Fedora Release Engineering - 5.2.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/assimp_generate_tarball.sh b/assimp_generate_tarball.sh index d29700c..2542a8d 100755 --- a/assimp_generate_tarball.sh +++ b/assimp_generate_tarball.sh @@ -1,5 +1,5 @@ #!/bin/bash -RELEASE=5.2.5 +RELEASE=5.3.1 if [ ! -f assimp-$RELEASE.tar.gz ]; then wget https://github.com/assimp/assimp/archive/v$RELEASE/assimp-$RELEASE.tar.gz @@ -15,4 +15,4 @@ find ./ -name "*.dll" -exec git rm -r {} \; rm -r test/models-nonbsd cd .. -tar czf assimp-5.2.5-free.tar.xz assimp-$RELEASE +tar czf assimp-$RELEASE-free.tar.xz assimp-$RELEASE diff --git a/sources b/sources index 94eb3ce..be1a1ca 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (assimp-5.2.5-free.tar.xz) = 83f4b3fe97f6fb3f119748908b9bb09a5e0dec509fc70823e3974848c1e9e8d0596d73cbafd779ab956d8dc2d92047b593ca1be213db27ec65002e1d7b6f542c +SHA512 (assimp-5.3.1-free.tar.xz) = 480ef268a811bf575fe20e6514666dd854c23923a841f8caac4edde1338eda774de84d0425ba1e41897f613d16ca2fb0b7d625c51c1777d2b21a090306b6db9c