From b396186669ec607562148b9f5303565a5d01aa2b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C8=98tefan=20Talpalaru?= Date: Fri, 17 Aug 2018 17:29:18 +0200 Subject: [PATCH] media-libs/opencv: disable implied CPU flags MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The OpenCV build system tries to be helpful by enabling unrequested CPU flags based on requested ones. Unfortunately, this breaks the build on AMD Piledriver because FMA3 implies AVX2 which is not available on this architecture. Further more, these CPU flags should only be handled by the corresponding Portage flags, instead of CMake's hard-coded automagic. This commit fixes that by disabling the whole "implication" mechanism for CPU flags, while also undoing the previous attempt at solving the problem by translating those broken "implications" into REQUIRED_USE. Authored-by: Ștefan Talpalaru Bug: https://bugs.gentoo.org/656638 --- ...opencv-3.4.1-r3.ebuild => opencv-3.4.1-r4.ebuild} | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) rename media-libs/opencv/{opencv-3.4.1-r3.ebuild => opencv-3.4.1-r4.ebuild} (97%) diff --git a/media-libs/opencv/opencv-3.4.1-r3.ebuild b/media-libs/opencv/opencv-3.4.1-r4.ebuild similarity index 97% rename from media-libs/opencv/opencv-3.4.1-r3.ebuild rename to media-libs/opencv/opencv-3.4.1-r4.ebuild index 89dc5ebc8192..e2aeffdea2cd 100644 --- a/media-libs/opencv/opencv-3.4.1-r3.ebuild +++ b/media-libs/opencv/opencv-3.4.1-r4.ebuild @@ -41,16 +41,7 @@ REQUIRED_USE=" java? ( python ) opengl? ( || ( gtk qt5 ) ) python? ( ${PYTHON_REQUIRED_USE} ) - tesseract? ( contrib ) - cpu_flags_x86_avx2? ( cpu_flags_x86_avx cpu_flags_x86_fma3 ) - cpu_flags_x86_fma3? ( cpu_flags_x86_avx2 ) - cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) - cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 cpu_flags_x86_popcnt ) - cpu_flags_x86_popcnt? ( cpu_flags_x86_sse4_1 ) - cpu_flags_x86_sse4_1? ( cpu_flags_x86_sse3 cpu_flags_x86_ssse3 ) - cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) - cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) - cpu_flags_x86_sse2? ( cpu_flags_x86_sse )" + tesseract? ( contrib )" # The following logic is intrinsic in the build system, but we do not enforce # it on the useflags since this just blocks emerging pointlessly: @@ -413,6 +404,7 @@ multilib_src_configure() { # ================================================== # cpu flags, should solve 633900 #=================================================== + -DOPENCV_CPU_OPT_IMPLIES_IGNORE=ON -DCPU_DISPATCH= -DENABLE_SSE=$(usex cpu_flags_x86_sse) -DENABLE_SSE2=$(usex cpu_flags_x86_sse2) -- 2.26.2