mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
opencv, fix build for secondary architecture (#5457)
This commit is contained in:
@@ -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/<arch>/, 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()
|
||||
|
||||
Reference in New Issue
Block a user