From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/assimp/files/, media-libs/assimp/
Date: Fri, 29 Apr 2022 02:22:40 +0000 (UTC) [thread overview]
Message-ID: <1651198951.3c7abed13a49d96d90fdeda81bba828271cace87.sam@gentoo> (raw)
commit: 3c7abed13a49d96d90fdeda81bba828271cace87
Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Thu Apr 28 06:06:12 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Apr 29 02:22:31 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c7abed1
media-libs/assimp: build with gcc-12
Fix an -Werror=array-bounds issue with gcc-12, by patching out the
global -Werror flag used by upstream.
Drop failing tests for x86_32.
Closes: https://bugs.gentoo.org/840616
Closes: https://bugs.gentoo.org/840767
Bug: https://github.com/assimp/assimp/issues/4438
Bug: https://github.com/assimp/assimp/issues/4433
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/25234
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-libs/assimp/assimp-5.2.3.ebuild | 9 ++
.../assimp-5.2.3-drop-Werror-gcc-option.patch | 22 ++++
...p-5.2.3-drop-failing-tests-for-abi_x86_32.patch | 131 +++++++++++++++++++++
3 files changed, 162 insertions(+)
diff --git a/media-libs/assimp/assimp-5.2.3.ebuild b/media-libs/assimp/assimp-5.2.3.ebuild
index ba654ddd393f..451858172fc2 100644
--- a/media-libs/assimp/assimp-5.2.3.ebuild
+++ b/media-libs/assimp/assimp-5.2.3.ebuild
@@ -32,11 +32,20 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-5.2.2-fix-usage-of-incompatible-minizip-data-structure.patch
+ "${FILESDIR}"/${P}-drop-Werror-gcc-option.patch
"${FILESDIR}"/${PN}-5.2.2-disable-failing-tests.patch
)
DOCS=( CodeConventions.md Readme.md )
+src_prepare() {
+ if use abi_x86_32; then
+ eapply "${FILESDIR}"/${P}-drop-failing-tests-for-abi_x86_32.patch
+ fi
+
+ cmake_src_prepare
+}
+
src_configure() {
local mycmakeargs=(
-DASSIMP_ASAN=OFF
diff --git a/media-libs/assimp/files/assimp-5.2.3-drop-Werror-gcc-option.patch b/media-libs/assimp/files/assimp-5.2.3-drop-Werror-gcc-option.patch
new file mode 100644
index 000000000000..708f45ee3503
--- /dev/null
+++ b/media-libs/assimp/files/assimp-5.2.3-drop-Werror-gcc-option.patch
@@ -0,0 +1,22 @@
+From dea8b4d8c533c131bd546c316f8df8af8897ac75 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Mon, 25 Apr 2022 17:39:33 +0200
+Subject: [PATCH] drop -Werror gcc option
+
+Temporary hack to allow building with gcc-12
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/code/CMakeLists.txt
++++ b/code/CMakeLists.txt
+@@ -1179,8 +1179,6 @@ TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp)
+ # enable warnings as errors ########################################
+ IF (MSVC)
+ TARGET_COMPILE_OPTIONS(assimp PRIVATE /WX)
+-ELSE()
+- TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror)
+ ENDIF()
+
+ # adds C_FLAGS required to compile zip.c on old GCC 4.x compiler
+--
+2.35.1
+
diff --git a/media-libs/assimp/files/assimp-5.2.3-drop-failing-tests-for-abi_x86_32.patch b/media-libs/assimp/files/assimp-5.2.3-drop-failing-tests-for-abi_x86_32.patch
new file mode 100644
index 000000000000..4c4ea0486a2f
--- /dev/null
+++ b/media-libs/assimp/files/assimp-5.2.3-drop-failing-tests-for-abi_x86_32.patch
@@ -0,0 +1,131 @@
+From f963a15bbbcfa1e3c4bd0c24173f90151e023469 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Thu, 28 Apr 2022 07:59:26 +0200
+Subject: [PATCH] drop failing tests for abi_x86_32
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/test/unit/AssimpAPITest_aiMatrix3x3.cpp
++++ b/test/unit/AssimpAPITest_aiMatrix3x3.cpp
+@@ -68,13 +68,6 @@ TEST_F(AssimpAPITest_aiMatrix3x3, aiMatrix3FromMatrix4Test) {
+ EXPECT_EQ(result_cpp, result_c);
+ }
+
+-TEST_F(AssimpAPITest_aiMatrix3x3, aiMatrix3FromQuaternionTest) {
+- const auto q = random_quat();
+- result_cpp = q.GetMatrix();
+- aiMatrix3FromQuaternion(&result_c, &q);
+- EXPECT_EQ(result_cpp, result_c);
+-}
+-
+ TEST_F(AssimpAPITest_aiMatrix3x3, aiMatrix3AreEqualTest) {
+ result_c = result_cpp = random_mat3();
+ EXPECT_EQ(result_cpp == result_c,
+--- a/test/unit/AssimpAPITest_aiMatrix4x4.cpp
++++ b/test/unit/AssimpAPITest_aiMatrix4x4.cpp
+@@ -78,15 +78,6 @@ TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4FromMatrix3Test) {
+ EXPECT_EQ(result_cpp, result_c);
+ }
+
+-TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4FromScalingQuaternionPositionTest) {
+- const aiVector3D s = random_vec3();
+- const aiQuaternion q = random_quat();
+- const aiVector3D t = random_vec3();
+- result_cpp = aiMatrix4x4(s, q, t);
+- aiMatrix4FromScalingQuaternionPosition(&result_c, &s, &q, &t);
+- EXPECT_EQ(result_cpp, result_c);
+-}
+-
+ TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4AddTest) {
+ const aiMatrix4x4 temp = random_mat4();
+ result_c = result_cpp = random_mat4();
+@@ -135,12 +126,6 @@ TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4InverseTest) {
+ EXPECT_EQ(result_cpp, result_c);
+ }
+
+-TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4DeterminantTest) {
+- result_c = result_cpp = random_mat4();
+- EXPECT_EQ(result_cpp.Determinant(),
+- aiMatrix4Determinant(&result_c));
+-}
+-
+ TEST_F(AssimpAPITest_aiMatrix4x4, aiMatrix4IsIdentityTest) {
+ EXPECT_EQ(result_cpp.IsIdentity(),
+ (bool)aiMatrix4IsIdentity(&result_c));
+--- a/test/unit/AssimpAPITest_aiQuaternion.cpp
++++ b/test/unit/AssimpAPITest_aiQuaternion.cpp
+@@ -54,19 +54,6 @@ protected:
+ aiQuaternion result_c, result_cpp;
+ };
+
+-TEST_F(AssimpAPITest_aiQuaternion, aiCreateQuaternionFromMatrixTest) {
+- // Use a predetermined transformation matrix
+- // to prevent running into division by zero.
+- aiMatrix3x3 m, r;
+- aiMatrix3x3::Translation(aiVector2D(14,-25), m);
+- aiMatrix3x3::RotationZ(Math::aiPi<float>() / 4.0f, r);
+- m = m * r;
+-
+- result_cpp = aiQuaternion(m);
+- aiCreateQuaternionFromMatrix(&result_c, &m);
+- EXPECT_EQ(result_cpp, result_c);
+-}
+-
+ TEST_F(AssimpAPITest_aiQuaternion, aiQuaternionFromEulerAnglesTest) {
+ const float x(RandPI.next()),
+ y(RandPI.next()),
+--- a/test/unit/AssimpAPITest_aiVector2D.cpp
++++ b/test/unit/AssimpAPITest_aiVector2D.cpp
+@@ -67,28 +67,6 @@ TEST_F(AssimpAPITest_aiVector2D, aiVector2AreEqualEpsilonTest) {
+ (bool)aiVector2AreEqualEpsilon(&result_cpp, &result_c, Epsilon));
+ }
+
+-TEST_F(AssimpAPITest_aiVector2D, aiVector2AddTest) {
+- result_c = result_cpp = random_vec2();
+- result_cpp += temp;
+- aiVector2Add(&result_c, &temp);
+- EXPECT_EQ(result_cpp, result_c);
+-}
+-
+-TEST_F(AssimpAPITest_aiVector2D, aiVector2SubtractTest) {
+- result_c = result_cpp = random_vec2();
+- result_cpp -= temp;
+- aiVector2Subtract(&result_c, &temp);
+- EXPECT_EQ(result_cpp, result_c);
+-}
+-
+-TEST_F(AssimpAPITest_aiVector2D, aiVector2ScaleTest) {
+- const float FACTOR = RandNonZero.next();
+- result_c = result_cpp = random_vec2();
+- result_cpp *= FACTOR;
+- aiVector2Scale(&result_c, FACTOR);
+- EXPECT_EQ(result_cpp, result_c);
+-}
+-
+ TEST_F(AssimpAPITest_aiVector2D, aiVector2SymMulTest) {
+ result_c = result_cpp = random_vec2();
+ result_cpp = result_cpp.SymMul(temp);
+@@ -96,21 +74,6 @@ TEST_F(AssimpAPITest_aiVector2D, aiVector2SymMulTest) {
+ EXPECT_EQ(result_cpp, result_c);
+ }
+
+-TEST_F(AssimpAPITest_aiVector2D, aiVector2DivideByScalarTest) {
+- const float DIVISOR = RandNonZero.next();
+- result_c = result_cpp = random_vec2();
+- result_cpp /= DIVISOR;
+- aiVector2DivideByScalar(&result_c, DIVISOR);
+- EXPECT_EQ(result_cpp, result_c);
+-}
+-
+-TEST_F(AssimpAPITest_aiVector2D, aiVector2DivideByVectorTest) {
+- result_c = result_cpp = random_vec2();
+- result_cpp = result_cpp / temp;
+- aiVector2DivideByVector(&result_c, &temp);
+- EXPECT_EQ(result_cpp, result_c);
+-}
+-
+ TEST_F(AssimpAPITest_aiVector2D, aiVector2LengthTest) {
+ result_c = result_cpp = random_vec2();
+ EXPECT_EQ(result_cpp.Length(), aiVector2Length(&result_c));
+--
+2.35.1
+
next reply other threads:[~2022-04-29 2:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-29 2:22 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-01-20 12:27 [gentoo-commits] repo/gentoo:master commit in: media-libs/assimp/files/, media-libs/assimp/ Sam James
2023-02-05 9:13 Joonas Niilola
2023-01-09 7:02 Viorel Munteanu
2022-08-23 5:11 Sam James
2020-06-05 12:48 Andreas Sturmlechner
2019-11-18 10:50 Slawek Lis
2019-10-09 5:43 Slawek Lis
2018-09-15 2:31 Andreas Sturmlechner
2018-08-26 0:00 Andreas Sturmlechner
2018-05-16 12:09 Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1651198951.3c7abed13a49d96d90fdeda81bba828271cace87.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox