[arch-commits] Commit in snes9x/trunk (PKGBUILD snes9x-buildflags.patch)

Antonio Rojas arojas at archlinux.org
Sun Nov 26 18:26:52 UTC 2017


    Date: Sunday, November 26, 2017 @ 18:26:51
  Author: arojas
Revision: 268955

Honor build flags (FS#53908)

Added:
  snes9x/trunk/snes9x-buildflags.patch
Modified:
  snes9x/trunk/PKGBUILD

-------------------------+
 PKGBUILD                |   15 ++++++++++--
 snes9x-buildflags.patch |   54 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-11-26 18:17:36 UTC (rev 268954)
+++ PKGBUILD	2017-11-26 18:26:51 UTC (rev 268955)
@@ -4,15 +4,24 @@
 pkgbase=snes9x
 pkgname=('snes9x' 'snes9x-gtk')
 pkgver=1.55
-pkgrel=1
+pkgrel=2
 arch=('x86_64')
 url="http://www.snes9x.com/"
 license=('custom')
 makedepends=('intltool' 'nasm' 'mesa' 'libpulse'  'libpng' 'sdl' 'gtk2' 'libxv'
              'adwaita-icon-theme' 'minizip')
-source=(https://github.com/snes9xgit/snes9x/archive/$pkgver.tar.gz)
-sha1sums=('366d14f77f70e6eb7b4fac24cde6d79fcfc0add3')
+source=(https://github.com/snes9xgit/snes9x/archive/$pkgver.tar.gz snes9x-buildflags.patch)
+sha1sums=('366d14f77f70e6eb7b4fac24cde6d79fcfc0add3'
+          'a1b68aaa710ee261a3e9ee1a80e9a82864f14374')
 
+prepare() {
+  cd $pkgbase-$pkgver
+  # Respect build flags (rmpfusion)
+  patch -p1 -i ../snes9x-buildflags.patch
+  cd unix
+  autoreconf -vi
+}
+
 build() {
   cd ${pkgbase}-${pkgver}/unix
   ./configure --prefix=/usr --enable-netplay

Added: snes9x-buildflags.patch
===================================================================
--- snes9x-buildflags.patch	                        (rev 0)
+++ snes9x-buildflags.patch	2017-11-26 18:26:51 UTC (rev 268955)
@@ -0,0 +1,54 @@
+diff -durN snes9x-1.54.1.orig/unix/configure.ac snes9x-1.54.1/unix/configure.ac
+--- snes9x-1.54.1.orig/unix/configure.ac	2016-10-15 02:20:34.000000000 +0200
++++ snes9x-1.54.1/unix/configure.ac	2017-02-04 18:52:33.297396407 +0100
+@@ -55,50 +55,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])


More information about the arch-commits mailing list