mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
OpenCV: decomission python2 (#5442)
* OpenCV: decomission python2 * Fix Python module-path
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="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/opencv/opencv/archive/$portVersion.tar.gz"
|
||||
SOURCE_FILENAME="opencv-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="dde4bf8d6639a5d3fe34d5515eab4a15669ded609a1d622350c7ff20dace1907"
|
||||
@@ -104,6 +104,14 @@ REQUIRES_devel="
|
||||
opencv$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
PROVIDES_python="
|
||||
opencv${secondaryArchSuffix}_python = $portVersionCompat
|
||||
"
|
||||
REQUIRES_python="
|
||||
haiku$secondaryArchSuffix
|
||||
opencv$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
PROVIDES_tools="
|
||||
opencv${secondaryArchSuffix}_tools = $portVersionCompat
|
||||
cmd:opencv_annotation$commandSuffix = $portVersion
|
||||
@@ -115,6 +123,8 @@ PROVIDES_tools="
|
||||
REQUIRES_tools="
|
||||
haiku$secondaryArchSuffix
|
||||
opencv$secondaryArchSuffix == $portVersion base
|
||||
cmd:f2py3
|
||||
cmd:python3
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
@@ -167,7 +177,6 @@ BUILD_PREREQUIRES="
|
||||
# cmd:ant
|
||||
cmd:cmake
|
||||
cmd:doxygen
|
||||
cmd:f2py2
|
||||
cmd:f2py3
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
# cmd:javac
|
||||
@@ -176,7 +185,6 @@ BUILD_PREREQUIRES="
|
||||
cmd:make
|
||||
# cmd:matlab # maybe later
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:python2
|
||||
cmd:python3
|
||||
"
|
||||
|
||||
@@ -206,6 +214,8 @@ BUILD()
|
||||
ARCH_SUBDIR="$secondaryArchSuffix/"
|
||||
fi
|
||||
|
||||
pythonVersion=$(python3 --version 2>&1 | sed 's/Python //' | head -c3)
|
||||
|
||||
cmake .. \
|
||||
-DWITH_GDAL=ON \
|
||||
-DWITH_IPP=OFF \
|
||||
@@ -217,11 +227,12 @@ BUILD()
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-DENABLE_PIC=OFF \
|
||||
-D OPENCV_GENERATE_PKGCONFIG=YES \
|
||||
-DOPENCV_GENERATE_PKGCONFIG=YES \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH="$prefix" \
|
||||
-DOPENCV_OTHER_INSTALL_PATH:PATH="$dataDir" \
|
||||
-DOpenBLAS_INCLUDE_DIR="$portPackageLinksDir/openblas${secondaryArchSuffix}_devel/develop/headers/$ARCH_SUBDIR" \
|
||||
-DOpenBLAS_LIB="$portPackageLinksDir/openblas${secondaryArchSuffix}_devel/develop/lib/$ARCH_SUBDIR"
|
||||
-DOpenBLAS_LIB="$portPackageLinksDir/openblas${secondaryArchSuffix}_devel/develop/lib/$ARCH_SUBDIR" \
|
||||
-DPYTHON3_PACKAGES_PATH="$prefix/lib/python$pythonVersion/vendor-packages"
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
@@ -268,6 +279,10 @@ INSTALL()
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
|
||||
# python package
|
||||
packageEntries python \
|
||||
$prefix/lib/python*
|
||||
|
||||
# tools package
|
||||
packageEntries tools \
|
||||
$binDir
|
||||
|
||||
Reference in New Issue
Block a user