aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarian Buschsieweke <marian.buschsieweke@ovgu.de>2020-09-03 09:37:53 +0200
committerRasmus Thomsen <oss@cogitri.dev>2020-09-03 11:02:17 +0000
commit8630ec41c63dc395205d03b8e3e8adf4407c8ff0 (patch)
treed55602d952031be92908bd468b584bff484b0642
parent3e77146350ee3aa5c4ee6c76a9d2666c5b6a7882 (diff)
downloadaports-8630ec41c63dc395205d03b8e3e8adf4407c8ff0.tar.gz
aports-8630ec41c63dc395205d03b8e3e8adf4407c8ff0.tar.bz2
aports-8630ec41c63dc395205d03b8e3e8adf4407c8ff0.tar.xz
testing/opencv: Enable all archs
-rw-r--r--testing/opencv/APKBUILD18
1 files changed, 13 insertions, 5 deletions
diff --git a/testing/opencv/APKBUILD b/testing/opencv/APKBUILD
index d3c4ce86c7..1bcd2db01a 100644
--- a/testing/opencv/APKBUILD
+++ b/testing/opencv/APKBUILD
@@ -4,7 +4,7 @@ pkgver=4.4.0
pkgrel=0
pkgdesc="An open source computer vision and machine learning library"
url="https://opencv.org"
-arch="x86_64" # vtk missing on other platforms
+arch="all"
license="BSD-3-Clause"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-samples::noarch"
makedepends="
@@ -27,7 +27,6 @@ makedepends="
openjpeg-tools
py3-setuptools
qt5-qtbase-dev
- vtk-dev
"
source="
$pkgname-$pkgver.tar.gz::https://github.com/opencv/opencv/archive/$pkgver.tar.gz
@@ -35,6 +34,17 @@ source="
"
options="!check" # Tests require human interaction
+# vtk is only provided on x86_64
+case "$CARCH" in
+ x86_64)
+ makedepends="$makedepends vtk-dev"
+ _extra_cmake_flags="-DCPU_BASELINE_DISABLE=SSE3 -DCPU_BASELINE_REQUIRE=SSE2"
+ ;;
+ *)
+ _extra_cmake_flags="-DWITH_VTK=OFF"
+ ;;
+esac
+
build() {
cmake -B build \
-DWITH_OPENCL=ON \
@@ -50,8 +60,6 @@ build() {
-DINSTALL_PYTHON_EXAMPLES=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
- -DCPU_BASELINE_DISABLE=SSE3 \
- -DCPU_BASELINE_REQUIRE=SSE2 \
-DOPENCV_EXTRA_MODULES_PATH="$srcdir/opencv_contrib-$pkgver/modules" \
-DOPENCV_SKIP_PYTHON_LOADER=ON \
-DOPENCV_GENERATE_PKGCONFIG=ON \
@@ -60,7 +68,7 @@ build() {
-DEIGEN_INCLUDE_PATH=/usr/include/eigen3 \
-DLAPACK_LIBRARIES="/usr/lib/liblapack.so;/usr/lib/libblas.so;/usr/lib/libcblas.so" \
-DCMAKE_SKIP_INSTALL_RPATH=ON \
- .
+ $_extra_cmake_flags .
make -C build
}