1
0
forked from pool/trigger-rally
Pavol Rusnak 2009-03-03 09:58:13 +00:00 committed by Git OBS Bridge
parent 851322e577
commit 01b6affa8a
8 changed files with 246 additions and 23 deletions

3
.gitattributes vendored
View File

@ -21,6 +21,3 @@
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
## Specific LFS patterns
trigger32.xpm filter=lfs diff=lfs merge=lfs -text
trigger64.xpm filter=lfs diff=lfs merge=lfs -text

View File

@ -1,3 +1,190 @@
--- Jamconfig.in
+++ Jamconfig.in
@@ -72,9 +72,6 @@
AUDIOLIB_AVAILABLE ?= "@AUDIOLIB_AVAILABLE@" ;
AUDIOLIB_CFLAGS ?= "@AUDIOLIB_CFLAGS@" ;
AUDIOLIB_LIBS ?= "@AUDIOLIB_LIBS@" ;
-AUDIOLIB_AVAILABLE ?= "@AUDIOLIB_AVAILABLE@" ;
-AUDIOLIB_CFLAGS ?= "@AUDIOLIB_CFLAGS@" ;
-AUDIOLIB_LIBS ?= "@AUDIOLIB_LIBS@" ;
PHYSFS_AVAILABLE ?= "@PHYSFS_AVAILABLE@" ;
PHYSFS_CFLAGS ?= "@PHYSFS_CFLAGS@" ;
PHYSFS_LIBS ?= "@PHYSFS_LIBS@" ;
@@ -91,6 +88,8 @@
GL_LIBS ?= "@GL_LIBS@" ;
GLU_CFLAGS ?= "@GLU_CFLAGS@" ;
GLU_LIBS ?= "@GLU_LIBS@" ;
+GLEW_CFLAGS ?= "@GLEW_CFLAGS@" ;
+GLEW_LIBS ?= "@GLEW_LIBS@" ;
prefix ?= "@prefix@" ;
exec_prefix ?= "@exec_prefix@" ;
bindir ?= "@bindir@" ;
--- configure
+++ configure
@@ -311,7 +311,7 @@
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os VARIANT CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SDL_CONFIG CC CFLAGS ac_ct_CC SDL_CFLAGS SDL_LIBS SDLIMAGE_AVAILABLE SDLIMAGE_CFLAGS SDLIMAGE_LIBS AUDIOLIB_AVAILABLE AUDIOLIB_CFLAGS AUDIOLIB_LIBS PHYSFS_AVAILABLE PHYSFS_CFLAGS PHYSFS_LIBS CPP acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS EGREP GL_CFLAGS GL_LIBS GLU_CFLAGS GLU_LIBS INSTALL LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os VARIANT CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SDL_CONFIG CC CFLAGS ac_ct_CC SDL_CFLAGS SDL_LIBS SDLIMAGE_AVAILABLE SDLIMAGE_CFLAGS SDLIMAGE_LIBS AUDIOLIB_AVAILABLE AUDIOLIB_CFLAGS AUDIOLIB_LIBS PHYSFS_AVAILABLE PHYSFS_CFLAGS PHYSFS_LIBS CPP acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS EGREP GL_CFLAGS GL_LIBS GLU_CFLAGS GLU_LIBS GLEW_CFLAGS GLEW_LIBS INSTALL LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -5226,6 +5226,131 @@
{ (exit 1); exit 1; }; }
fi
+GLEW_CFLAGS="${GL_CFLAGS}"
+if test "X${with_apple_opengl_framework}" != "Xyes"; then
+ echo "$as_me:$LINENO: checking for OpenGL Extension Wrangler library" >&5
+echo $ECHO_N "checking for OpenGL Extension Wrangler library... $ECHO_C" >&6
+if test "${ax_cv_check_glew_libglew+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ax_cv_check_glew_libglew="no"
+ ax_save_CPPFLAGS="${CPPFLAGS}"
+ CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}"
+ ax_save_LIBS="${LIBS}"
+ LIBS=""
+ ax_check_libs="-lglew32 -lGLEW"
+ for ax_lib in ${ax_check_libs}; do
+ if test X$ax_compiler_ms = Xyes; then
+ ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`
+ else
+ ax_try_lib="${ax_lib}"
+ fi
+ LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}"
+ #
+ # libGLEW typically links with libstdc++ on POSIX platforms. However,
+ # setting the language to C++ means that test program source is named
+ # "conftest.cc"; and Microsoft cl doesn't know what to do with such a
+ # file.
+ #
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ if test X$ax_compiler_ms = Xyes; then
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ fi
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+# if HAVE_WINDOWS_H && defined(_WIN32)
+# include <windows.h>
+# endif
+# include <GL/glew.h>
+int
+main ()
+{
+glewInit();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ax_cv_check_glew_libglew="${ax_try_lib}"; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test X$ax_compiler_ms = Xyes; then
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ fi
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ done
+ LIBS=${ax_save_LIBS}
+ CPPFLAGS=${ax_save_CPPFLAGS}
+fi
+echo "$as_me:$LINENO: result: $ax_cv_check_glew_libglew" >&5
+echo "${ECHO_T}$ax_cv_check_glew_libglew" >&6
+ if test "X${ax_cv_check_glew_libglew}" = "Xno"; then
+ no_glew="yes"
+ GLEW_CFLAGS=""
+ GLEW_LIBS=""
+ else
+ GLEW_LIBS="${ax_cv_check_glew_libglew} ${GL_LIBS}"
+ fi
+fi
+
+
+
+if test "x$GLEW_CFLAGS" = "x" -a "x$GLEW_LIBS" = "x"; then
+ { { echo "$as_me:$LINENO: error: Couldn't find GLEW library and headers" >&5
+echo "$as_me: error: Couldn't find GLEW library and headers" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
# Um, can't get this to substitute [app]datadir :/
#AC_DEFINE([DATADIR], [$(datadir)], [comment])
@@ -5963,6 +6088,8 @@
s,@GL_LIBS@,$GL_LIBS,;t t
s,@GLU_CFLAGS@,$GLU_CFLAGS,;t t
s,@GLU_LIBS@,$GLU_LIBS,;t t
+s,@GLEW_CFLAGS@,$GLEW_CFLAGS,;t t
+s,@GLEW_LIBS@,$GLEW_LIBS,;t t
s,@INSTALL@,$INSTALL,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
--- configure.ac
+++ configure.ac
@@ -123,6 +123,11 @@
AC_MSG_ERROR([Couldn't find GLU library and headers])
fi
+AX_CHECK_GLEW
+if test "x$GLEW_CFLAGS" = "x" -a "x$GLEW_LIBS" = "x"; then
+ AC_MSG_ERROR([Couldn't find GLEW library and headers])
+fi
+
# Um, can't get this to substitute [app]datadir :/
#AC_DEFINE([DATADIR], [$(datadir)], [comment])
--- src/Jamfile
+++ src/Jamfile
@@ -7,7 +7,6 @@
@ -8,3 +195,36 @@
SubInclude TOP src pengine ;
SubInclude TOP src psim ;
SubInclude TOP src trigger ;
--- src/pengine/Jamfile
+++ src/pengine/Jamfile
@@ -3,7 +3,4 @@
Help pengine : "Build the pengine library" ;
Library pengine : [ Wildcard *.c *.cpp *.h ]
[ Wildcard GL : *.h ] ;
-ExternalLibs pengine : SDL SDLIMAGE AUDIOLIB GL GLU PHYSFS ;
-LinkWith pengine : glew ;
-
-IncludeDir pengine : ../glew ;
+ExternalLibs pengine : SDL SDLIMAGE AUDIOLIB GL GLU GLEW PHYSFS ;
--- src/psim/Jamfile
+++ src/psim/Jamfile
@@ -2,6 +2,4 @@
Help psim : "Build the psim library" ;
Library psim : [ Wildcard *.cpp *.h ] ;
-ExternalLibs psim : SDL SDLIMAGE AUDIOLIB GL GLU PHYSFS ;
-
-IncludeDir psim : ../glew ;
+ExternalLibs psim : SDL SDLIMAGE AUDIOLIB GL GLU GLEW PHYSFS ;
--- src/trigger/Jamfile
+++ src/trigger/Jamfile
@@ -2,7 +2,5 @@
Help trigger : "Build trigger (main application)" ;
Application trigger : [ Wildcard *.cpp *.h ] ;
-LinkWith trigger : pengine psim glew ;
-ExternalLibs trigger : SDL SDLIMAGE GL GLU AUDIOLIB PHYSFS ;
-
-IncludeDir trigger : ../glew ;
+LinkWith trigger : pengine psim ;
+ExternalLibs trigger : SDL SDLIMAGE GL GLU GLEW AUDIOLIB PHYSFS ;

View File

@ -4,6 +4,6 @@ Name[de]=Trigger
GenericName=Rally Racing Game
GenericName[de]=Rallye-Racing-Spiel
Type=Application
Exec=trigger
Icon=trigger
Exec=trigger-rally
Icon=trigger-rally
Categories=Game;SportsGame;

View File

@ -6,12 +6,12 @@ License: GPL
Group: Amusements/Games/Action/Race
Source0: trigger-%{version}-src.tar.bz2
Source1: %{name}.desktop
Source2: %{name}32.xpm
Source3: %{name}64.xpm
Source2: %{name}32.png
Source3: %{name}64.png
Patch0: %{name}-%{version}-glew.patch
Url: http://sourceforge.net/projects/trigger-rally
BuildRoot: %{_tmppath}/build-root-%{name}
BuildRequires: gcc-c++ SDL-devel SDL_image-devel freealut-devel Mesa-devel openal-devel physfs-devel boost-jam update-desktop-files
BuildRequires: gcc-c++ SDL-devel SDL_image-devel freealut-devel glew-devel openal-devel physfs-devel boost-jam update-desktop-files
Requires: trigger-rally-data == %{version}
%description
@ -21,14 +21,14 @@ Copyright (C) 2004-2006 Jasmine Langridge, Richard Langridge
%prep
%setup -q -n trigger-%{version}-src
# set attributes
chmod a-x Jam* config.* configure.ac doc/* mk/autoconf/* mk/jam/* src/Jamfile src/pengine/* src/psim/* src/trigger/*
# use system glew
%patch0
rm -rf src/glew
# set attributes
chmod a-x Jam* config.* configure.ac doc/* mk/autoconf/* mk/jam/* src/Jamfile src/pengine/* src/psim/* src/trigger/*
%build
./configure --datadir=%{_datadir}/trigger-rally
./configure --datadir=%{_datadir}/games/trigger-rally
jam
# Data directory for program execution is set during compilation !
# We only use jam for compilation, NOT FOR INSTALLATION (only datadir must be specified)
@ -36,11 +36,10 @@ jam
%install
# Program:
install -d $RPM_BUILD_ROOT%{_prefix}/games
install -s -m 755 trigger $RPM_BUILD_ROOT%{_prefix}/games
install -D -m 755 trigger $RPM_BUILD_ROOT%{_prefix}/games/trigger-rally
# Icons:
install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
install -D -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps
install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/trigger-rally.png
install -D -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps/trigger-rally.png
# Desktop menu entry:
%suse_update_desktop_file -i %{name} Game SportsGame
@ -50,10 +49,17 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc doc/*
%{_prefix}/games/trigger
%{_prefix}/games/trigger-rally
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/*.xpm
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/32x32
%dir %{_datadir}/icons/hicolor/32x32/apps
%dir %{_datadir}/icons/hicolor/64x64
%dir %{_datadir}/icons/hicolor/64x64/apps
%{_datadir}/icons/hicolor/*/apps/*.png
%changelog
* Tue Mar 03 2009 Pavol Rusnak <prusnak@suse.cz
- use system glew library (glew.patch)
* Sun Mar 01 2009 Frank Schaefer <schaeferf.obs@googlemail.com>
- Initial openSUSE package release (0.5.2.1)

3
trigger-rally32.png Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dfa8113e0535118604b2afe465c55c73bb41a262edd3d2f0bac005bb1eb9f713
size 3230

3
trigger-rally64.png Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:749e537c58ba3dff8231f7110e1378376c624af6e05817d7b1ec287dce84a4bd
size 9148

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ee7aefdc5f477d99c58ba38cd868eda7449b5d301c4c1ef610efe4fc8c3f286d
size 10213

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b978257037740877873def70ec3be7cb2194f392c88eb7f0802268e7d883e1e3
size 36854