[armagetronad] 06/14: Add gcc-6-ftbfs.patch and fix FTBFS with GCC-6.

Markus Koschany apo at moszumanska.debian.org
Tue Jul 12 08:47:33 UTC 2016


This is an automated email from the git hooks/post-receive script.

apo pushed a commit to branch master
in repository armagetronad.

commit e5f63d184b4135dfb1847257fc40e65456ab57de
Author: Markus Koschany <apo at debian.org>
Date:   Tue Jul 12 08:30:06 2016 +0200

    Add gcc-6-ftbfs.patch and fix FTBFS with GCC-6.
    
    Closes: #812293
    Thanks: Martin Michlmayr for the report and Z-Man for the patch.
---
 debian/patches/gcc-6-ftbfs.patch | 88 ++++++++++++++++++++++++++++++++++++++++
 debian/patches/series            |  1 +
 2 files changed, 89 insertions(+)

diff --git a/debian/patches/gcc-6-ftbfs.patch b/debian/patches/gcc-6-ftbfs.patch
new file mode 100644
index 0000000..709223f
--- /dev/null
+++ b/debian/patches/gcc-6-ftbfs.patch
@@ -0,0 +1,88 @@
+From: Markus Koschany <apo at debian.org>
+Date: Tue, 12 Jul 2016 08:25:27 +0200
+Subject: gcc 6 ftbfs
+
+Fix FTBFS with GCC-6. Thanks to Z-Man for providing the patch.
+
+Debian-Bug: https://bugs.debian.org/812293
+Forwarded: http://forums3.armagetronad.net/viewtopic.php?f=4&t=24603
+---
+ src/tools/tLocale.cpp |  7 +++++++
+ src/tools/tLocale.h   | 11 ++++++-----
+ 2 files changed, 13 insertions(+), 5 deletions(-)
+
+diff --git a/src/tools/tLocale.cpp b/src/tools/tLocale.cpp
+index 45c205d..10820d5 100644
+--- a/src/tools/tLocale.cpp
++++ b/src/tools/tLocale.cpp
+@@ -731,6 +731,13 @@ tOutput& operator << (tOutput &o, char *locale)
+ 
+ // and a special implementation for the locales and strings:
+ tOutput& operator << (tOutput &o, const char *locale){
++    return o.AddString(locale);
++}
++
++tOutput & tOutput::AddString(char const * locale)
++{
++    tOutput & o = *this;
++
+     int len = strlen(locale);
+     if (len == 0)
+         return o;
+diff --git a/src/tools/tLocale.h b/src/tools/tLocale.h
+index 8e06530..67b0f4f 100644
+--- a/src/tools/tLocale.h
++++ b/src/tools/tLocale.h
+@@ -81,7 +81,7 @@ class tOutput{
+ 
+     tOutputItemBase *anchor;
+ 
+-    tOutput& operator << (const tOutput &o);
++    // tOutput& operator << (const tOutput &o);
+ public:
+     tOutput();
+     ~tOutput();
+@@ -91,6 +91,7 @@ public:
+     void AddLiteral(const char *);       // adds a language independent string
+     void AddLocale(const char *);        // adds a language dependant string
+     void AddSpace();                     // adds a simple space
++    tOutput & AddString(char const * pString); // checks the string, delegates to correct Add...()-Function
+ 
+     // set a template parameter at this position of the output string
+     tOutput & SetTemplateParameter(int num, const char *parameter);
+@@ -113,7 +114,7 @@ public:
+ 
+         SetTemplateParameter(1, template1);
+ 
+-        *this << identifier;
++        AddString(identifier);
+     }
+ 
+     template< class T1, class T2 >
+@@ -125,7 +126,7 @@ public:
+         SetTemplateParameter(1, template1);
+         SetTemplateParameter(2, template2);
+ 
+-        *this << identifier;
++        AddString(identifier);
+     }
+ 
+     template< class T1, class T2, class T3 >
+@@ -138,7 +139,7 @@ public:
+         SetTemplateParameter(2, template2);
+         SetTemplateParameter(3, template3);
+ 
+-        *this << identifier;
++        AddString(identifier);
+     }
+ 
+     template< class T1, class T2, class T3, class T4 >
+@@ -152,7 +153,7 @@ public:
+         SetTemplateParameter(3, template3);
+         SetTemplateParameter(4, template4);
+ 
+-        *this << identifier;
++        AddString(identifier);
+     }
+ 
+     tOutput(const tOutput &o); // copy constructor
diff --git a/debian/patches/series b/debian/patches/series
index 63f69db..f91ed38 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 desktop-file.patch
+gcc-6-ftbfs.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/armagetronad.git



More information about the Pkg-games-commits mailing list