From owner-svn-ports-all@freebsd.org Wed Jul 26 18:53:00 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8F9CDADC34; Wed, 26 Jul 2017 18:53:00 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9A0C729FA; Wed, 26 Jul 2017 18:53:00 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6QIqxjS034544; Wed, 26 Jul 2017 18:52:59 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6QIqxMx034542; Wed, 26 Jul 2017 18:52:59 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201707261852.v6QIqxMx034542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Wed, 26 Jul 2017 18:52:59 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r446693 - in head/games/super_methane_brothers: . files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: in head/games/super_methane_brothers: . files X-SVN-Commit-Revision: 446693 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2017 18:53:01 -0000 Author: jbeich Date: Wed Jul 26 18:52:59 2017 New Revision: 446693 URL: https://svnweb.freebsd.org/changeset/ports/446693 Log: 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 Added: head/games/super_methane_brothers/files/patch-sources_methane.cpp (contents, props changed) Deleted: head/games/super_methane_brothers/files/patch-sources__methane.cpp Modified: head/games/super_methane_brothers/Makefile (contents, props changed) Modified: head/games/super_methane_brothers/Makefile ============================================================================== --- head/games/super_methane_brothers/Makefile Wed Jul 26 18:51:40 2017 (r446692) +++ head/games/super_methane_brothers/Makefile Wed Jul 26 18:52:59 2017 (r446693) @@ -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} Added: head/games/super_methane_brothers/files/patch-sources_methane.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/super_methane_brothers/files/patch-sources_methane.cpp Wed Jul 26 18:52:59 2017 (r446693) @@ -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 + #include + #include ++#ifndef CL_DISABLE_SSE2 + #include ++#endif + #include + #include + #include +@@ -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 setup_sound; +- CL_AutoPtr sound_output; +- CL_AutoPtr setup_mikmod; ++ CL_UniquePtr setup_sound; ++ CL_UniquePtr sound_output; ++ CL_UniquePtr 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(new CL_SetupSound)); ++ sound_output = cl_move(CL_UniquePtr(new CL_SoundOutput(44100))); ++ setup_mikmod = cl_move(CL_UniquePtr(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) + {