Compare commits

..

2 commits

Author SHA1 Message Date
Scott K Logan
e20962cbb7 Add pugixml and poly2tri devel dependencies to assimp-devel 2024-01-04 11:32:19 -06:00
Scott K Logan
d22c6d6356 RHEL 9 fixes: revert patch macros and GCC warning suppression 2023-12-13 13:58:51 -06:00
15 changed files with 496 additions and 501 deletions

3
.gitignore vendored
View file

@ -6,6 +6,3 @@
/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
/assimp-5.4.3-free.tar.xz
/assimp-6.0.2-free.tar.xz

View file

@ -1,24 +0,0 @@
diff -rupN --no-dereference assimp-6.0.2/code/AssetLib/Q3D/Q3DLoader.cpp assimp-6.0.2-new/code/AssetLib/Q3D/Q3DLoader.cpp
--- assimp-6.0.2/code/AssetLib/Q3D/Q3DLoader.cpp 2025-06-08 21:50:39.000000000 +0200
+++ assimp-6.0.2-new/code/AssetLib/Q3D/Q3DLoader.cpp 2025-12-14 20:02:55.733930684 +0100
@@ -55,6 +55,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
#include <assimp/DefaultLogger.hpp>
#include <assimp/IOSystem.hpp>
+#include <limits>
+
namespace Assimp {
static constexpr aiImporterDesc desc = {
@@ -309,6 +311,11 @@ void Q3DImporter::InternReadFile(const s
throw DeadlyImportError("Quick3D: Invalid texture. Width or height is zero");
}
+ const unsigned int uint_max = std::numeric_limits<unsigned int>::max();
+ if (tex->mWidth > (uint_max / tex->mHeight)) {
+ throw DeadlyImportError("Quick3D: Texture dimensions are too large, resulting in overflow.");
+ }
+
unsigned int mul = tex->mWidth * tex->mHeight;
aiTexel *begin = tex->pcData = new aiTexel[mul];
aiTexel *const end = &begin[mul - 1] + 1;

View file

@ -0,0 +1,13 @@
diff -up ./doc/Doxyfile.in.doxyfile ./doc/Doxyfile.in
--- ./doc/Doxyfile.in.doxyfile 2020-01-12 06:56:40.000000000 -0500
+++ ./doc/Doxyfile.in 2021-02-27 18:12:22.953572564 -0500
@@ -703,7 +702,8 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE = contrib/*
+EXCLUDE = contrib/* \
+ @PROJECT_BINARY_DIR@
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded

View file

@ -1,7 +1,7 @@
diff -rupN --no-dereference assimp-6.0.2/port/PyAssimp/pyassimp/helper.py assimp-6.0.2-new/port/PyAssimp/pyassimp/helper.py
--- assimp-6.0.2/port/PyAssimp/pyassimp/helper.py 2025-06-08 21:50:39.000000000 +0200
+++ assimp-6.0.2-new/port/PyAssimp/pyassimp/helper.py 2025-08-17 10:36:52.891631207 +0200
@@ -29,6 +29,7 @@ additional_dirs, ext_whitelist = [],[]
diff -up ./port/PyAssimp/pyassimp/helper.py.pythonpath ./port/PyAssimp/pyassimp/helper.py
--- ./port/PyAssimp/pyassimp/helper.py.pythonpath 2021-02-27 18:03:01.858146645 -0500
+++ ./port/PyAssimp/pyassimp/helper.py 2021-02-27 18:04:18.595341644 -0500
@@ -25,6 +25,7 @@ additional_dirs, ext_whitelist = [],[]
# depending on the platform we're running on.
if os.name=='posix':
additional_dirs.append('./')
@ -9,7 +9,7 @@ diff -rupN --no-dereference assimp-6.0.2/port/PyAssimp/pyassimp/helper.py assimp
additional_dirs.append('/usr/lib/')
additional_dirs.append('/usr/lib/x86_64-linux-gnu/')
additional_dirs.append('/usr/lib/aarch64-linux-gnu/')
@@ -54,6 +55,7 @@ if os.name=='posix':
@@ -46,6 +47,7 @@ if os.name=='posix':
# currently there's always a symlink called
# libassimp.so in /usr/local/lib.
ext_whitelist.append('.so')

12
assimp-5.2.5-nozlib.patch Normal file
View file

@ -0,0 +1,12 @@
diff -uNr a/contrib/zlib/CMakeLists.txt b/contrib/zlib/CMakeLists.txt
--- a/contrib/zlib/CMakeLists.txt 2022-09-08 11:13:43.000000000 -0700
+++ b/contrib/zlib/CMakeLists.txt 2023-01-17 15:29:47.187803181 -0800
@@ -196,7 +196,7 @@
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
endif(MINGW)
-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
+add_library(zlibstatic OBJECT ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
INSTALL( TARGETS zlibstatic
EXPORT "${TARGETS_EXPORT_NAME}"

49
assimp-5.2.5-tests.patch Normal file
View file

@ -0,0 +1,49 @@
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 ) {

338
assimp-5.2.5-unbundle.patch Normal file
View file

@ -0,0 +1,338 @@
--- ./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 <poly2tri/poly2tri.h>
-#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 <utf8.h>
-#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 <poly2tri/poly2tri.h>
-# include <polyclipping/clipper.hpp>
-#else
-# include "../contrib/poly2tri/poly2tri/poly2tri.h"
-# include "../contrib/clipper/clipper.hpp"
-#endif
+#include <poly2tri/poly2tri.h>
+#include <../contrib/clipper/clipper.hpp>
#include <memory>
#include <iterator>
--- ./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 <poly2tri/poly2tri.h>
-# include <polyclipping/clipper.hpp>
-#else
-# include "../contrib/poly2tri/poly2tri/poly2tri.h"
-# include "../contrib/clipper/clipper.hpp"
-#endif
+#include <poly2tri/poly2tri.h>
+#include <../contrib/clipper/clipper.hpp>
#include <iterator>
#include <forward_list>
--- ./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 <assimp/fast_atof.h>
-#ifdef ASSIMP_USE_HUNTER
-# include <utf8.h>
-#else
-# include <contrib/utf8cpp/source/utf8.h>
-#endif
+#include <utf8.h>
#include <memory>
--- ./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 <utility>
#include "MMDPmxParser.h"
#include <assimp/StringUtils.h>
-#ifdef ASSIMP_USE_HUNTER
-# include <utf8.h>
-#else
-# include "../contrib/utf8cpp/source/utf8.h"
-#endif
+#include <utf8.h>
#include <assimp/Exceptional.h>
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 <assimp/ByteSwapper.h>
#include <assimp/StreamReader.h>
#include <assimp/TinyFormatter.h>
-#ifdef ASSIMP_USE_HUNTER
#include <utf8.h>
-#else
-#include "../contrib/utf8cpp/source/utf8.h"
-#endif
#include <assimp/importerdesc.h>
#include <assimp/scene.h>
#include <assimp/DefaultLogger.hpp>
--- ./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 <assimp/DefaultLogger.hpp>
#include <assimp/Base64.hpp>
+#include <rapidjson/stringbuffer.h>
+
// 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<rapidjson::SizeType>(m_schemaName.size()), this));
+ m_schema.reset(new rapidjson::SchemaDocument(schemaDoc, this));
}
const rapidjson::SchemaDocument* GetRemoteDocument(const char* uri, rapidjson::SizeType) override {

View file

@ -1,37 +0,0 @@
diff -rupN --no-dereference assimp-6.0.2/doc/CMakeLists.txt assimp-6.0.2-new/doc/CMakeLists.txt
--- assimp-6.0.2/doc/CMakeLists.txt 2025-06-08 21:50:39.000000000 +0200
+++ assimp-6.0.2-new/doc/CMakeLists.txt 2025-08-17 10:36:53.475374100 +0200
@@ -33,9 +33,9 @@ if( DEFINED CMAKE_INSTALL_DOCDIR )
DESTINATION ${CMAKE_INSTALL_DOCDIR}
)
install(FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/AssimpDoc_Html/AnimationOverview.png
- ${CMAKE_CURRENT_SOURCE_DIR}/AssimpDoc_Html/AnimationOverview.svg
- ${CMAKE_CURRENT_SOURCE_DIR}/AssimpDoc_Html/dragonsplash.png
+ ${CMAKE_CURRENT_SOURCE_DIR}/architecture/AnimationOverview.png
+ ${CMAKE_CURRENT_SOURCE_DIR}/architecture/AnimationOverview.svg
+ ${CMAKE_CURRENT_SOURCE_DIR}/images/dragonsplash.png
DESTINATION ${CMAKE_INSTALL_DOCDIR}/${HTML_OUTPUT}
)
endif()
diff -rupN --no-dereference assimp-6.0.2/doc/Doxyfile.in assimp-6.0.2-new/doc/Doxyfile.in
--- assimp-6.0.2/doc/Doxyfile.in 2025-06-08 21:50:39.000000000 +0200
+++ assimp-6.0.2-new/doc/Doxyfile.in 2025-08-17 10:36:53.474954432 +0200
@@ -952,7 +952,7 @@ RECURSIVE = NO
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE = @PROJECT_BINARY_DIR@
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
@@ -1221,7 +1221,7 @@ GENERATE_HTML = YES
# The default directory is: html.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_OUTPUT = html
+HTML_OUTPUT = AssimpDoc_Html
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
# generated HTML page (for example: .htm, .php, .asp).

View file

@ -1,12 +0,0 @@
diff -rupN --no-dereference assimp-6.0.2/contrib/zlib/CMakeLists.txt assimp-6.0.2-new/contrib/zlib/CMakeLists.txt
--- assimp-6.0.2/contrib/zlib/CMakeLists.txt 2025-06-08 21:50:39.000000000 +0200
+++ assimp-6.0.2-new/contrib/zlib/CMakeLists.txt 2025-08-17 10:36:53.187611066 +0200
@@ -196,7 +196,7 @@ if(MINGW)
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
endif(MINGW)
-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
+add_library(zlibstatic OBJECT ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
IF(ASSIMP_INSTALL)
INSTALL( TARGETS zlibstatic

View file

@ -1,28 +0,0 @@
diff -rupN --no-dereference assimp-6.0.2/CMakeLists.txt assimp-6.0.2-new/CMakeLists.txt
--- assimp-6.0.2/CMakeLists.txt 2025-06-08 21:50:39.000000000 +0200
+++ assimp-6.0.2-new/CMakeLists.txt 2025-08-17 10:36:53.765126531 +0200
@@ -813,6 +813,7 @@ IF ( ASSIMP_BUILD_SAMPLES )
ENDIF ()
IF ( ASSIMP_BUILD_TESTS )
+ ENABLE_TESTING()
ADD_SUBDIRECTORY( test/ )
ENDIF ()
diff -rupN --no-dereference assimp-6.0.2/test/CMakeLists.txt assimp-6.0.2-new/test/CMakeLists.txt
--- assimp-6.0.2/test/CMakeLists.txt 2025-08-17 10:36:52.887323815 +0200
+++ assimp-6.0.2-new/test/CMakeLists.txt 2025-08-17 10:36:53.765489323 +0200
@@ -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)

View file

@ -1,248 +0,0 @@
diff -rupN --no-dereference assimp-6.0.2/code/AssetLib/Blender/BlenderTessellator.h assimp-6.0.2-new/code/AssetLib/Blender/BlenderTessellator.h
--- assimp-6.0.2/code/AssetLib/Blender/BlenderTessellator.h 2025-06-08 21:50:39.000000000 +0200
+++ assimp-6.0.2-new/code/AssetLib/Blender/BlenderTessellator.h 2025-08-18 20:15:00.250159883 +0200
@@ -143,7 +143,7 @@ namespace Assimp
#if ASSIMP_BLEND_WITH_POLY_2_TRI
-#include "contrib/poly2tri/poly2tri/poly2tri.h"
+#include <poly2tri/poly2tri.h>
namespace Assimp
{
diff -rupN --no-dereference assimp-6.0.2/code/AssetLib/IFC/IFCGeometry.cpp assimp-6.0.2-new/code/AssetLib/IFC/IFCGeometry.cpp
--- assimp-6.0.2/code/AssetLib/IFC/IFCGeometry.cpp 2025-06-08 21:50:39.000000000 +0200
+++ assimp-6.0.2-new/code/AssetLib/IFC/IFCGeometry.cpp 2025-08-18 20:15:00.250503229 +0200
@@ -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 <poly2tri/poly2tri.h>
#include "contrib/clipper/clipper.hpp"
#include <iterator>
diff -rupN --no-dereference assimp-6.0.2/code/AssetLib/IFC/IFCOpenings.cpp assimp-6.0.2-new/code/AssetLib/IFC/IFCOpenings.cpp
--- assimp-6.0.2/code/AssetLib/IFC/IFCOpenings.cpp 2025-06-08 21:50:39.000000000 +0200
+++ assimp-6.0.2-new/code/AssetLib/IFC/IFCOpenings.cpp 2025-08-18 20:15:00.250876754 +0200
@@ -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 <poly2tri/poly2tri.h>
#include "contrib/clipper/clipper.hpp"
#include <deque>
diff -rupN --no-dereference assimp-6.0.2/code/CMakeLists.txt assimp-6.0.2-new/code/CMakeLists.txt
--- assimp-6.0.2/code/CMakeLists.txt 2025-06-08 21:50:39.000000000 +0200
+++ assimp-6.0.2-new/code/CMakeLists.txt 2025-08-18 20:15:00.254124936 +0200
@@ -1120,13 +1120,7 @@ IF(ASSIMP_HUNTER_ENABLED)
hunter_add_package(pugixml)
find_package(pugixml CONFIG REQUIRED)
ELSEIF(NOT TARGET pugixml::pugixml)
- SET( Pugixml_SRCS
- ../contrib/pugixml/src/pugiconfig.hpp
- ../contrib/pugixml/src/pugixml.cpp
- ../contrib/pugixml/src/pugixml.hpp
- )
- INCLUDE_DIRECTORIES("../contrib/pugixml/src")
- SOURCE_GROUP( Contrib\\Pugixml FILES ${Pugixml_SRCS})
+ find_package(pugixml REQUIRED)
ENDIF()
# utf8
@@ -1134,7 +1128,7 @@ IF(ASSIMP_HUNTER_ENABLED)
hunter_add_package(utf8)
find_package(utf8cpp CONFIG REQUIRED)
ELSE()
- INCLUDE_DIRECTORIES("../contrib/utf8cpp/source")
+ find_package(utf8cpp CONFIG REQUIRED)
ENDIF()
# polyclipping
@@ -1150,10 +1144,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
@@ -1168,13 +1162,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
@@ -1183,7 +1177,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})
@@ -1279,6 +1273,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.")
@@ -1290,7 +1285,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)
@@ -1303,11 +1299,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
@@ -1489,7 +1480,6 @@ IF(ASSIMP_HUNTER_ENABLED)
TARGET_LINK_LIBRARIES(assimp
PUBLIC
openddlparser::openddl_parser
- minizip::minizip
ZLIB::zlib
RapidJSON::rapidjson
utf8cpp
@@ -1508,9 +1498,16 @@ ELSE()
if (ASSIMP_BUILD_DRACO)
target_link_libraries(assimp ${draco_LIBRARIES})
endif()
- if(TARGET pugixml::pugixml)
- target_link_libraries(assimp pugixml::pugixml)
- 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 -rupN --no-dereference assimp-6.0.2/code/PostProcessing/TriangulateProcess.cpp assimp-6.0.2-new/code/PostProcessing/TriangulateProcess.cpp
--- assimp-6.0.2/code/PostProcessing/TriangulateProcess.cpp 2025-06-08 21:50:39.000000000 +0200
+++ assimp-6.0.2-new/code/PostProcessing/TriangulateProcess.cpp 2025-08-18 20:15:00.251686318 +0200
@@ -62,7 +62,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
#include "PostProcessing/TriangulateProcess.h"
#include "PostProcessing/ProcessHelper.h"
#include "Common/PolyTools.h"
-#include "contrib/earcut-hpp/earcut.hpp"
+#include <mapbox/earcut.hpp>
#include <memory>
#include <cstdint>
diff -rupN --no-dereference assimp-6.0.2/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp assimp-6.0.2-new/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp
--- assimp-6.0.2/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp 2025-06-08 21:50:39.000000000 +0200
+++ assimp-6.0.2-new/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp 2025-08-18 20:15:00.252020642 +0200
@@ -24,7 +24,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 -rupN --no-dereference assimp-6.0.2/test/CMakeLists.txt assimp-6.0.2-new/test/CMakeLists.txt
--- assimp-6.0.2/test/CMakeLists.txt 2025-06-08 21:50:39.000000000 +0200
+++ assimp-6.0.2-new/test/CMakeLists.txt 2025-08-18 20:15:00.253409037 +0200
@@ -43,14 +43,6 @@ INCLUDE_DIRECTORIES(
${Assimp_SOURCE_DIR}/code
)
-if(NOT ASSIMP_HUNTER_ENABLED)
- INCLUDE_DIRECTORIES(
- ${Assimp_SOURCE_DIR}/contrib/googletest/googletest/include
- ${Assimp_SOURCE_DIR}/contrib/googletest/googletest/
- ${Assimp_SOURCE_DIR}/contrib/pugixml/src
- )
-endif()
-
if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING")
endif()
@@ -234,26 +226,11 @@ add_executable( unit
${POST_PROCESSES}
)
-if(ASSIMP_HUNTER_ENABLED)
- hunter_add_package(GTest)
- find_package(GTest CONFIG REQUIRED)
- target_link_libraries(unit GTest::gtest_main GTest::gmock)
-else()
- target_sources(unit PUBLIC ${Assimp_SOURCE_DIR}/contrib/googletest/googletest/src/gtest-all.cc)
-endif()
+find_package(GTest CONFIG REQUIRED)
+target_link_libraries(unit GTest::gtest_main GTest::gmock)
# RapidJSON
-IF(ASSIMP_HUNTER_ENABLED)
- hunter_add_package(RapidJSON)
- find_package(RapidJSON CONFIG REQUIRED)
-ELSE()
- INCLUDE_DIRECTORIES("../contrib/rapidjson/include")
- 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)
- ADD_DEFINITIONS( -DRAPIDJSON_NOMEMBERITERATORCLASS )
- endif()
-ENDIF()
+find_package(RapidJSON CONFIG REQUIRED)
IF (ASSIMP_BUILD_DRACO)
ADD_DEFINITIONS( -DASSIMP_ENABLE_DRACO )
diff -rupN --no-dereference assimp-6.0.2/test/unit/utglTF2ImportExport.cpp assimp-6.0.2-new/test/unit/utglTF2ImportExport.cpp
--- assimp-6.0.2/test/unit/utglTF2ImportExport.cpp 2025-06-08 21:50:39.000000000 +0200
+++ assimp-6.0.2-new/test/unit/utglTF2ImportExport.cpp 2025-08-18 20:15:00.253778700 +0200
@@ -986,7 +986,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<rapidjson::SizeType>(m_schemaName.size()), this));
+ m_schema.reset(new rapidjson::SchemaDocument(schemaDoc, 0, 0, this));
}
const rapidjson::SchemaDocument* GetRemoteDocument(const char* uri, rapidjson::SizeType) override {

View file

@ -1,8 +1,9 @@
%define soversion 6
%undefine __cmake_in_source_build
%define soversion 5
Name: assimp
Version: 6.0.2
Release: 6%{?dist}
Version: 5.2.5
Release: 2%{?dist}
Summary: Library to import various 3D model formats into applications
# Assimp is BSD
@ -13,7 +14,7 @@ Summary: Library to import various 3D model formats into applications
# Bundled contrib/unzip is zlib
# Bundled contrib/zip is unlicense
# Bundled contrib/zlib is zlib
License: BSD-3-Clause AND MIT AND BSL-1.0 AND Unlicense AND Zlib
License: BSD and MIT and Boost and Unlicense and zlib
URL: https://github.com/assimp/assimp
# Github releases include nonfree models, source tarball must be re-generated
@ -21,28 +22,21 @@ URL: https://github.com/assimp/assimp
Source0: %{name}-%{version}-free.tar.xz
Source1: assimp_generate_tarball.sh
# Un-bundle poly2tri, pugixml, utf8cpp, RapidJSON, clipper
Patch0: %{name}-unbundle.patch
# Un-bundle libraries that are provided by the distribution.
Patch0: %{name}-5.2.5-unbundle.patch
# Add /usr/lib64 to library lookup paths for python modules
Patch1: %{name}-pythonpath.patch
Patch1: %{name}-5.1.0-pythonpath.patch
# Prevent export of bundled zlibstatic library
Patch2: %{name}-nozlib.patch
Patch2: %{name}-5.2.5-nozlib.patch
# Exclude the build directory from the doxygen-generated documentation
# Fix HTML_OUTPUT dir in doxyfile
# Fix installing images from doc/architecture
Patch3: %{name}-docs.patch
Patch3: %{name}-5.1.0-doxyfile.patch
# Enable ctest
Patch4: %{name}-tests.patch
# Backport fix for CVE-2025-11277
Patch5: https://github.com/assimp/assimp/commit/0978918f7148fbcd3d05cc6573dae7859975a895.patch
# PyAssimp: Re-add 'aiProcess_Triangulate' (#2423174)
Patch6: https://github.com/assimp/assimp/commit/dd98d4aea3d9d2b3544540ea44eeb15c3616dbb7.patch
Patch4: %{name}-5.2.5-tests.patch
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: dos2unix
BuildRequires: doxygen
BuildRequires: earcut-hpp-devel
BuildRequires: gcc-c++
BuildRequires: gtest-devel
BuildRequires: make
@ -50,12 +44,28 @@ BuildRequires: pkgconfig(python3)
BuildRequires: poly2tri-devel
BuildRequires: pugixml-devel
BuildRequires: python3-devel
BuildRequires: zlib-devel
# Need to BR -static packages for header-only libraries for tracking, per
# guidelines
BuildRequires: rapidjson-devel
BuildRequires: rapidjson-static
BuildRequires: stb_image-devel
# Enforce the the minimum EVR to contain fixes for all of:
# CVE-2021-28021
# CVE-2021-42715
# CVE-2021-42716
# CVE-2022-28041
# CVE-2023-43898
# CVE-2023-45661
# CVE-2023-45662
# CVE-2023-45663
# CVE-2023-45664
# CVE-2023-45666
# CVE-2023-45667
%if 0%{?el7} || 0%{?el8}
%global min_stb_image 2.28-0.39.20231011gitbeebb24
%else
%global min_stb_image 2.28^20231011gitbeebb24-12
%endif
BuildRequires: stb_image-devel >= %{min_stb_image}
BuildRequires: stb_image-static
BuildRequires: utf8cpp-devel
BuildRequires: utf8cpp-static
@ -67,7 +77,7 @@ Provides: bundled(open3dgc)
Provides: bundled(openddl-parser)
Provides: bundled(unzip)
Provides: bundled(minzip)
Provides: bundled(zlib)
%description
Assimp, the Open Asset Import Library, is a free library to import
@ -76,7 +86,6 @@ to provide a full asset conversion pipeline for use in game
engines and real-time rendering systems, but is not limited
to these applications.
%package devel
Summary: Header files and libraries for assimp
Requires: %{name}%{?_isa} = %{version}-%{release}
@ -88,15 +97,18 @@ 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.
%if 0%{?fedora} || 0%{?rhel} > 7
%package -n python3-%{name}
Summary: Python 3 bindings for assimp
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
Requires: python3
Provides: %{name}-python3 = %{version}-%{release}
Obsoletes: %{name}-python3 < 3.1.1
%description -n python3-%{name}
This package contains the PyAssimp3 python bindings
%endif
%package doc
Summary: Assimp documentation
@ -105,51 +117,61 @@ BuildArch: noarch
%description doc
%{summary}.
%prep
%autosetup -p1 -n %{name}-%{version}
# Get rid of bundled libs so we can't accidently build against them, except:
# - clipper: Unpackaged
# - Open3DGC: Unpackaged
# - openddlparser: Unpackaged
# - tinyusdz: Unpackaged
# - unzip: Modified minizip
# - zip: Modified minizip
find contrib/ -maxdepth 1 -mindepth 1 \
| grep -Ev '(clipper|Open3DGC|openddlparser|tinyusdz|unzip|zip)' \
| xargs rm -r
%setup -q
# Get rid of bundled libs so we can't accidently build against them
rm -r contrib/android-cmake
rm -r contrib/draco
rm -r contrib/poly2tri
rm -r contrib/pugixml
rm -r contrib/rapidjson
rm -r contrib/stb
rm -r contrib/utf8cpp
%patch0 -p1 -b .unbundle
%patch1 -p1 -b .pythonpath
%patch2 -p1 -b .nozlib
%patch3 -p1 -b .doxyfile
%patch4 -p0 -b .tests
mv contrib/openddlparser/LICENSE contrib/openddlparser/LICENSE.openddlparser
%build
%cmake \
-DCMAKE_BUILD_TYPE=Release \
-DASSIMP_LIB_INSTALL_DIR=%{_lib} \
-DASSIMP_WARNINGS_AS_ERRORS=OFF \
%ifarch s390x ppc64
-DAI_BUILD_BIG_ENDIAN=TRUE \
%endif
-DASSIMP_WARNINGS_AS_ERRORS=OFF \
-DASSIMP_BUILD_ASSIMP_TOOLS=ON \
-DASSIMP_BUILD_DOCS=ON \
-DASSIMP_IGNORE_GIT_HASH=ON \
-DASSIMP_BUILD_ASSIMP_TOOLS=TRUE \
-DASSIMP_BUILD_DOCS=OFF \
-DASSIMP_BUILD_DRACO=OFF \
-DHTML_OUTPUT=%{name}-%{version} \
-DCMAKE_INSTALL_DOCDIR=%{_docdir} \
-DHAVE_POLY2TRI=ON \
-DPOLY2TRI_INCLUDE_PATH=%{_includedir}/poly2tri \
-DPOLY2TRI_LIB=poly2tri \
-DCMAKE_INSTALL_DOCDIR=%{_defaultdocdir}/%{name}
-DASSIMP_BUILD_ZLIB=ON
# To use system polyclipping if assimp ever becomes compatible:
# -DCLIPPER_INCLUDE_PATH=%{_includedir}/polyclipping
%cmake_build
# Fix file encoding
dos2unix Readme.md LICENSE CREDITS port/PyAssimp/README.md
iconv -f iso8859-1 -t utf-8 CREDITS > CREDITS.conv && mv -f CREDITS.conv CREDITS
%install
%cmake_install
mkdir -p %{buildroot}%{python3_sitelib}/pyassimp/
install -m0644 port/PyAssimp/pyassimp/*.py %{buildroot}%{python3_sitelib}/pyassimp/
rm -f %{buildroot}%{_libdir}/libzlibstatic.a
%check
# Exclude tests that rely on nonbsd models
%check
%ctest --exclude-regex "utMD5Importer.importBoarMan|utMD5Importer.importBob|utMD2Importer.importDolphin|utMD2Importer.importFlag|utMD2Importer.importHorse|utQ3BSPImportExport.importerTest|utBlenderImporter.importBob|utBlenderImporter.importFleurOptonl|utPMXImporter.importTest|utXImporter.importDwarf" || :
%files
%license LICENSE
%license contrib/clipper/License.txt
@ -157,77 +179,25 @@ install -m0644 port/PyAssimp/pyassimp/*.py %{buildroot}%{python3_sitelib}/pyassi
%license contrib/zip/UNLICENSE
%doc Readme.md CREDITS
%{_bindir}/assimp
%{_libdir}/libassimp.so.%{version}
%{_libdir}/libassimp.so.%{soversion}
%{_libdir}/*.so.%{version}
%{_libdir}/*.so.%{soversion}
%files devel
%{_includedir}/assimp/
%{_libdir}/libassimp.so
%{_libdir}/pkgconfig/assimp.pc
%{_libdir}/cmake/assimp-*/
%{_includedir}/assimp
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_libdir}/cmake/*
%files doc
%{_docdir}/*
%if 0%{?fedora} || 0%{?rhel} > 7
%files -n python3-%{name}
%doc port/PyAssimp/README.md
%{python3_sitelib}/pyassimp/
%{python3_sitelib}/pyassimp
%endif
%changelog
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Sat Dec 27 2025 Sandro Mani <manisandro@gmail.com> - 6.0.2-5
- PyAssimp: Re-add 'aiProcess_Triangulate' (#2423174)
* Sun Dec 14 2025 Sandro Mani <manisandro@gmail.com> - 6.0.2-4
- Backport fix for CVE-2025-11277
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 6.0.2-3
- Rebuilt for Python 3.14.0rc3 bytecode
* Mon Aug 18 2025 Sandro Mani <manisandro@gmail.com> - 6.0.2-2
- Fix pugixml::pugixml dependency ending up in link interface of assimp::assimp
* Fri Aug 15 2025 Sandro Mani <manisandro@gmail.com> - 6.0.2-1
- Update to 6.0.2
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 5.4.3-4
- Rebuilt for Python 3.14.0rc2 bytecode
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 5.4.3-2
- Rebuilt for Python 3.14
* Sat Mar 15 2025 Rich Mattes <richmattes@gmail.com> - 5.4.3-1
- Update to release 5.4.3
- Resolves: #2274012
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Aug 28 2024 Miroslav Suchý <msuchy@redhat.com> - 5.3.1-4
- convert license to SPDX
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Jun 08 2024 Python Maint <python-maint@redhat.com> - 5.3.1-2
- Rebuilt for Python 3.13
* Sun Mar 31 2024 Rich Mattes <richmattes@gmail.com> - 5.3.1-1
- Update to release 5.3.1
- Resolves: rhbz#2256587
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jan 03 2024 Scott K Logan <logans@cottsay.net> - 5.2.5-2
- Add pugixml and poly2tri devel dependencies to assimp-devel

View file

@ -1,10 +1,5 @@
#!/bin/bash
if [ $# -lt 1 ]; then
echo "Usage: $0 version"
exit 1
fi
RELEASE=$1
RELEASE=5.2.5
if [ ! -f assimp-$RELEASE.tar.gz ]; then
wget https://github.com/assimp/assimp/archive/v$RELEASE/assimp-$RELEASE.tar.gz
@ -20,4 +15,4 @@ find ./ -name "*.dll" -exec git rm -r {} \;
rm -r test/models-nonbsd
cd ..
tar czf assimp-$RELEASE-free.tar.xz assimp-$RELEASE
tar czf assimp-5.2.5-free.tar.xz assimp-$RELEASE

View file

@ -1,30 +0,0 @@
diff -rupN --no-dereference assimp-6.0.2/port/PyAssimp/pyassimp/postprocess.py assimp-6.0.2-new/port/PyAssimp/pyassimp/postprocess.py
--- assimp-6.0.2/port/PyAssimp/pyassimp/postprocess.py 2025-06-08 21:50:39.000000000 +0200
+++ assimp-6.0.2-new/port/PyAssimp/pyassimp/postprocess.py 2025-12-27 19:11:08.846657557 +0100
@@ -36,13 +36,21 @@ aiProcess_JoinIdenticalVertices = 0x2
#
aiProcess_MakeLeftHanded = 0x4
-## <hr>Triangulates all faces of all meshes.
+## <hr>Triangulates all faces of all meshes.
#
# By default the imported mesh data might contain faces with more than 3
-# indices. For rendering you'll usually want all faces to be triangles.
-# This post processing stepaiProcess_ForceGenNormals
-## <hr>Removes some parts of the data structure (animations, materials,
-# light sources, cameras, textures, vertex components).
+# indices. For rendering you'll usually want all faces to be triangles.
+# This post processing step splits up faces with more than 3 indices into
+# triangles. Line and point primitives are *not* modified! If you want
+# 'triangles only' with no other kinds of primitives, try the following
+# solution:
+# - Specify both #aiProcess_Triangulate and #aiProcess_SortByPType
+# - Ignore all point and line meshes when you process assimp's output
+#
+aiProcess_Triangulate = 0x8
+
+# <hr>Removes some parts of the data structure (animations, materials,
+# light sources, cameras, textures, vertex components).
#
# The components to be removed are specified in a separate
# configuration option, <tt>#AI_CONFIG_PP_RVC_FLAGS<tt>. This is quite useful

View file

@ -1 +1 @@
SHA512 (assimp-6.0.2-free.tar.xz) = c2895d1185d13fdbd25499e6d916d960f124892de7363e9e91db3ed1daef554ebea462e37cbfafbe5be548e5a962f18fc9f213f836579d97e725c17aae58149b
SHA512 (assimp-5.2.5-free.tar.xz) = 83f4b3fe97f6fb3f119748908b9bb09a5e0dec509fc70823e3974848c1e9e8d0596d73cbafd779ab956d8dc2d92047b593ca1be213db27ec65002e1d7b6f542c