summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Clark2016-05-23 11:02:24 -0500
committerJeffrey Clark2016-05-23 11:02:24 -0500
commit2784ec65b0c74e1b1c25f269d89c6e5ae67f17f0 (patch)
treeede16bdc86d8026fb97d01f9ab5bf812c3054d25
parent5899ea6492fdb3a22c9f3ee230d2cb6a9806047a (diff)
downloadaur-2784ec65b0c74e1b1c25f269d89c6e5ae67f17f0.tar.gz
patch to support gcc 6 support (in next upstream release)
-rw-r--r--.SRCINFO6
-rw-r--r--0001-fix-build-when-TR1-enabled.patch40
-rw-r--r--PKGBUILD8
3 files changed, 51 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 19e0c584f016..0b54e8c24044 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Fri Apr 29 17:31:13 UTC 2016
+# Mon May 23 16:01:15 UTC 2016
pkgbase = attract
pkgdesc = A graphical front-end for command line emulators that hides the underlying operating system and is intended to be controlled with a joystick or gamepad.
pkgver = 2.0.0
- pkgrel = 1
+ pkgrel = 2
url = http://www.attractmode.org/
install = attract.install
arch = i686
@@ -19,11 +19,13 @@ pkgbase = attract
provides = attract
conflicts = attractmode-git
source = https://github.com/mickelson/attract/archive/v2.0.0.tar.gz
+ source = 0001-fix-build-when-TR1-enabled.patch
source = https://github.com/mickelson/attract/releases/download/v1.6.2/ATTRACT.MODE.intro.16-9.v6.1080p.mp4
source = https://github.com/mickelson/attract/releases/download/v1.6.2/ATTRACT.MODE.intro.4-3.v6.1080p.mp4
source = attract.desktop
source = attract.install
sha1sums = f658c5eb69ca405e2b0764e9365d1c5a5ff1e57a
+ sha1sums = cc6294a66c3e88861a7bb17eaba1edaabc095317
sha1sums = 37885c5f2e6194e689c36eb88c43bd5bb23363d0
sha1sums = 445bb161b9c06749347974b6c19c846d86b00ceb
sha1sums = cf599edbff2962b5ff0a77560a95d80cec828264
diff --git a/0001-fix-build-when-TR1-enabled.patch b/0001-fix-build-when-TR1-enabled.patch
new file mode 100644
index 000000000000..ab381a7091ef
--- /dev/null
+++ b/0001-fix-build-when-TR1-enabled.patch
@@ -0,0 +1,40 @@
+From 2220b6cab905a4e96e1508bc2f9bb2d6c844d1dc Mon Sep 17 00:00:00 2001
+From: Jeffrey Clark <h0tw1r3@users.noreply.github.com>
+Date: Sat, 21 May 2016 17:33:02 -0500
+Subject: [PATCH 1/1] fix build when TR1 enabled
+
+appears to be the default with g++ 6
+---
+ extlibs/gameswf/base/utility.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/extlibs/gameswf/base/utility.h b/extlibs/gameswf/base/utility.h
+index 116cec7..28e7727 100644
+--- a/extlibs/gameswf/base/utility.h
++++ b/extlibs/gameswf/base/utility.h
+@@ -81,9 +81,11 @@ void operator delete[](void* ptr);
+ inline int64 i64abs(int64 i) { if (i < 0) return -i; else return i; }
+ inline int iabs(int i) { if (i < 0) return -i; else return i; }
+ inline int imax(int a, int b) { if (a < b) return b; else return a; }
+-inline float fmax(float a, float b) { if (a < b) return b; else return a; }
+ inline int imin(int a, int b) { if (a < b) return a; else return b; }
++#ifndef _GLIBCXX_USE_C99_MATH_TR1
+ inline float fmin(float a, float b) { if (a < b) return a; else return b; }
++inline float fmax(float a, float b) { if (a < b) return b; else return a; }
++#endif
+
+
+ inline int iclamp(int i, int min, int max) {
+@@ -99,7 +101,9 @@ inline float fclamp(float f, float xmin, float xmax) {
+ inline float flerp(float a, float b, float f) { return (b - a) * f + a; }
+
+ const float LN_2 = 0.693147180559945f;
++#ifndef _GLIBCXX_USE_C99_MATH_TR1
+ inline float log2(float f) { return logf(f) / LN_2; }
++#endif
+
+ inline int fchop( float f ) { return (int) f; } // replace w/ inline asm if desired
+ inline int frnd(float f) { return fchop(f + 0.5f); } // replace with inline asm if desired
+--
+2.8.2
+
diff --git a/PKGBUILD b/PKGBUILD
index 54ee40bf78b2..f59798ed1fca 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=attract
pkgver=2.0.0
-pkgrel=1
+pkgrel=2
pkgdesc="A graphical front-end for command line emulators that hides the underlying operating system and is intended to be controlled with a joystick or gamepad."
arch=('i686' 'x86_64')
url="http://www.attractmode.org/"
@@ -12,17 +12,23 @@ makedepends=('git')
provides=('attract')
conflicts=('attractmode-git')
source=("https://github.com/mickelson/${pkgname}/archive/v${pkgver}.tar.gz"
+ "0001-fix-build-when-TR1-enabled.patch"
"https://github.com/mickelson/${pkgname}/releases/download/v1.6.2/ATTRACT.MODE.intro.16-9.v6.1080p.mp4"
"https://github.com/mickelson/${pkgname}/releases/download/v1.6.2/ATTRACT.MODE.intro.4-3.v6.1080p.mp4"
attract.desktop
attract.install)
sha1sums=('f658c5eb69ca405e2b0764e9365d1c5a5ff1e57a'
+ 'cc6294a66c3e88861a7bb17eaba1edaabc095317'
'37885c5f2e6194e689c36eb88c43bd5bb23363d0'
'445bb161b9c06749347974b6c19c846d86b00ceb'
'cf599edbff2962b5ff0a77560a95d80cec828264'
'284afdf55086f2a626d5ab617240ff74cea30f53')
install=attract.install
+prepare() {
+ patch -N -p1 -d "${pkgname}-${pkgver}" -i ../0001-fix-build-when-TR1-enabled.patch
+}
+
build() {
cd "${pkgname}-${pkgver}"
VERSION="$pkgver" make prefix=/usr