commit:     622178a43687a38321af43de225f6faa236e6445
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 23 09:35:31 2018 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Tue Jan 23 09:35:31 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=622178a4

games-emulation/snes9x: Fix broken build system

Closes: https://bugs.gentoo.org/645330
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 .../snes9x/files/snes9x-1.55-build-system.patch    | 63 ++++++++++++++++++++++
 games-emulation/snes9x/snes9x-1.55.ebuild          |  5 +-
 2 files changed, 67 insertions(+), 1 deletion(-)

diff --git a/games-emulation/snes9x/files/snes9x-1.55-build-system.patch 
b/games-emulation/snes9x/files/snes9x-1.55-build-system.patch
new file mode 100644
index 00000000000..30811ef421e
--- /dev/null
+++ b/games-emulation/snes9x/files/snes9x-1.55-build-system.patch
@@ -0,0 +1,63 @@
+--- a/gtk/configure.ac
++++ b/gtk/configure.ac
+@@ -33,7 +33,7 @@
+ 
+ AM_GLIB_GNU_GETTEXT
+ 
+-snes9xlocaledir='${prefix}/${DATADIRNAME}/locale'
++snes9xlocaledir='$(localedir)'
+ AC_SUBST(snes9xlocaledir)
+ 
+ AC_ARG_WITH(debug,
+--- a/unix/configure.ac
++++ b/unix/configure.ac
+@@ -56,49 +56,6 @@
+ # *** Execution begins here ***
+ # *****************************
+ 
+-# Remove -g and -O2 flags manually.
+-
+-if test "x$CFLAGS" != "x"; then
+-      CFLAGS="`echo \"$CFLAGS\" | sed -e 's/-g//'`"
+-      CFLAGS="`echo \"$CFLAGS\" | sed -e 's/-O2//'`"
+-fi
+-
+-if test "x$CXXFLAGS" != "x"; then
+-      CXXFLAGS="`echo \"$CXXFLAGS\" | sed -e 's/-g//'`"
+-      CXXFLAGS="`echo \"$CXXFLAGS\" | sed -e 's/-O2//'`"
+-fi
+-
+-# Test what compiler flags we should use.
+-
+-AC_ARG_ENABLE([debug],
+-      [AS_HELP_STRING([--enable-debug],
+-              [leave debug information in the final binary (default: no)])],
+-      [], [enable_debug="no"])
+-
+-if test "x$enable_debug" = "xyes"; then
+-      AC_S9X_COMPILER_FLAG([-g],  [g])
+-      AC_S9X_COMPILER_FLAG([-O0], [o0])
+-else
+-      AC_S9X_COMPILER_FLAG([-O3], [o3], [
+-              AC_S9X_COMPILER_FLAG([-O2], [o2], [
+-                      AC_S9X_COMPILER_FLAG([-O1], [o1])])])
+-      AC_S9X_COMPILER_FLAG([-fomit-frame-pointer], [omit_frame_pointer])
+-fi
+-
+-AC_ARG_ENABLE([mtune],
+-      [AS_HELP_STRING([--enable-mtune],
+-              [use the specified value for the -mtune/-mcpu flag (default: 
no)])],
+-      [], [enable_mtune="no"])
+-
+-if test "x$enable_mtune" != "xno"; then
+-      AC_S9X_COMPILER_FLAG([-mtune="$enable_mtune"], [mtune],
+-      [
+-              AC_MSG_WARN([-mtune failed, trying -mcpu...])
+-              AC_S9X_COMPILER_FLAG([-mcpu="$enable_mtune"], [mcpu],
+-                      [AC_MSG_ERROR([Please specify a working value for 
--enable-mtune.])])
+-      ])
+-fi
+-
+ AC_S9X_COMPILER_FLAG([-fno-exceptions],       [no_exceptions])
+ AC_S9X_COMPILER_FLAG([-fno-rtti],             [no_rtti])
+ AC_S9X_COMPILER_FLAG([-pedantic],             [pedantic])

diff --git a/games-emulation/snes9x/snes9x-1.55.ebuild 
b/games-emulation/snes9x/snes9x-1.55.ebuild
index cf70b572d8c..ba25e25b642 100644
--- a/games-emulation/snes9x/snes9x-1.55.ebuild
+++ b/games-emulation/snes9x/snes9x-1.55.ebuild
@@ -40,7 +40,10 @@ DEPEND="${RDEPEND}
 
 S="${WORKDIR}/${P}/unix"
 
-PATCHES=( "${FILESDIR}"/${PN}-1.53-cross-compile.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.53-cross-compile.patch
+       "${FILESDIR}"/${PN}-1.55-build-system.patch
+)
 
 src_prepare() {
        cd "${WORKDIR}"/${P} || die

Reply via email to