summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorScore_Under2019-05-29 09:40:21 +0100
committerScore_Under2019-05-29 09:41:22 +0100
commit4585bb8d267d40a543b1ccaf762d4578e2c7cac0 (patch)
treecd135b0dc486040ee53a671abf51dfcad85a0156
parentc6208407511dac1325989c10e633e4a3de0b1ac9 (diff)
downloadaur-opencv-with-python2-support.tar.gz
Update for 4.1.0 in line with original Arch package
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD39
-rw-r--r--opencv-includedir.patch9
3 files changed, 43 insertions, 32 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5f9bb16db5a3..8612741fc1ca 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,8 @@
-# Generated by mksrcinfo v8
-# Thu Nov 29 02:42:11 UTC 2018
pkgbase = opencv-with-python2-support
pkgdesc = Open Source Computer Vision Library
- pkgver = 4.0.0
- pkgrel = 4
- url = http://opencv.org/
+ pkgver = 4.1.0
+ pkgrel = 2
+ url = https://opencv.org/
arch = x86_64
license = BSD
makedepends = cmake
@@ -19,6 +17,8 @@ pkgbase = opencv-with-python2-support
makedepends = gtk3
makedepends = vtk
makedepends = glew
+ makedepends = ant
+ makedepends = java-environment
depends = intel-tbb
depends = openexr
depends = gst-plugins-base
@@ -34,18 +34,21 @@ pkgbase = opencv-with-python2-support
optdepends = hdf5: support for HDF5 format
optdepends = opencl-icd-loader: For coding with OpenCL
optdepends = python-numpy: Python interface
- source = opencv-4.0.0.tar.gz::https://github.com/opencv/opencv/archive/4.0.0.zip
- source = opencv_contrib-4.0.0.tar.gz::https://github.com/opencv/opencv_contrib/archive/4.0.0.tar.gz
- sha256sums = 86fd08fc02893e05e2944fa7b0daa7d02643232450f020b475e1b2f24587b99a
- sha256sums = 4fb0681414df4baedce6e3f4a01318d6f4fcde6ee14854d761fd4e397a397763
+ optdepends = java-runtime: Java interface
+ source = opencv-4.1.0.tar.gz::https://github.com/opencv/opencv/archive/4.1.0.zip
+ source = opencv_contrib-4.1.0.tar.gz::https://github.com/opencv/opencv_contrib/archive/4.1.0.tar.gz
+ source = opencv-includedir.patch
+ sha256sums = 2c75b129da2e2c8728d168b7bf14ceca2da0ebe938557b109bae6742855ede13
+ sha256sums = e7d775cc0b87b04308823ca518b11b34cc12907a59af4ccdaf64419c1ba5e682
+ sha256sums = a96e35c9592e655b21a62cfe04e864a10e21535ad900e5de67356b9e9f40ca10
pkgname = opencv-with-python2-support
- provides = opencv=4.0.0
+ provides = opencv=4.1.0
conflicts = opencv
pkgname = opencv-with-python2-support-samples
pkgdesc = Open Source Computer Vision Library (samples)
- depends = opencv=4.0.0
- provides = opencv-samples=4.0.0
+ depends = opencv=4.1.0
+ provides = opencv-samples=4.1.0
conflicts = opencv-samples
diff --git a/PKGBUILD b/PKGBUILD
index e8189aae93ea..821e48685166 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,36 +1,38 @@
# Maintainer(?): Score_Under <seejay.11@gmail.com>
-
-# This is the last thing I want to be maintaining, but as long as arch isn't
-# gentoo and as long as hydrus dev still uses ancient technology, it looks like
-# this is my lot in life.
-
# Following upstream package opencv:
# Maintainer: Ray Rashif <schiv@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
pkgbase=opencv-with-python2-support
pkgname=(opencv-with-python2-support opencv-with-python2-support-samples)
-pkgver=4.0.0
-pkgrel=4
+pkgver=4.1.0
+pkgrel=2
pkgdesc="Open Source Computer Vision Library"
arch=(x86_64)
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 python2-numpy python-setuptools python2-setuptools mesa eigen hdf5 lapacke gtk3 vtk glew)
+makedepends=(cmake python-numpy python2-numpy python-setuptools python2-setuptools mesa eigen hdf5 lapacke gtk3 vtk glew ant java-environment)
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 interface')
+ 'python-numpy: Python interface'
+ 'java-runtime: Java interface')
source=("opencv-$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")
-sha256sums=('86fd08fc02893e05e2944fa7b0daa7d02643232450f020b475e1b2f24587b99a'
- '4fb0681414df4baedce6e3f4a01318d6f4fcde6ee14854d761fd4e397a397763')
+ "opencv_contrib-$pkgver.tar.gz::https://github.com/opencv/opencv_contrib/archive/$pkgver.tar.gz"
+ opencv-includedir.patch)
+sha256sums=('2c75b129da2e2c8728d168b7bf14ceca2da0ebe938557b109bae6742855ede13'
+ 'e7d775cc0b87b04308823ca518b11b34cc12907a59af4ccdaf64419c1ba5e682'
+ 'a96e35c9592e655b21a62cfe04e864a10e21535ad900e5de67356b9e9f40ca10')
prepare() {
mkdir -p build
+
+ cd opencv-$pkgver
+ patch -p1 -i ../opencv-includedir.patch # Fix wrong include patch in pkgconfig file
+
case " $CFLAGS $CPPFLAGS $CXXFLAGS " in
*" -O3 "*|*" -Ofast "*)
warning "OpenCV takes a very long time to build at high optimisation levels."
@@ -41,6 +43,7 @@ prepare() {
build() {
cd build
+ export JAVA_HOME="/usr/lib/jvm/default"
# cmake's FindLAPACK doesn't add cblas to LAPACK_LIBRARIES, so we need to specify them manually
_python3path=`python -c "from sysconfig import get_path; print(get_path('platlib'))"`
_python2path=`python2 -c "from sysconfig import get_path; print(get_path('platlib'))"`
@@ -66,7 +69,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=ON \
+ -DOPENCV_JNI_INSTALL_PATH=lib
make
}
@@ -83,12 +88,6 @@ package_opencv-with-python2-support() {
# separate samples package
cd "$pkgdir"/usr/share
mv opencv4/samples "$srcdir"/opencv-samples
-
- # install missing headers https://github.com/opencv/opencv/issues/13201
- for _module in imgcodecs videoio photo; do
- cp -r "$srcdir"/opencv-$pkgver/modules/$_module/include/opencv2/$_module/legacy \
- "$pkgdir"/usr/include/opencv4/opencv2/$_module
- done
}
package_opencv-with-python2-support-samples() {
diff --git a/opencv-includedir.patch b/opencv-includedir.patch
new file mode 100644
index 000000000000..dd530946720f
--- /dev/null
+++ b/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}