[asc] 47/65: * Team upload. * Add patches fixing FTBFS with gcc-4.7, thanks to Gregor Jasny (Closes: #674299)

Markus Koschany apo-guest at moszumanska.debian.org
Mon Dec 7 20:38:01 UTC 2015


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

apo-guest pushed a commit to branch master
in repository asc.

commit e50308e8817a0132fd61156ba085547f83bf11b4
Author: Dmitrijs Ledkovs <xnox at debian.org>
Date:   Sun May 27 21:53:11 2012 +0000

    * Team upload.
    * Add patches fixing FTBFS with gcc-4.7, thanks to Gregor Jasny
      (Closes: #674299)
---
 debian/changelog                   |   8 ++
 debian/patches/010_boost_libs.diff |  30 --------
 debian/patches/gcc-4.7-part2.diff  | 146 +++++++++++++++++++++++++++++++++++++
 debian/patches/gcc-4.7.diff        |  83 +++++++++++++++++++++
 debian/patches/series              |   3 +-
 5 files changed, 239 insertions(+), 31 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 348ec75..b19b0eb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+asc (2.4.0.0-3) unstable; urgency=low
+
+  * Team upload.
+  * Add patches fixing FTBFS with gcc-4.7, thanks to Gregor Jasny
+    (Closes: #674299)
+
+ -- Dmitrijs Ledkovs <xnox at debian.org>  Sun, 27 May 2012 21:38:32 +0100
+
 asc (2.4.0.0-2) unstable; urgency=low
 
   [ Felix Geyer ]
diff --git a/debian/patches/010_boost_libs.diff b/debian/patches/010_boost_libs.diff
deleted file mode 100644
index 4805ab9..0000000
--- a/debian/patches/010_boost_libs.diff
+++ /dev/null
@@ -1,30 +0,0 @@
-Index: asc-2.1.0.0/configure
-===================================================================
---- asc-2.1.0.0.orig/configure	2009-05-28 14:04:15.000000000 -0400
-+++ asc-2.1.0.0/configure	2009-05-28 14:05:21.000000000 -0400
-@@ -22721,13 +22721,13 @@
- #AC_MSG_RESULT("yes")
- 
- 
--{ echo "$as_me:$LINENO: checking for main in -lboost_regex" >&5
--echo $ECHO_N "checking for main in -lboost_regex... $ECHO_C" >&6; }
-+{ echo "$as_me:$LINENO: checking for main in -lboost_regex-mt" >&5
-+echo $ECHO_N "checking for main in -lboost_regex-mt... $ECHO_C" >&6; }
- if test "${ac_cv_lib_boost_regex_main+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
--LIBS="-lboost_regex  $LIBS"
-+LIBS="-lboost_regex-mt  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
-@@ -22777,7 +22777,7 @@
- { echo "$as_me:$LINENO: result: $ac_cv_lib_boost_regex_main" >&5
- echo "${ECHO_T}$ac_cv_lib_boost_regex_main" >&6; }
- if test $ac_cv_lib_boost_regex_main = yes; then
--  BOOST_LIBS="-lboost_regex"
-+  BOOST_LIBS="-lboost_regex-mt"
- else
-   BOOSTERR=yes
- fi
diff --git a/debian/patches/gcc-4.7-part2.diff b/debian/patches/gcc-4.7-part2.diff
new file mode 100644
index 0000000..17b896c
--- /dev/null
+++ b/debian/patches/gcc-4.7-part2.diff
@@ -0,0 +1,146 @@
+Description: Fix remaining GCC 4.7 build failures
+Author: Gregor Jasny <gjasny at googlemail.com>
+
+--- a/source/graphics/blitter.h
++++ b/source/graphics/blitter.h
+@@ -30,6 +30,7 @@
+ #include "../misc.h"
+  #include "../palette.h"
+  #include "../basegfx.h"
++#include "lighten.h"
+ 
+ typedef SDLmm::Color Color;
+ 
+--- a/source/graphics/drawing.h
++++ b/source/graphics/drawing.h
+@@ -31,6 +31,7 @@
+ #include "../misc.h"
+  #include "../palette.h"
+  // #include "../basegfx.h"
++#include "lighten.h"
+ 
+ 
+ 
+@@ -128,30 +129,6 @@
+ 
+ extern char saturationTranslationTable[256][256];
+ 
+-
+-inline SDLmm::Color lighten_Color( SDLmm::Color color, int factor16 )
+-{
+-   return saturationTranslationTable[color & 0xff][factor16] |
+-          (saturationTranslationTable[(color >> 8) & 0xff][factor16] << 8 ) |
+-          (saturationTranslationTable[(color >> 16) & 0xff][factor16] << 16 ) |
+-          (color & 0xff000000);
+-}
+-
+-inline void lighten_Color( SDLmm::Color* color, int factor16 )
+-{
+-   *color = lighten_Color( *color, factor16 );
+-};
+-
+-inline SDL_Color lighten_Color( const SDL_Color& color, int factor16 )
+-{
+-   SDL_Color c  = color;
+-   c.r =  saturationTranslationTable[color.r & 0xff][factor16];
+-   c.g =  saturationTranslationTable[color.g & 0xff][factor16];
+-   c.b =  saturationTranslationTable[color.b & 0xff][factor16];
+-   return c;
+-}
+-
+-
+ template< int pixelsize,
+ template<int> class ColorMerger >
+ class PutPixel: public ColorMerger<pixelsize>
+@@ -169,7 +146,7 @@
+          PixelType* pix = (PixelType*)( surf.pixels() );
+          pix += pos.y * surf.pitch()/pixelsize + pos.x;
+ 
+-         assign ( src, pix );
++         this->assign ( src, pix );
+       };
+ };
+ 
+--- a/source/itemrepository.cpp
++++ b/source/itemrepository.cpp
+@@ -88,7 +88,7 @@
+    t->filename = fileName;
+    t->location = location;
+    t->archive = prc.getArchive();
+-   add ( t );
++   this->add ( t );
+ }
+ 
+ 
+@@ -110,7 +110,7 @@
+       t->archive = stream.readString();
+       dataLoaderTicker();
+ 
+-      add ( t );
++      this->add ( t );
+       // add ( T::newFromStream(stream ));
+    }
+ }
+--- /dev/null
++++ b/source/graphics/lighten.h
+@@ -0,0 +1,60 @@
++/*
++    This file is part of Advanced Strategic Command; http://www.asc-hq.de
++    Copyright (C) 1994-2004  Martin Bickel  and  Marc Schellenberger
++ 
++    This program is free software; you can redistribute it and/or modify
++    it under the terms of the GNU General Public License as published by
++    the Free Software Foundation; either version 2 of the License, or
++    (at your option) any later version.
++ 
++    This program is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++    GNU General Public License for more details.
++ 
++    You should have received a copy of the GNU General Public License
++    along with this program; see the file COPYING. If not, write to the
++    Free Software Foundation, Inc., 59 Temple Place, Suite 330,
++    Boston, MA  02111-1307  USA
++*/
++
++#ifndef lightenH
++ #define lightenH
++
++#include <cmath>
++ #include <map>
++ #include "loki/static_check.h"
++ #include "../libs/sdlmm/src/sdlmm.h"
++ #include "surface.h"
++
++#include "../misc.h"
++ #include "../palette.h"
++ // #include "../basegfx.h"
++
++extern char saturationTranslationTable[256][256];
++
++
++inline SDLmm::Color lighten_Color( SDLmm::Color color, int factor16 )
++{
++   return saturationTranslationTable[color & 0xff][factor16] |
++          (saturationTranslationTable[(color >> 8) & 0xff][factor16] << 8 ) |
++          (saturationTranslationTable[(color >> 16) & 0xff][factor16] << 16 ) |
++          (color & 0xff000000);
++}
++
++inline void lighten_Color( SDLmm::Color* color, int factor16 )
++{
++   *color = lighten_Color( *color, factor16 );
++};
++
++inline SDL_Color lighten_Color( const SDL_Color& color, int factor16 )
++{
++   SDL_Color c  = color;
++   c.r =  saturationTranslationTable[color.r & 0xff][factor16];
++   c.g =  saturationTranslationTable[color.g & 0xff][factor16];
++   c.b =  saturationTranslationTable[color.b & 0xff][factor16];
++   return c;
++}
++
++#endif
++
diff --git a/debian/patches/gcc-4.7.diff b/debian/patches/gcc-4.7.diff
new file mode 100644
index 0000000..de5e650
--- /dev/null
+++ b/debian/patches/gcc-4.7.diff
@@ -0,0 +1,83 @@
+Description: Fixed gcc 4.7 compilation problems
+Origin: upstream, 205e73929e9576f4abfdde7188bef381396b8ce1
+Author: Martin Bickel <martin at asc-hq.org>
+
+diff -r 83e224cdaf50 -r 205e73929e95 source/graphics/blitter.h
+--- a/source/graphics/blitter.h	Sun May 13 15:41:46 2012 +0200
++++ b/source/graphics/blitter.h	Wed May 16 19:17:17 2012 +0200
+@@ -749,7 +749,7 @@
+ 
+       void assign ( PixelType src, PixelType* dest )
+       {
+-         if ( isOpaque(src ) ) {
++         if ( this->isOpaque(src ) ) {
+             *dest = src;
+          }
+       };
+@@ -769,7 +769,7 @@
+ 
+       void assign ( PixelType src, PixelType* dest )
+       {
+-         if ( isOpaque(src ) ) {
++         if ( this->isOpaque(src ) ) {
+             *dest = src;
+          }
+       };
+@@ -846,7 +846,7 @@
+       void assign ( PixelType src, PixelType* dest )
+       {
+          // STATIC_CHECK ( pixelsize == 1, wrong_pixel_size );
+-         if ( isOpaque(src ) ) {
++         if ( this->isOpaque(src ) ) {
+             *dest = table[*dest];
+          }
+       };
+@@ -873,7 +873,7 @@
+ 
+       void assign ( PixelType src, PixelType* dest )
+       {
+-         if ( isOpaque(src ) ) {
++         if ( this->isOpaque(src ) ) {
+             *dest = ((*dest >> 1) & 0x7f7f7f7f) | (*dest & 0xff000000 );
+          }
+       };
+@@ -901,7 +901,7 @@
+    protected:
+       void assign ( PixelType src, PixelType* dest )
+       {
+-         if ( isOpaque(src ) )
++         if ( this->isOpaque(src ) )
+             *dest = colormixbufchar[*dest + src*256 ];
+       };
+    public:
+@@ -918,7 +918,7 @@
+       void assign ( PixelType src, PixelType* dest )
+       {
+          // STATIC_CHECK ( pixelsize == 1, wrong_pixel_size );
+-         if ( isOpaque(src ) ) {
++         if ( this->isOpaque(src ) ) {
+             *dest = ((*dest >> 1) & 0x7f7f7f7f) + ((src >> 1) & 0x7f7f7f7f);
+          }
+       };
+@@ -975,7 +975,7 @@
+       void assign ( PixelType src, PixelType* dest )
+       {
+          // STATIC_CHECK ( pixelsize == 1, wrong_pixel_size );
+-         if ( isOpaque(src ) ) {
++         if ( this->isOpaque(src ) ) {
+             *dest = table[ *dest + src*256 ];
+          }
+       };
+diff -r 83e224cdaf50 -r 205e73929e95 source/graphics/surface.cpp
+--- a/source/graphics/surface.cpp	Sun May 13 15:41:46 2012 +0200
++++ b/source/graphics/surface.cpp	Wed May 16 19:17:17 2012 +0200
+@@ -579,7 +579,7 @@
+ 
+       void assign ( PixelType src, PixelType* dest )
+       {
+-         if ( !isOpaque(src ) )
++         if ( !this->isOpaque(src ) )
+             *dest &= alphamask;
+       };
+ 
+
diff --git a/debian/patches/series b/debian/patches/series
index 8b13789..dc824e5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
-
+gcc-4.7.diff
+gcc-4.7-part2.diff

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



More information about the Pkg-games-commits mailing list