diff options
author | Giovanni Santini | 2018-09-10 21:16:46 +0200 |
---|---|---|
committer | Giovanni Santini | 2018-09-10 21:16:46 +0200 |
commit | ea95b70e4c8ebea89c7576fb92e0984e0ef2258f (patch) | |
tree | 4092f20bdf27c0c83e7f452a95291b8293e05525 | |
parent | e599256459557cc048c11ae7e0baed00663cb2d5 (diff) | |
download | aur-ea95b70e4c8ebea89c7576fb92e0984e0ef2258f.tar.gz |
upgpkg: opencv-java 3.4.3-1
- Version bump.
- PKGBUILD tracks the official one.
- Now only the java module and its dependencies are built, not all
OpenCV.
- Some cleanup here and there.
-rw-r--r-- | .SRCINFO | 14 | ||||
-rwxr-xr-x | PKGBUILD | 123 |
2 files changed, 51 insertions, 86 deletions
@@ -1,6 +1,6 @@ pkgbase = opencv-java pkgdesc = Open Source Computer Vision Library - Java bindings - pkgver = 3.4.0 + pkgver = 3.4.3 pkgrel = 1 url = http://opencv.org/ arch = i686 @@ -13,13 +13,13 @@ pkgbase = opencv-java makedepends = eigen makedepends = apache-ant makedepends = java-environment - depends = opencv>=3.4.0 + depends = opencv>=3.4.3 depends = java-runtime - optdepends = opencv-samples - source = opencv-3.4.0.tar.gz::https://github.com/opencv/opencv/archive/3.4.0.tar.gz - source = opencv_contrib-3.4.0.tar.gz::https://github.com/opencv/opencv_contrib/archive/3.4.0.tar.gz - sha256sums = 678cc3d2d1b3464b512b084a8cca1fad7de207c7abdf2caa1fed636c13e916da - sha256sums = 699ab3eee7922fbd3e8f98c68e6d16a1d453b20ef364e76172e56466dc9c16cd + optdepends = opencv-samples: OpenCV samples + source = opencv-3.4.3.tar.gz::https://github.com/opencv/opencv/archive/3.4.3.tar.gz + source = opencv_contrib-3.4.3.tar.gz::https://github.com/opencv/opencv_contrib/archive/3.4.3.tar.gz + sha256sums = 4eef85759d5450b183459ff216b4c0fa43e87a4f6aa92c8af649f89336f002ec + sha256sums = 6dfb51326f3dfeb659128df952edecd45683626a965aa4a8e1e9c970c40fb636 pkgname = opencv-java @@ -3,104 +3,69 @@ # Contributor: Tobias Powalowski <tpowa@archlinux.org> # Based on the official opencv PKGBUILD - pkgname=opencv-java _pkgbase=opencv -pkgver=3.4.0 +pkgver=3.4.3 pkgrel=1 pkgdesc="Open Source Computer Vision Library - Java bindings" -arch=('i686' 'x86_64') -license=('BSD') +arch=(i686 x86_64) +license=(BSD) url="http://opencv.org/" -depends=( - "opencv>=$pkgver" - 'java-runtime' - ) -makedepends=( - 'cmake' - 'python-numpy' - 'python2-numpy' - 'mesa' - 'eigen' - # Needed for the Java binding - 'apache-ant' - 'java-environment' -) -optdepends=( - 'opencv-samples' -) -# Sources and checksums section -source=( - "${_pkgbase}-${pkgver}.tar.gz::https://github.com/opencv/opencv/archive/$pkgver.tar.gz" - "opencv_contrib-$pkgver.tar.gz::https://github.com/opencv/opencv_contrib/archive/$pkgver.tar.gz" -) -sha256sums=('678cc3d2d1b3464b512b084a8cca1fad7de207c7abdf2caa1fed636c13e916da' - '699ab3eee7922fbd3e8f98c68e6d16a1d453b20ef364e76172e56466dc9c16cd') - -# CMake flags -_cmakeopts=('-D WITH_OPENCL=ON' - '-D WITH_OPENGL=ON' - '-D WITH_TBB=ON' - '-D WITH_XINE=ON' - '-D WITH_GSTREAMER=OFF' - '-D BUILD_WITH_DEBUG_INFO=OFF' - '-D BUILD_TESTS=OFF' - '-D BUILD_PERF_TESTS=OFF' - '-D BUILD_EXAMPLES=ON' - '-D INSTALL_C_EXAMPLES=ON' - '-D INSTALL_PYTHON_EXAMPLES=ON' - '-D CMAKE_BUILD_TYPE=Release' - '-D CMAKE_INSTALL_PREFIX=/usr' - '-D CMAKE_INSTALL_LIBDIR=lib' - '-D CMAKE_SKIP_RPATH=ON' - ) - -# SSE only available from Pentium 3 onwards (i686 is way older) -[[ "$CARCH" = 'i686' ]] && _cmakeopts+=('-D CPU_BASELINE_DISABLE=SSE2') -[[ "$CARCH" = 'x86_64' ]] && _cmakeopts+=('-D CPU_BASELINE_DISABLE=SSE3 -D CPU_BASELINE_REQUIRE=SSE2') +depends=("opencv>=$pkgver" java-runtime) +# Last two makedepends are needed for the Java binding +makedepends=(cmake python-numpy python2-numpy mesa eigen apache-ant java-environment) +optdepends=('opencv-samples: OpenCV samples') +source=("$_pkgbase-$pkgver.tar.gz::https://github.com/opencv/opencv/archive/$pkgver.tar.gz" + "opencv_contrib-$pkgver.tar.gz::https://github.com/opencv/opencv_contrib/archive/$pkgver.tar.gz") +sha256sums=('4eef85759d5450b183459ff216b4c0fa43e87a4f6aa92c8af649f89336f002ec' + '6dfb51326f3dfeb659128df952edecd45683626a965aa4a8e1e9c970c40fb636') +# Removed all the CMake flags manipulation; +# hopefully, SSE will be automagically disabled properly on i686 -# prepare() and build() are the official ones prepare() { # Setting JAVA_HOME msg2 "Setting JAVA_HOME variable" export JAVA_HOME="/usr/lib/jvm/default" + mkdir -p build } build() { - mkdir -p "$srcdir/build" - cd "$srcdir/build" - - cmake ${_cmakeopts[@]} \ - -DOPENCV_EXTRA_MODULES_PATH="$srcdir/opencv_contrib-$pkgver/modules" \ - -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" \ - ../$_pkgbase-$pkgver - - # Build everything, we will fix things in package step - make + cd build + # The flags are almost as the original package, just tweaked for easier and speedier builds + cmake ../$_pkgbase-$pkgver \ + -DBUILD_LIST=java \ + -DWITH_OPENCL=ON \ + -DWITH_OPENGL=ON \ + -DWITH_TBB=ON \ + -DOpenGL_GL_PREFERENCE=GLVND \ + -DBUILD_WITH_DEBUG_INFO=OFF \ + -DBUILD_TESTS=OFF \ + -DBUILD_PERF_TESTS=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DOPENCV_EXTRA_MODULES_PATH="$srcdir/opencv_contrib-$pkgver/modules" \ + -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" + make } # Changed in order to save just Java files # It's a bit dirty, but it works package() { + cd build - # Entering in the source directory - cd "$srcdir/build" - - # Making a fake install - mkdir -p "$srcdir/temp" - make DESTDIR="$srcdir/temp" install + # Making a fake install + mkdir -p "$srcdir/temp" + make DESTDIR="$srcdir/temp" install - # Creating the package structure - mkdir -p "$pkgdir/usr/share/opencv/java" - # Installing the built files - cp -r "$srcdir/temp/usr/share/OpenCV/java" "$pkgdir/usr/share/opencv" + # Creating the package structure + mkdir -p "$pkgdir/usr/share/opencv/java" + # Installing the built files + cp -r "$srcdir/temp/usr/share/OpenCV/java" "$pkgdir/usr/share/opencv" - # Create a symbolic link in /usr/share/java as Java apps written for Ubuntu may be looking there - mkdir -p "$pkgdir/usr/share/java/" - # Get the number in the Jar filename - _number=$(echo $pkgver | sed 's/\.//g') - #_number=$(echo $pkgver | sed 's/\.[0-9]$//' | sed 's/\.//g') - ln -s "/usr/share/opencv/java/opencv-$_number.jar" "$pkgdir/usr/share/java/opencv.jar" + # Create a symbolic link in /usr/share/java as Java apps written for Ubuntu may be looking there + mkdir -p "$pkgdir/usr/share/java/" + ln -s "/usr/share/opencv/java/opencv-${pkgver//./}.jar" "$pkgdir/usr/share/java/opencv.jar" } |