updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / opensg-cvs / PKGBUILD
blob8481745fb9c5db9a1e23eeb2379a0bffce4d756d
1 # Contributor: domanov <domanov_NOSPAM@gmail_NOSPAM.com>
2 # based on http://vijaymichaeljoseph.blogspot.com/2009/10/compiling-opensg-with-qt4x.html
3 pkgname=opensg-cvs
4 pkgver=1.8.0
5 pkgrel=3
6 pkgdesc="Multithreaded, multiplatform scene graph system based on OpenGL"
7 arch=("x86_64")
8 license=('GPL')
9 url=('http://downloads.sourceforge.net/project/opensg/OpenSG/1.8.0/opensg_dailybuild.070704.source.tgz')
10 depends=('libtiff' 'libxmu' 'libpng>=1.4' 'qt')
11 makedepends=('cvs')
12 provides=()
13 conflicts=()
14 replaces=()
15 backup=()
16 options=('!makeflags')
17 install=
18 noextract=()
19 source=('commonQT4.patch' 'DefaultRules.patch' 'libpng14.patch')
20 md5sums=('5942aa5890d66d29395428752de0988f'
21          '1613916bf7a938ea4bf232ddd35ddf4f'
22          'c69da415eafca19769a6bae3fe58e90f')
24 build() {
25    unset LDFLAGS
26    cd ${srcdir}
27    if [ -d OpenSG/CVS ]; then
28      cd OpenSG
29 #     cvs -z3 update -d
30      cd ..
31    else
32      mkdir OpenSG
33      cvs -d:pserver:anonymous:@opensg.cvs.sourceforge.net:/cvsroot/opensg login
34      cvs -z3 -d:pserver:anonymous:@opensg.cvs.sourceforge.net:/cvsroot/opensg co -P OpenSG
35   fi
37    msg ":: CVS checkout/update done (or server timeout)"
39    # as suggested in the wiki, copy the src dir into a new build dir
40    rm -rf "$srcdir/OpenSG-build"
41    cp -r "$srcdir/OpenSG" "$srcdir/OpenSG-build"
43    cd OpenSG-build
44    msg ":: First configure...\n"
46    ./configure  --prefix=/usr \
47                 --enable-qt4 \
48                 --with-qt4bindir=/usr/bin \
49                 --with-qt4includedir=/usr/include \
50                 --with-qt4libdir=/usr/lib \
51                 --enable-glut --enable-x11 --enable-jpg --enable-png --enable-tif --enable-gif 
53    msg "\n \n:: Patching... \n"
54    patch Common/DefaultRules.mk < ../DefaultRules.patch
56    patch Source/System/Image/OSGPNGImageFileType.cpp < ../libpng14.patch
58    # the path x86_64 used for this PKGBUILD. Testers for i686?
59    patch Builds/x86_64-unknown-linux-gnu-g++/CommonPackages/commonQT4.mk < ../commonQT4.patch
61    msg ":: Make clean...\n \n" # needed, don't really understand why
62    make clean
63    
64    msg ":: Re-config...\n \n"
65    ./config.status
67    msg "\n \n Starting 'make opt &> log'. Log file in src/OpenSG-build/log (be aware, it's big)"
68    make opt &> log || return 1
69    
70    # not standard INSTALL_DIR
71    NEWINSTALL_DIR=${pkgdir}/usr
72    install -d -m755 ${NEWINSTALL_DIR}
73    make INSTALL_DIR=${NEWINSTALL_DIR} install || return 1
74    mv ${NEWINSTALL_DIR}/lib/opt/* ${NEWINSTALL_DIR}/lib
75    rmdir ${NEWINSTALL_DIR}/lib/opt ${NEWINSTALL_DIR}/lib/dbg
76  }