1 # Heavily based on 'opencv' by Ray Rashif & Tobias Powalowski
2 # Maintainer: Simone Sclavi 'Ito' <darkhado@gmail.com>
8 pkgdesc="Older version of the Intel(R) Open Source Computer Vision Library, currently required by sikuli-ide"
11 url="http://opencv.willowgarage.com"
12 depends=('jasper' 'python2-numpy' 'gstreamer0.10-base'
13 'gtk2' 'xine-lib' 'libdc1394' 'v4l-utils')
14 makedepends=('pkg-config' 'cmake')
16 source=(http://downloads.sourceforge.net/opencvlibrary/OpenCV-$pkgver.tar.bz2
17 libpng-1.4.patch v4l-mmap.patch
18 gcc46.patch linux-2.6.38.patch)
19 md5sums=('1d71584fb4e04214c0085108f95e24c8'
20 '301f9108f2ee875d889c279adadb254e'
21 'c0e2d8ecba3b56974ea2169f61e4905f'
22 '0949e4c01bbd942ea0ed13ad877952c8'
23 '6e7e4676671ef4e5b5a866f27289cdb0')
26 cd "$srcdir/OpenCV-$pkgver"
27 # fix ffmpeg-related C++ issue
28 # see http://code.google.com/p/ffmpegsource/source/detail?r=311
29 export CXXFLAGS="$CXXFLAGS -D__STDC_CONSTANT_MACROS"
31 # libpng 1.4 compatibility
32 patch -Np1 -i ../libpng-1.4.patch
35 patch -Np0 -i ../v4l-mmap.patch
38 patch -Np1 -i ../gcc46.patch
40 # linux 2.6.38 compatibility
41 patch -Np1 -i ../linux-2.6.38.patch
43 cmake . -DCMAKE_BUILD_TYPE=Release \
44 -DCMAKE_INSTALL_PREFIX=/opt/opencv-old \
45 -DCMAKE_SKIP_RPATH=ON \
48 -DPYTHON_EXECUTABLE=/usr/bin/$_pybin \
49 -DPYTHON_INCLUDE_DIR=/usr/include/$_pydir \
50 -DPYTHON_LIBRARY=/usr/lib/lib$_pydir.so
56 cd "$srcdir/OpenCV-$pkgver"
58 make DESTDIR="$pkgdir/" install
60 # install license file
61 install -Dm644 "$srcdir/OpenCV-$pkgver/doc/license.txt" \
62 "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
64 # add opencv-old library path to ld.so.conf
65 install -d $pkgdir/etc/ld.so.conf.d
66 echo "/opt/opencv-old/lib/" > $pkgdir/etc/ld.so.conf.d/opencv-old.conf
69 # vim:set ts=2 sw=2 et: