[SCM] advanced 3D real time strategy game engine branch, master, updated. debian/85.0+dfsg1-3-15-g0891b9e

Jan Dittberner jandd at debian.org
Tue Apr 10 11:23:03 UTC 2012


The following commit has been merged in the master branch:
commit 0891b9e0a47534af4a07de58d67510462c7076e6
Author: Jan Dittberner <jandd at debian.org>
Date:   Tue Apr 10 11:56:03 2012 +0200

    Fix FTBFS with gcc 4.7 by declaring GetArea2D before it's used (Closes: #667379), thanks for the patch to Cyril Brulebois.

diff --git a/debian/changelog b/debian/changelog
index 5c3f617..2503a9a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+spring (88.0+dfsg1-2) UNRELEASED; urgency=low
+
+  * Fix FTBFS with gcc 4.7 by declaring GetArea2D before it's used
+    (Closes: #667379), thanks for the patch to Cyril Brulebois.
+
+ -- Jan Dittberner <jandd at debian.org>  Tue, 10 Apr 2012 11:52:09 +0200
+
 spring (88.0+dfsg1-1) unstable; urgency=low
 
   [ Jan Dittberner ]
diff --git a/debian/patches/0007-fix-FTBFS-with-gcc-4.7.patch b/debian/patches/0007-fix-FTBFS-with-gcc-4.7.patch
new file mode 100644
index 0000000..94d09ba
--- /dev/null
+++ b/debian/patches/0007-fix-FTBFS-with-gcc-4.7.patch
@@ -0,0 +1,42 @@
+Subject: fix FTBFS with g++ 4.7 due to wrong order of includes
+From: Cyril Brulebois <kibi at debian.org>
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667379
+Bug: http://springrts.com/mantis/view.php?id=3053
+--- a/rts/lib/assimp/code/PolyTools.h
++++ b/rts/lib/assimp/code/PolyTools.h
+@@ -47,6 +47,17 @@ 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.*/
+@@ -82,17 +93,6 @@ inline bool PointInTriangle2D(const T& p
+ }
+ 
+ 
+-// -------------------------------------------------------------------------------
+-/** 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 
diff --git a/debian/patches/series b/debian/patches/series
index a949cf3..763bda0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 0003-fix-cmake-2_8-java-build.patch
 0005-fix-sdl-build.patch
 0006-fix-boost.1.48-compilation.patch
+0007-fix-FTBFS-with-gcc-4.7.patch

-- 
advanced 3D real time strategy game engine



More information about the Pkg-games-commits mailing list