[FlightGear] Fix gcc 4.7.0 compile issues in rawhide
Fabrice Bellet
bellet at fedoraproject.org
Sun Jan 22 20:25:03 UTC 2012
commit 328d1af994d4c91b55cac7bf1b4715a8648df436
Author: Fabrice Bellet <fabrice at bellet.info>
Date: Sun Jan 22 21:24:59 2012 +0100
Fix gcc 4.7.0 compile issues in rawhide
FlightGear-2.4.0-gcc47-2.patch | 10 ++++++++++
FlightGear-2.4.0-gcc47-3.patch | 18 ++++++++++++++++++
FlightGear-2.4.0-gcc47.patch | 12 ++++++++++++
FlightGear.spec | 16 +++++++++++++++-
4 files changed, 55 insertions(+), 1 deletions(-)
---
diff --git a/FlightGear-2.4.0-gcc47-2.patch b/FlightGear-2.4.0-gcc47-2.patch
new file mode 100644
index 0000000..82e6c9a
--- /dev/null
+++ b/FlightGear-2.4.0-gcc47-2.patch
@@ -0,0 +1,10 @@
+--- flightgear-2.4.0/utils/TerraSync/terrasync.cxx.terrasync 2012-01-22 00:32:12.931618332 +0100
++++ flightgear-2.4.0/utils/TerraSync/terrasync.cxx 2012-01-22 00:33:10.612724837 +0100
+@@ -42,6 +42,7 @@
+
+ #include <stdlib.h> // atoi() atof() abs() system()
+ #include <signal.h> // signal()
++#include <unistd.h> // sleep() getpid() write()
+
+ #include <simgear/compiler.h>
+
diff --git a/FlightGear-2.4.0-gcc47-3.patch b/FlightGear-2.4.0-gcc47-3.patch
new file mode 100644
index 0000000..8c923c1
--- /dev/null
+++ b/FlightGear-2.4.0-gcc47-3.patch
@@ -0,0 +1,18 @@
+commit 617fb0299b138c6bc2c44fa3621c55cb16ef4258
+Author: James Turner <zakalawe at mac.com>
+Date: Wed Oct 19 10:03:06 2011 +0100
+
+ Merge downstream fix from Gentoo, to deal with libsvn versions.
+
+diff --git a/utils/TerraSync/terrasync.cxx b/utils/TerraSync/terrasync.cxx
+index d15078d..c70fbaa 100644
+--- a/utils/TerraSync/terrasync.cxx
++++ b/utils/TerraSync/terrasync.cxx
+@@ -61,6 +61,7 @@
+ # include <svn_client.h>
+ # include <svn_cmdline.h>
+ # include <svn_pools.h>
++# include <svn_version.h>
+ # else
+ # undef HAVE_SVN_CLIENT_H
+ # endif
diff --git a/FlightGear-2.4.0-gcc47.patch b/FlightGear-2.4.0-gcc47.patch
new file mode 100644
index 0000000..0c177ff
--- /dev/null
+++ b/FlightGear-2.4.0-gcc47.patch
@@ -0,0 +1,12 @@
+diff --git a/src/Environment/presets.cxx b/src/Environment/presets.cxx
+index 55da646..5e31e63 100644
+--- a/src/Environment/presets.cxx
++++ b/src/Environment/presets.cxx
+@@ -24,6 +24,7 @@
+ #endif
+ #include "presets.hxx"
+
++#include <cmath>
+ #include <simgear/math/SGMisc.hxx>
+ #include <Main/fg_props.hxx>
+
diff --git a/FlightGear.spec b/FlightGear.spec
index f10eb20..c607a36 100644
--- a/FlightGear.spec
+++ b/FlightGear.spec
@@ -1,7 +1,7 @@
Name: FlightGear
Summary: The FlightGear Flight Simulator
Version: 2.4.0
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+
Group: Amusements/Games
@@ -15,6 +15,14 @@ Source4: fg-48.png
Source5: fg-64.png
Source6: fg-128.png
Source7: COPYING
+# taken from http://gitorious.org/fg/flightgear/commit/b1b4b7ecf48c4420d4445979c36cbf3f80be616a
+# Should be safe to drop when 2.6.0 lands.
+Patch1: FlightGear-2.4.0-gcc47.patch
+# compile fix of terrasync
+Patch2: FlightGear-2.4.0-gcc47-2.patch
+# http://gitorious.org/fg/flightgear/commit/617fb0299b138c6bc2c44fa3621c55cb16ef4258
+# Should be safe to drop when 2.6.0 lands.
+Patch3: FlightGear-2.4.0-gcc47-3.patch
URL: http://www.flightgear.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: openal-soft-devel >= 1.11.753, SimGear-devel >= %{version}, freeglut-devel
@@ -32,6 +40,9 @@ expanded and improved upon by anyone interested in contributing
%prep
%setup -q -n flightgear-%{version}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
# make rpmlint happy
find -name \*.h -o -name \*.cpp -o -name \*.cxx -o -name \*.hxx \
@@ -109,6 +120,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/icons/hicolor/*/apps/*
%changelog
+* Sat Jan 21 2012 Fabrice Bellet <fabrice at bellet.info> 2.4.0-3
+- Fix gcc 4.7.0 compile issues in rawhide
+
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list