summaryrefslogtreecommitdiff
path: root/media-libs/assimp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-20 14:08:57 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-20 14:08:57 +0000
commit6aa0d33a65c735f3148967b62316c2e71f43589a (patch)
tree4ddfb479a93b928f4ad0507a58e779e6de3eb403 /media-libs/assimp
parenta332b8e207ac6a51fa349c699b486d870c9cdc70 (diff)
gentoo auto-resync : 20:01:2024 - 14:08:56
Diffstat (limited to 'media-libs/assimp')
-rw-r--r--media-libs/assimp/Manifest5
-rw-r--r--media-libs/assimp/assimp-5.2.5-r2.ebuild94
-rw-r--r--media-libs/assimp/assimp-5.3.1.ebuild125
-rw-r--r--media-libs/assimp/files/assimp-5.2.5-float-comparison.patch84
-rw-r--r--media-libs/assimp/files/assimp-5.2.5-gtest.patch30
5 files changed, 338 insertions, 0 deletions
diff --git a/media-libs/assimp/Manifest b/media-libs/assimp/Manifest
index 2e02eec130fc..4cfadf3982b4 100644
--- a/media-libs/assimp/Manifest
+++ b/media-libs/assimp/Manifest
@@ -2,6 +2,11 @@ AUX assimp-5.2.5-disable-collada-tests.patch 798 BLAKE2B 302c2ea2a1152f7bcf71d82
AUX assimp-5.2.5-disable-failing-tests.patch 3612 BLAKE2B 08dd1585e0d5ea37f5b52a88d364f48865f3b8032eba3cbd875047b7a07a5d9df658631cb5649dc6688112a9ec8809d9dfe75959711b0238b78ed01a5bc2eeb9 SHA512 cef65009eaf04cef82c22d86273dc63a30ae32ecf352b9ce9bfc61ecd9b9c67415d4162a02ffad5337d3d2af4f594b6f4387ad68fb4b4c78500d7ea1a3d42b82
AUX assimp-5.2.5-drop-failing-tests-for-abi_x86_32.patch 5237 BLAKE2B 04f0cf86616afcf0e050ae9d8caf956b389362a667a370a1bfc523b428990e09481c92946cf252c04259d69b1718087aa24c65e645f19a86339fd1d4f359a505 SHA512 76fa57de33bb93722d9c83af7c706a99a3a9e76f1136b63edc7ba4036fd75ada9d7d6df2060563f56963a6ec971023944d6701319bb1c810fd2803fb4fb4afc7
AUX assimp-5.2.5-fix-version.patch 881 BLAKE2B dd859c3437ea89b35a463e3aef64868f49a7c5d157d86b1c618bc15390b67950d9b40ae8717db0d21d7048b177c1ba61f6f871919cdf49e5576fc5be46553cd5 SHA512 9e1515624bc8f9d4eaa0c5d103b386e5cca12817b26e7002af7b0dd412e744fb1296e513371b9f3b0f87e566c9ca9b1b68e216a7f0e5a2ed11096d89b2fab0ae
+AUX assimp-5.2.5-float-comparison.patch 3809 BLAKE2B 6a0474c759d6a4ff68ced5c7f929062b98ae37594f6bf00a12bdfe787eaeaf24af9704e800114e4f2ccd485547165a09debbbf34820138c047a3830b95cdbc57 SHA512 6e4b55744fe5413e681f67af99f1050695cea15563e5e5f2406f9fd34cfdcfe58b40727e1071ecd98151b756c373d9f189d6e42c0705d4456ca5b676704b5d50
+AUX assimp-5.2.5-gtest.patch 843 BLAKE2B 044019d2036755c52f780e1bc4e842f181e067c1084432efe2fa6ce769fdd3f919224a7aece04a30593b477637e7e3760f023b50139ab9daecb741d5239dc021 SHA512 431ecd0dec29837a97323227311d795d1774cbe645098a945a05a8b5c36d3dd83f79ec99e99c3c27ec89adb5b90add09f030a0fdde6086381affdf91c83150ff
DIST assimp-5.2.5.tar.gz 49543936 BLAKE2B 77e0eecd1307646211a86244a371e24401dffd03dceb569acdd63751cdb38bd169c8b12c942efd2e77b5f541653f2775739150b9fe352b8c903dcc4fe7bccca8 SHA512 ac0dc4243f9d1ff077966f0037187b4374075ac97e75e1a3cd6bdc1caf5f8e4d40953d9a8a316480969c09524d87daa9d3ed75e6ac6f037dd5b1c5f25fce3afb
+DIST assimp-5.3.1.tar.gz 52826870 BLAKE2B 1f3eac17deb6d19777f2a7cdf74e5be9d6df12a70e9b0449a90f3cc6f85b6d4170de2b870c028e2ad9c7f6ac7269daa0cbb3971dd1feb83a5b12a683ff8bb72f SHA512 49963f84ed0a8145f3af249890a533f0b12f5553ae09581289cb1f20cb49cb1a3ed3f3c4c966ceb43aa897b90deca268aa6554066b2bd34f2ac9c15041420ddb
EBUILD assimp-5.2.5-r1.ebuild 1600 BLAKE2B 60a268965f12bd95b0f2541439f8eab6a49248ea0829e312a39baefcca6f4a673715f055e4e439210834156f86028e2853d3ffaf208dffa53bcccdbe7e824628 SHA512 130dd44275b3051b028996cce856466dbf75ed92bffef8d316a6a27ec6724c133d84af53ce53611bc3b1bcd716c9e00c40b5c6ccb774c4e77ac18f6cca0960b9
+EBUILD assimp-5.2.5-r2.ebuild 2143 BLAKE2B 3c8a5929e27fc8946d145fd1b09d81a3b478d5b2f9a6174c4344d468ec40d31f41a0b9f550633aebd3840015a3b205b1ee95e641edeaeac3b2af07393e2da6f3 SHA512 139b20cf0d92e516697eb1f0d1758bb9e422673c774cdaaf5af630992555413d37902cbc60ac598ad9f83f9a90bb30934af61719ba9098127f7c5e1a2d29a00b
+EBUILD assimp-5.3.1.ebuild 4120 BLAKE2B a09c2ecb242af9e3ed28a0bd6e26d38ff98aea727ea2fe6550f36ff4a34ae7b2d2849693e970786d62e4e722d4f08010b1122f508f6bc7f15b75222b8d3e1207 SHA512 80c36db0e7a824be763740dd3bdc5e773994c0ea6bdc0a39416a257e54e4a5885507ff39a2ed046405d2a84aa6282e2d718b39f9c7a2e62b279e69257d175115
MISC metadata.xml 602 BLAKE2B 37acfeee427b496401cc52d6f424ac33db0d84ebe3052f5d062e52ed0785751f5f693918bbe3388b657329f63b8936c37b7111e88912b376f0db0686320c2b47 SHA512 97813527a76719e99b97c81be7b11b38f5fd31e880a14519973bfa1e32ff08b8010c95ce1e872c2975a446ac567fb69ee2600920b87ead4d17b6584fda29a38a
diff --git a/media-libs/assimp/assimp-5.2.5-r2.ebuild b/media-libs/assimp/assimp-5.2.5-r2.ebuild
new file mode 100644
index 000000000000..fc010b398f41
--- /dev/null
+++ b/media-libs/assimp/assimp-5.2.5-r2.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Importer library to import assets from 3D files"
+HOMEPAGE="https://github.com/assimp/assimp"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+IUSE="samples test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ sys-libs/zlib[minizip]
+ samples? (
+ media-libs/freeglut
+ media-libs/libglvnd
+ )
+ test? (
+ dev-cpp/gtest
+ )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.2.5-gtest.patch"
+ "${FILESDIR}/${PN}-5.2.5-float-comparison.patch"
+)
+
+DOCS=( CodeConventions.md Readme.md )
+
+src_prepare() {
+ sed -r \
+ -e "s#PROJECT\(Assimp VERSION [0-9]+\.[0-9]+\.[0-9]+\)#PROJECT(Assimp VERSION ${PV})#g" \
+ -i CMakeLists.txt || die
+ sed -r \
+ -e "s#EXPECT_EQ\(aiGetVersionPatch\(\), [0-9]+U \);#EXPECT_EQ(aiGetVersionPatch(), $(ver_cut 3)U );#g" \
+ -e "s#EXPECT_NE\( aiGetVersionRevision#EXPECT_EQ\( aiGetVersionRevision#g" \
+ -i test/unit/utVersion.cpp || die
+ sed \
+ -e "s# -O0 -g # #g" \
+ -i \
+ cmake-modules/Coveralls.cmake \
+ contrib/android-cmake/android.toolchain.cmake \
+ contrib/openddlparser/CMakeLists.txt \
+ CMakeLists.txt \
+ || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DASSIMP_ASAN=OFF
+ -DASSIMP_BUILD_ASSIMP_TOOLS=ON
+ -DASSIMP_BUILD_DOCS=OFF
+ -DASSIMP_BUILD_SAMPLES=$(usex samples)
+ -DASSIMP_BUILD_TESTS=$(usex test)
+ -DASSIMP_BUILD_ZLIB=OFF
+ -DASSIMP_DOUBLE_PRECISION=OFF
+ -DASSIMP_INJECT_DEBUG_POSTFIX=OFF
+ -DASSIMP_IGNORE_GIT_HASH=ON
+ -DASSIMP_UBSAN=OFF
+ -DASSIMP_WARNINGS_AS_ERRORS=OFF
+ # bug #891787 (CVE-2022-45748), intentionally not in alphabetic ordering
+ -DASSIMP_BUILD_COLLADA_IMPORTER=OFF
+ -DASSIMP_BUILD_COLLADA_EXPORTER=OFF
+ )
+
+ if use samples; then
+ mycmakeargs+=( -DOpenGL_GL_PREFERENCE="GLVND" )
+ fi
+
+ cmake_src_configure
+}
+
+src_test() {
+ local CMAKE_SKIP_TESTS=(
+ # ( Failed )
+ "^utCollada.*"
+ "^utIssues.OpacityBugWhenExporting_727$"
+ )
+ myctestargs+=(
+ --repeat until-pass:100
+ )
+
+ cmake_src_test
+}
diff --git a/media-libs/assimp/assimp-5.3.1.ebuild b/media-libs/assimp/assimp-5.3.1.ebuild
new file mode 100644
index 000000000000..a8ca3c576436
--- /dev/null
+++ b/media-libs/assimp/assimp-5.3.1.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Importer library to import assets from 3D files"
+HOMEPAGE="https://github.com/assimp/assimp"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+IUSE="doc samples test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ sys-libs/zlib[minizip]
+ doc? ( app-text/doxygen )
+ samples? (
+ media-libs/freeglut
+ media-libs/libglvnd
+ )
+ test? (
+ dev-cpp/gtest
+ )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.2.5-gtest.patch"
+ "${FILESDIR}/${PN}-5.2.5-float-comparison.patch"
+)
+
+DOCS=( CodeConventions.md Readme.md )
+
+src_prepare() {
+ sed -r \
+ -e "s#PROJECT\(Assimp VERSION [0-9]+\.[0-9]+\.[0-9]+\)#PROJECT(Assimp VERSION ${PV})#g" \
+ -i CMakeLists.txt || die
+ sed -r \
+ -e "s#EXPECT_EQ\(aiGetVersionPatch\(\), [0-9]+U \);#EXPECT_EQ(aiGetVersionPatch(), $(ver_cut 3)U );#g" \
+ -e "s#EXPECT_NE\( aiGetVersionRevision#EXPECT_EQ\( aiGetVersionRevision#g" \
+ -i test/unit/utVersion.cpp || die
+ sed \
+ -e "s# -g -O0 # #g" \
+ -i \
+ cmake-modules/Coveralls.cmake \
+ contrib/android-cmake/android.toolchain.cmake \
+ contrib/openddlparser/CMakeLists.txt \
+ CMakeLists.txt \
+ || die
+ sed -r \
+ -e "s#(PROJECT_NUMBER *= \").*\"#\1v${PV}\"#g" \
+ -e "s#(GENERATE_XML *= )(YES|NO)#\1NO#g" \
+ -e "s#(GENERATE_HTML *= )(YES|NO)#\1YES#g" \
+ -i doc/Doxyfile.in || die
+ sed -r \
+ -e "s#AssimpDoc_Html(/AnimationOverview)#architecture\1#g" \
+ -e "s#AssimpDoc_Html(/dragonsplash)#images\1#g" \
+ -i doc/CMakeLists.txt || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ # -DASSIMP_ASAN=yes # Enable AddressSanitizer.
+ -DASSIMP_BUILD_ASSIMP_TOOLS=yes # If the supplementary tools for Assimp are built in addition to the library.
+ -DASSIMP_BUILD_DOCS=$(usex doc) # Build documentation using Doxygen.
+ # -DASSIMP_BUILD_DRACO=no # If the Draco libraries are to be built. Primarily for glTF
+ # -DASSIMP_BUILD_NONFREE_C4D_IMPORTER=no # Build the C4D importer, which relies on the non-free Cineware SDK.
+ -DASSIMP_BUILD_SAMPLES=$(usex samples) # If the official samples are built as well (needs Glut).
+ -DASSIMP_BUILD_TESTS=$(usex test) # If the test suite for Assimp is built in addition to the library.
+ -DASSIMP_BUILD_ZLIB=no # Build your own zlib
+ -DASSIMP_COVERALLS=$(usex test) # Enable this to measure test coverage.
+ # breaks tests
+ # -DASSIMP_DOUBLE_PRECISION=no # Set to yes to enable double precision processing
+ # -DASSIMP_HUNTER_ENABLED=no # Enable Hunter package manager support
+ -DASSIMP_IGNORE_GIT_HASH=yes # Don't call git to get the hash.
+ -DASSIMP_INJECT_DEBUG_POSTFIX=no # Inject debug postfix in .a/.so/.dll lib names
+ # -DASSIMP_INSTALL=yes # Disable this if you want to use assimp as a submodule.
+ # -DASSIMP_LIBRARY_SUFFIX= # Suffix to append to library names
+ # -DASSIMP_NO_EXPORT=no # Disable Assimp's export functionality.
+ # -DASSIMP_OPT_BUILD_PACKAGES=no # Set to yes to generate CPack configuration files and packaging targets
+ -DASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR=no # Suppress rapidjson warning on MSVC (NOTE: breaks android build)
+ # -DASSIMP_UBSAN=yes # Enable Undefined Behavior sanitizer.
+ -DASSIMP_WARNINGS_AS_ERRORS=no # Treat all warnings as errors.
+ # -DBUILD_SHARED_LIBS=yes # Build package with shared libraries.
+ # bug #891787 (CVE-2022-45748), intentionally not in alphabetic ordering
+ -DASSIMP_BUILD_COLLADA_IMPORTER=OFF
+ -DASSIMP_BUILD_COLLADA_EXPORTER=OFF
+ )
+
+ if use doc; then
+ mycmakeargs+=(
+ -DHTML_OUTPUT="html"
+ )
+ fi
+ if use samples; then
+ mycmakeargs+=(
+ -DOpenGL_GL_PREFERENCE="GLVND"
+ )
+ fi
+ if use test; then
+ # adds the target headercheck which compiles every header file, default disabled because it adds many targets
+ -DASSIMP_HEADERCHECK=$(usex test)
+ fi
+
+ cmake_src_configure
+}
+
+src_test() {
+ local CMAKE_SKIP_TESTS=(
+ # ( Failed )
+ "^utCollada.*"
+ "^utIssues.OpacityBugWhenExporting_727$"
+ )
+ myctestargs+=(
+ --repeat until-pass:100
+ )
+ cmake_src_test
+}
diff --git a/media-libs/assimp/files/assimp-5.2.5-float-comparison.patch b/media-libs/assimp/files/assimp-5.2.5-float-comparison.patch
new file mode 100644
index 000000000000..ccbcffe2c167
--- /dev/null
+++ b/media-libs/assimp/files/assimp-5.2.5-float-comparison.patch
@@ -0,0 +1,84 @@
+diff --git a/include/assimp/matrix3x3.inl b/include/assimp/matrix3x3.inl
+index 99d9197..0ffa433 100644
+--- a/include/assimp/matrix3x3.inl
++++ b/include/assimp/matrix3x3.inl
+@@ -140,9 +140,7 @@ const TReal* aiMatrix3x3t<TReal>::operator[] (unsigned int p_iIndex) const {
+ template <typename TReal>
+ AI_FORCE_INLINE
+ bool aiMatrix3x3t<TReal>::operator== (const aiMatrix3x3t<TReal>& m) const {
+- return a1 == m.a1 && a2 == m.a2 && a3 == m.a3 &&
+- b1 == m.b1 && b2 == m.b2 && b3 == m.b3 &&
+- c1 == m.c1 && c2 == m.c2 && c3 == m.c3;
++ return this->Equal(m);
+ }
+
+ // ------------------------------------------------------------------------------------------------
+diff --git a/include/assimp/matrix4x4.inl b/include/assimp/matrix4x4.inl
+index 54d176d..0d9da5d 100644
+--- a/include/assimp/matrix4x4.inl
++++ b/include/assimp/matrix4x4.inl
+@@ -328,10 +328,7 @@ const TReal* aiMatrix4x4t<TReal>::operator[](unsigned int p_iIndex) const {
+ template <typename TReal>
+ AI_FORCE_INLINE
+ bool aiMatrix4x4t<TReal>::operator== (const aiMatrix4x4t<TReal>& m) const {
+- return (a1 == m.a1 && a2 == m.a2 && a3 == m.a3 && a4 == m.a4 &&
+- b1 == m.b1 && b2 == m.b2 && b3 == m.b3 && b4 == m.b4 &&
+- c1 == m.c1 && c2 == m.c2 && c3 == m.c3 && c4 == m.c4 &&
+- d1 == m.d1 && d2 == m.d2 && d3 == m.d3 && d4 == m.d4);
++ return this->Equal(m);
+ }
+
+ // ----------------------------------------------------------------------------------------
+diff --git a/include/assimp/quaternion.inl b/include/assimp/quaternion.inl
+index 960e91a..d6bcbe7 100644
+--- a/include/assimp/quaternion.inl
++++ b/include/assimp/quaternion.inl
+@@ -73,7 +73,7 @@ aiQuaterniont<TReal> operator * (const aiMatrix4x4t<TReal>& pMatrix, const aiQua
+ template<typename TReal>
+ bool aiQuaterniont<TReal>::operator== (const aiQuaterniont& o) const
+ {
+- return x == o.x && y == o.y && z == o.z && w == o.w;
++ return this->Equal(o);
+ }
+
+ // ---------------------------------------------------------------------------
+diff --git a/include/assimp/vector2.inl b/include/assimp/vector2.inl
+index 245eb31..cd057fe 100644
+--- a/include/assimp/vector2.inl
++++ b/include/assimp/vector2.inl
+@@ -144,14 +144,14 @@ TReal aiVector2t<TReal>::operator[](unsigned int i) const {
+ template <typename TReal>
+ inline
+ bool aiVector2t<TReal>::operator== (const aiVector2t& other) const {
+- return x == other.x && y == other.y;
++ return this->Equal(other);
+ }
+
+ // ------------------------------------------------------------------------------------------------
+ template <typename TReal>
+ inline
+ bool aiVector2t<TReal>::operator!= (const aiVector2t& other) const {
+- return x != other.x || y != other.y;
++ return !(*this == other);
+ }
+
+ // ---------------------------------------------------------------------------
+diff --git a/include/assimp/vector3.inl b/include/assimp/vector3.inl
+index 28ca2be..daa63e8 100644
+--- a/include/assimp/vector3.inl
++++ b/include/assimp/vector3.inl
+@@ -198,12 +198,12 @@ AI_FORCE_INLINE TReal& aiVector3t<TReal>::operator[](unsigned int i) {
+ // ------------------------------------------------------------------------------------------------
+ template <typename TReal>
+ AI_FORCE_INLINE bool aiVector3t<TReal>::operator== (const aiVector3t<TReal>& other) const {
+- return x == other.x && y == other.y && z == other.z;
++ return this->Equal(other);
+ }
+ // ------------------------------------------------------------------------------------------------
+ template <typename TReal>
+ AI_FORCE_INLINE bool aiVector3t<TReal>::operator!= (const aiVector3t<TReal>& other) const {
+- return x != other.x || y != other.y || z != other.z;
++ return !(*this == other);
+ }
+ // ---------------------------------------------------------------------------
+ template<typename TReal>
diff --git a/media-libs/assimp/files/assimp-5.2.5-gtest.patch b/media-libs/assimp/files/assimp-5.2.5-gtest.patch
new file mode 100644
index 000000000000..9441141337ac
--- /dev/null
+++ b/media-libs/assimp/files/assimp-5.2.5-gtest.patch
@@ -0,0 +1,30 @@
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index afe4874..5a87cc2 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -191,7 +191,6 @@ SET( POST_PROCESSES
+ unit/utRemoveComments.cpp
+ unit/utRemoveComponent.cpp
+ unit/utVertexTriangleAdjacency.cpp
+- unit/utJoinVertices.cpp
+ unit/utSplitLargeMeshes.cpp
+ unit/utFindDegenerates.cpp
+ unit/utFindInvalidData.cpp
+@@ -281,4 +281,6 @@ target_link_libraries( unit assimp ${platform_libs} )
+
+ add_subdirectory(headercheck)
+
+-add_test( unittests unit )
++get_target_property(unit_SOURCES unit SOURCES)
++find_package(GTest REQUIRED)
++gtest_add_tests(TARGET unit ${unit_SOURCES})
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -725,6 +725,7 @@ IF ( ASSIMP_BUILD_SAMPLES )
+ ENDIF ()
+
+ IF ( ASSIMP_BUILD_TESTS )
++ enable_testing()
+ ADD_SUBDIRECTORY( test/ )
+ ENDIF ()
+