commit:     990ef023d106b220f1f52945440509f0af2db0e0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 11 18:35:46 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Oct 11 19:16:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=990ef023

media-libs/opencv: drop pch support (fixes eigen build)

PCH support is broken when using CMake and apparently
opencv is no exception.

Closes: https://bugs.gentoo.org/733796
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/opencv/opencv-4.4.0.ebuild | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/media-libs/opencv/opencv-4.4.0.ebuild 
b/media-libs/opencv/opencv-4.4.0.ebuild
index 783f97e3a22..5e6c41a3d97 100644
--- a/media-libs/opencv/opencv-4.4.0.ebuild
+++ b/media-libs/opencv/opencv-4.4.0.ebuild
@@ -22,7 +22,7 @@ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz 
-> ${P}.tar.gz
 LICENSE="BSD"
 SLOT="0/${PV}" # subslot = libopencv* soname version
 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
-IUSE="contrib contribcvv contribdnn contribfreetype contribhdf contribovis 
contribsfm contribxfeatures2d cuda debug dnnsamples -download +eigen examples 
+features2d ffmpeg gdal gflags glog gphoto2 gstreamer gtk3 ieee1394 jpeg jpeg2k 
lapack lto opencl openexr opengl openmp opencvapps pch png +python qt5 
tesseract testprograms threads tiff vaapi v4l vtk webp xine"
+IUSE="contrib contribcvv contribdnn contribfreetype contribhdf contribovis 
contribsfm contribxfeatures2d cuda debug dnnsamples -download +eigen examples 
+features2d ffmpeg gdal gflags glog gphoto2 gstreamer gtk3 ieee1394 jpeg jpeg2k 
lapack lto opencl openexr opengl openmp opencvapps png +python qt5 tesseract 
testprograms threads tiff vaapi v4l vtk webp xine"
 
 # The following lines are shamelessly stolen from ffmpeg-9999.ebuild with 
modifications
 ARM_CPU_FEATURES=(
@@ -416,7 +416,8 @@ multilib_src_configure() {
        # OpenCV build options
        # ===================================================
                -DENABLE_CCACHE=OFF
-               -DENABLE_PRECOMPILED_HEADERS=$(usex pch)
+               # bug 733796, but PCH is a risky game in CMake anyway
+               -DENABLE_PRECOMPILED_HEADERS=OFF
                -DENABLE_SOLUTION_FOLDERS=OFF
                -DENABLE_PROFILING=OFF
                -DENABLE_COVERAGE=OFF
@@ -453,6 +454,7 @@ multilib_src_configure() {
        for i in "${CPU_FEATURES_MAP[@]}" ; do
                use ${i%:*} && CPU_BASELINE="${CPU_BASELINE}${i#*:};"
        done
+
        GLOBALCMAKEARGS+=(
                -DOPENCV_CPU_OPT_IMPLIES_IGNORE=ON
                -DCPU_BASELINE=${CPU_BASELINE}
@@ -509,7 +511,7 @@ multilib_src_configure() {
 }
 
 python_module_compile() {
-       local BUILD_DIR=${orig_BUILD_DIR}
+       local BUILD_DIR="${orig_BUILD_DIR}"
        local mycmakeargs=( ${GLOBALCMAKEARGS[@]} )
 
        # Set all python variables to load the correct Gentoo paths

Reply via email to