From 3dd65bc466201467acd25304ba006885eea355d2 Mon Sep 17 00:00:00 2001
From: Link Dupont
Date: Wed, 13 Sep 2017 21:15:04 -0700
Subject: [PATCH] remove endless-sky-0.9.4-std-gnu++11.patch; use gnu++11 only
on ppc64le
---
endless-sky-0.9.4-remove-additional-ccflags.patch | 11 +++++------
endless-sky-0.9.4-std-gnu++11.patch | 11 -----------
endless-sky.spec | 14 +++++++++-----
3 files changed, 14 insertions(+), 22 deletions(-)
delete mode 100644 endless-sky-0.9.4-std-gnu++11.patch
diff --git a/endless-sky-0.9.4-remove-additional-ccflags.patch b/endless-sky-0.9.4-remove-additional-ccflags.patch
index 3a194b5..7620701 100644
--- a/endless-sky-0.9.4-remove-additional-ccflags.patch
+++ b/endless-sky-0.9.4-remove-additional-ccflags.patch
@@ -1,11 +1,10 @@
-diff -up ./SConstruct.orig ./SConstruct
---- ./SConstruct.orig 2017-01-01 22:16:40.914893288 -0800
-+++ ./SConstruct 2017-01-01 22:22:26.934720111 -0800
-@@ -22,14 +22,7 @@ opts.Update(env)
+--- SConstruct.orig 2017-09-13 20:00:51.154361127 -0700
++++ SConstruct 2017-09-13 20:24:45.396884800 -0700
+@@ -25,14 +25,7 @@
Help(opts.GenerateHelpText(env))
--flags = ["-std=gnu++11", "-Wall"]
+-flags = ["-std=c++11", "-Wall"]
-if env["mode"] != "debug":
- flags += ["-O3"]
-if env["mode"] == "debug":
@@ -13,7 +12,7 @@ diff -up ./SConstruct.orig ./SConstruct
-if env["mode"] == "profile":
- flags += ["-pg"]
- env.Append(LINKFLAGS = ["-pg"])
-+flags = ["-std=gnu++11"]
++flags = ["-std=c++11"]
# Required build flags. If you want to use SSE optimization, you can turn on
# -msse3 or (if just building for your own computer) -march=native.
diff --git a/endless-sky-0.9.4-std-gnu++11.patch b/endless-sky-0.9.4-std-gnu++11.patch
deleted file mode 100644
index 1d06db7..0000000
--- a/endless-sky-0.9.4-std-gnu++11.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- SConstruct.orig2 2016-10-04 05:44:52.000000000 -0700
-+++ SConstruct 2016-10-31 23:09:20.880648829 -0700
-@@ -22,7 +22,7 @@
-
- Help(opts.GenerateHelpText(env))
-
--flags = ["-std=c++11", "-Wall"]
-+flags = ["-std=gnu++11", "-Wall"]
- if env["mode"] != "debug":
- flags += ["-O3"]
- if env["mode"] == "debug":
diff --git a/endless-sky.spec b/endless-sky.spec
index c0696ed..f4f6e92 100644
--- a/endless-sky.spec
+++ b/endless-sky.spec
@@ -2,7 +2,7 @@
Name: endless-sky
Version: 0.9.8
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Space exploration, trading, and combat game
License: GPLv3
@@ -13,11 +13,8 @@ Source0: https://github.com/%{name}/%{name}/archive/%{gittag0}.tar.gz#/%{name}-%
# Patch not submitted upstream. Upstream conforms to Debian packaging
# standards where the use of /usr/games is acceptable.
Patch0: endless-sky-0.8.10-remove-games-path.patch
-# Use gnu++11 standard instead of c++11. Fixes a FTBFS issue on ppc64le.
-# https://github.com/endless-sky/endless-sky/pull/1804
-Patch1: endless-sky-0.9.4-std-gnu++11.patch
# Unset CCFLAGS override inside SConstruct.
-Patch2: endless-sky-0.9.4-remove-additional-ccflags.patch
+Patch1: endless-sky-0.9.4-remove-additional-ccflags.patch
Requires: %{name}-data = %{version}-%{release}
BuildRequires: scons
@@ -56,6 +53,9 @@ Images, sound, and game data for %{name}.
%build
+%ifarch ppc64le
+sed -i 's/std=c++11/std=gnu++11/' SConstruct
+%endif
CCFLAGS="%{optflags}" \
LDFLAGS="%{?__global_ldflags}" \
%{_bindir}/scons \
@@ -112,6 +112,10 @@ fi
%changelog
+* Wed Sep 13 2017 Link Dupont - 0.9.8-2
+- Remove GNU C++ extensions patch
+- Only use GNU C++ extensions when building on ppc64le
+
* Mon Aug 21 2017 Link Dupont - 0.9.8-1
- New upstream release (RH#1473666)