Commit 4216d71d authored by Bart Ribbers's avatar Bart Ribbers Committed by Ariadne Conill
Browse files

community/opencv: upgrade to 4.5.2

parent 8280478a
# Contributor: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=opencv
pkgver=4.4.0
pkgrel=2
pkgver=4.5.2
pkgrel=0
pkgdesc="An open source computer vision and machine learning library"
url="https://opencv.org"
arch="all !mips64" # blocked by lapack
# Other arches blocked by vtk-dev
arch="x86_64 x86 aarch64 ppc64le"
license="BSD-3-Clause"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-samples::noarch"
makedepends="
subpackages="$pkgname-dbg $pkgname-dev"
depends_dev="
blas-dev
cmake
eigen-dev
ffmpeg-dev
freetype-dev
......@@ -28,47 +28,71 @@ makedepends="
openjpeg-tools
py3-setuptools
qt5-qtbase-dev
vtk-dev
"
makedepends="$depends_dev
cmake
python3
"
source="
$pkgname-$pkgver.tar.gz::https://github.com/opencv/opencv/archive/$pkgver.tar.gz
$pkgname-contrib-$pkgver.tar.gz::https://github.com/opencv/opencv_contrib/archive/$pkgver.tar.gz
source="https://github.com/opencv/opencv/archive/$pkgver/opencv-$pkgver.tar.gz
https://github.com/opencv/opencv_contrib/archive/$pkgver/opencv_contrib-$pkgver.tar.gz
"
options="!check" # Tests require human interaction
# Tests require human interaction
# net required to download a data file (face_landmark_model.dat)
options="net !check"
# 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
prepare() {
default_prepare
cd "$srcdir/opencv_contrib-$pkgver"/modules
# Only use modules that we care about
mv \
aruco \
face \
tracking \
optflow \
plot \
shape \
superres \
videostab \
ximgproc \
"$builddir"/modules/
}
build() {
cmake -B build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DWITH_OPENCL=ON \
-DWITH_OPENGL=ON \
-DWITH_TBB=ON \
-DWITH_VULKAN=ON \
-DWITH_QT=ON \
-DWITH_ADE=OFF \
-DWITH_opencv_gapi=OFF \
-DWITH_IPP=OFF \
-DBUILD_WITH_DEBUG_INFO=ON \
-DBUILD_TESTS=OFF \
-DBUILD_PERF_TESTS=OFF \
-DBUILD_EXAMPLES=ON \
-DINSTALL_C_EXAMPLES=ON \
-DINSTALL_PYTHON_EXAMPLES=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DOPENCV_EXTRA_MODULES_PATH="$srcdir/opencv_contrib-$pkgver/modules" \
-DBUILD_EXAMPLES=OFF \
-DINSTALL_C_EXAMPLES=OFF \
-DINSTALL_PYTHON_EXAMPLES=OFF \
-DOPENCV_SKIP_PYTHON_LOADER=ON \
-DOPENCV_GENERATE_PKGCONFIG=ON \
-DOPENCV_ENABLE_NONFREE=ON \
-DOPENCV_ENABLE_NONFREE=OFF \
-DOPENCV_GENERATE_SETUPVARS=OFF \
-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 \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
$_extra_cmake_flags
cmake --build build
}
......@@ -89,5 +113,7 @@ samples() {
mv "$pkgdir/usr/share/opencv4/samples" "$subpkgdir/usr/share/opencv4"
}
sha512sums="ce4bada7b57c1a00439eca02abcba262732d5eabfd26090f6f83642d747a9a1a7908230bcd01a2b999c509e0c43c8b0dcb2b93ac824518b79cffe533f22652bb opencv-4.4.0.tar.gz
d1a29a4a343f55fe2ae04966d2fc2d20765de719619bea68b84ee72f432777062727d8105b0aa168f359e468544b2ea930b1a4f8dc059e51de27d8af229c6b6b opencv-contrib-4.4.0.tar.gz"
sha512sums="
07788ec49801bdab963a057871e81fc2b081149c75764810197766d987e54db0d6fd142d2397bbbacefcea6a8be100235ea886ee7e5d5c07ed1156e76249dfec opencv-4.5.2.tar.gz
72ce91dfefc1c3e12cc8e965d90392cfed6c236daafb512aafc14cdad83242bfa0fc1adea308cd07a5483e010633e2996c3b239b2ce12cea47e6e21c36ed398b opencv_contrib-4.5.2.tar.gz
"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment