# # Chakra Packages for Chakra, part of chakra-project.org # # maintainer (i686): Phil Miller # maintainer (x86_64): Manuel Tortosa # include global config source ../_buildscripts/${current_repo}-${_arch}-cfg.conf pkgname=opencv pkgver=2.1.0 pkgrel=1 pkgdesc="Intel(R) Open Source Computer Vision Library" arch=('i686' 'x86_64') license=('custom') url="http://opencv.willowgarage.com" depends=('jasper' 'gtk2' 'python' 'xine-lib' 'gstreamer0.10-base' 'libdc1394' 'libv4l') makedepends=('cmake' 'pkgconfig') options=('!libtool') source=(http://downloads.sourceforge.net/opencvlibrary/OpenCV-${pkgver}.tar.bz2 libpng-1.4.patch) md5sums=('1d71584fb4e04214c0085108f95e24c8' '301f9108f2ee875d889c279adadb254e') build() { # fix build if [ "${_arch}" = "i686" ]; then export CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe -D__STDC_CONSTANT_MACROS" else export CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -D__STDC_CONSTANT_MACROS" fi cd ${srcdir}/OpenCV-${pkgver} patch -p1 -i ${srcdir}/libpng-1.4.patch || return 1 cd ${srcdir} mkdir build cd build cmake ../OpenCV-${pkgver} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_SKIP_RPATH=ON \ -DWITH_XINE=ON \ -DWITH_UNICAP=OFF || return 1 make || return 1 } package() { cd ${srcdir}/build make DESTDIR=$pkgdir install || return 1 # install license file install -D -m644 ${srcdir}/OpenCV-${pkgver}/doc/license.txt \ ${pkgdir}/usr/share/licenses/$pkgname/LICENSE || return 1 }