1 # Contributor : mightyjaym <jmambrosino@gmail.com>
6 pkgdesc="Java binding to the SDL API"
8 url="http://sdljava.sourceforge.net"
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')
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
27 ln -s /usr/share/java/bsh.jar
28 ln -s /usr/share/java/jdom/jdom.jar
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__"
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"
49 make CFLAGS="-fno-strict-aliasing -fPIC"
50 cd ${srcdir}/${pkgname}-${pkgver}
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/