From fa2a2f679791487b79c37b4fd6a13206b80b9f8b Mon Sep 17 00:00:00 2001 From: "coadde [Márcio Alexandre Silva Delgado]" Date: Mon, 25 Apr 2016 21:15:20 -0300 Subject: opencv: update package and needs more changes to fix it --- libre/opencv/PKGBUILD | 63 +++++++++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 27 deletions(-) (limited to 'libre/opencv/PKGBUILD') diff --git a/libre/opencv/PKGBUILD b/libre/opencv/PKGBUILD index 77d8b570c..20e706163 100644 --- a/libre/opencv/PKGBUILD +++ b/libre/opencv/PKGBUILD @@ -7,24 +7,27 @@ pkgbase=opencv pkgname=opencv -pkgver=2.4.12.3 -pkgrel=1.parabola1 +pkgver=3.1.0 +pkgrel=3.parabola1 pkgdesc="Free Computer Vision Library, without nonfree SIFT algorithm and nonfree Milky icons" -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'armv7h') license=('BSD') url="http://opencv.org/" depends=('intel-tbb' 'openexr' 'xine-lib' 'libdc1394' 'gtkglext') -makedepends=('cmake' 'python2-numpy' 'mesa' 'eigen2') +makedepends=('cmake' 'python-numpy' 'python2-numpy' 'mesa' 'eigen') optdepends=('opencv-samples' - 'eigen2' + 'eigen' 'libcl: For coding with OpenCL' - 'python2-numpy: Python 2.x interface') + 'python-numpy: Python 3 interface' + 'python2-numpy: Python 2 interface') mksource=("$pkgbase-$pkgver::https://github.com/Itseez/opencv/archive/$pkgver.zip") source=("https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.zip" - opencv-ffmpeg3.patch) -mkmd5sums=('eaede6500e9c2d56683196b0576db1f7') + "opencv_contrib-$pkgver.tar.gz::https://github.com/Itseez/opencv_contrib/archive/$pkgver.tar.gz" + '5852.patch') +mkmd5sums=('91b88a4e56509ea741c3e11f42ea738b') md5sums=('7a5f152bdbd730928aaebf1dcb960747' - 'c752f3e83ebb021171fdd04aa7fb2e5a') + 'a822839ad3ab79ff837c16785ea9dd10' + '5bd9cd736b171c15cedee3a32a0c47ff') _cmakeopts=('-D WITH_OPENCL=ON' '-D WITH_OPENGL=ON' @@ -39,44 +42,50 @@ _cmakeopts=('-D WITH_OPENCL=ON' '-D INSTALL_PYTHON_EXAMPLES=ON' '-D CMAKE_BUILD_TYPE=Release' '-D CMAKE_INSTALL_PREFIX=/usr' - '-D CMAKE_SKIP_RPATH=ON') + '-D CMAKE_SKIP_RPATH=ON' + #'-D WITH_IPP=ON' + #'-D INSTALL_CREATE_DISTRIB=ON' + ) # SSE only available from Pentium 3 onwards (i686 is way older) -[[ "$CARCH" = 'i686' ]] && \ +# SSE only available x86 hardware and ARM uses NEON +[[ "$CARCH" = 'i686' || "$CARCH" = 'armv7h' ]] && \ _cmakeopts+=('-D ENABLE_SSE=OFF' '-D ENABLE_SSE2=OFF' '-D ENABLE_SSE3=OFF') -# all x64 CPUs support SSE2 but not SSE3 -[[ "$CARCH" = 'x86_64' ]] && _cmakeopts+=('-D ENABLE_SSE3=OFF') - mksource() { - cd "$srcdir/$pkgname-$pkgver" + cd "$srcdir/$pkgname_contrib-$pkgver" + + # remove nonfree SIFT algorithm that is patented in some countries and have some other limitations on the use + rm -rv modules/xfeatures2d/src/sift.cpp - # remove nonfree SIFT algorithm that is patented in some countries and have some other limitations on the use - rm -rv modules/nonfree/src/sift.cpp + cd "$srcdir/$pkgname-$pkgver" - # remove nonfree Milky icons - rm -rv modules/highgui/src/files_Qt/Milky + # remove nonfree Milky icons + rm -rv modules/highgui/src/files_Qt/Milky } prepare() { - cd "$srcdir/$pkgname-$pkgver" + cd "$srcdir/$pkgname-$pkgver" + + # remove nonfree SIFT references + rm -rv modules/nonfree - # remove useless folder - rm -rv 3rdparty + cd "$srcdir/$pkgname-$pkgver" - # remove nonfree SIFT references - rm -rv modules/nonfree + # remove useless folder + rm -rv 3rdparty - # fix build with ffmpeg 3.0 (Debian) - patch -p1 -i ../opencv-ffmpeg3.patch + patch -p1 -i "$srcdir/5852.patch" } build() { cd "$srcdir/$pkgname-$pkgver" - cmake ${_cmakeopts[@]} . + cmake ${_cmakeopts[@]} \ + -DOPENCV_EXTRA_MODULES_PATH="$srcdir/opencv_contrib-$pkgver/modules" \ + . make } -- cgit v1.2.3-54-g00ecf