commit 4a32a67bb4fb36fdfb427a09c60d83a589b09ab3
Author: Hans de Goede <hdegoede(a)redhat.com>
Date: Thu Jul 7 21:24:47 2016 +0200
Fix building with gcc6 / fix FTBFS
vbam-1.8.0.1229-gcc6.patch | 42 ++++++++++++++++++++++++++++++++++++++++++
vbam.spec | 7 ++++++-
2 files changed, 48 insertions(+), 1 deletion(-)
---
diff --git a/vbam-1.8.0.1229-gcc6.patch b/vbam-1.8.0.1229-gcc6.patch
new file mode 100644
index 0000000..071c0f9
--- /dev/null
+++ b/vbam-1.8.0.1229-gcc6.patch
@@ -0,0 +1,42 @@
+diff -up vbam-1.8.0.1229/fex/fex/blargg_common.h~
vbam-1.8.0.1229/fex/fex/blargg_common.h
+--- vbam-1.8.0.1229/fex/fex/blargg_common.h~ 2014-04-05 18:22:07.000000000 +0200
++++ vbam-1.8.0.1229/fex/fex/blargg_common.h 2016-07-07 21:08:00.998100478 +0200
+@@ -12,7 +12,7 @@
+ typedef const char* blargg_err_t; // 0 on success, otherwise error string
+
+ // Success; no error
+-int const blargg_ok = 0;
++const blargg_err_t blargg_ok = NULL;
+
+ // BLARGG_RESTRICT: equivalent to C99's restrict, where supported
+ #if __GNUC__ >= 3 || _MSC_VER >= 1100
+diff -up vbam-1.8.0.1229/src/sdl/expr.cpp~ vbam-1.8.0.1229/src/sdl/expr.cpp
+--- vbam-1.8.0.1229/src/sdl/expr.cpp~ 2014-04-05 18:22:07.000000000 +0200
++++ vbam-1.8.0.1229/src/sdl/expr.cpp 2016-07-07 21:17:18.145720777 +0200
+@@ -90,12 +90,10 @@
+ /* Copy the first part of user declarations. */
+ #line 1 "expr.ypp"
+
+-namespace std {
+ #include <stdio.h>
+ #include <memory.h>
+ #include <stdlib.h>
+ #include <string.h>
+-}
+
+ using namespace std;
+
+diff -up vbam-1.8.0.1229/src/sdl/expr.ypp~ vbam-1.8.0.1229/src/sdl/expr.ypp
+--- vbam-1.8.0.1229/src/sdl/expr.ypp~ 2014-04-05 18:22:07.000000000 +0200
++++ vbam-1.8.0.1229/src/sdl/expr.ypp 2016-07-07 21:14:14.865529840 +0200
+@@ -1,10 +1,8 @@
+ %{
+-namespace std {
+ #include <stdio.h>
+ #include <memory.h>
+ #include <stdlib.h>
+ #include <string.h>
+-}
+
+ using namespace std;
+
diff --git a/vbam.spec b/vbam.spec
index f969c54..cae7f75 100644
--- a/vbam.spec
+++ b/vbam.spec
@@ -1,7 +1,7 @@
Name: vbam
#Pre-release version 1.8.0.1228 is a snapshot of svn 1229
Version: 1.8.0.1229
-Release: 2%{?dist}
+Release: 3%{?dist}
#Will not create a binary vbam package, only vbam-gtk and vbam-sdl subpackages
Summary: High compatibility Gameboy Advance Emulator combining VBA developments
@@ -13,6 +13,7 @@ Url:
http://www.vba-m.com
Source: vbam-%{version}.tar.xz
#Kudos to Michael Schwendt and Hans de Goede (updates paths for compat-SFML16-devel):
Patch0: %{name}-%{version}-includedir.patch
+Patch1: %{name}-%{version}-gcc6.patch
BuildRequires: SDL-devel
BuildRequires: zip
BuildRequires: ImageMagick
@@ -83,6 +84,7 @@ Advance project, with many improvements from various developments of
VBA.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
sed -i '/CMAKE_C.*_FLAGS/d' CMakeLists.txt
#Typos in desktop file:
#https://sourceforge.net/p/vbam/bugs/159/
@@ -137,6 +139,9 @@ fi
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
+* Thu Jul 7 2016 Hans de Goede <j.w.r.degoede(a)gmail.com> - 1.8.0.1229-3
+- Fix building with gcc6 / fix FTBFS
+
* Mon Jan 12 2015 Jeremy Newton <alexjnewt(a)hotmail.com> - 1.8.0.1229-2
- Fix typo in desktop file