1 # Contributor: domanov <domanov_NOSPAM@gmail_NOSPAM.com>
2 # based on http://vijaymichaeljoseph.blogspot.com/2009/10/compiling-opensg-with-qt4x.html
6 pkgdesc="Multithreaded, multiplatform scene graph system based on OpenGL"
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')
16 options=('!makeflags')
19 source=('commonQT4.patch' 'DefaultRules.patch' 'libpng14.patch')
20 md5sums=('5942aa5890d66d29395428752de0988f'
21 '1613916bf7a938ea4bf232ddd35ddf4f'
22 'c69da415eafca19769a6bae3fe58e90f')
27 if [ -d OpenSG/CVS ]; then
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
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"
44 msg ":: First configure...\n"
46 ./configure --prefix=/usr \
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
64 msg ":: Re-config...\n \n"
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
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