updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / opencv-tbb / PKGBUILD
blob4cb1e5f0b19bf71336849c1adcf9af97ff04fa45
1 # $Id: PKGBUILD 88973 2010-08-27 12:02:00Z schiv $
2 # Maintainer: Ray Rashif <schiv@archlinux.org>
3 # Contributor: Tobias Powalowski <tpowa@archlinux.org>
5 pkgname=opencv-tbb
6 _pybin=python2
7 _pydir=python2.7
8 pkgver=2.3.1
9 pkgrel=2
10 pkgdesc="Intel(R) Open Source Computer Vision Library with Threading Building Blocks and SSE3"
11 arch=('i686' 'x86_64')
12 license=('BSD')
13 url="http://opencv.willowgarage.com"
14 depends=('jasper' 'python2' 'gstreamer0.10-base'
15           'gtk2' 'xine-lib' 'libdc1394' 'v4l-utils' 'intel-tbb')
16 makedepends=('pkg-config' 'cmake')
17 options=('!libtool')
18 provides=('opencv')
19 conflicts=('opencv')
20 source=(http://downloads.sourceforge.net/opencvlibrary/OpenCV-$pkgver.tar.bz2)
21 #         libpng-1.4.patch
22 #         v4l-mmap.patch
23 #       CMakeLists.txt.patch
24 #       OpenCVFindTBB.cmake.patch)
25 md5sums=('827c9f8aa14384c531c73aa165f9b777' )
26 #          '301f9108f2ee875d889c279adadb254e'
27 #          'c0e2d8ecba3b56974ea2169f61e4905f'
28 #         '72e7704dbc9f2b6176afcb638369485e'
29 #         '93cffabd0b6ddda305fa78a369020e1f')
30 build() {
31   cd "$srcdir/OpenCV-$pkgver"
33   # libpng 1.4 compatibility
34 #   patch -Np1 -i ../libpng-1.4.patch
35
36 #   # fix v4l issue
37 #   patch -Np0 -i ../v4l-mmap.patch
38 #   #patch -Np2 -i ../CMakeLists.txt.patch
39 #   patch -Np2 -i ../OpenCVFindTBB.cmake.patch
41   # fix ffmpeg-related C++ issue
42   # see http://code.google.com/p/ffmpegsource/source/detail?r=311
43   export CXXFLAGS="$CXXFLAGS -D__STDC_CONSTANT_MACROS"
45   cmake . -DCMAKE_BUILD_TYPE=Release \
46           -DCMAKE_INSTALL_PREFIX=/usr \
47           -DCMAKE_SKIP_RPATH=ON \
48           -DWITH_XINE=ON \
49           -DWITH_UNICAP=OFF \
50           -DPYTHON_EXECUTABLE=/usr/bin/$_pybin \
51           -DPYTHON_INCLUDE_DIR=/usr/include/$_pydir \
52           -DWITH_TBB=ON \
53           -DWITH_TBB_INCLUDE_DIR=/usr/include/ \
54           -DWITH_TBB_LIB_DIR=/usr/lib \
55           -DPYTHON_LIBRARY=/usr/lib/lib$_pydir.so \
56           -DBUILD_EXAMPLES=YES \
57           -DINSTALL_C_EXAMPLES=YES \
58           -DINSTALL_PYTHON_EXAMPLES=YES           
60   make
63 package() {
64   cd "$srcdir/OpenCV-$pkgver"
66   make DESTDIR="$pkgdir/" install
68   # install license file
69   install -Dm644 "$srcdir/OpenCV-$pkgver/doc/license.txt" \
70     "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
73 # vim:set ts=2 sw=2 et: