[arch-commits] Commit in opencv/trunk (PKGBUILD)
Antonio Rojas
arojas at archlinux.org
Sun Apr 4 18:14:20 UTC 2021
Date: Sunday, April 4, 2021 @ 18:14:19
Author: arojas
Revision: 411495
Split python bindings, since they require many additional dependencies
Modified:
opencv/trunk/PKGBUILD
----------+
PKGBUILD | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-04-04 17:18:03 UTC (rev 411494)
+++ PKGBUILD 2021-04-04 18:14:19 UTC (rev 411495)
@@ -3,9 +3,9 @@
# Contributor: Tobias Powalowski <tpowa at archlinux.org>
pkgbase=opencv
-pkgname=(opencv opencv-samples)
+pkgname=(opencv opencv-samples python-opencv)
pkgver=4.5.2
-pkgrel=1
+pkgrel=2
pkgdesc="Open Source Computer Vision Library"
arch=(x86_64)
license=(BSD)
@@ -14,10 +14,10 @@
makedepends=(cmake python-numpy python-setuptools mesa eigen hdf5 lapacke qt5-base vtk glew ant java-environment)
optdepends=('opencv-samples: samples'
'vtk: for the viz module'
- 'qt5-base: for the HighGUI module and the Python bindings'
- 'hdf5: for the HDF5 module and the Python bindings'
+ 'glew: for the viz module'
+ 'qt5-base: for the HighGUI module'
+ 'hdf5: for the HDF5 module'
'opencl-icd-loader: For coding with OpenCL'
- 'python-numpy: Python bindings'
'java-runtime: Java interface')
source=(https://github.com/opencv/opencv/archive/$pkgver/$pkgname-$pkgver.tar.gz
https://github.com/opencv/opencv_contrib/archive/$pkgver/opencv_contrib-$pkgver.tar.gz
@@ -67,7 +67,7 @@
DESTDIR="$pkgdir" cmake --install build
# install license file
- install -Dm644 $pkgname-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
+ install -Dm644 $pkgbase-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
# separate samples package
mv "$pkgdir"/usr/share/opencv4/samples "$srcdir"
@@ -75,6 +75,9 @@
# Add java symlinks expected by some binary blobs
ln -sr "$pkgdir"/usr/share/java/{opencv4/opencv-${pkgver//./},opencv}.jar
ln -sr "$pkgdir"/usr/lib/{libopencv_java${pkgver//./},libopencv_java}.so
+
+ # Split Python bindings
+ rm -r "$pkgdir"/usr/lib/python3*
}
package_opencv-samples() {
@@ -86,5 +89,16 @@
mv samples "$pkgdir"/usr/share/opencv4
# install license file
- install -Dm644 opencv-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
+ install -Dm644 $pkgbase-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
+
+package_python-opencv() {
+ pkgdesc="Python bindings for OpenCV"
+ depends=(python-numpy opencv vtk glew qt5-base hdf5)
+ unset optdepends
+
+ DESTDIR="$pkgdir" cmake --install build/modules/python3
+
+ # install license file
+ install -Dm644 $pkgbase-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
+}
More information about the arch-commits
mailing list