rpms/methane/devel .cvsignore, 1.2, 1.3 methane-fullscreen.patch, 1.1, 1.2 methane-highscore.patch, 1.1, 1.2 methane.spec, 1.8, 1.9 sources, 1.2, 1.3 methane-1.4.7-pulseaudio.patch, 1.1, NONE methane-clanlib08.patch, 1.2, NONE

Hans de Goede jwrdegoede at fedoraproject.org
Wed Nov 11 10:07:26 UTC 2009


Author: jwrdegoede

Update of /cvs/extras/rpms/methane/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13525

Modified Files:
	.cvsignore methane-fullscreen.patch methane-highscore.patch 
	methane.spec sources 
Removed Files:
	methane-1.4.7-pulseaudio.patch methane-clanlib08.patch 
Log Message:
* Wed Nov 11 2009 Hans de Goede <hdegoede at redhat.com> 1.5.0-1
- New upstream release 1.5.0



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/methane/devel/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- .cvsignore	14 Feb 2007 07:57:12 -0000	1.2
+++ .cvsignore	11 Nov 2009 10:07:26 -0000	1.3
@@ -1 +1 @@
-methane-1.4.7.tgz
+methane-1.5.0.tgz

methane-fullscreen.patch:
 build                |only
 debugfiles.list      |only
 debuglinks.list      |only
 debugsources.list    |only
 methane              |only
 sources/methane.cpp  |   43 +++++++++++++++++++++++++++++++++++++++----
 sources/methane.cpp~ |only
 7 files changed, 39 insertions(+), 4 deletions(-)

Index: methane-fullscreen.patch
===================================================================
RCS file: /cvs/extras/rpms/methane/devel/methane-fullscreen.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- methane-fullscreen.patch	14 Feb 2007 07:57:12 -0000	1.1
+++ methane-fullscreen.patch	11 Nov 2009 10:07:26 -0000	1.2
@@ -1,26 +1,101 @@
---- 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;
+Only in methane-1.5.0.new: build
+Only in methane-1.5.0.new: debugfiles.list
+Only in methane-1.5.0.new: debuglinks.list
+Only in methane-1.5.0.new: debugsources.list
+Only in methane-1.5.0.new: methane
+diff -ur methane-1.5.0/sources/methane.cpp methane-1.5.0.new/sources/methane.cpp
+--- methane-1.5.0/sources/methane.cpp	2009-11-09 23:24:15.000000000 +0100
++++ methane-1.5.0.new/sources/methane.cpp	2009-11-09 23:20:25.000000000 +0100
+@@ -36,6 +36,7 @@
+ 
+ RenderTarget GLOBAL_RenderTarget = opengl;
+ bool GLOBAL_SoundEnable = true;
++bool GLOBAL_FullScreenEnable = true;
+ 
+ //------------------------------------------------------------------------------
+ // Keyboard stuff
+@@ -59,6 +60,20 @@
+ 
+ 	int main(const std::vector<CL_String> &args)
+ 	{
++		int i;
++
++		for (i = 1; i < args.size(); i++)
++		{
++			if (args[i].compare("-w") == 0)
++				GLOBAL_FullScreenEnable = false;
++			else
++				fprintf(stderr,
++					"Unknown commandline parameter: '%s', ignoring\n\n"
++					"Valid parameters:\n"
++					"'-w': start in windowed mode\n",
++					args[i].c_str());
++		}
++
+ 		// Create a console window for text-output if not available
+ 		CL_ConsoleWindow console("Console");
+ 		try
+@@ -103,7 +118,13 @@
+ 			CL_DisplayWindowDescription desc;
+ 			desc.set_title("Super Methane Brothers");
+ 			desc.set_size(CL_Size(SCR_WIDTH*2,SCR_HEIGHT*2), true);
+-			desc.set_allow_resize(true);
++			if (GLOBAL_FullScreenEnable)
++			{
++				desc.set_fullscreen(true);
++				desc.set_decorations(false);
++			}
++			else
++				desc.set_allow_resize(true);
+ 			CL_DisplayWindow window(desc);
+ 
+ 			CMethDoc Game(window);
+@@ -129,8 +150,6 @@
+ 			int last_time = CL_System::get_time();
+ 
  			int quit_flag = 0;
- 			int disable_scale_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;
+@@ -276,7 +295,8 @@
+ 
+ 	bool get_options()
+ 	{
+-		CL_DisplayWindow window("Methane Options", 640, 480);
++		CL_DisplayWindow window("Methane Options", 640, 480,
++					GLOBAL_FullScreenEnable);
+ 
+ 		// Connect the Window close event
+ 		CL_Slot slot_quit = window.sig_window_close().connect(this, &SuperMethaneBrothers::on_window_close);
+@@ -311,6 +331,12 @@
+ 				}
+ 			}
+ 
++			if ( (LastKey == 'f') || (LastKey == 'F') )
++			{
++				LastKey = 0;
++				GLOBAL_FullScreenEnable = !GLOBAL_FullScreenEnable;
++			}
++
+ 			gc.clear(CL_Colorf(0.0f,0.0f,0.2f));
+ 
+ 			int ypos = 40;
+@@ -333,6 +359,15 @@
+ 			{
+ 				options_font.draw_text(gc, 10, ypos, "Audio - Disabled. Press 'A' to modify");
+ 			}
++			ypos += 50;
++			if (GLOBAL_FullScreenEnable)
++			{
++				options_font.draw_text(gc, 10, ypos, "Full screen - Enabled. Press 'F' to modify");
++			}
++			else
++			{
++				options_font.draw_text(gc, 10, ypos, "Full screen - Disabled. Press 'F' to modify");
++			}
+ 
+ 			ypos += 100;
+ 			options_font.draw_text(gc, 10, ypos, "Press the spacebar to start");
+Only in methane-1.5.0.new/sources: methane.cpp~

methane-highscore.patch:
 doc.cpp     |   50 ++++++++++++++------------------------------------
 game.cpp    |    1 +
 methane.cpp |   21 +++++++++++++++++++++
 3 files changed, 36 insertions(+), 36 deletions(-)

Index: methane-highscore.patch
===================================================================
RCS file: /cvs/extras/rpms/methane/devel/methane-highscore.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- methane-highscore.patch	14 Feb 2007 07:57:12 -0000	1.1
+++ methane-highscore.patch	11 Nov 2009 10:07:26 -0000	1.2
@@ -1,99 +1,129 @@
---- 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)
+diff -up methane-1.5.0/sources/doc.cpp~ methane-1.5.0/sources/doc.cpp
+--- methane-1.5.0/sources/doc.cpp~	2009-10-22 10:33:21.000000000 +0200
++++ methane-1.5.0/sources/doc.cpp	2009-11-08 18:37:31.000000000 +0100
+@@ -16,7 +16,10 @@
+ #include "doc.h"
+ #include "target.h"
+ #include "snddef.h"
++#include <stdio.h>
  
++extern FILE *methanescoresfptr;
++
  //------------------------------------------------------------------------------
-@@ -382,23 +382,19 @@
+ //! \brief Initialise Document
+ //!
+@@ -110,28 +112,13 @@ void CMethDoc::DisplayOptions( CL_Displa
  //------------------------------------------------------------------------------
  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);
+-	CL_String dirname = CL_Directory::get_appdata("clanlib", "methane", "1.5", false);
+-
+-	try
+-	{
+-		CL_File file(dirname+"highscores");
+-		HISCORES *hs;
+-		int cnt;
+-		for (cnt=0, hs=m_GameTarget.m_Game.m_HiScores; cnt<MAX_HISCORES; cnt++, hs++)
+-		{
+-			char buffer[5];
+-			file.read(buffer, 4, true);
+-			buffer[4] = 0;
+-			int score = file.read_int32();
+-
+-			m_GameTarget.m_Game.InsertHiScore( score, buffer );
++	size_t ign;
  
- 	// Allocate file memory, which is cleared to zero
- 	mptr = (char *) calloc(1, HighScoreLoadBufferSize);
- 	if (!mptr)		// No memory
+-		}
+-	}
+-	catch(CL_Exception& exception)
 -	{
--		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 @@
- 	}
++	if (!methanescoresfptr) return;	// No scores available
  
- 	free(mptr);
--
--	fclose(fptr);
--
++	rewind(methanescoresfptr);
++	ign = fread(m_GameTarget.m_Game.m_HiScores, sizeof(HISCORES),
++		    MAX_HISCORES, methanescoresfptr);
  }
  
  //------------------------------------------------------------------------------
-@@ -427,17 +420,14 @@
+@@ -139,21 +126,11 @@ void CMethDoc::LoadScores(void)
  //------------------------------------------------------------------------------
  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
+-	CL_String dirname = CL_Directory::get_appdata("clanlib", "methane", "1.5");
++	size_t ign;
+ 
+-	try
+-	{
+-		CL_File file(dirname+"highscores", CL_File::create_always, CL_File::access_write);
+-		HISCORES *hs;
+-		int cnt;
+-		for (cnt=0, hs=m_GameTarget.m_Game.m_HiScores; cnt<MAX_HISCORES; cnt++, hs++)
+-		{
+-			file.write(hs->name, 4, true);
+-			file.write_int32(hs->score);
+-		}
+-	}
+-	catch(CL_Exception& exception)
+-	{
+-	}
+-}
++	if (!methanescoresfptr) return;	// No scores available
+ 
 +	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);
--
- }
++	ign = fwrite(m_GameTarget.m_Game.m_HiScores, sizeof(HISCORES),
++		     MAX_HISCORES, methanescoresfptr);
++}
+diff -up methane-1.5.0/sources/game.cpp~ methane-1.5.0/sources/game.cpp
+--- methane-1.5.0/sources/game.cpp~	2009-04-28 16:42:43.000000000 +0200
++++ methane-1.5.0/sources/game.cpp	2009-11-08 18:44:46.000000000 +0100
+@@ -27,6 +27,7 @@
+ #include "weapon.h"
+ #include "target.h"
+ #include <stdlib.h>
++#include <stdio.h>
  
---- 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 @@
+ //------------------------------------------------------------------------------
+ // The Game Version Number
+diff -up methane-1.5.0/sources/methane.cpp~ methane-1.5.0/sources/methane.cpp
+--- methane-1.5.0/sources/methane.cpp~	2009-10-22 10:47:43.000000000 +0200
++++ methane-1.5.0/sources/methane.cpp	2009-11-08 18:30:40.000000000 +0100
+@@ -12,6 +12,14 @@
  //------------------------------------------------------------------------------
  // 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 <unistd.h>
++#include <string.h>
 +#include <stdio.h>
++#include <stdlib.h>
 +
- #ifdef METHANE_OLD_CPP
- #include <iostream.h>
- #else
-@@ -32,6 +39,7 @@
- // The Game Instance
- //------------------------------------------------------------------------------
- CMethDoc Game;
-+FILE *methanescoresfptr = NULL;
+ #include <ClanLib/core.h>
+ #include <ClanLib/application.h>
+ #include <ClanLib/display.h>
+@@ -24,6 +31,8 @@
  
- //------------------------------------------------------------------------------
- // Keyboard stuff
-@@ -60,6 +68,15 @@
+ #include "doc.h"
  
- 	virtual int main(int argc, char **argv)
++FILE *methanescoresfptr = NULL;
++
+ RenderTarget GLOBAL_RenderTarget = opengl;
+ bool GLOBAL_SoundEnable = true;
+ 
+@@ -236,6 +245,8 @@ public:
+ 				last_time = last_time + game_speed; 
+ 			}
+ 			Game.SaveScores();
++			if (methanescoresfptr)
++				fclose(methanescoresfptr);
+ 		}
+ 		catch(CL_Exception& exception)
+ 		{
+@@ -340,6 +351,15 @@ class Program
+ public:
+ 	static int main(const std::vector<CL_String> &args)
  	{
 + 		gid_t realgid = getgid();
 + 		
@@ -103,17 +133,7 @@
 + 			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();
++
+ 		CL_SetupCore setup_core;
+ 		CL_SetupDisplay setup_display;
  
- 			Game.RemoveSoundDriver();
-+			
-+ 			if (methanescoresfptr)
-+ 				fclose(methanescoresfptr);
- 		}
- 		catch(CL_Error error)
- 		{


Index: methane.spec
===================================================================
RCS file: /cvs/extras/rpms/methane/devel/methane.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- methane.spec	25 Jul 2009 12:07:40 -0000	1.8
+++ methane.spec	11 Nov 2009 10:07:26 -0000	1.9
@@ -1,6 +1,6 @@
 Name:           methane
-Version:        1.4.7
-Release:        8%{?dist}
+Version:        1.5.0
+Release:        1%{?dist}
 Summary:        Super Methane Brothers
 Group:          Amusements/Games
 License:        GPLv2+
@@ -10,12 +10,10 @@ 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
-Patch3:         methane-1.4.7-pulseaudio.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires:  ClanLib-devel mikmod-devel desktop-file-utils
+BuildRequires:  ClanLib-devel >= 2.1 desktop-file-utils
 Requires:       hicolor-icon-theme opengl-games-utils
 
 %description
@@ -25,27 +23,25 @@ its original author.
 
 %prep
 %setup -q
-%patch0 -p1 -z .cl08
 %patch1 -p1 -z .highscore
 %patch2 -p1 -z .fullscreen
-%patch3 -p1 -z .pa
 # we don't want every beeping file to be executable!
-chmod -x `find -type f`
+# 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%{_datadir}/%{name}
 mkdir -p $RPM_BUILD_ROOT%{_var}/games
-install -m 755 source/linux/%{name} $RPM_BUILD_ROOT%{_bindir}
+install -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}
+cp -a resources $RPM_BUILD_ROOT%{_datadir}/%{name}
 ln -s opengl-game-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/%{name}-wrapper
 touch $RPM_BUILD_ROOT%{_var}/games/%{name}scores
 
@@ -81,17 +77,21 @@ fi
 
 %files
 %defattr(-,root,root,-)
-%doc authors copying docs history i_linux readme todo
+%doc authors.txt copying.txt docs history.txt readme.txt
 %attr(2755,root,games) %{_bindir}/%{name}
 %{_bindir}/%{name}-wrapper
-%verify(not md5 size mtime) %config(noreplace) %attr(664,root,games) %{_var}/games/%{name}scores
+%{_datadir}/%{name}
 %{_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
+%verify(not md5 size mtime) %config(noreplace) %attr(664,root,games) %{_var}/games/%{name}scores
 
 
 %changelog
+* Wed Nov 11 2009 Hans de Goede <hdegoede at redhat.com> 1.5.0-1
+- New upstream release 1.5.0
+
 * Sat Jul 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.7-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/methane/devel/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- sources	14 Feb 2007 07:57:12 -0000	1.2
+++ sources	11 Nov 2009 10:07:26 -0000	1.3
@@ -1 +1 @@
-c3db4683400ff39e5f9a4b93c4cdb526  methane-1.4.7.tgz
+59d23dadff7b1a23dad05282aaaf6293  methane-1.5.0.tgz


--- methane-1.4.7-pulseaudio.patch DELETED ---


--- methane-clanlib08.patch DELETED ---




More information about the scm-commits mailing list