[spring/f17] fix build with gcc 4.7, update to 88

Tom Callaway spot at fedoraproject.org
Wed Apr 4 16:02:04 UTC 2012


commit b254948dd8fb097844c02faf85961ce47be64b26
Author: Tom Callaway <spot at fedoraproject.org>
Date:   Wed Apr 4 12:02:02 2012 -0400

    fix build with gcc 4.7, update to 88

 sources                 |    2 +-
 spring.spec             |   14 ++++++++++++--
 spring_88.0-gcc47.patch |   39 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+), 3 deletions(-)
---
diff --git a/sources b/sources
index c88abce..91cd9de 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-8dc5bfbd95a8fbfc41a07808438fa1aa  spring_87.0_src.tar.lzma
+151bf483f1c3b801b4cede6f02d79ea9  spring_88.0_src.tar.lzma
diff --git a/spring.spec b/spring.spec
index 2449df1..751d6da 100644
--- a/spring.spec
+++ b/spring.spec
@@ -1,6 +1,6 @@
 Name:			spring
-Version:		87.0
-Release:		1%{?dist}
+Version:		88.0
+Release:		2%{?dist}
 Summary:		Multiplayer, 3D realtime strategy combat game
 
 Group:			Amusements/Games
@@ -16,6 +16,7 @@ URL:			http://springrts.com
 Source0:		http://downloads.sourceforge.net/project/springrts/springrts/spring-%{version}/spring_%{version}_src.tar.lzma
 Source1:		spring-README.Fedora
 Patch0:			spring-83-dso.patch
+Patch1:			spring_88.0-gcc47.patch
 
 BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -24,6 +25,8 @@ BuildRequires:	glew-devel libvorbis-devel DevIL-ILUT-devel
 BuildRequires:	freetype-devel python-devel allegro-devel zip
 BuildRequires:	java-devel-openjdk p7zip-plugins
 BuildRequires:	desktop-file-utils
+# When assimp goes into Fedora, unbundle it here and use the system copy.
+#BuildRequires:	assimp-devel
 # Man page generation
 BuildRequires:	libxslt asciidoc docbook-style-xsl
 
@@ -55,6 +58,7 @@ great resource, read it here: http://spring.clan-sy.com/wiki/Main_Page
 
 # Compile patches.
 %patch0 -p0 -b .spring-83-dso-fix
+%patch1 -p1 -b .gcc47
 
 cp -p %{SOURCE1} README.Fedora
 touch ./rts/build/cmake/FindAllegro.cmake
@@ -148,6 +152,12 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Wed Apr  4 2012 Tom Callaway <spot at fedoraproject.org> - 88.0-2
+- fix compile with gcc 4.7
+
+* Sat Mar 24 2012 Gilboa Davara <gilboad [AT] gmail [DOT] com> - 88.0-1
+- 88.0: Upstream bugfix release.
+
 * Mon Mar 07 2012 Gilboa Davara <gilboad [AT] gmail [DOT] com> - 87.0-1
 - 87.0: Upstream bugfix release.
 
diff --git a/spring_88.0-gcc47.patch b/spring_88.0-gcc47.patch
new file mode 100644
index 0000000..c57a03d
--- /dev/null
+++ b/spring_88.0-gcc47.patch
@@ -0,0 +1,39 @@
+diff -up spring_88.0/rts/lib/assimp/code/PolyTools.h.gcc47 spring_88.0/rts/lib/assimp/code/PolyTools.h
+--- spring_88.0/rts/lib/assimp/code/PolyTools.h.gcc47	2012-04-04 11:43:38.434398485 -0400
++++ spring_88.0/rts/lib/assimp/code/PolyTools.h	2012-04-04 11:45:42.999305007 -0400
+@@ -47,6 +47,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ namespace Assimp {
+ 
+ // -------------------------------------------------------------------------------
++/** Compute the signed area of a triangle.
++ *  The function accepts an unconstrained template parameter for use with
++ *  both aiVector3D and aiVector2D, but generally ignores the third coordinate.*/
++template <typename T>
++inline double GetArea2D(const T& v1, const T& v2, const T& v3)
++{
++	return 0.5 * (v1.x * ((double)v3.y - v2.y) + v2.x * ((double)v1.y - v3.y) + v3.x * ((double)v2.y - v1.y));
++}
++
++// -------------------------------------------------------------------------------
+ /** Test if a given point p2 is on the left side of the line formed by p0-p1.
+  *  The function accepts an unconstrained template parameter for use with
+  *  both aiVector3D and aiVector2D, but generally ignores the third coordinate.*/
+@@ -81,18 +91,6 @@ inline bool PointInTriangle2D(const T& p
+ 	return (dot11 > 0) && (dot00 > 0) && (dot11 + dot00 < 1);
+ }
+ 
+-
+-// -------------------------------------------------------------------------------
+-/** Compute the signed area of a triangle.
+- *  The function accepts an unconstrained template parameter for use with
+- *  both aiVector3D and aiVector2D, but generally ignores the third coordinate.*/
+-template <typename T>
+-inline double GetArea2D(const T& v1, const T& v2, const T& v3) 
+-{
+-	return 0.5 * (v1.x * ((double)v3.y - v2.y) + v2.x * ((double)v1.y - v3.y) + v3.x * ((double)v2.y - v1.y));
+-}
+-
+-
+ // -------------------------------------------------------------------------------
+ /** Check whether the winding order of a given polygon is counter-clockwise.
+  *  The function accepts an unconstrained template parameter, but is intended 


More information about the scm-commits mailing list