1 |
commit: b396186669ec607562148b9f5303565a5d01aa2b |
2 |
Author: Ștefan Talpalaru <stefantalpalaru <AT> yahoo <DOT> com> |
3 |
AuthorDate: Fri Aug 17 15:29:18 2018 +0000 |
4 |
Commit: Amy Liffey <amynka <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 18 06:10:58 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3961866 |
7 |
|
8 |
media-libs/opencv: disable implied CPU flags |
9 |
|
10 |
The OpenCV build system tries to be helpful by enabling unrequested CPU |
11 |
flags based on requested ones. Unfortunately, this breaks the build on |
12 |
AMD Piledriver because FMA3 implies AVX2 which is not available on this |
13 |
architecture. |
14 |
|
15 |
Further more, these CPU flags should only be handled by the |
16 |
corresponding Portage flags, instead of CMake's hard-coded automagic. |
17 |
This commit fixes that by disabling the whole "implication" mechanism |
18 |
for CPU flags, while also undoing the previous attempt at solving the |
19 |
problem by translating those broken "implications" into REQUIRED_USE. |
20 |
|
21 |
Authored-by: Ștefan Talpalaru <stefantalpalaru <AT> yahoo.com> |
22 |
Bug: https://bugs.gentoo.org/656638 |
23 |
|
24 |
.../{opencv-3.4.1-r3.ebuild => opencv-3.4.1-r4.ebuild} | 12 ++---------- |
25 |
1 file changed, 2 insertions(+), 10 deletions(-) |
26 |
|
27 |
diff --git a/media-libs/opencv/opencv-3.4.1-r3.ebuild b/media-libs/opencv/opencv-3.4.1-r4.ebuild |
28 |
similarity index 97% |
29 |
rename from media-libs/opencv/opencv-3.4.1-r3.ebuild |
30 |
rename to media-libs/opencv/opencv-3.4.1-r4.ebuild |
31 |
index 89dc5ebc819..e2aeffdea2c 100644 |
32 |
--- a/media-libs/opencv/opencv-3.4.1-r3.ebuild |
33 |
+++ b/media-libs/opencv/opencv-3.4.1-r4.ebuild |
34 |
@@ -41,16 +41,7 @@ REQUIRED_USE=" |
35 |
java? ( python ) |
36 |
opengl? ( || ( gtk qt5 ) ) |
37 |
python? ( ${PYTHON_REQUIRED_USE} ) |
38 |
- tesseract? ( contrib ) |
39 |
- cpu_flags_x86_avx2? ( cpu_flags_x86_avx cpu_flags_x86_fma3 ) |
40 |
- cpu_flags_x86_fma3? ( cpu_flags_x86_avx2 ) |
41 |
- cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) |
42 |
- cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 cpu_flags_x86_popcnt ) |
43 |
- cpu_flags_x86_popcnt? ( cpu_flags_x86_sse4_1 ) |
44 |
- cpu_flags_x86_sse4_1? ( cpu_flags_x86_sse3 cpu_flags_x86_ssse3 ) |
45 |
- cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) |
46 |
- cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) |
47 |
- cpu_flags_x86_sse2? ( cpu_flags_x86_sse )" |
48 |
+ tesseract? ( contrib )" |
49 |
|
50 |
# The following logic is intrinsic in the build system, but we do not enforce |
51 |
# it on the useflags since this just blocks emerging pointlessly: |
52 |
@@ -413,6 +404,7 @@ multilib_src_configure() { |
53 |
# ================================================== |
54 |
# cpu flags, should solve 633900 |
55 |
#=================================================== |
56 |
+ -DOPENCV_CPU_OPT_IMPLIES_IGNORE=ON |
57 |
-DCPU_DISPATCH= |
58 |
-DENABLE_SSE=$(usex cpu_flags_x86_sse) |
59 |
-DENABLE_SSE2=$(usex cpu_flags_x86_sse2) |