summaryrefslogtreecommitdiff
path: root/libre/opencv/PKGBUILD
diff options
context:
space:
mode:
authorgrizzlyuser <grizzlyuser@protonmail.com>2020-04-26 20:23:42 +0300
committerAndreas Grapentin <andreas@grapentin.org>2020-05-13 18:20:46 +0200
commit6f837890f295fbca0f6d42c95d5c2f87289e32a8 (patch)
tree9ca538cdb6058373f927042c99d4c8a9f8ccaaa0 /libre/opencv/PKGBUILD
parentf4730219a4d05726feaf766ae49af33fb56ccc66 (diff)
downloadabslibre-6f837890f295fbca0f6d42c95d5c2f87289e32a8.tar.gz
abslibre-6f837890f295fbca0f6d42c95d5c2f87289e32a8.tar.bz2
abslibre-6f837890f295fbca0f6d42c95d5c2f87289e32a8.zip
libre/opencv 4.3.0-4.par1: New version and sync with Arch Linux
Arch Linux changed makedepends from gtk3 to qt5-base, and because of that, HighGUI module now doesn't build when Milky icons are removed. So added libre.patch that replaces custom icons with the ones from system icon theme. AFAIK that requires hicolor-icon-theme dependency added. Changed the license to reflect that it's BSD 3-clause. modules/xfeatures2d/ had been already removed in prepare(), so no need to remove modules/xfeatures2d/src/{sift,surf}.cpp additionally. It doesn't build with only two .cpp files removed anyway. Signed-off-by: Andreas Grapentin <andreas@grapentin.org>
Diffstat (limited to 'libre/opencv/PKGBUILD')
-rw-r--r--libre/opencv/PKGBUILD35
1 files changed, 19 insertions, 16 deletions
diff --git a/libre/opencv/PKGBUILD b/libre/opencv/PKGBUILD
index 8d258445e..35bebad6c 100644
--- a/libre/opencv/PKGBUILD
+++ b/libre/opencv/PKGBUILD
@@ -3,45 +3,50 @@
# Contributor (Hyperbola): André Silva <emulatorman@hyperbola.info>
# Contributor (Hyperbola): Márcio Silva <coadde@hyperbola.info>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+# Contributor: grizzlyuser <grizzlyuser@protonmail.com>
pkgbase=opencv
pkgname=opencv
-pkgver=4.1.1
-pkgrel=1
+pkgver=4.3.0
+pkgrel=4
pkgrel+=.par1
pkgdesc="Free Computer Vision Library, without nonfree SIFT and SURF algorithms, nonfree Milky icons and lena images"
arch=(x86_64)
arch+=(i686 armv7h)
-license=(BSD)
+license=(BSD3)
url="https://opencv.org/"
depends=(intel-tbb openexr gst-plugins-base libdc1394 cblas lapack libgphoto2 jasper ffmpeg)
-makedepends=(cmake python-numpy python-setuptools mesa eigen hdf5 lapacke gtk3 vtk glew ant java-environment)
+depends+=(hicolor-icon-theme)
+makedepends=(cmake python-numpy python-setuptools mesa eigen hdf5 lapacke qt5-base vtk glew ant java-environment)
optdepends=('opencv-samples: samples'
- 'gtk3: for the HighGUI module and the Python bindings'
'vtk: for the viz module'
+ 'qt5-base: for the HighGUI module and the Python bindings'
'hdf5: for the HDF5 module and the Python bindings'
'opencl-icd-loader: For coding with OpenCL'
'python-numpy: Python bindings'
'java-runtime: Java interface')
-mksource=("$pkgbase-$pkgver.zip::https://github.com/opencv/opencv/archive/$pkgver.zip"
- "opencv_contrib-$pkgver.tar.gz::https://github.com/opencv/opencv_contrib/archive/$pkgver.tar.gz")
+mksource=("$pkgbase-$pkgver.tar.gz::https://github.com/opencv/opencv/archive/$pkgver.zip"
+ "opencv_contrib-$pkgver.tar.gz::https://github.com/opencv/opencv_contrib/archive/$pkgver.tar.gz"
+ libre.patch)
source=("https://repo.parabola.nu/other/$pkgname-libre/$pkgname-libre-$pkgver.zip"
opencv-includedir.patch)
-mksha256sums=('d34985c7b4283519c032e3585b30846644f56c81acba35693295ff8930f080aa'
- '9f85d380758498d800fec26307e389620cde8b1a2e86ab51cddc5200fbe37102')
-sha256sums=('92de32fbd5c2239cf1b7bd52c07aab8bec76fab1dd51fef5a887f401f75ee2f6'
+mksha256sums=('36799186756c1e12adde97f0a8d1afc395d5b0f86d8ad9ef951bc33aa732f9b9'
+ 'a96e35c9592e655b21a62cfe04e864a10e21535ad900e5de67356b9e9f40ca10'
+ '15139ab05b9713be6a7ee35b610f42668ea331a67c914b84a5696abd50076c54')
+sha256sums=('f82739ce08f52a3bb439c427a189da2aaa4b99ffd2d07fd6b26194b64e876900'
'a96e35c9592e655b21a62cfe04e864a10e21535ad900e5de67356b9e9f40ca10')
mksource() {
cd "$srcdir/opencv_contrib-$pkgver"
# remove nonfree SIFT and SURF algorithms that are patented in some countries and have some other limitations on the use
- rm -v modules/xfeatures2d/src/{sift,surf}.cpp
+ rm -rv modules/xfeatures2d
cd "$srcdir/$pkgname-$pkgver"
# remove nonfree Milky icons
rm -rv modules/highgui/src/files_Qt/Milky
+ patch -p1 -i ../libre.patch
# remove nonfree lena.png and lena.jpg images
rm -v $(find . -iname '*lena*')
@@ -53,9 +58,7 @@ prepare() {
cd $pkgname-$pkgver
patch -p1 -i ../opencv-includedir.patch # Fix wrong include patch in pkgconfig file
- cd "$srcdir/opencv_contrib-$pkgver"
- # remove nonfree SIFT and SURF references
- rm -rv modules/xfeatures2d
+ sed -e '/ocv_tbb_cmake_guess(HAVE_TBB)/d' -i cmake/OpenCVDetectTBB.cmake # Don't use TBB's cmake config, it breaks build
}
build() {
@@ -75,7 +78,8 @@ build() {
-DWITH_OPENCL=ON \
-DWITH_OPENGL=ON \
-DWITH_TBB=ON \
- -DOpenGL_GL_PREFERENCE=GLVND \
+ -DWITH_VULKAN=ON \
+ -DWITH_QT=ON \
-DBUILD_WITH_DEBUG_INFO=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_PERF_TESTS=OFF \
@@ -83,7 +87,6 @@ build() {
-DINSTALL_C_EXAMPLES=ON \
-DINSTALL_PYTHON_EXAMPLES=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_LIBDIR=lib \
$extra \
-DOPENCV_EXTRA_MODULES_PATH="$srcdir/opencv_contrib-$pkgver/modules" \
-DOPENCV_SKIP_PYTHON_LOADER=ON \