summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
Diffstat (limited to 'libre')
-rw-r--r--libre/opencv/PKGBUILD29
-rw-r--r--libre/opencv/opencv-includedir.patch9
2 files changed, 27 insertions, 11 deletions
diff --git a/libre/opencv/PKGBUILD b/libre/opencv/PKGBUILD
index 6e23bb87b..2129b1388 100644
--- a/libre/opencv/PKGBUILD
+++ b/libre/opencv/PKGBUILD
@@ -7,27 +7,30 @@
pkgbase=opencv
pkgname=opencv
pkgver=4.0.1
-pkgrel=1
+pkgrel=5
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)
-url="http://opencv.org/"
+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)
+makedepends=(cmake python-numpy python-setuptools mesa eigen hdf5 lapacke gtk3 vtk glew ant java-environment double-conversion)
optdepends=('opencv-samples: samples'
'gtk3: for the HighGUI module'
'vtk: for the viz module'
'hdf5: support for HDF5 format'
'opencl-icd-loader: For coding with OpenCL'
- 'python-numpy: Python 3 interface')
+ 'python-numpy: Python 3 interface'
+ '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")
-source=("https://repo.parabola.nu/other/$pkgname-libre/$pkgname-libre-$pkgver.zip")
+source=("https://repo.parabola.nu/other/$pkgname-libre/$pkgname-libre-$pkgver.zip"
+ opencv-includedir.patch)
mksha256sums=('b79ccdc4797a959c5ab17249a8a302c066248ae070e4d7010e2d77a625fdb30a'
'0d8acbad4b7074cfaafd906a7419c23629179d5e98894714402090b192ef8237')
-sha256sums=('62118c4fa2bf720c86ec669c06b1dd6f194880bf4f4da99c4838e136b441956f')
+sha256sums=('62118c4fa2bf720c86ec669c06b1dd6f194880bf4f4da99c4838e136b441956f'
+ 'a96e35c9592e655b21a62cfe04e864a10e21535ad900e5de67356b9e9f40ca10')
mksource() {
cd "$srcdir/opencv_contrib-$pkgver"
@@ -45,17 +48,19 @@ mksource() {
}
prepare() {
- cd "$srcdir/opencv_contrib-$pkgver"
+ mkdir -p build
+
+ 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
-
- mkdir -p ../build
}
build() {
cd build
-
+ export JAVA_HOME="/usr/lib/jvm/default"
# SSE only available from Pentium 3 onwards (i686 is way older)
# SSE only available x86 hardware and ARM uses NEON
case "$CARCH" in
@@ -86,7 +91,9 @@ build() {
-DLAPACK_LIBRARIES="/usr/lib/liblapack.so;/usr/lib/libblas.so;/usr/lib/libcblas.so" \
-DLAPACK_CBLAS_H="/usr/include/cblas.h" \
-DLAPACK_LAPACKE_H="/usr/include/lapacke.h" \
- -DOPENCV_GENERATE_PKGCONFIG=ON
+ -DOPENCV_GENERATE_PKGCONFIG=ON \
+ -DOPENCV_ENABLE_NONFREE=OFF \
+ -DOPENCV_JNI_INSTALL_PATH=lib
# -DWITH_IPP=OFF
make
}
diff --git a/libre/opencv/opencv-includedir.patch b/libre/opencv/opencv-includedir.patch
new file mode 100644
index 000000000..dd5309467
--- /dev/null
+++ b/libre/opencv/opencv-includedir.patch
@@ -0,0 +1,9 @@
+diff -u -r opencv-4.0.1/cmake/templates/opencv-XXX.pc.in opencv-4.0.1-includedir/cmake/templates/opencv-XXX.pc.in
+--- opencv-4.0.1/cmake/templates/opencv-XXX.pc.in 2018-12-22 07:03:30.000000000 +0000
++++ opencv-4.0.1-includedir/cmake/templates/opencv-XXX.pc.in 2019-02-07 15:08:15.016613349 +0000
+@@ -11,4 +10,4 @@
+ Version: @OPENCV_VERSION_PLAIN@
+ Libs: @OPENCV_PC_LIBS@
+ Libs.private: @OPENCV_PC_LIBS_PRIVATE@
+-Cflags: -I${includedir_old} -I${includedir_new}
++Cflags: -I${includedir_new}