diff --git a/sdljava.spec b/sdljava.spec index c86eb31..7bf9ef3 100644 --- a/sdljava.spec +++ b/sdljava.spec @@ -19,16 +19,9 @@ Source1: %{name}-runtest.sh Patch0: sdljava-0.9.1-regen.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ftgl-devel glew-devel SDL-devel SDL_gfx-devel SDL_image-devel -BuildRequires: SDL_mixer-devel SDL_ttf-devel java-devel java-gcj-compat-devel -BuildRequires: ant xml-commons-apis swig bsh jdom -# Build fails on fedora 8 test 2 when not using icedtea :( Note it runs fine -# with gcj (bug 297961). -BuildRequires: java-1.7.0-icedtea-devel -# icedtea is i386 and x86_64 -ExclusiveArch: %{ix86} x86_64 +BuildRequires: SDL_mixer-devel SDL_ttf-devel java-gcj-compat-devel +BuildRequires: java-javadoc ant xml-commons-apis swig bsh jdom Requires: bsh jdom -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig %description sdljava is a Java binding to the SDL API being developed by Ivan Ganza. @@ -96,17 +89,37 @@ rm src/org/gljava/opengl/native/glew_wrap.c %build + +# special case ppc as the define is powerpc not ppc and both ppc and ppc64 +# must be set for ppc64 +%ifarch ppc +CFLAGS="$RPM_OPT_FLAGS -D__powerpc__ -fno-strict-aliasing -fPIC" +%endif +%ifarch ppc64 +CFLAGS="$RPM_OPT_FLAGS -D__powerpc__ -D__powerpc64__ -fno-strict-aliasing -fPIC" +%endif + +# special case ix86 as all of ix86 should define __i386__ +%ifarch %{ix86} +CFLAGS="$RPM_OPT_FLAGS -D__i386__ -fno-strict-aliasing -fPIC" +%endif + +# All other archs +if [ -z "$CFLAGS" ]; then + CFLAGS="$RPM_OPT_FLAGS -D__%{_arch}__ -fno-strict-aliasing -fPIC" +fi + pushd src/sdljava/native -make CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fPIC" -make libsdljava_gfx.so CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fPIC" +make CFLAGS="$CFLAGS" +make libsdljava_gfx.so CFLAGS="$CFLAGS" popd pushd src/org/gljava/opengl/native -make CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fPIC" +make CFLAGS="$CFLAGS" popd pushd src/org/gljava/opengl/native/ftgl -make CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fPIC" +make CFLAGS="$CFLAGS" popd ant jar javadoc @@ -164,13 +177,11 @@ rm -rf $RPM_BUILD_ROOT %post -/sbin/ldconfig if [ -x %{_bindir}/rebuild-gcj-db ]; then %{_bindir}/rebuild-gcj-db fi %postun -/sbin/ldconfig if [ -x %{_bindir}/rebuild-gcj-db ]; then %{_bindir}/rebuild-gcj-db fi @@ -201,6 +212,10 @@ ln -s %{name}-%{version} %{_javadocdir}/%{name} %changelog * Sun Dec 9 2007 Hans de Goede 0.9.1-7 - And the dejavu-fonts fontfile names changed back again (what fun) +- The gcj bug causing us to not compile has been fixed, use gcj again + and drop ExclusiveArch +- There is no reason for us to run ldconfig! +- Sigh we must now define __arch__ ourself as the newer swig doesn't * Tue Nov 20 2007 Hans de Goede 0.9.1-6 - Adjust font symlinks in sdljava-demo package for fontfile name changes in