diff options
author | 2023-12-15 17:50:01 +0100 | |
---|---|---|
committer | 2024-01-20 12:26:30 +0000 | |
commit | 054f5ce87ab5e96a7224e2e396f897472d0d8f62 (patch) | |
tree | 14e8d80ec44db3712d83045991f821bad2fdbc4c /media-libs/assimp/files | |
parent | sys-kernel/gentoo-sources: add 6.1.74 (diff) | |
download | gentoo-054f5ce87ab5e96a7224e2e396f897472d0d8f62.tar.gz gentoo-054f5ce87ab5e96a7224e2e396f897472d0d8f62.tar.bz2 gentoo-054f5ce87ab5e96a7224e2e396f897472d0d8f62.zip |
media-libs/assimp: add 5.2.5-r2, add 5.3.1
Rework tests to make use of gtest via ctest.
Some tests generate random input data which might fail on fma-enabled CPUs due to smaller rounding errors on fused operations, so we repeat those
tests until they succeed.
Closes: https://bugs.gentoo.org/908403
Closes: https://bugs.gentoo.org/910362
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34346
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/assimp/files')
-rw-r--r-- | media-libs/assimp/files/assimp-5.2.5-float-comparison.patch | 84 | ||||
-rw-r--r-- | media-libs/assimp/files/assimp-5.2.5-gtest.patch | 30 |
2 files changed, 114 insertions, 0 deletions
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 () + |