rpms/glaxium/F-7 glaxium-0.5-fixes.patch, NONE, 1.1 glaxium.desktop, NONE, 1.1 glaxium.png, NONE, 1.1 glaxium.spec, NONE, 1.1 glaxium_0.5-allow-running-when-dsp-busy.patch, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Tue Oct 9 17:41:09 UTC 2007


Author: jwrdegoede

Update of /cvs/extras/rpms/glaxium/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18529

Modified Files:
	.cvsignore sources 
Added Files:
	glaxium-0.5-fixes.patch glaxium.desktop glaxium.png 
	glaxium.spec glaxium_0.5-allow-running-when-dsp-busy.patch 
Log Message:
* Sat Oct  6 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.5-2
- Add patch from packman which allows running when sound is not available
- Minor .desktop file improvements


glaxium-0.5-fixes.patch:

--- NEW FILE glaxium-0.5-fixes.patch ---
diff -up glaxium_0.5/scratcher.hpp.fix glaxium_0.5/scratcher.hpp
--- glaxium_0.5/scratcher.hpp.fix	2007-10-04 16:21:08.000000000 +0200
+++ glaxium_0.5/scratcher.hpp	2007-10-04 16:21:27.000000000 +0200
@@ -34,7 +34,7 @@ public:
             UNDEF
     } ;
     
-    Scratcher:: Scratcher(List *list, float x, float z, int bench=0);
+    Scratcher(List *list, float x, float z, int bench=0);
     void draw();
     void drawShadowable();
     void move();
diff -up glaxium_0.5/tank.hpp.fix glaxium_0.5/tank.hpp
--- glaxium_0.5/tank.hpp.fix	2007-10-04 16:21:08.000000000 +0200
+++ glaxium_0.5/tank.hpp	2007-10-04 16:21:27.000000000 +0200
@@ -61,7 +61,7 @@ protected:
 
 class TankFire : public Sprite {
 public:
-    TankFire::TankFire(List *list, Tank *tank, float x, float y, float z,float dx, float dz,float rotated);
+    TankFire(List *list, Tank *tank, float x, float y, float z,float dx, float dz,float rotated);
     void draw();
 	void drawShadowable();
     void move();
diff -up glaxium_0.5/variables.cpp.fix glaxium_0.5/variables.cpp
--- glaxium_0.5/variables.cpp.fix	2007-10-04 16:21:08.000000000 +0200
+++ glaxium_0.5/variables.cpp	2007-10-04 16:21:27.000000000 +0200
@@ -453,6 +453,7 @@ char* GlaxiumVariables::getFullOptionsPa
 	static char strReturn[1024];
 	strcpy(strReturn, getenv("HOME"));
 	strcat(strReturn, "/.glaxiumrc");
+	return strReturn;
 #endif
 }
 


--- NEW FILE glaxium.desktop ---
[Desktop Entry]
Name=Glaxium
Comment=OpenGL space shooter
Exec=glaxium-wrapper -f
Icon=glaxium
Terminal=false
StartupNotify=false
Type=Application
Categories=Game;ActionGame;


--- NEW FILE glaxium.spec ---
Name:           glaxium
Version:        0.5
Release:        2%{?dist}
Summary:        An OpenGL space shooter
Group:          Amusements/Games
License:        GPLv2+
URL:            http://xhosxe.free.fr/glaxium/
Source0:        http://xhosxe.free.fr/glaxium/%{name}_%{version}.tar.gz
Source1:        %{name}.desktop
Source2:        %{name}.png
Patch0:         %{name}-0.5-fixes.patch
Patch1:         %{name}_0.5-allow-running-when-dsp-busy.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  SDL_mixer-devel freeglut-devel libpng-devel desktop-file-utils
Requires:       hicolor-icon-theme opengl-games-utils

%description
Glaxium is an OpenGL-based space-ship "shoot-em-up" styled game.
It is designed to provide the same feel as the old 2D games 
of that type, but with 3D for the special effects.

%prep
%setup -q -n %{name}_%{version}
%patch0 -p1
%patch1 -p1
sed -i 's|/games/glaxium|/glaxium|g' configure* Makefile.in
sed -i 's/\r//g' CHANGES.txt LICENSE README.txt


%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
# make install DESTDIR=$RPM_BUILD_ROOT doesn't work
mkdir -p $RPM_BUILD_ROOT%{_bindir}
%makeinstall
ln -s opengl-game-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/%{name}-wrapper

# below is the desktop file and icon stuff.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  %{SOURCE1}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps
install -p -m 644 %{SOURCE2} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps


%clean
rm -rf $RPM_BUILD_ROOT


%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi


%files
%defattr(-,root,root,-)
%doc CHANGES.txt LICENSE README.txt
%{_bindir}/%{name}*
%{_datadir}/%{name}
%{_mandir}/man6/%{name}.6.gz
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/128x128/apps/%{name}.png


%changelog
* Sat Oct  6 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.5-2
- Add patch from packman which allows running when sound is not available
- Minor .desktop file improvements

* Thu Oct  4 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 0.5-1
- Initial Fedora package

glaxium_0.5-allow-running-when-dsp-busy.patch:

--- NEW FILE glaxium_0.5-allow-running-when-dsp-busy.patch ---
--- ./main.cpp.gege	2002-10-11 23:21:02.000000000 +0200
+++ ./main.cpp	2003-04-25 12:42:28.000000000 +0200
@@ -228,9 +228,11 @@
                 if (game==1 && GLvar->delay>100) {
                     game=0;
 #ifdef HAVE_LIBSDL_MIXER
+		    if (mixerok) {
                     Mix_FreeMusic(GLvar->module1);
                     GLvar->module2 = Mix_LoadMUS(GLvar->getFullPath("samples/glax3.xm"));
                     Mix_PlayMusic(GLvar->module2,-1);
+		    }
 #endif
                 } else if (game==0) {
                     glEnable(GL_BLEND);
@@ -258,9 +260,11 @@
 		                scene->globalList->Add(GLvar->mySpaceShip);
 						cheatCode=0;
 	#ifdef HAVE_LIBSDL_MIXER
+		    if (mixerok) {
 				        Mix_FreeMusic(GLvar->module2);
 					    GLvar->module1 = Mix_LoadMUS(GLvar->getFullPath("samples/glax.xm"));
 						Mix_PlayMusic(GLvar->module1,-1);
+		    }
     #endif
 					}
                 }
--- ./sprite.cpp.gege	2002-10-04 20:05:22.000000000 +0200
+++ ./sprite.cpp	2003-04-25 12:42:55.000000000 +0200
@@ -58,17 +58,21 @@
     
 #ifdef HAVE_LIBSDL_MIXER
 void Sprite::SpritePlaySample(type_samples sampleToPlay,int volume) {
+  if (mixerok) {
   if (z_<63) {
     int v=Mix_PlayChannel(-1,GLvar->samples[sampleToPlay], 0);
     Mix_Volume(v, (int)((63-z_)*2)*volume/128);
   }
+  }
 }
 void Sprite::PlaySample(type_samples sampleToPlay,int volume) {
+  if (mixerok) {
   if (GLvar->samples[sampleToPlay])
     {
       int v=Mix_PlayChannel(-1,GLvar->samples[sampleToPlay], 0);
       Mix_Volume(v, volume);
     }
+  }
 }
 #else
   /* must exist because it has one or two parameters... 
--- ./variables.cpp.gege	2002-10-17 23:53:00.000000000 +0200
+++ ./variables.cpp	2003-04-25 12:44:16.000000000 +0200
@@ -330,6 +330,7 @@
 }
 
 
+int mixerok;
 
 #ifdef HAVE_LIBSDL_MIXER
 void GlaxiumVariables::initSound()
@@ -347,8 +348,10 @@
     /* Open the audio device */
     if (Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers) < 0) {
         fprintf(stderr, "Couldn't open audio: %s\n", SDL_GetError());
-        exit(2);
+	mixerok = 0;
+	return;
     } else {
+	mixerok = 1;
         Mix_QuerySpec(&audio_rate, &audio_format, &audio_channels);
         printf("Opened audio at %d Hz %d bit %s, %d bytes audio buffer\n", audio_rate,
             (audio_format&0xFF),
--- ./variables.hpp.gege	2002-10-10 17:15:16.000000000 +0200
+++ ./variables.hpp	2003-04-25 12:44:05.000000000 +0200
@@ -42,6 +42,7 @@
 #include "mikmod.h"
 #endif
 
+extern int mixerok;
 
 #define SCALE .12
 


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/glaxium/F-7/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	9 Oct 2007 15:36:25 -0000	1.1
+++ .cvsignore	9 Oct 2007 17:40:37 -0000	1.2
@@ -0,0 +1 @@
+glaxium_0.5.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/glaxium/F-7/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	9 Oct 2007 15:36:25 -0000	1.1
+++ sources	9 Oct 2007 17:40:37 -0000	1.2
@@ -0,0 +1 @@
+ea6d6f8b4ebb7c73b74af64d83f45cb7  glaxium_0.5.tar.gz




More information about the fedora-extras-commits mailing list