diff options
author | Score_Under | 2019-05-29 09:40:21 +0100 |
---|---|---|
committer | Score_Under | 2019-05-29 09:41:22 +0100 |
commit | 4585bb8d267d40a543b1ccaf762d4578e2c7cac0 (patch) | |
tree | cd135b0dc486040ee53a671abf51dfcad85a0156 /PKGBUILD | |
parent | c6208407511dac1325989c10e633e4a3de0b1ac9 (diff) | |
download | aur-opencv-with-python2-support.tar.gz |
Update for 4.1.0 in line with original Arch package
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 39 |
1 files changed, 19 insertions, 20 deletions
@@ -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() { |