rpms/methane/devel methane-clanlib08.patch, NONE, 1.1 methane-fullscreen.patch, NONE, 1.1 methane-help.desktop, NONE, 1.1 methane-help.png, NONE, 1.1 methane-highscore.patch, NONE, 1.1 methane.desktop, NONE, 1.1 methane.png, NONE, 1.1 methane.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Wed Feb 14 07:57:44 UTC 2007


Author: jwrdegoede

Update of /cvs/extras/rpms/methane/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25460/devel

Modified Files:
	.cvsignore sources 
Added Files:
	methane-clanlib08.patch methane-fullscreen.patch 
	methane-help.desktop methane-help.png methane-highscore.patch 
	methane.desktop methane.png methane.spec 
Log Message:
auto-import methane-1.4.7-1.fc7 on branch devel from methane-1.4.7-1.fc7.src.rpm

methane-clanlib08.patch:

--- NEW FILE methane-clanlib08.patch ---
--- methane-1.4.7/source/linux/makefile~	2007-02-07 15:23:23.000000000 +0100
+++ methane-1.4.7/source/linux/makefile	2007-02-07 15:23:23.000000000 +0100
@@ -1,5 +1,5 @@
-METHANE_FLAGS = `pkg-config --cflags clanCore-0.7 clanDisplay-0.7 clanApp-0.7 clanGL-0.7`
-METHANE_LIBS = `pkg-config --libs clanCore-0.7 clanDisplay-0.7 clanApp-0.7 clanGL-0.7`
+METHANE_FLAGS = `pkg-config --cflags clanCore-0.8 clanDisplay-0.8 clanApp-0.8 clanGL-0.8`
+METHANE_LIBS = `pkg-config --libs clanCore-0.8 clanDisplay-0.8 clanApp-0.8 clanGL-0.8`
 
 # Remove the following two lines to disable sound
 METHANE_SND_FLAGS = -DMETHANE_MIKMOD `libmikmod-config --cflags`

methane-fullscreen.patch:

--- NEW FILE methane-fullscreen.patch ---
--- methane-1.4.7/source/linux/main.cpp.fullscreen	2007-02-07 15:32:32.000000000 +0100
+++ methane-1.4.7/source/linux/main.cpp	2007-02-07 15:34:16.000000000 +0100
@@ -114,10 +114,11 @@
 			CL_SetupGL setupGL;
 
 			// Set the video mode
-			CL_DisplayWindow window("Super Methane Brothers", SCR_WIDTH*2, SCR_HEIGHT*2);
-
+			CL_DisplayWindow window("Super Methane Brothers", 640, 480, true, true);
+			CL_Mouse::hide();
+			
 			CL_PixelBuffer pixel_screen(SCR_WIDTH, SCR_HEIGHT, SCR_WIDTH*4, CL_PixelFormat::rgba8888);
-			CL_Surface game_screen(&pixel_screen);
+			CL_Surface game_screen(pixel_screen);
 			CL_Canvas game_canvas(game_screen);
 
 			// Connect the Window close event
@@ -142,7 +143,7 @@
 			CL_InputBuffer mykey;
 			int quit_flag = 0;
 			int disable_scale_flag = 0;
-			int full_screen_flag = 0;
+			int full_screen_flag = 1;
 			int on_options_screen = 1;
 			int option_page = 0;
 			int game_speed = 60;


--- NEW FILE methane-help.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=Super Methane Brothers Documentation
Exec=htmlview file:///usr/share/doc/methane-version/docs/info.html
Icon=methane-help
Terminal=false
StartupNotify=true
Type=Application
Categories=Game;ArcadeGame;

methane-highscore.patch:

--- NEW FILE methane-highscore.patch ---
--- methane-1.4.7/source/linux/doc.cpp.highscore	2005-01-20 17:22:02.000000000 +0100
+++ methane-1.4.7/source/linux/doc.cpp	2007-02-07 15:24:55.000000000 +0100
@@ -40,7 +40,7 @@
 //------------------------------------------------------------------------------
 // The HighScore table filename
 //------------------------------------------------------------------------------
-static char HighScoreFileName[] = "/var/games/methanescores";
+extern FILE *methanescoresfptr;
 #define HighScoreLoadBufferSize (MAX_HISCORES * 64)
 
 //------------------------------------------------------------------------------
@@ -382,23 +382,19 @@
 //------------------------------------------------------------------------------
 void CMethDoc::LoadScores(void)
 {
-	FILE *fptr;
 	char *mptr;
 	char *tptr;
 	char let;
 	int cnt;
 
-	fptr = fopen(HighScoreFileName, "r");
-	if (!fptr) return;	// No scores available
+	if (!methanescoresfptr) return;	// No scores available
+	rewind(methanescoresfptr);
 
 	// Allocate file memory, which is cleared to zero
 	mptr = (char *) calloc(1, HighScoreLoadBufferSize);
 	if (!mptr)		// No memory
-	{
-		fclose(fptr);
 		return;
-	}
-	fread( mptr, 1, HighScoreLoadBufferSize-2, fptr);	// Get the file
+	fread( mptr, 1, HighScoreLoadBufferSize-2, methanescoresfptr);	// Get the file
 
 	// (Note: mptr is zero terminated)
 	tptr = mptr;
@@ -417,9 +413,6 @@
 	}
 
 	free(mptr);
-
-	fclose(fptr);
-
 }
 
 //------------------------------------------------------------------------------
@@ -427,17 +420,14 @@
 //------------------------------------------------------------------------------
 void CMethDoc::SaveScores(void)
 {
-	FILE *fptr;
 	int cnt;
 	HISCORES *hs;
 
-	fptr = fopen(HighScoreFileName, "w");
-	if (!fptr) return;	// Cannot write scores
+	if (!methanescoresfptr) return;	// Cannot write scores
+	rewind(methanescoresfptr);
 	for (cnt=0, hs=m_GameTarget.m_Game.m_HiScores; cnt<MAX_HISCORES; cnt++, hs++)
 	{
-		fprintf(fptr, "%c%c%c%c%d$", hs->name[0], hs->name[1], hs->name[2], hs->name[3], hs->score);
+		fprintf(methanescoresfptr, "%c%c%c%c%d$", hs->name[0], hs->name[1], hs->name[2], hs->name[3], hs->score);
 	}
-	fclose(fptr);
-
 }
 
--- methane-1.4.7/source/linux/main.cpp.highscore	2005-01-20 17:22:02.000000000 +0100
+++ methane-1.4.7/source/linux/main.cpp	2007-02-07 15:26:13.000000000 +0100
@@ -13,6 +13,13 @@
 //------------------------------------------------------------------------------
 // Methane brothers main source file
 //------------------------------------------------------------------------------
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE /* this must be done before the first include of unistd.h */
+#endif
+#include<unistd.h>
+#include<string.h>
+#include <stdio.h>
+
 #ifdef METHANE_OLD_CPP
 #include <iostream.h>
 #else
@@ -32,6 +39,7 @@
 // The Game Instance
 //------------------------------------------------------------------------------
 CMethDoc Game;
+FILE *methanescoresfptr = NULL;
 
 //------------------------------------------------------------------------------
 // Keyboard stuff
@@ -60,6 +68,15 @@
 
 	virtual int main(int argc, char **argv)
 	{
+ 		gid_t realgid = getgid();
+ 		
+ 		methanescoresfptr = fopen("/var/games/methanescores", "r+");
+ 		
+ 		if (setresgid(-1, realgid, realgid) != 0) {
+ 			perror("Could not drop setgid privileges.  Aborting.");
+ 			exit(1);
+ 		}
+ 		
 		// Create a console window for text-output if not available
 		CL_ConsoleWindow console("Console");
 		console.redirect_stdio();
@@ -305,6 +322,9 @@
 			Game.SaveScores();
 
 			Game.RemoveSoundDriver();
+			
+ 			if (methanescoresfptr)
+ 				fclose(methanescoresfptr);
 		}
 		catch(CL_Error error)
 		{


--- NEW FILE methane.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=Super Methane Brothers
Name[af]=Super Metaan Broers
Name[ca]=Els germans Super metà
Name[eo]=Supermetanaj fratoj
Name[es]=Los hermanos super metano
Name[fa]=برادران ابر متان
Name[fo]=Super Methan Brøður
Name[ja]=スーパーメタンブラザーズ
Name[lt]=Super metaniniai broliai
Name[lv]=Super Metāna Brāļi
Name[nso]=Masogana a Super Methane
Name[pl]=Bracia supemetanowcy
Name[pt_BR]=Super Irmãos 
Name[ru]=Братья Метаны
Name[sl]=Super metanska bratovščina
Name[ta]=Super Methane Brothers-Å¢¨Ç¡ðÎ
Name[tr]=Süper Metan Kardeşler
Name[ven]=Vhakomana vhahulwane vha Ha-Methane
Name[vi]=Super Methane Brothers 
Name[zh_CN]=超级 Methane 兄弟
Name[zh_TW]=超級瓦斯兄弟
Name[zu]=Obhuti be-Super Methane
GenericName=Arcade Game
GenericName[af]=Arkade Speletjie
GenericName[be]=Аркадная гульня
GenericName[bg]=Игра в Галерия със сводове
GenericName[bs]=Arkadna igra
GenericName[ca]=Joc d'arcade
GenericName[cs]=Arkádová hra
GenericName[da]=Arkade-videospil
GenericName[de]=Arkade-Spiel
GenericName[el]=Παιχνίδι Arcade
GenericName[eo]=Arkadoludo
GenericName[es]=Juego de Arcade
GenericName[et]=Põnevusmäng
GenericName[eu]=Arcade Jokoa
GenericName[fa]=بازی Arcade
GenericName[fi]=Arcade peli
GenericName[fo]=Arkaduspæl
GenericName[fr]=Jeu d'arcade
GenericName[he]=משחק Arcade
GenericName[hr]=Arkadna igra
GenericName[hu]=ügyességi
GenericName[it]=Gioco arcade
GenericName[ja]=アーケードゲーム
GenericName[ko]=오락실 놀이
GenericName[lt]=Arkadinis žaidimas
GenericName[lv]=Arkādes Spēle
GenericName[mt]=Logħba tal-arcades
GenericName[nb]=Arkadespill
GenericName[nl]=arcade-spel
GenericName[nn]=Arkadespel
GenericName[nso]=Papadi ya Arcade
GenericName[pl]=Gra zręcznościowa
GenericName[pt]=Jogo de Arcada
GenericName[pt_BR]= Arcade
GenericName[ro]=Un joc de aventuri
GenericName[ru]=Аркадная игра
GenericName[sk]=Dobrodružná hra
GenericName[sl]=Arkadna igra
GenericName[ss]=Umdlalo we Arcade
GenericName[sv]=Arkadspel
GenericName[ta]=Arcade Game-Å¢¨Ç¡ðÎ
GenericName[th]=เกมอาเขต
GenericName[tr]=Macera oyunu
GenericName[uk]=Гра "Arcade"
GenericName[ven]=Mutambo wa Akheidi
GenericName[xh]=Umdlalo we Arcade
GenericName[zh_CN]=街机游戏
GenericName[zh_TW]=電子遊戲
GenericName[zu]=Umdlalo womhhume
Comment=Converted from the Amiga by its original author
Exec=methane
Icon=methane
Terminal=false
StartupNotify=false
Type=Application
Categories=Game;ArcadeGame;


--- NEW FILE methane.spec ---
Name:           methane
Version:        1.4.7
Release:        1%{?dist}
Summary:        Super Methane Brothers
Group:          Amusements/Games
License:        GPL
URL:            http://methane.sourceforge.net/
Source0:        http://dl.sf.net/sourceforge/%{name}/%{name}-%{version}.tgz
Source1:        %{name}.desktop
Source2:        %{name}-help.desktop
Source3:        %{name}.png
Source4:        %{name}-help.png
Patch0:         methane-clanlib08.patch
Patch1:         methane-highscore.patch
Patch2:         methane-fullscreen.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  ClanLib-devel mikmod-devel desktop-file-utils
Requires:       hicolor-icon-theme

%description
Super Methane Brothers is a platform game converted from the Amiga by
its original author. It is very similar to the Taito game "Bubble
Bobble".


%prep
%setup -q
%patch0 -p1 -z .cl08
%patch1 -p1 -z .highscore
%patch2 -p1 -z .fullscreen
# we don't want every beeping file to be executable!
chmod -x `find -type f`
# put the correct version in methane-help.desktop
cat %{SOURCE2} | sed s/version/%{version}/ > %{name}-help.desktop


%build
pushd source/linux
make CXXFLAGS="$RPM_OPT_FLAGS"
popd


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_var}/games
install -m 755 source/linux/%{name} $RPM_BUILD_ROOT%{_bindir}
touch $RPM_BUILD_ROOT%{_var}/games/%{name}scores


# 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 \
  --add-category X-Fedora                       \
  %{SOURCE1}
desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  --add-category X-Fedora                       \
  %{name}-help.desktop
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
install -p -m 644 %{SOURCE3} %{SOURCE4} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/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 authors copying docs history i_linux readme todo
%attr(2755,root,games) %{_bindir}/%{name}
%verify(not md5 size mtime) %config(noreplace) %attr(664,root,games) %{_var}/games/%{name}scores
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/applications/fedora-%{name}-help.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_datadir}/icons/hicolor/32x32/apps/%{name}-help.png


%changelog
* Thu Jan 25 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 1.4.7-1
- Initial Fedora Extras package, based on the SUSE srpm


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/methane/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	13 Feb 2007 19:43:42 -0000	1.1
+++ .cvsignore	14 Feb 2007 07:57:12 -0000	1.2
@@ -0,0 +1 @@
+methane-1.4.7.tgz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/methane/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	13 Feb 2007 19:43:42 -0000	1.1
+++ sources	14 Feb 2007 07:57:12 -0000	1.2
@@ -0,0 +1 @@
+c3db4683400ff39e5f9a4b93c4cdb526  methane-1.4.7.tgz




More information about the scm-commits mailing list