updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / sdljava / PKGBUILD
blob0e8aedd9d94341fa65e96b6445650ea4f4e8352a
1 # Contributor : mightyjaym <jmambrosino@gmail.com>
3 pkgname=sdljava
4 pkgver=0.9.1
5 pkgrel=2
6 pkgdesc="Java binding to the SDL API"
7 arch=(i686 x86_64)
8 url="http://sdljava.sourceforge.net"
9 license=('LGPL')
10 depends=('java-environment' 'bsh' 'java-jdom' 'sdl')
11 makedepends=('ftgl' 'glew' 'sdl_gfx' 'sdl_image' 'sdl_mixer' 'sdl_ttf' 'apache-ant' 'swig' 'ruby')
12 source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz ${pkgname}-${pkgver}-regen.patch)
13 md5sums=('c28122f53f6c240c46bd08bc7588305a' '97a40541a202798d99f8fcb152325ead')
15 build() {
16   cd ${srcdir}/${pkgname}-${pkgver}
17   patch -p1 < ../sdljava-0.9.1-regen.patch
19   GCC_PATH=`gcc -print-search-dirs | grep install | cut -f 2 -d " "`
20   sed -i "s#@GCC_INCLUDE_PATH@#$GCC_PATH/include#g" \
21     etc/build/linux/Makefile \
22     etc/build/gljava/linux/Makefile \
23     etc/build/gljava/linux/ftgl/Makefile
25   cd lib
26   rm *.jar
27   ln -s /usr/share/java/bsh.jar
28   ln -s /usr/share/java/jdom/jdom.jar
29   cd ..
31   cp etc/build/linux/Makefile src/sdljava/native
32   cp etc/build/gljava/linux/Makefile src/org/gljava/opengl/native
33   cp etc/build/gljava/linux/ftgl/Makefile src/org/gljava/opengl/native/ftgl
35   rm src/sdljava/native/SDL*_wrap.c src/sdljava/native/SDL_types.h
36   rm src/org/gljava/opengl/native/glew_wrap.c
38 if [ "$CARCH" = "i686" ]; then
39         export ARCH_DEFINE="-D__i386__"
40 else    export ARCH_DEFINE="-D__x86_64__"
43   cd src/sdljava/native
44   make CFLAGS="-fno-strict-aliasing -fPIC"
45   make libsdljava_gfx.so CFLAGS="-fno-strict-aliasing -fPIC"
46   cd ../../org/gljava/opengl/native
47   make CFLAGS="-fno-strict-aliasing -fPIC"
48   cd ftgl
49   make CFLAGS="-fno-strict-aliasing -fPIC"
50   cd ${srcdir}/${pkgname}-${pkgver}
51   ant jar javadoc
53 install -D -m644 ${srcdir}/${pkgname}-${pkgver}/lib/${pkgname}.jar ${pkgdir}/usr/share/java/${pkgname}.jar
54 mkdir -p ${pkgdir}/usr/lib/
55 install -m755 ${srcdir}/${pkgname}-${pkgver}/lib/*.so ${pkgdir}/usr/lib/