[arch-commits] Commit in opencv/repos (staging-x86_64 staging-x86_64/PKGBUILD)

2020-11-09 Thread Evangelos Foutras via arch-commits
Date: Monday, November 9, 2020 @ 20:47:25
  Author: foutrelis
Revision: 399942

archrelease: copy trunk to staging-x86_64

Added:
  opencv/repos/staging-x86_64/
  opencv/repos/staging-x86_64/PKGBUILD
(from rev 399941, opencv/trunk/PKGBUILD)

--+
 PKGBUILD |   83 +
 1 file changed, 83 insertions(+)

Copied: opencv/repos/staging-x86_64/PKGBUILD (from rev 399941, 
opencv/trunk/PKGBUILD)
===
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2020-11-09 20:47:25 UTC (rev 399942)
@@ -0,0 +1,83 @@
+# Maintainer: Ray Rashif 
+# Contributor: Tobias Powalowski 
+
+pkgbase=opencv
+pkgname=(opencv opencv-samples)
+pkgver=4.5.0
+pkgrel=2
+pkgdesc="Open Source Computer Vision Library"
+arch=(x86_64)
+license=(BSD)
+url="https://opencv.org/;
+depends=(tbb openexr gst-plugins-base libdc1394 cblas lapack libgphoto2 
openjpeg2 ffmpeg)
+makedepends=(cmake python-numpy python-setuptools mesa eigen hdf5 lapacke 
qt5-base vtk glew ant java-environment)
+optdepends=('opencv-samples: samples'
+'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')
+source=("$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;)
+sha256sums=('168f6e61d8462fb3d5a29ba0d19c0375c25cac753ad01035a359584ccde9'
+'a65f1f0b98b2c720abbf122c502044d11f427a43212d85d8d2402d7a6339edda')
+
+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
+  _pythonpath=`python -c "from sysconfig import get_path; 
print(get_path('platlib'))"`
+  cmake -B build -S $pkgname-$pkgver \
+-DWITH_OPENCL=ON \
+-DWITH_OPENGL=ON \
+-DWITH_TBB=ON \
+-DWITH_VULKAN=ON \
+-DWITH_QT=ON \
+-DBUILD_WITH_DEBUG_INFO=OFF \
+-DBUILD_TESTS=OFF \
+-DBUILD_PERF_TESTS=OFF \
+-DBUILD_EXAMPLES=ON \
+-DINSTALL_C_EXAMPLES=ON \
+-DINSTALL_PYTHON_EXAMPLES=ON \
+-DCMAKE_INSTALL_PREFIX=/usr \
+-DCPU_BASELINE_DISABLE=SSE3 \
+-DCPU_BASELINE_REQUIRE=SSE2 \
+-DOPENCV_EXTRA_MODULES_PATH="$srcdir/opencv_contrib-$pkgver/modules" \
+-DOPENCV_SKIP_PYTHON_LOADER=ON \
+-DOPENCV_PYTHON3_INSTALL_PATH=$_pythonpath \
+
-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_ENABLE_NONFREE=ON \
+-DOPENCV_JNI_INSTALL_PATH=lib \
+-DOPENCV_GENERATE_SETUPVARS=OFF \
+-DEIGEN_INCLUDE_PATH=/usr/include/eigen3
+  cmake --build build
+}
+
+package_opencv() {
+  DESTDIR="$pkgdir" cmake --install build
+
+  # install license file
+  install -Dm644 $pkgname-$pkgver/LICENSE -t 
"$pkgdir"/usr/share/licenses/$pkgname
+
+  # separate samples package
+  mv "$pkgdir"/usr/share/opencv4/samples "$srcdir"
+
+  # Add java symlinks expected by some binary blobs
+  ln -sr "$pkgdir"/usr/share/java/{opencv4/opencv-${pkgver//./},opencv}.jar
+  ln -sr "$pkgdir"/usr/lib/{libopencv_java${pkgver//./},libopencv_java}.so
+}
+
+package_opencv-samples() {
+  pkgdesc+=" (samples)"
+  depends=("opencv=$pkgver")
+  unset optdepends
+
+  mkdir -p "$pkgdir"/usr/share/opencv4
+  mv samples "$pkgdir"/usr/share/opencv4
+
+  # install license file
+  install -Dm644 opencv-$pkgver/LICENSE -t 
"$pkgdir"/usr/share/licenses/$pkgname
+}


[arch-commits] Commit in opencv/repos (staging-x86_64 staging-x86_64/PKGBUILD)

2020-10-12 Thread Antonio Rojas via arch-commits
Date: Monday, October 12, 2020 @ 16:47:58
  Author: arojas
Revision: 398070

archrelease: copy trunk to staging-x86_64

Added:
  opencv/repos/staging-x86_64/
  opencv/repos/staging-x86_64/PKGBUILD
(from rev 398069, opencv/trunk/PKGBUILD)

--+
 PKGBUILD |   83 +
 1 file changed, 83 insertions(+)

Copied: opencv/repos/staging-x86_64/PKGBUILD (from rev 398069, 
opencv/trunk/PKGBUILD)
===
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2020-10-12 16:47:58 UTC (rev 398070)
@@ -0,0 +1,83 @@
+# Maintainer: Ray Rashif 
+# Contributor: Tobias Powalowski 
+
+pkgbase=opencv
+pkgname=(opencv opencv-samples)
+pkgver=4.5.0
+pkgrel=1
+pkgdesc="Open Source Computer Vision Library"
+arch=(x86_64)
+license=(BSD)
+url="https://opencv.org/;
+depends=(tbb openexr gst-plugins-base libdc1394 cblas lapack libgphoto2 
openjpeg2 ffmpeg)
+makedepends=(cmake python-numpy python-setuptools mesa eigen hdf5 lapacke 
qt5-base vtk glew ant java-environment)
+optdepends=('opencv-samples: samples'
+'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')
+source=("$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;)
+sha256sums=('168f6e61d8462fb3d5a29ba0d19c0375c25cac753ad01035a359584ccde9'
+'a65f1f0b98b2c720abbf122c502044d11f427a43212d85d8d2402d7a6339edda')
+
+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
+  _pythonpath=`python -c "from sysconfig import get_path; 
print(get_path('platlib'))"`
+  cmake -B build -S $pkgname-$pkgver \
+-DWITH_OPENCL=ON \
+-DWITH_OPENGL=ON \
+-DWITH_TBB=ON \
+-DWITH_VULKAN=ON \
+-DWITH_QT=ON \
+-DBUILD_WITH_DEBUG_INFO=OFF \
+-DBUILD_TESTS=OFF \
+-DBUILD_PERF_TESTS=OFF \
+-DBUILD_EXAMPLES=ON \
+-DINSTALL_C_EXAMPLES=ON \
+-DINSTALL_PYTHON_EXAMPLES=ON \
+-DCMAKE_INSTALL_PREFIX=/usr \
+-DCPU_BASELINE_DISABLE=SSE3 \
+-DCPU_BASELINE_REQUIRE=SSE2 \
+-DOPENCV_EXTRA_MODULES_PATH="$srcdir/opencv_contrib-$pkgver/modules" \
+-DOPENCV_SKIP_PYTHON_LOADER=ON \
+-DOPENCV_PYTHON3_INSTALL_PATH=$_pythonpath \
+
-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_ENABLE_NONFREE=ON \
+-DOPENCV_JNI_INSTALL_PATH=lib \
+-DOPENCV_GENERATE_SETUPVARS=OFF \
+-DEIGEN_INCLUDE_PATH=/usr/include/eigen3
+  cmake --build build
+}
+
+package_opencv() {
+  DESTDIR="$pkgdir" cmake --install build
+
+  # install license file
+  install -Dm644 $pkgname-$pkgver/LICENSE -t 
"$pkgdir"/usr/share/licenses/$pkgname
+
+  # separate samples package
+  mv "$pkgdir"/usr/share/opencv4/samples "$srcdir"
+
+  # Add java symlinks expected by some binary blobs
+  ln -sr "$pkgdir"/usr/share/java/{opencv4/opencv-${pkgver//./},opencv}.jar
+  ln -sr "$pkgdir"/usr/lib/{libopencv_java${pkgver//./},libopencv_java}.so
+}
+
+package_opencv-samples() {
+  pkgdesc+=" (samples)"
+  depends=("opencv=$pkgver")
+  unset optdepends
+
+  mkdir -p "$pkgdir"/usr/share/opencv4
+  mv samples "$pkgdir"/usr/share/opencv4
+
+  # install license file
+  install -Dm644 opencv-$pkgver/LICENSE -t 
"$pkgdir"/usr/share/licenses/$pkgname
+}


[arch-commits] Commit in opencv/repos (staging-x86_64 staging-x86_64/PKGBUILD)

2020-07-25 Thread Antonio Rojas via arch-commits
Date: Saturday, July 25, 2020 @ 06:53:37
  Author: arojas
Revision: 392521

archrelease: copy trunk to staging-x86_64

Added:
  opencv/repos/staging-x86_64/
  opencv/repos/staging-x86_64/PKGBUILD
(from rev 392520, opencv/trunk/PKGBUILD)

--+
 PKGBUILD |   79 +
 1 file changed, 79 insertions(+)

Copied: opencv/repos/staging-x86_64/PKGBUILD (from rev 392520, 
opencv/trunk/PKGBUILD)
===
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2020-07-25 06:53:37 UTC (rev 392521)
@@ -0,0 +1,79 @@
+# Maintainer: Ray Rashif 
+# Contributor: Tobias Powalowski 
+
+pkgbase=opencv
+pkgname=(opencv opencv-samples)
+pkgver=4.4.0
+pkgrel=1
+pkgdesc="Open Source Computer Vision Library"
+arch=(x86_64)
+license=(BSD)
+url="https://opencv.org/;
+depends=(tbb openexr gst-plugins-base libdc1394 cblas lapack libgphoto2 
openjpeg2 ffmpeg)
+makedepends=(cmake python-numpy python-setuptools mesa eigen hdf5 lapacke 
qt5-base vtk glew ant java-environment)
+optdepends=('opencv-samples: samples'
+'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')
+source=("$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;)
+sha256sums=('7faa0991c74cda52313ee37ef73f3e451332a47e7aa36c2bb2240b69f5002d27'
+'a69772f553b32427e09ffbfd0c8d5e5e47f7dab8b3ffc02851ffd7f912b76840')
+
+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
+  _pythonpath=`python -c "from sysconfig import get_path; 
print(get_path('platlib'))"`
+  cmake -B build -S $pkgname-$pkgver \
+-DWITH_OPENCL=ON \
+-DWITH_OPENGL=ON \
+-DWITH_TBB=ON \
+-DWITH_VULKAN=ON \
+-DWITH_QT=ON \
+-DBUILD_WITH_DEBUG_INFO=OFF \
+-DBUILD_TESTS=OFF \
+-DBUILD_PERF_TESTS=OFF \
+-DBUILD_EXAMPLES=ON \
+-DINSTALL_C_EXAMPLES=ON \
+-DINSTALL_PYTHON_EXAMPLES=ON \
+-DCMAKE_INSTALL_PREFIX=/usr \
+-DCPU_BASELINE_DISABLE=SSE3 \
+-DCPU_BASELINE_REQUIRE=SSE2 \
+-DOPENCV_EXTRA_MODULES_PATH="$srcdir/opencv_contrib-$pkgver/modules" \
+-DOPENCV_SKIP_PYTHON_LOADER=ON \
+-DOPENCV_PYTHON3_INSTALL_PATH=$_pythonpath \
+
-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_ENABLE_NONFREE=ON \
+-DOPENCV_JNI_INSTALL_PATH=lib \
+-DOPENCV_GENERATE_SETUPVARS=OFF \
+-DEIGEN_INCLUDE_PATH=/usr/include/eigen3
+  cmake --build build
+}
+
+package_opencv() {
+  DESTDIR="$pkgdir" cmake --install build
+
+  # install license file
+  install -Dm644 $pkgname-$pkgver/LICENSE -t 
"$pkgdir"/usr/share/licenses/$pkgname
+
+  # separate samples package
+  mv "$pkgdir"/usr/share/opencv4/samples "$srcdir"
+}
+
+package_opencv-samples() {
+  pkgdesc+=" (samples)"
+  depends=("opencv=$pkgver")
+  unset optdepends
+
+  mkdir -p "$pkgdir"/usr/share/opencv4
+  mv samples "$pkgdir"/usr/share/opencv4
+
+  # install license file
+  install -Dm644 opencv-$pkgver/LICENSE -t 
"$pkgdir"/usr/share/licenses/$pkgname
+}


[arch-commits] Commit in opencv/repos (staging-x86_64 staging-x86_64/PKGBUILD)

2018-11-18 Thread Antonio Rojas via arch-commits
Date: Sunday, November 18, 2018 @ 14:04:50
  Author: arojas
Revision: 340095

archrelease: copy trunk to staging-x86_64

Added:
  opencv/repos/staging-x86_64/
  opencv/repos/staging-x86_64/PKGBUILD
(from rev 340094, opencv/trunk/PKGBUILD)

--+
 PKGBUILD |   86 +
 1 file changed, 86 insertions(+)

Copied: opencv/repos/staging-x86_64/PKGBUILD (from rev 340094, 
opencv/trunk/PKGBUILD)
===
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2018-11-18 14:04:50 UTC (rev 340095)
@@ -0,0 +1,86 @@
+# Maintainer: Ray Rashif 
+# Contributor: Tobias Powalowski 
+
+pkgbase=opencv
+pkgname=(opencv opencv-samples)
+pkgver=4.0.0
+pkgrel=1
+pkgdesc="Open Source Computer Vision Library"
+arch=(x86_64)
+license=(BSD)
+url="http://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)
+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')
+source=("$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;)
+sha256sums=('86fd08fc02893e05e2944fa7b0daa7d02643232450f020b475e1b2f24587b99a'
+'4fb0681414df4baedce6e3f4a01318d6f4fcde6ee14854d761fd4e397a397763')
+
+prepare() {
+  mkdir -p build
+}
+
+build() {
+  cd build
+  # cmake's FindLAPACK doesn't add cblas to LAPACK_LIBRARIES, so we need to 
specify them manually
+  cmake ../$pkgname-$pkgver \
+-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=ON \
+-DINSTALL_C_EXAMPLES=ON \
+-DINSTALL_PYTHON_EXAMPLES=ON \
+-DCMAKE_INSTALL_PREFIX=/usr \
+-DCMAKE_INSTALL_LIBDIR=lib \
+-DCPU_BASELINE_DISABLE=SSE3 \
+-DCPU_BASELINE_REQUIRE=SSE2 \
+-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
+}
+
+package_opencv() {
+  options=(staticlibs)
+
+  cd build
+  make DESTDIR="$pkgdir" install
+
+  # install license file
+  install -Dm644 "$srcdir"/$pkgname-$pkgver/LICENSE -t 
"$pkgdir"/usr/share/licenses/$pkgname
+
+  # install python bindings
+  cd python_loader
+  python setup.py install --root="$pkgdir"
+  rm -r "$pkgdir"/usr/python
+
+  cd "$pkgdir"/usr/share
+
+  # separate samples package
+  mv opencv4/samples "$srcdir/$pkgname-samples"
+}
+
+package_opencv-samples() {
+  pkgdesc+=" (samples)"
+  depends=("opencv=$pkgver")
+  unset optdepends
+
+  mkdir -p "$pkgdir"/usr/share/opencv
+  cp -r "$srcdir"/opencv-samples "$pkgdir"/usr/share/opencv/samples
+  # fix permissions
+  chmod 755 "$pkgdir"/usr/share/opencv/samples/*
+
+  # install license file
+  install -Dm644 "$srcdir"/opencv-$pkgver/LICENSE -t 
"$pkgdir"/usr/share/licenses/$pkgname
+}


[arch-commits] Commit in opencv/repos (staging-x86_64 staging-x86_64/PKGBUILD)

2018-08-23 Thread Antonio Rojas via arch-commits
Date: Thursday, August 23, 2018 @ 17:53:19
  Author: arojas
Revision: 332866

archrelease: copy trunk to staging-x86_64

Added:
  opencv/repos/staging-x86_64/
  opencv/repos/staging-x86_64/PKGBUILD
(from rev 332865, opencv/trunk/PKGBUILD)

--+
 PKGBUILD |   83 +
 1 file changed, 83 insertions(+)

Copied: opencv/repos/staging-x86_64/PKGBUILD (from rev 332865, 
opencv/trunk/PKGBUILD)
===
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2018-08-23 17:53:19 UTC (rev 332866)
@@ -0,0 +1,83 @@
+# $Id$
+# Maintainer: Ray Rashif 
+# Contributor: Tobias Powalowski 
+
+pkgbase=opencv
+pkgname=(opencv opencv-samples)
+pkgver=3.4.2
+pkgrel=4
+pkgdesc="Open Source Computer Vision Library"
+arch=(x86_64)
+license=(BSD)
+url="http://opencv.org/;
+depends=(intel-tbb openexr gst-plugins-base libdc1394 cblas lapack libgphoto2 
jasper)
+makedepends=(cmake python-numpy python2-numpy mesa eigen hdf5 lapacke gtk3)
+optdepends=('opencv-samples: samples'
+'gtk3: for the HighGUI module'
+'hdf5: support for HDF5 format'
+'opencl-icd-loader: For coding with OpenCL'
+'python-numpy: Python 3 interface'
+'python2-numpy: Python 2 interface')
+source=("$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;)
+sha256sums=('9405c5d7d8ab1696e98631d0c92125816356ec366a73c417bdcc4d74783b42aa'
+'45a52764ebd2558fa0b7fd8dc47379b37dd0956d912abbf7c786228374fdf60d')
+
+prepare() {
+  mkdir -p build
+}
+
+build() {
+  cd build
+  # cmake's FindLAPACK doesn't add cblas to LAPACK_LIBRARIES, so we need to 
specify them manually
+  cmake ../$pkgname-$pkgver \
+-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=ON \
+-DINSTALL_C_EXAMPLES=ON \
+-DINSTALL_PYTHON_EXAMPLES=ON \
+-DCMAKE_INSTALL_PREFIX=/usr \
+-DCMAKE_INSTALL_LIBDIR=lib \
+-DCPU_BASELINE_DISABLE=SSE3 \
+-DCPU_BASELINE_REQUIRE=SSE2 \
+-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
+}
+
+package_opencv() {
+  options=(staticlibs)
+
+  cd build
+  make DESTDIR="$pkgdir" install
+
+  # install license file
+  install -Dm644 "$srcdir"/$pkgname-$pkgver/LICENSE -t 
"$pkgdir"/usr/share/licenses/$pkgname
+
+  cd "$pkgdir"/usr/share
+
+  # separate samples package
+  mv OpenCV/samples "$srcdir/$pkgname-samples"
+  mv OpenCV $pkgname # otherwise folder naming is inconsistent
+}
+
+package_opencv-samples() {
+  pkgdesc+=" (samples)"
+  depends=("opencv=$pkgver")
+  unset optdepends
+
+  mkdir -p "$pkgdir"/usr/share/opencv
+  cp -r "$srcdir"/opencv-samples "$pkgdir"/usr/share/opencv/samples
+  # fix permissions
+  chmod 755 "$pkgdir"/usr/share/opencv/samples/*
+
+  # install license file
+  install -Dm644 "$srcdir"/opencv-$pkgver/LICENSE -t 
"$pkgdir"/usr/share/licenses/$pkgname
+}


[arch-commits] Commit in opencv/repos (staging-x86_64 staging-x86_64/PKGBUILD)

2018-08-19 Thread Antonio Rojas via arch-commits
Date: Sunday, August 19, 2018 @ 10:06:00
  Author: arojas
Revision: 332648

archrelease: copy trunk to staging-x86_64

Added:
  opencv/repos/staging-x86_64/
  opencv/repos/staging-x86_64/PKGBUILD
(from rev 332647, opencv/trunk/PKGBUILD)

--+
 PKGBUILD |   83 +
 1 file changed, 83 insertions(+)

Copied: opencv/repos/staging-x86_64/PKGBUILD (from rev 332647, 
opencv/trunk/PKGBUILD)
===
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2018-08-19 10:06:00 UTC (rev 332648)
@@ -0,0 +1,83 @@
+# $Id$
+# Maintainer: Ray Rashif 
+# Contributor: Tobias Powalowski 
+
+pkgbase=opencv
+pkgname=(opencv opencv-samples)
+pkgver=3.4.2
+pkgrel=3
+pkgdesc="Open Source Computer Vision Library"
+arch=(x86_64)
+license=(BSD)
+url="http://opencv.org/;
+depends=(intel-tbb openexr gst-plugins-base libdc1394 cblas lapack libgphoto2 
jasper)
+makedepends=(cmake python-numpy python2-numpy mesa eigen hdf5 lapacke gtk3)
+optdepends=('opencv-samples: samples'
+'gtk3: for the HighGUI module'
+'hdf5: support for HDF5 format'
+'opencl-icd-loader: For coding with OpenCL'
+'python-numpy: Python 3 interface'
+'python2-numpy: Python 2 interface')
+source=("$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;)
+sha256sums=('9405c5d7d8ab1696e98631d0c92125816356ec366a73c417bdcc4d74783b42aa'
+'45a52764ebd2558fa0b7fd8dc47379b37dd0956d912abbf7c786228374fdf60d')
+
+prepare() {
+  mkdir -p build
+}
+
+build() {
+  cd build
+  # cmake's FindLAPACK doesn't add cblas to LAPACK_LIBRARIES, so we need to 
specify them manually
+  cmake ../$pkgname-$pkgver \
+-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=ON \
+-DINSTALL_C_EXAMPLES=ON \
+-DINSTALL_PYTHON_EXAMPLES=ON \
+-DCMAKE_INSTALL_PREFIX=/usr \
+-DCMAKE_INSTALL_LIBDIR=lib \
+-DCPU_BASELINE_DISABLE=SSE3 \
+-DCPU_BASELINE_REQUIRE=SSE2 \
+-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
+}
+
+package_opencv() {
+  options=(staticlibs)
+
+  cd build
+  make DESTDIR="$pkgdir" install
+
+  # install license file
+  install -Dm644 "$srcdir"/$pkgname-$pkgver/LICENSE -t 
"$pkgdir"/usr/share/licenses/$pkgname
+
+  cd "$pkgdir"/usr/share
+
+  # separate samples package
+  mv OpenCV/samples "$srcdir/$pkgname-samples"
+  mv OpenCV $pkgname # otherwise folder naming is inconsistent
+}
+
+package_opencv-samples() {
+  pkgdesc+=" (samples)"
+  depends=("opencv=$pkgver")
+  unset optdepends
+
+  mkdir -p "$pkgdir"/usr/share/opencv
+  cp -r "$srcdir"/opencv-samples "$pkgdir"/usr/share/opencv/samples
+  # fix permissions
+  chmod 755 "$pkgdir"/usr/share/opencv/samples/*
+
+  # install license file
+  install -Dm644 "$srcdir"/opencv-$pkgver/LICENSE -t 
"$pkgdir"/usr/share/licenses/$pkgname
+}


[arch-commits] Commit in opencv/repos (staging-x86_64 staging-x86_64/PKGBUILD)

2018-07-18 Thread Evangelos Foutras via arch-commits
Date: Wednesday, July 18, 2018 @ 06:31:37
  Author: foutrelis
Revision: 328956

archrelease: copy trunk to staging-x86_64

Added:
  opencv/repos/staging-x86_64/
  opencv/repos/staging-x86_64/PKGBUILD
(from rev 328955, opencv/trunk/PKGBUILD)

--+
 PKGBUILD |   87 +
 1 file changed, 87 insertions(+)

Copied: opencv/repos/staging-x86_64/PKGBUILD (from rev 328955, 
opencv/trunk/PKGBUILD)
===
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2018-07-18 06:31:37 UTC (rev 328956)
@@ -0,0 +1,87 @@
+# $Id$
+# Maintainer: Ray Rashif 
+# Contributor: Tobias Powalowski 
+
+pkgbase=opencv
+pkgname=(opencv opencv-samples)
+pkgver=3.4.2
+pkgrel=2
+pkgdesc="Open Source Computer Vision Library"
+arch=(x86_64)
+license=(BSD)
+url="http://opencv.org/;
+depends=(intel-tbb openexr gst-plugins-base libdc1394 cblas lapack libgphoto2 
jasper)
+makedepends=(cmake python-numpy python2-numpy mesa eigen hdf5 lapacke gtk3)
+optdepends=('opencv-samples: samples'
+'gtk3: for the HighGUI module'
+'hdf5: support for HDF5 format'
+'opencl-icd-loader: For coding with OpenCL'
+'python-numpy: Python 3 interface'
+'python2-numpy: Python 2 interface')
+source=("$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;)
+sha256sums=('9405c5d7d8ab1696e98631d0c92125816356ec366a73c417bdcc4d74783b42aa'
+'45a52764ebd2558fa0b7fd8dc47379b37dd0956d912abbf7c786228374fdf60d')
+
+prepare() {
+  mkdir -p build
+}
+
+build() {
+  cd build
+  # cmake's FindLAPACK doesn't add cblas to LAPACK_LIBRARIES, so we need to 
specify them manually
+  cmake ../$pkgname-$pkgver \
+-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=ON \
+-DINSTALL_C_EXAMPLES=ON \
+-DINSTALL_PYTHON_EXAMPLES=ON \
+-DCMAKE_INSTALL_PREFIX=/usr \
+-DCMAKE_INSTALL_LIBDIR=lib \
+-DCPU_BASELINE_DISABLE=SSE3 \
+-DCPU_BASELINE_REQUIRE=SSE2 \
+-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
+}
+
+package_opencv() {
+  options=(staticlibs)
+
+  cd build
+  make DESTDIR="$pkgdir" install
+
+  # install license file
+  install -Dm644 "$srcdir"/$pkgname-$pkgver/LICENSE -t 
"$pkgdir"/usr/share/licenses/$pkgname
+
+  cd "$pkgdir"/usr/share
+
+  # separate samples package; also be -R friendly
+  if [[ -d OpenCV/samples ]]; then
+mv OpenCV/samples "$srcdir/$pkgname-samples"
+mv OpenCV $pkgname # otherwise folder naming is inconsistent
+  elif [[ ! -d OpenCV ]]; then
+warning "Directory naming issue; samples package may not be built!"
+  fi
+}
+
+package_opencv-samples() {
+  pkgdesc+=" (samples)"
+  depends=("opencv=$pkgver")
+  unset optdepends
+
+  mkdir -p "$pkgdir"/usr/share/opencv
+  cp -r "$srcdir"/opencv-samples "$pkgdir"/usr/share/opencv/samples
+  # fix permissions
+  chmod 755 "$pkgdir"/usr/share/opencv/samples/*
+
+  # install license file
+  install -Dm644 "$srcdir"/opencv-$pkgver/LICENSE -t 
"$pkgdir"/usr/share/licenses/$pkgname
+}


[arch-commits] Commit in opencv/repos (staging-x86_64 staging-x86_64/PKGBUILD)

2018-04-23 Thread Antonio Rojas via arch-commits
Date: Monday, April 23, 2018 @ 17:46:10
  Author: arojas
Revision: 322856

archrelease: copy trunk to staging-x86_64

Added:
  opencv/repos/staging-x86_64/
  opencv/repos/staging-x86_64/PKGBUILD
(from rev 322855, opencv/trunk/PKGBUILD)

--+
 PKGBUILD |   92 +
 1 file changed, 92 insertions(+)

Copied: opencv/repos/staging-x86_64/PKGBUILD (from rev 322855, 
opencv/trunk/PKGBUILD)
===
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2018-04-23 17:46:10 UTC (rev 322856)
@@ -0,0 +1,92 @@
+# $Id$
+# Maintainer: Ray Rashif 
+# Contributor: Tobias Powalowski 
+
+pkgbase=opencv
+pkgname=('opencv' 'opencv-samples')
+pkgver=3.4.1
+pkgrel=3
+pkgdesc="Open Source Computer Vision Library"
+arch=('x86_64')
+license=('BSD')
+url="http://opencv.org/;
+depends=('intel-tbb' 'openexr' 'xine-lib' 'libdc1394' 'cblas' 'lapack' 
'libgphoto2' 'jasper')
+makedepends=('cmake' 'python-numpy' 'python2-numpy' 'mesa' 'eigen' 'hdf5' 
'lapacke' 'gtkglext')
+optdepends=('opencv-samples'
+'gtkglext: for the HighGUI module'
+'hdf5: support for HDF5 format'
+'opencl-icd-loader: For coding with OpenCL'
+'python-numpy: Python 3 interface'
+'python2-numpy: Python 2 interface')
+source=("$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;)
+sha256sums=('24bda432eaace9e992322dcc3d30144cefa5314c2424d4aa02e5fe3fa9dd17bd'
+'298c69ee006d7675e1ff9d371ba8b0d9e7e88374bb7ba0f9d0789851d352ec6e')
+
+_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_INSTALL_PREFIX=/usr'
+'-D CMAKE_INSTALL_LIBDIR=lib'
+'-D CPU_BASELINE_DISABLE=SSE3 -D CPU_BASELINE_REQUIRE=SSE2'
+)
+
+build() {
+  mkdir -p build
+
+  cd build
+  # cmake's FindLAPACK doesn't add cblas to LAPACK_LIBRARIES, so we need to 
specify them manually
+  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" \
+../$pkgname-$pkgver
+  make
+}
+
+package_opencv() {
+  options=('staticlibs')
+
+  cd build
+  make DESTDIR="$pkgdir" install
+
+  # install license file
+  install -Dm644 "$srcdir/$pkgname-$pkgver/LICENSE" \
+"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+  cd "$pkgdir/usr/share"
+
+  # separate samples package; also be -R friendly
+  if [[ -d OpenCV/samples ]]; then
+mv OpenCV/samples "$srcdir/$pkgname-samples"
+mv OpenCV $pkgname # otherwise folder naming is inconsistent
+  elif [[ ! -d OpenCV ]]; then
+warning "Directory naming issue; samples package may not be built!"
+  fi
+}
+
+package_opencv-samples() {
+  pkgdesc+=" (samples)"
+  depends=("opencv=$pkgver") # sample codes change with lib/API
+  unset optdepends
+
+  mkdir -p "$pkgdir/usr/share/opencv"
+  cp -r "$srcdir/opencv-samples" "$pkgdir/usr/share/opencv/samples"
+  # fix permissions
+  chmod 755 "$pkgdir"/usr/share/opencv/samples/*
+
+  # install license file
+  install -Dm644 "$srcdir/opencv-$pkgver/LICENSE" \
+"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:


[arch-commits] Commit in opencv/repos (staging-x86_64 staging-x86_64/PKGBUILD)

2018-02-26 Thread Antonio Rojas via arch-commits
Date: Monday, February 26, 2018 @ 09:40:03
  Author: arojas
Revision: 317551

archrelease: copy trunk to staging-x86_64

Added:
  opencv/repos/staging-x86_64/
  opencv/repos/staging-x86_64/PKGBUILD
(from rev 317550, opencv/trunk/PKGBUILD)

--+
 PKGBUILD |   96 +
 1 file changed, 96 insertions(+)

Copied: opencv/repos/staging-x86_64/PKGBUILD (from rev 317550, 
opencv/trunk/PKGBUILD)
===
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2018-02-26 09:40:03 UTC (rev 317551)
@@ -0,0 +1,96 @@
+# $Id$
+# Maintainer: Ray Rashif 
+# Contributor: Tobias Powalowski 
+
+pkgbase=opencv
+pkgname=('opencv' 'opencv-samples')
+pkgver=3.4.0
+pkgrel=3
+pkgdesc="Open Source Computer Vision Library"
+arch=('x86_64')
+license=('BSD')
+url="http://opencv.org/;
+depends=('intel-tbb' 'openexr' 'xine-lib' 'libdc1394' 'cblas' 'lapack' 
'libgphoto2')
+makedepends=('cmake' 'python-numpy' 'python2-numpy' 'mesa' 'eigen' 'hdf5' 
'lapacke' 'gtkglext')
+optdepends=('opencv-samples'
+'gtkglext: for the HighGUI module'
+'hdf5: support for HDF5 format'
+'opencl-icd-loader: For coding with OpenCL'
+'python-numpy: Python 3 interface'
+'python2-numpy: Python 2 interface')
+source=("$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;)
+sha256sums=('ae8a9f468b7ee3822a62d20d356c69f2b32330a231e738ac2914f332766611b7'
+'699ab3eee7922fbd3e8f98c68e6d16a1d453b20ef364e76172e56466dc9c16cd')
+
+_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'
+'-D CPU_BASELINE_DISABLE=SSE3 -D CPU_BASELINE_REQUIRE=SSE2'
+#'-D WITH_IPP=ON'
+#'-D INSTALL_CREATE_DISTRIB=ON'
+)
+
+build() {
+  mkdir -p build
+
+  cd build
+  # cmake's FindLAPACK doesn't add cblas to LAPACK_LIBRARIES, so we need to 
specify them manually
+  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" \
+../$pkgname-$pkgver
+  make
+}
+
+package_opencv() {
+  options=('staticlibs')
+
+  cd build
+  make DESTDIR="$pkgdir" install
+
+  # install license file
+  install -Dm644 "$srcdir/$pkgname-$pkgver/LICENSE" \
+"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+  cd "$pkgdir/usr/share"
+
+  # separate samples package; also be -R friendly
+  if [[ -d OpenCV/samples ]]; then
+mv OpenCV/samples "$srcdir/$pkgname-samples"
+mv OpenCV $pkgname # otherwise folder naming is inconsistent
+  elif [[ ! -d OpenCV ]]; then
+warning "Directory naming issue; samples package may not be built!"
+  fi
+}
+
+package_opencv-samples() {
+  pkgdesc+=" (samples)"
+  depends=("opencv=$pkgver") # sample codes change with lib/API
+  unset optdepends
+
+  mkdir -p "$pkgdir/usr/share/opencv"
+  cp -r "$srcdir/opencv-samples" "$pkgdir/usr/share/opencv/samples"
+  # fix permissions
+  chmod 755 "$pkgdir"/usr/share/opencv/samples/*
+
+  # install license file
+  install -Dm644 "$srcdir/opencv-$pkgver/LICENSE" \
+"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:


[arch-commits] Commit in opencv/repos (staging-x86_64 staging-x86_64/PKGBUILD)

2017-12-24 Thread Antonio Rojas via arch-commits
Date: Sunday, December 24, 2017 @ 11:25:28
  Author: arojas
Revision: 313582

archrelease: copy trunk to staging-x86_64

Added:
  opencv/repos/staging-x86_64/
  opencv/repos/staging-x86_64/PKGBUILD
(from rev 313581, opencv/trunk/PKGBUILD)

--+
 PKGBUILD |   94 +
 1 file changed, 94 insertions(+)

Copied: opencv/repos/staging-x86_64/PKGBUILD (from rev 313581, 
opencv/trunk/PKGBUILD)
===
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2017-12-24 11:25:28 UTC (rev 313582)
@@ -0,0 +1,94 @@
+# $Id$
+# Maintainer: Ray Rashif 
+# Contributor: Tobias Powalowski 
+
+pkgbase=opencv
+pkgname=('opencv' 'opencv-samples')
+pkgver=3.4.0
+pkgrel=1
+pkgdesc="Open Source Computer Vision Library"
+arch=('x86_64')
+license=('BSD')
+url="http://opencv.org/;
+depends=('intel-tbb' 'openexr' 'xine-lib' 'libdc1394' 'gtkglext' 'cblas' 
'lapack' 'libgphoto2')
+makedepends=('cmake' 'python-numpy' 'python2-numpy' 'mesa' 'eigen' 'hdf5' 
'lapacke')
+optdepends=('opencv-samples'
+'hdf5: support for HDF5 format'
+'opencl-icd-loader: For coding with OpenCL'
+'python-numpy: Python 3 interface'
+'python2-numpy: Python 2 interface')
+source=("$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;)
+sha256sums=('ae8a9f468b7ee3822a62d20d356c69f2b32330a231e738ac2914f332766611b7'
+'699ab3eee7922fbd3e8f98c68e6d16a1d453b20ef364e76172e56466dc9c16cd')
+
+_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_SKIP_RPATH=ON'
+'-D CPU_BASELINE_DISABLE=SSE3 -D CPU_BASELINE_REQUIRE=SSE2'
+#'-D WITH_IPP=ON'
+#'-D INSTALL_CREATE_DISTRIB=ON'
+)
+
+build() {
+  mkdir -p build
+
+  cd build
+  # cmake's FindLAPACK doesn't add cblas to LAPACK_LIBRARIES, so we need to 
specify them manually
+  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" \
+../$pkgname-$pkgver
+  make
+}
+
+package_opencv() {
+  options=('staticlibs')
+
+  cd build
+  make DESTDIR="$pkgdir" install
+
+  # install license file
+  install -Dm644 "$srcdir/$pkgname-$pkgver/LICENSE" \
+"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+  cd "$pkgdir/usr/share"
+
+  # separate samples package; also be -R friendly
+  if [[ -d OpenCV/samples ]]; then
+mv OpenCV/samples "$srcdir/$pkgname-samples"
+mv OpenCV $pkgname # otherwise folder naming is inconsistent
+  elif [[ ! -d OpenCV ]]; then
+warning "Directory naming issue; samples package may not be built!"
+  fi
+}
+
+package_opencv-samples() {
+  pkgdesc+=" (samples)"
+  depends=("opencv=$pkgver") # sample codes change with lib/API
+  unset optdepends
+
+  mkdir -p "$pkgdir/usr/share/opencv"
+  cp -r "$srcdir/opencv-samples" "$pkgdir/usr/share/opencv/samples"
+  # fix permissions
+  chmod 755 "$pkgdir"/usr/share/opencv/samples/*
+
+  # install license file
+  install -Dm644 "$srcdir/opencv-$pkgver/LICENSE" \
+"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et: