extra/opencv to 2.4.4-1

This commit is contained in:
Kevin Mihelich 2013-03-05 01:58:19 +00:00
parent 3b244cb88b
commit 3e344da7e8

View file

@ -9,8 +9,8 @@
pkgbase=opencv pkgbase=opencv
pkgname=('opencv' 'opencv-docs' 'opencv-samples') pkgname=('opencv' 'opencv-docs' 'opencv-samples')
_realname=OpenCV _realname=OpenCV
pkgver=2.4.3 pkgver=2.4.4
pkgrel=5 pkgrel=1
pkgdesc="Open Source Computer Vision Library" pkgdesc="Open Source Computer Vision Library"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
license=('BSD') license=('BSD')
@ -18,7 +18,8 @@ url="http://opencv.org/"
depends=('jasper' 'gstreamer0.10-base' depends=('jasper' 'gstreamer0.10-base'
'xine-lib' 'libdc1394' 'openexr' 'gtkglext') 'xine-lib' 'libdc1394' 'openexr' 'gtkglext')
makedepends=('cmake' 'python2-numpy' 'eigen2' makedepends=('cmake' 'python2-numpy' 'eigen2'
'opencl-headers' 'mesa') 'opencl-headers' 'mesa'
'texlive-bin' 'python2-sphinx') # for docs
optdepends=('opencv-docs' optdepends=('opencv-docs'
'opencv-samples' 'opencv-samples'
'eigen2' 'eigen2'
@ -26,7 +27,7 @@ optdepends=('opencv-docs'
source=("http://downloads.sourceforge.net/opencvlibrary/$_realname-${pkgver}.tar.bz2" source=("http://downloads.sourceforge.net/opencvlibrary/$_realname-${pkgver}.tar.bz2"
'pkgconfig.patch' 'pkgconfig.patch'
'fsh.patch') 'fsh.patch')
md5sums=('c0a5af4ff9d0d540684c0bf00ef35dbe' md5sums=('bb7272c102a801a9f9ee01db6e7ad8e9'
'cb916260b5ec594fe7a0cc2e54fc569f' 'cb916260b5ec594fe7a0cc2e54fc569f'
'35256e3ccace373feba8131d1540a0de') '35256e3ccace373feba8131d1540a0de')
@ -53,12 +54,17 @@ build() {
# fix pkg-config mess # fix pkg-config mess
# see https://bugs.archlinux.org/task/32430 # see https://bugs.archlinux.org/task/32430
# and http://code.opencv.org/issues/1925
patch -Np1 -i "$srcdir/pkgconfig.patch" patch -Np1 -i "$srcdir/pkgconfig.patch"
# fix another upstream mess # fix another upstream mess that they won't fix
# see http://code.opencv.org/issues/2512 # see http://code.opencv.org/issues/2512
patch -Np1 -i "$srcdir/fsh.patch" patch -Np1 -i "$srcdir/fsh.patch"
# python2 compatibility for generating docs
sed -i 's/sphinx-build/sphinx-build2/' cmake/OpenCVDetectPython.cmake
cmake ${_cmakeopts[@]} . cmake ${_cmakeopts[@]} .
make make
@ -76,11 +82,10 @@ package_opencv() {
cd "$pkgdir/usr/share" cd "$pkgdir/usr/share"
# separate docs package; also be -R friendly # separate docs package; also be -R friendly
[ -d doc/$pkgname ] && mv doc/$pkgname "$srcdir/opencv-doc" \ [[ -d doc ]] && mv doc "$srcdir/opencv-doc"
&& rm -r doc
# separate samples package # separate samples package
[ -d $pkgname/samples ] && mv $pkgname/samples "$srcdir/opencv-samples" [[ -d $pkgname/samples ]] && mv $pkgname/samples "$srcdir/opencv-samples"
} }
package_opencv-docs() { package_opencv-docs() {
@ -89,10 +94,14 @@ package_opencv-docs() {
unset optdepends unset optdepends
options=('docs') options=('docs')
# PDFs are not being generated for some reason as of 2.4.4
# even after adding latex and sphinx deps
# when previously without them there were a couple of good docs installed
cd "$srcdir" cd "$srcdir"
mkdir -p "$pkgdir/usr/share/doc" # doc dir now includes opencv subdir (looks like they finally listened)
cp -r opencv-doc "$pkgdir/usr/share/doc/opencv" cp -r opencv-doc "$pkgdir/usr/share/doc"
# install license file # install license file
#install -Dm644 "$srcdir/$_realname-$pkgver/doc/license.txt" \ #install -Dm644 "$srcdir/$_realname-$pkgver/doc/license.txt" \