[methane] New upstream release 1.5.1 Improve (make high res) icons

Hans de Goede jwrdegoede at fedoraproject.org
Sun Dec 11 16:22:30 UTC 2011


commit 00e4f587bb8e2504bd56246dcb0c5ec4653873ab
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Sun Dec 11 17:23:12 2011 +0100

    New upstream release 1.5.1
    Improve (make high res) icons

 .gitignore                     |    1 +
 methane-1.5.0-opengl1.patch    |  141 ----------------------------------------
 methane-1.5.1-clanlib-23.patch |   34 ++++++++++
 methane-fullscreen.patch       |   31 ++++-----
 methane-help.desktop           |    2 +-
 methane-help.png               |  Bin 555 -> 0 bytes
 methane-highscore.patch        |   42 ++++--------
 methane.png                    |  Bin 446 -> 4034 bytes
 methane.spec                   |   45 ++++++-------
 sources                        |    2 +-
 10 files changed, 87 insertions(+), 211 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 20e9bfb..04d7827 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 methane-1.5.0.tgz
+/methane-1.5.1.tgz
diff --git a/methane-1.5.1-clanlib-23.patch b/methane-1.5.1-clanlib-23.patch
new file mode 100644
index 0000000..39729df
--- /dev/null
+++ b/methane-1.5.1-clanlib-23.patch
@@ -0,0 +1,34 @@
+--- methane-1.5.1/Makefile	2011-04-05 09:21:14.000000000 +0200
++++ methane-1.5.1.new/Makefile	2011-12-11 13:55:15.253088027 +0100
+@@ -1,5 +1,5 @@
+-METHANE_FLAGS = -DENABLE_SOUND `pkg-config --cflags clanCore-2.2 clanDisplay-2.2 clanApp-2.2 clanGL-2.2 clanGL1-2.2 clanSWRender-2.2 clanSound-2.2 clanMikMod-2.2`
+-METHANE_LIBS = `pkg-config --libs clanCore-2.2 clanDisplay-2.2 clanApp-2.2 clanGL-2.2 clanGL1-2.2 clanSWRender-2.2  clanSound-2.2 clanMikMod-2.2`
++METHANE_FLAGS = -DENABLE_SOUND `pkg-config --cflags clanCore-2.3 clanDisplay-2.3 clanApp-2.3 clanGL-2.3 clanGL1-2.3 clanSWRender-2.3 clanSound-2.3 clanMikMod-2.3`
++METHANE_LIBS = `pkg-config --libs clanCore-2.3 clanDisplay-2.3 clanApp-2.3 clanGL-2.3 clanGL1-2.3 clanSWRender-2.3  clanSound-2.3 clanMikMod-2.3`
+ 
+ OBJF = build/game.o build/baddie.o build/methane.o build/target.o build/maps.o build/gfxoff.o build/mapdata.o build/objlist.o build/doc.o build/bitdraw.o build/global.o build/suck.o build/power.o build/goodie.o build/bititem.o build/player.o build/weapon.o build/bitgroup.o build/boss.o build/sound.o build/gasobj.o build/misc.o
+ 
+--- methane-1.5.1/sources/methane.cpp	2011-12-11 14:18:38.301132904 +0100
++++ methane-1.5.1.new/sources/methane.cpp	2011-12-11 14:15:32.669126965 +0100
+@@ -105,15 +105,15 @@
+ 				return 0;
+ 			}
+ 
+-			CL_AutoPtr<CL_SetupSound> setup_sound;
+-			CL_AutoPtr<CL_SoundOutput> sound_output;
+-			CL_AutoPtr<CL_SetupMikMod> setup_mikmod;
++			CL_UniquePtr<CL_SetupSound> setup_sound;
++			CL_UniquePtr<CL_SoundOutput> sound_output;
++			CL_UniquePtr<CL_SetupMikMod> setup_mikmod;
+ 
+ 			if (GLOBAL_SoundEnable)
+ 			{
+-				setup_sound = new CL_SetupSound;
+-				sound_output = new CL_SoundOutput(44100);
+-				setup_mikmod = new CL_SetupMikMod;
++				setup_sound = cl_move(CL_UniquePtr<CL_SetupSound>(new CL_SetupSound));
++				sound_output = cl_move(CL_UniquePtr<CL_SoundOutput>(new CL_SoundOutput(44100)));
++				setup_mikmod = cl_move(CL_UniquePtr<CL_SetupMikMod>(new CL_SetupMikMod));
+ 			}
+ 
+ 			// Set the video mode
diff --git a/methane-fullscreen.patch b/methane-fullscreen.patch
index 709f34a..1755cb5 100644
--- a/methane-fullscreen.patch
+++ b/methane-fullscreen.patch
@@ -1,19 +1,18 @@
-diff -up methane-1.5.0/sources/methane.cpp.fullscreen methane-1.5.0/sources/methane.cpp
---- methane-1.5.0/sources/methane.cpp.fullscreen	2009-11-12 08:41:46.000000000 +0100
-+++ methane-1.5.0/sources/methane.cpp	2009-11-12 08:42:36.000000000 +0100
-@@ -36,6 +36,7 @@ FILE *methanescoresfptr = NULL;
+--- methane-1.5.1/sources/methane.cpp	2011-12-11 13:52:54.904083515 +0100
++++ methane-1.5.1.new/sources/methane.cpp	2011-12-11 13:51:27.174080706 +0100
+@@ -37,6 +37,7 @@
  
- RenderTarget GLOBAL_RenderTarget = opengl;
+ RenderTarget GLOBAL_RenderTarget = opengl2;
  bool GLOBAL_SoundEnable = true;
 +bool GLOBAL_FullScreenEnable = true;
  
  //------------------------------------------------------------------------------
  // Keyboard stuff
-@@ -59,6 +60,20 @@ public:
+@@ -60,6 +61,20 @@
  
  	int main(const std::vector<CL_String> &args)
  	{
-+		int i;
++		unsigned int i;
 +
 +		for (i = 1; i < args.size(); i++)
 +		{
@@ -27,10 +26,10 @@ diff -up methane-1.5.0/sources/methane.cpp.fullscreen methane-1.5.0/sources/meth
 +					args[i].c_str());
 +		}
 +
- 		// Create a console window for text-output if not available
- 		CL_ConsoleWindow console("Console");
  		try
-@@ -103,8 +118,16 @@ public:
+ 		{
+ 			CL_SetupGL target_opengl2;
+@@ -105,8 +120,16 @@
  			CL_DisplayWindowDescription desc;
  			desc.set_title("Super Methane Brothers");
  			desc.set_size(CL_Size(SCR_WIDTH*2,SCR_HEIGHT*2), true);
@@ -48,7 +47,7 @@ diff -up methane-1.5.0/sources/methane.cpp.fullscreen methane-1.5.0/sources/meth
  
  			CMethDoc Game(window);
  
-@@ -129,8 +152,6 @@ public:
+@@ -131,8 +154,6 @@
  			int last_time = CL_System::get_time();
  
  			int quit_flag = 0;
@@ -57,7 +56,7 @@ diff -up methane-1.5.0/sources/methane.cpp.fullscreen methane-1.5.0/sources/meth
  			int on_options_screen = 1;
  			int option_page = 0;
  			int game_speed = 60;
-@@ -276,7 +297,8 @@ public:
+@@ -281,7 +302,8 @@
  
  	bool get_options()
  	{
@@ -67,8 +66,8 @@ diff -up methane-1.5.0/sources/methane.cpp.fullscreen methane-1.5.0/sources/meth
  
  		// Connect the Window close event
  		CL_Slot slot_quit = window.sig_window_close().connect(this, &SuperMethaneBrothers::on_window_close);
-@@ -311,6 +333,12 @@ public:
- 				}
+@@ -320,6 +342,12 @@
+ 				GLOBAL_RenderTarget = swrender;
  			}
  
 +			if ( (LastKey == 'f') || (LastKey == 'F') )
@@ -80,9 +79,9 @@ diff -up methane-1.5.0/sources/methane.cpp.fullscreen methane-1.5.0/sources/meth
  			gc.clear(CL_Colorf(0.0f,0.0f,0.2f));
  
  			int ypos = 40;
-@@ -333,6 +361,15 @@ public:
+@@ -360,6 +388,15 @@
  			{
- 				options_font.draw_text(gc, 10, ypos, "Audio - Disabled. Press 'A' to modify");
+ 				options_font.draw_text(gc, 10, ypos, "Audio - Disabled. Press 'A' to toggle");
  			}
 +			ypos += 50;
 +			if (GLOBAL_FullScreenEnable)
diff --git a/methane-help.desktop b/methane-help.desktop
index 4bcc7a6..fd56ce9 100644
--- a/methane-help.desktop
+++ b/methane-help.desktop
@@ -1,7 +1,7 @@
 [Desktop Entry]
 Name=Super Methane Brothers Documentation
 Exec=xdg-open file:///usr/share/doc/methane-version/docs/info.html
-Icon=methane-help
+Icon=help-contents
 Terminal=false
 StartupNotify=true
 Type=Application
diff --git a/methane-highscore.patch b/methane-highscore.patch
index d8c261e..7ccf414 100644
--- a/methane-highscore.patch
+++ b/methane-highscore.patch
@@ -1,18 +1,16 @@
-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 @@
+--- methane-1.5.1/sources/doc.cpp	2011-04-05 09:08:02.000000000 +0200
++++ methane-1.5.1.new/sources/doc.cpp	2011-12-11 13:35:23.888049882 +0100
+@@ -15,6 +15,9 @@
  #include "doc.h"
  #include "target.h"
  #include "snddef.h"
 +#include <stdio.h>
- 
-+extern FILE *methanescoresfptr;
 +
++extern FILE *methanescoresfptr;
+ 
  //------------------------------------------------------------------------------
  //! \brief Initialise Document
- //!
-@@ -110,28 +112,13 @@ void CMethDoc::DisplayOptions( CL_Displa
+@@ -110,28 +113,14 @@
  //------------------------------------------------------------------------------
  void CMethDoc::LoadScores(void)
  {
@@ -43,10 +41,11 @@ diff -up methane-1.5.0/sources/doc.cpp~ methane-1.5.0/sources/doc.cpp
 +	rewind(methanescoresfptr);
 +	ign = fread(m_GameTarget.m_Game.m_HiScores, sizeof(HISCORES),
 +		    MAX_HISCORES, methanescoresfptr);
++	ign++;
  }
  
  //------------------------------------------------------------------------------
-@@ -139,21 +126,11 @@ void CMethDoc::LoadScores(void)
+@@ -139,21 +128,12 @@
  //------------------------------------------------------------------------------
  void CMethDoc::SaveScores(void)
  {
@@ -73,21 +72,10 @@ diff -up methane-1.5.0/sources/doc.cpp~ methane-1.5.0/sources/doc.cpp
 +	rewind(methanescoresfptr);
 +	ign = fwrite(m_GameTarget.m_Game.m_HiScores, sizeof(HISCORES),
 +		     MAX_HISCORES, methanescoresfptr);
++	ign++;
 +}
-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>
- 
- //------------------------------------------------------------------------------
- // 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
+--- methane-1.5.1/sources/methane.cpp	2011-04-05 09:08:02.000000000 +0200
++++ methane-1.5.1.new/sources/methane.cpp	2011-12-11 13:38:30.252055844 +0100
 @@ -12,6 +12,14 @@
  //------------------------------------------------------------------------------
  // Methane brothers main source file
@@ -103,16 +91,16 @@ diff -up methane-1.5.0/sources/methane.cpp~ methane-1.5.0/sources/methane.cpp
  #include <ClanLib/core.h>
  #include <ClanLib/application.h>
  #include <ClanLib/display.h>
-@@ -24,6 +31,8 @@
+@@ -25,6 +33,8 @@
  
  #include "doc.h"
  
 +FILE *methanescoresfptr = NULL;
 +
- RenderTarget GLOBAL_RenderTarget = opengl;
+ RenderTarget GLOBAL_RenderTarget = opengl2;
  bool GLOBAL_SoundEnable = true;
  
-@@ -236,6 +245,8 @@ public:
+@@ -238,6 +248,8 @@
  				last_time = last_time + game_speed; 
  			}
  			Game.SaveScores();
@@ -121,7 +109,7 @@ diff -up methane-1.5.0/sources/methane.cpp~ methane-1.5.0/sources/methane.cpp
  		}
  		catch(CL_Exception& exception)
  		{
-@@ -340,6 +351,15 @@ class Program
+@@ -367,6 +379,15 @@
  public:
  	static int main(const std::vector<CL_String> &args)
  	{
diff --git a/methane.png b/methane.png
index 7ad2d2b..e30510f 100644
Binary files a/methane.png and b/methane.png differ
diff --git a/methane.spec b/methane.spec
index 4d81f63..f4dcb15 100644
--- a/methane.spec
+++ b/methane.spec
@@ -1,6 +1,6 @@
 Name:           methane
-Version:        1.5.0
-Release:        4%{?dist}
+Version:        1.5.1
+Release:        1%{?dist}
 Summary:        Super Methane Brothers
 Group:          Amusements/Games
 License:        GPLv2+
@@ -9,12 +9,10 @@ Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz
 Source1:        %{name}.desktop
 Source2:        %{name}-help.desktop
 Source3:        %{name}.png
-Source4:        %{name}-help.png
 Patch1:         methane-highscore.patch
 Patch2:         methane-fullscreen.patch
-Patch3:         methane-1.5.0-opengl1.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires:  ClanLib-devel >= 2.1 desktop-file-utils
+Patch3:         methane-1.5.1-clanlib-23.patch
+BuildRequires:  ClanLib-devel >= 2.3 desktop-file-utils
 Requires:       hicolor-icon-theme opengl-games-utils
 
 %description
@@ -26,7 +24,7 @@ its original author.
 %setup -q
 %patch1 -p1 -z .highscore
 %patch2 -p1 -z .fullscreen
-%patch3 -p1 -z .gl1
+%patch3 -p1
 # put the correct version in methane-help.desktop
 cat %{SOURCE2} | sed s/version/%{version}/ > %{name}-help.desktop
 
@@ -36,7 +34,6 @@ make CXXFLAGS="$RPM_OPT_FLAGS"
 
 
 %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
@@ -53,42 +50,40 @@ desktop-file-install --vendor fedora            \
 desktop-file-install --vendor fedora            \
   --dir $RPM_BUILD_ROOT%{_datadir}/applications \
   %{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
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps
+install -p -m 644 %{SOURCE3} \
+  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps
 
 
 %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
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
 %postun
-touch --no-create %{_datadir}/icons/hicolor || :
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
-   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+if [ $1 -eq 0 ] ; then
+    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 fi
 
+%posttrans
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
 
 %files
-%defattr(-,root,root,-)
 %doc authors.txt copying.txt docs history.txt readme.txt
 %attr(2755,root,games) %{_bindir}/%{name}
 %{_bindir}/%{name}-wrapper
 %{_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
+%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
 %verify(not md5 size mtime) %config(noreplace) %attr(664,root,games) %{_var}/games/%{name}.scores
 
 
 %changelog
+* Sun Dec 11 2011 Hans de Goede <hdegoede at redhat.com> - 1.5.1-1
+- New upstream release 1.5.1
+- Improve (make high res) icons
+
 * Tue Dec 06 2011 Adam Jackson <ajax at redhat.com> - 1.5.0-4
 - Rebuild for new libpng
 
diff --git a/sources b/sources
index 78e8bb0..548d22c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-59d23dadff7b1a23dad05282aaaf6293  methane-1.5.0.tgz
+7e4258e326478678c2332388eab2ed14  methane-1.5.1.tgz


More information about the scm-commits mailing list