1 |
commit: eaa51858d9d2701d98839236338cad3acd3389c1 |
2 |
Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net> |
3 |
AuthorDate: Tue Sep 27 17:23:45 2022 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 28 08:19:26 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eaa51858 |
7 |
|
8 |
media-libs/openexr: fix build issue on x86 |
9 |
|
10 |
The package can fail to build on x86_32 if -march=native is set. This |
11 |
sets the -mf16c intrinsic which isn't available on every x86_32 arch. |
12 |
The patch replaces -march=native with -march=i686 if x86 is used. |
13 |
|
14 |
Also disable a failing test for x86. |
15 |
|
16 |
Closes: https://bugs.gentoo.org/840580 |
17 |
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net> |
18 |
Closes: https://github.com/gentoo/gentoo/pull/27498 |
19 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
20 |
|
21 |
...openexr-3.1.5-drop-failing-testDwaLookups.patch | 29 ++++++++++++++++++++++ |
22 |
media-libs/openexr/openexr-3.1.5.ebuild | 10 +++++++- |
23 |
2 files changed, 38 insertions(+), 1 deletion(-) |
24 |
|
25 |
diff --git a/media-libs/openexr/files/openexr-3.1.5-drop-failing-testDwaLookups.patch b/media-libs/openexr/files/openexr-3.1.5-drop-failing-testDwaLookups.patch |
26 |
new file mode 100644 |
27 |
index 000000000000..7579ddd23156 |
28 |
--- /dev/null |
29 |
+++ b/media-libs/openexr/files/openexr-3.1.5-drop-failing-testDwaLookups.patch |
30 |
@@ -0,0 +1,29 @@ |
31 |
+From 6f3c61b994e9a503fcc9649cba439d81f40901d0 Mon Sep 17 00:00:00 2001 |
32 |
+From: Bernd Waibel <waebbl-gentoo@××××××.net> |
33 |
+Date: Tue, 27 Sep 2022 07:29:11 +0200 |
34 |
+Subject: [PATCH] drop failing testDwaLookups |
35 |
+ |
36 |
+On x86_32 testDwaLookups fails |
37 |
+ |
38 |
+Signed-off-by: Bernd Waibel <waebbl-gentoo@××××××.net> |
39 |
+--- a/src/test/OpenEXRTest/main.cpp |
40 |
++++ b/src/test/OpenEXRTest/main.cpp |
41 |
+@@ -65,7 +65,6 @@ |
42 |
+ #include "testDwaCompressorSimd.h" |
43 |
+ #include "testRle.h" |
44 |
+ #include "testB44ExpLogTable.h" |
45 |
+-#include "testDwaLookups.h" |
46 |
+ #include "testIDManifest.h" |
47 |
+ |
48 |
+ #include "tmpDir.h" |
49 |
+@@ -229,7 +228,6 @@ main (int argc, char *argv[]) |
50 |
+ TEST (testDwaCompressorSimd, "basic"); |
51 |
+ TEST (testRle, "core"); |
52 |
+ TEST (testB44ExpLogTable, "core"); |
53 |
+- TEST (testDwaLookups, "core"); |
54 |
+ TEST (testIDManifest, "core"); |
55 |
+ |
56 |
+ // NB: If you add a test here, make sure to enumerate it in the |
57 |
+-- |
58 |
+2.37.3 |
59 |
+ |
60 |
|
61 |
diff --git a/media-libs/openexr/openexr-3.1.5.ebuild b/media-libs/openexr/openexr-3.1.5.ebuild |
62 |
index b13e0484bc86..14c4a1e4c3ba 100644 |
63 |
--- a/media-libs/openexr/openexr-3.1.5.ebuild |
64 |
+++ b/media-libs/openexr/openexr-3.1.5.ebuild |
65 |
@@ -3,7 +3,7 @@ |
66 |
|
67 |
EAPI=8 |
68 |
|
69 |
-inherit cmake |
70 |
+inherit cmake flag-o-matic |
71 |
|
72 |
MY_PN=OpenEXR |
73 |
|
74 |
@@ -43,10 +43,18 @@ src_prepare() { |
75 |
sed -e "s:/var/tmp/:${T}:" \ |
76 |
-i "${S}"/src/test/${MY_PN}{,Fuzz,Util}Test/tmpDir.h || die "failed to set temp path for tests" |
77 |
|
78 |
+ if use x86; then |
79 |
+ eapply "${FILESDIR}"/${P}-drop-failing-testDwaLookups.patch |
80 |
+ fi |
81 |
+ |
82 |
cmake_src_prepare |
83 |
} |
84 |
|
85 |
src_configure() { |
86 |
+ if use x86; then |
87 |
+ replace-cpu-flags native i686 |
88 |
+ fi |
89 |
+ |
90 |
local mycmakeargs=( |
91 |
-DBUILD_TESTING=$(usex test) |
92 |
-DDOCS=$(usex doc) |