From 7ec22683bb65a79e5e4c3b72d89189d7feed93d8 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Sun, 29 Nov 2020 11:53:40 +0100 Subject: [PATCH] opencv, fix build for secondary architecture (#5457) --- media-libs/opencv/opencv-4.5.0.recipe | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/media-libs/opencv/opencv-4.5.0.recipe b/media-libs/opencv/opencv-4.5.0.recipe index 6a1680bd0..a761360d9 100644 --- a/media-libs/opencv/opencv-4.5.0.recipe +++ b/media-libs/opencv/opencv-4.5.0.recipe @@ -10,7 +10,7 @@ COPYRIGHT="2000-2020, Intel Corporation 2015-2016, Itseez Inc. 2019-2020, Xperience AI" LICENSE="BSD (3-clause)" -REVISION="3" +REVISION="4" SOURCE_URI="https://github.com/opencv/opencv/archive/$portVersion.tar.gz" SOURCE_FILENAME="opencv-$portVersion.tar.gz" CHECKSUM_SHA256="dde4bf8d6639a5d3fe34d5515eab4a15669ded609a1d622350c7ff20dace1907" @@ -21,8 +21,10 @@ SECONDARY_ARCHITECTURES="x86" # On x86_gcc2 we don't want to install the commands in bin//, but in bin/. commandSuffix=$secondaryArchSuffix +commandBinDir=$binDir if [ "$targetArchitecture" = x86_gcc2 ]; then commandSuffix= + commandBinDir=$prefix/bin fi portVersionCompat="$portVersion compat >= ${portVersion%%.*}" @@ -123,7 +125,7 @@ PROVIDES_tools=" REQUIRES_tools=" haiku$secondaryArchSuffix opencv$secondaryArchSuffix == $portVersion base - numpy_python3 + numpy${secondaryArchSuffix}_python3 cmd:python3 " @@ -177,7 +179,7 @@ BUILD_PREREQUIRES=" # cmd:ant cmd:cmake cmd:doxygen - numpy_python3 + numpy${secondaryArchSuffix}_python3 cmd:gcc$secondaryArchSuffix # cmd:javac # cmd:jni @@ -217,6 +219,10 @@ BUILD() pythonVersion=$(python3 --version 2>&1 | sed 's/Python //' | head -c3) cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ + $cmakeDirArgs \ + -DCMAKE_INSTALL_BINDIR=$commandBinDir \ + -DCMAKE_INSTALL_LIBEXECDIR=$libDir \ -DWITH_GDAL=ON \ -DWITH_IPP=OFF \ -DWITH_OPENGL=OFF \ @@ -243,11 +249,6 @@ INSTALL() make install - mkdir -p $developDir $dataDir - mv $prefix/include $includeDir - mv $prefix/share/* $dataDir - rmdir $prefix/share - prepareInstalledDevelLibs libopencv_calib3d \ libopencv_core \ libopencv_dnn \ @@ -285,7 +286,7 @@ INSTALL() # tools package packageEntries tools \ - $binDir + $commandBinDir } TEST()