aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2017-07-27 02:52:59 +0800
committerKoop Mast <kwm@rainbow-runner.nl>2018-02-04 05:14:53 +0800
commit7c0e0c4a06bb0c07ca314fe4fa4cb73e5d53c1af (patch)
tree4eb91e8818dcebba70d05ca20a2ad6f004955257 /games
parent6a08ee1f98999867e4f1a4656efb40e76d4c2645 (diff)
downloadfreebsd-ports-gnome-7c0e0c4a06bb0c07ca314fe4fa4cb73e5d53c1af.tar.gz
freebsd-ports-gnome-7c0e0c4a06bb0c07ca314fe4fa4cb73e5d53c1af.tar.zst
freebsd-ports-gnome-7c0e0c4a06bb0c07ca314fe4fa4cb73e5d53c1af.zip
games/super_methane_brothers: unbreak runtime on non-x86 after r446663
$ methane Exception caught: Sorry, clanSWRender requires a processor capable of SSE2 instructions. (Update your CPU) Pointy hat to: jbeich
Diffstat (limited to 'games')
-rw-r--r--games/super_methane_brothers/Makefile2
-rw-r--r--games/super_methane_brothers/files/patch-sources__methane.cpp24
-rw-r--r--games/super_methane_brothers/files/patch-sources_methane.cpp99
3 files changed, 100 insertions, 25 deletions
diff --git a/games/super_methane_brothers/Makefile b/games/super_methane_brothers/Makefile
index 5e66afa2b8b7..3356cb34e315 100644
--- a/games/super_methane_brothers/Makefile
+++ b/games/super_methane_brothers/Makefile
@@ -3,7 +3,7 @@
PORTNAME= super_methane_brothers
PORTVERSION= 1.5.1
-PORTREVISION= 8
+PORTREVISION= 9
CATEGORIES= games
MASTER_SITES= SF/methane/Methane%20Stable/Methane%20V${PORTVERSION}
DISTNAME= methane-${PORTVERSION}
diff --git a/games/super_methane_brothers/files/patch-sources__methane.cpp b/games/super_methane_brothers/files/patch-sources__methane.cpp
deleted file mode 100644
index 0969aa7e2d63..000000000000
--- a/games/super_methane_brothers/files/patch-sources__methane.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
---- sources/methane.cpp.orig 2011-12-11 14:18:38.301132904 +0100
-+++ 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/games/super_methane_brothers/files/patch-sources_methane.cpp b/games/super_methane_brothers/files/patch-sources_methane.cpp
new file mode 100644
index 000000000000..fa2276ea6773
--- /dev/null
+++ b/games/super_methane_brothers/files/patch-sources_methane.cpp
@@ -0,0 +1,99 @@
+--- sources/methane.cpp.orig 2011-04-05 07:08:02 UTC
++++ sources/methane.cpp
+@@ -12,10 +12,17 @@
+ //------------------------------------------------------------------------------
+ // Methane brothers main source file
+ //------------------------------------------------------------------------------
++
++#if !defined(__i386__) && !defined(__x86_64__)
++#define CL_DISABLE_SSE2
++#endif
++
+ #include <ClanLib/core.h>
+ #include <ClanLib/application.h>
+ #include <ClanLib/display.h>
++#ifndef CL_DISABLE_SSE2
+ #include <ClanLib/swrender.h>
++#endif
+ #include <ClanLib/gl.h>
+ #include <ClanLib/gl1.h>
+ #include <ClanLib/sound.h>
+@@ -54,10 +61,14 @@ class SuperMethaneBrothers (public)
+ {
+ CL_SetupGL target_opengl2;
+ CL_SetupGL1 target_opengl1;
++#ifndef CL_DISABLE_SSE2
+ CL_SetupSWRender target_swrender;
+
+ // Since SWRender is compatible and fast - Use that as the default setting options
+ target_swrender.set_current();
++#else
++ target_opengl2.set_current();
++#endif
+
+ if (get_options())
+ {
+@@ -69,9 +80,11 @@ class SuperMethaneBrothers (public)
+ case (opengl1):
+ target_opengl1.set_current();
+ break;
++#ifndef CL_DISABLE_SSE2
+ case (swrender):
+ target_swrender.set_current();
+ break;
++#endif
+ }
+ }
+ else
+@@ -80,15 +93,15 @@ class SuperMethaneBrothers (public)
+ 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
+@@ -302,11 +315,13 @@ class SuperMethaneBrothers (public)
+ LastKey = 0;
+ GLOBAL_RenderTarget = opengl1;
+ }
++#ifndef CL_DISABLE_SSE2
+ if ( (LastKey == 'r') || (LastKey == 'R') )
+ {
+ LastKey = 0;
+ GLOBAL_RenderTarget = swrender;
+ }
++#endif
+
+ gc.clear(CL_Colorf(0.0f,0.0f,0.2f));
+
+@@ -330,6 +345,7 @@ class SuperMethaneBrothers (public)
+ {
+ options_font.draw_text(gc, 10, ypos, "OpenGL V1 - Disabled. Press 'E' to select");
+ }
++#ifndef CL_DISABLE_SSE2
+ ypos += 50;
+ if (GLOBAL_RenderTarget == swrender)
+ {
+@@ -339,6 +355,7 @@ class SuperMethaneBrothers (public)
+ {
+ options_font.draw_text(gc, 10, ypos, "Software Renderer - Disabled. Press 'R' to select");
+ }
++#endif
+ ypos += 100;
+ if (GLOBAL_SoundEnable)
+ {