updated on Thu Jan 26 12:02:26 UTC 2012
[aur-mirror.git] / vxl-svn / PKGBUILD
blob1f2a4ee2a5ea2e0ceb6ce68a5611a5cf67413536
1 # Contributor: Muhammad Qadri <maqadriatcomcastdotnet>
2 pkgname=vxl-svn
3 pkgver=26161
4 pkgrel=1
5 pkgdesc="Collection of C++ libraries designed for computer vision research and implementation"
6 arch=('i686' 'x86_64')
7 url="http://vxl.sourceforge.net"
8 license=('custom:BSD')
9 makedepends=('subversion' 'cmake')
10 provides=('vxl')
11 conflicts=('vxl')
12 source=()
13 md5sums=() 
15 _svntrunk=https://vxl.svn.sourceforge.net/svnroot/vxl/trunk
16 _svnmod=vxl
18 build() {
19   cd "$srcdir"
21   if [ -d $_svnmod/.svn ]; then
22     (cd $_svnmod && svn up -r $pkgver)
23   else
24     svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
25   fi
27   msg "SVN checkout done or server timeout"
28   msg "Starting make..."
30   #Note that we don't copy the code from directory to the next
31   #This is because the cmake utility doesn't work with the sed patch that way
32   rm -rf "$srcdir/$_svnmod-build"
33   mkdir "$srcdir/$_svnmod-build"
34   cd "$srcdir/$_svnmod-build"
36   sed -e 's| mpeg2 | mpeg2vxl |' "$srcdir/$_svnmod/v3p/mpeg2/CMakeLists.txt" "$srcdir/$_svnmod/config/cmake/Modules/FindMPEG2.cmake" -i 
38   cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_TESTING:BOOL=OFF -DCMAKE_CXX_FLAGS="$CXXFLAGS" -DCMAKE_C_FLAGS="$CFLAGS" "$srcdir/$_svnmod"
40   make || return 1
41   make DESTDIR="$pkgdir/" install
43   profile_entry=$srcdir/vxl.sh
44   echo '#!/bin/sh' > $profile_entry
45   echo 'export VXLDIR=/usr' >> $profile_entry
47   install -Dm644 $srcdir/$_svnmod/core/vxl_copyright.h $pkgdir/usr/share/licenses/$pkgname/vxl_copyright.h
48   install -Dm755 $profile_entry $pkgdir/etc/profile.d/opengazer.sh