tag 667379 patch thanks Matthias Klose <d...@debian.org> (03/04/2012): > Package: spring > Version: 85.0+dfsg1-3 > Severity: important > Tags: sid wheezy > User: debian-...@lists.debian.org > Usertags: ftbfs-gcc-4.7
Here's a patch to fix this FTBFS. No intent to NMU here. Mraw, KiBi.
diff -Nru spring-88.0+dfsg1/debian/changelog spring-88.0+dfsg1/debian/changelog --- spring-88.0+dfsg1/debian/changelog 2012-03-31 11:07:41.000000000 +0000 +++ spring-88.0+dfsg1/debian/changelog 2012-04-04 20:51:18.000000000 +0000 @@ -1,3 +1,11 @@ +spring (88.0+dfsg1-1.1) UNRELEASED; urgency=low + + * Non-maintainer upload. + * Fix FTBFS with gcc 4.7 by declaring GetArea2D before it's used + (Closes: #667379). + + -- Cyril Brulebois <k...@debian.org> Wed, 04 Apr 2012 20:50:38 +0000 + spring (88.0+dfsg1-1) unstable; urgency=low [ Jan Dittberner ] diff -Nru spring-88.0+dfsg1/debian/patches/0007-fix-FTBFS-with-gcc-4.7.patch spring-88.0+dfsg1/debian/patches/0007-fix-FTBFS-with-gcc-4.7.patch --- spring-88.0+dfsg1/debian/patches/0007-fix-FTBFS-with-gcc-4.7.patch 1970-01-01 00:00:00.000000000 +0000 +++ spring-88.0+dfsg1/debian/patches/0007-fix-FTBFS-with-gcc-4.7.patch 2012-04-04 20:50:51.000000000 +0000 @@ -0,0 +1,38 @@ +--- 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 -Nru spring-88.0+dfsg1/debian/patches/series spring-88.0+dfsg1/debian/patches/series --- spring-88.0+dfsg1/debian/patches/series 2012-03-31 11:07:41.000000000 +0000 +++ spring-88.0+dfsg1/debian/patches/series 2012-04-04 20:32:25.000000000 +0000 @@ -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
signature.asc
Description: Digital signature