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

tobi pushed a commit to branch master
in repository rbdoom3bfg.

commit aed04bd706cadd57b5e7068a5853b0425330c884
Author: Tobias Frost <t...@coldtobi.de>
Date:   Mon Aug 7 00:01:56 2017 -0400

    New patch 08-gcc70.patch to fix FTBFS with GCC 7 (Closes: #853638)
    Update debian/copyright years
---
 debian/changelog           |   4 +-
 debian/copyright           |   2 +-
 debian/patches/80-gcc7.fix | 221 +++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series      |   1 +
 4 files changed, 226 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index b7c60f8..ea01132 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,10 @@ rbdoom3bfg (1.1.0~preview3+dfsg+git20161019-1) UNRELEASED; 
urgency=medium
 
   * New upstream git snapshot.
   * Drop libavcodec-*-dev from B-D-alternatives; they are no longer availavble.
+  * New patch 08-gcc70.patch to fix FTBFS with GCC 7 (Closes: #853638)
+  * Update debian/copyright years
 
- -- Tobias Frost <t...@debian.org>  Sun, 11 Dec 2016 14:11:40 +0100
+ -- Tobias Frost <t...@debian.org>  Sun, 06 Aug 2017 23:58:42 -0400
 
 rbdoom3bfg (1.1.0~preview3+dfsg+git20160807-2) unstable; urgency=medium
 
diff --git a/debian/copyright b/debian/copyright
index 7c81eb6..e77cc7e 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -114,7 +114,7 @@ License: Expat
  SOFTWARE.
 
 Files: debian/*
-Copyright: 2014-2016 Tobias Frost <t...@debian.org>
+Copyright: 2014-2017 Tobias Frost <t...@debian.org>
 License: GPL-2+
  This package is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
diff --git a/debian/patches/80-gcc7.fix b/debian/patches/80-gcc7.fix
new file mode 100644
index 0000000..6ea6cf7
--- /dev/null
+++ b/debian/patches/80-gcc7.fix
@@ -0,0 +1,221 @@
+diff --git a/doomclassic/doom/st_stuff.cpp b/doomclassic/doom/st_stuff.cpp
+index 481ec82..baeaf01 100644
+--- a/doomclassic/doom/st_stuff.cpp
++++ b/doomclassic/doom/st_stuff.cpp
+@@ -968,7 +968,7 @@ void ST_loadGraphics(void)
+       int             j;
+       int             facenum;
+ 
+-      char    namebuf[9];
++      char    namebuf[11];
+ 
+       // Load the numbers, tall and short
+       for (i=0;i<10;i++)
+diff --git a/doomclassic/doom/wi_stuff.cpp b/doomclassic/doom/wi_stuff.cpp
+index 47837cf..cec5156 100644
+--- a/doomclassic/doom/wi_stuff.cpp
++++ b/doomclassic/doom/wi_stuff.cpp
+@@ -1503,16 +1503,17 @@ void WI_loadData(void)
+ {     
+       int             i;
+       int             j;
+-      char    name[9];
++      char    name[20];
+       anim_t* a;
+ 
+-      if (::g->gamemode == commercial)
++      if (::g->gamemode == commercial) {
+               strcpy(name, "INTERPIC");
+               // DHM - Nerve :: Use our background image
+               //strcpy(name, "DMENUPIC");
+-      else 
+-              sprintf(name, "WIMAP%d", ::g->wbs->epsd);
+-
++      } else {
++              snprintf(name, 20, "WIMAP%d", ::g->wbs->epsd);
++              name[19] = 0;
++      }
+       if ( ::g->gamemode == retail )
+       {
+               if (::g->wbs->epsd == 3)
+@@ -1542,7 +1543,8 @@ void WI_loadData(void)
+               ::g->lnames = (patch_t **) DoomLib::Z_Malloc(sizeof(patch_t*) * 
::g->NUMCMAPS, PU_LEVEL_SHARED, 0);
+               for (i=0 ; i < ::g->NUMCMAPS ; i++)
+               {                                                               
+-                      sprintf(name, "CWILV%2.2d", i);
++                      snprintf(name, 20, "CWILV%2.2d", i);
++                      name[19] = 0;
+                       ::g->lnames[i] = (patch_t*)W_CacheLumpName(name, 
PU_LEVEL_SHARED);
+               }                                       
+       }
+@@ -1551,7 +1553,8 @@ void WI_loadData(void)
+               ::g->lnames = (patch_t **) DoomLib::Z_Malloc(sizeof(patch_t*) * 
( NUMMAPS ), PU_LEVEL_SHARED, 0);
+               for (i=0 ; i<NUMMAPS ; i++)
+               {
+-                      sprintf(name, "WILV%d%d", ::g->wbs->epsd, i);
++                      snprintf(name, 20, "WILV%d%d", ::g->wbs->epsd, i);
++                      name[19] = 0;
+                       ::g->lnames[i] = (patch_t*)W_CacheLumpName(name, 
PU_LEVEL_SHARED);
+               }
+ 
+@@ -1575,7 +1578,8 @@ void WI_loadData(void)
+                                       if (::g->wbs->epsd != 1 || j != 8) 
+                                       {
+                                               // animations
+-                                              sprintf(name, "WIA%d%.2d%.2d", 
::g->wbs->epsd, j, i);  
++                                              snprintf(name, 20, 
"WIA%d%.2d%.2d", ::g->wbs->epsd, j, i);
++                                              name[19] = 0;
+                                               a->p[i] = 
(patch_t*)W_CacheLumpName(name, PU_LEVEL_SHARED);
+                                       }
+                                       else
+@@ -1594,7 +1598,7 @@ void WI_loadData(void)
+       for (i=0;i<10;i++)
+       {
+               // numbers 0-9
+-              sprintf(name, "WINUM%d", i);     
++              snprintf(name, 10, "WINUM%d", i); name[9] = 0;
+               ::g->num[i] = (patch_t*)W_CacheLumpName(name, PU_LEVEL_SHARED);
+       }
+ 
+@@ -1651,11 +1655,11 @@ void WI_loadData(void)
+       for (i=0 ; i<MAXPLAYERS ; i++)
+       {
+               // "1,2,3,4"
+-              sprintf(name, "STPB%d", i);      
++              snprintf(name, 10, "STPB%d", i); name[9] = 0;
+               ::g->wistuff_p[i] = (patch_t*)W_CacheLumpName(name, 
PU_LEVEL_SHARED);
+ 
+               // "1,2,3,4"
+-              sprintf(name, "WIBP%d", i+1);     
++              snprintf(name, 10, "WIBP%d", i+1); name[9] = 0;
+               ::g->wistuff_bp[i] = (patch_t*)W_CacheLumpName(name, 
PU_LEVEL_SHARED);
+       }
+ 
+diff --git a/neo/d3xp/MultiplayerGame.cpp b/neo/d3xp/MultiplayerGame.cpp
+index a14c6da..4780f95 100644
+--- a/neo/d3xp/MultiplayerGame.cpp
++++ b/neo/d3xp/MultiplayerGame.cpp
+@@ -631,7 +631,8 @@ idMultiplayerGame::GameTime
+ const char* idMultiplayerGame::GameTime()
+ {
+       static char buff[16];
+-      int m, s, t, ms;
++      unsigned int m, s, t;
++      int ms;
+       
+       if( gameState == COUNTDOWN )
+       {
+@@ -653,7 +654,9 @@ const char* idMultiplayerGame::GameTime()
+               }
+               else
+               {
+-                      sprintf( buff, "WMP %i", s );
++                      snprintf( buff, 16, "WMP %i", s );
++                      buff[15] = 0;
++
+               }
+       }
+       else
+@@ -678,7 +681,8 @@ const char* idMultiplayerGame::GameTime()
+               t = s / 10;
+               s -= t * 10;
+               
+-              sprintf( buff, "%i:%i%i", m, t, s );
++              snprintf( buff, 16, "%i:%i%i", m, t, s );
++              buff[15] = 0;
+       }
+       return &buff[0];
+ }
+diff --git a/neo/idlib/StrStatic.h b/neo/idlib/StrStatic.h
+index 4fdb52d..63c930f 100644
+--- a/neo/idlib/StrStatic.h
++++ b/neo/idlib/StrStatic.h
+@@ -97,7 +97,7 @@ public:
+       {
+               buffer[ 0 ] = '\0';
+               SetStaticBuffer( buffer, _size_ );
+-              idStr::operator=( b );
++              idStr::operator=( idStr(b) );
+       }
+       
+       ID_INLINE       explicit idStrStatic( const char c ) :
+@@ -105,7 +105,7 @@ public:
+       {
+               buffer[ 0 ] = '\0';
+               SetStaticBuffer( buffer, _size_ );
+-              idStr::operator=( c );
++              idStr::operator=( idStr(c) );
+       }
+       
+       ID_INLINE       explicit idStrStatic( const int i ) :
+@@ -113,7 +113,7 @@ public:
+       {
+               buffer[ 0 ] = '\0';
+               SetStaticBuffer( buffer, _size_ );
+-              idStr::operator=( i );
++              idStr::operator=( idStr(i) );
+       }
+       
+       ID_INLINE       explicit idStrStatic( const unsigned u ) :
+@@ -121,7 +121,7 @@ public:
+       {
+               buffer[ 0 ] = '\0';
+               SetStaticBuffer( buffer, _size_ );
+-              idStr::operator=( u );
++              idStr::operator=( idStr(u) );
+       }
+       
+       ID_INLINE       explicit idStrStatic( const float f ) :
+@@ -129,7 +129,7 @@ public:
+       {
+               buffer[ 0 ] = '\0';
+               SetStaticBuffer( buffer, _size_ );
+-              idStr::operator=( f );
++              idStr::operator=( idStr(f) );
+       }
+       
+ private:
+diff --git a/neo/tools/compilers/dmap/dmap.cpp 
b/neo/tools/compilers/dmap/dmap.cpp
+index 655e881..03c5831 100644
+--- a/neo/tools/compilers/dmap/dmap.cpp
++++ b/neo/tools/compilers/dmap/dmap.cpp
+@@ -34,6 +34,10 @@ If you have questions concerning this license or the 
applicable additional terms
+ 
+ dmapGlobals_t dmapGlobals;
+ 
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ /*
+ ============
+ ProcessModel
+@@ -243,7 +247,7 @@ void Dmap( const idCmdArgs& args )
+ {
+       int                     i;
+       int                     start, end;
+-      char            path[1024];
++      char            path[PATH_MAX];
+       idStr           passedName;
+       bool            leaked = false;
+       bool            noCM = false;
+@@ -390,7 +394,8 @@ void Dmap( const idCmdArgs& args )
+       // if this isn't a regioned map, delete the last saved region map
+       if( passedName.Right( 4 ) != ".reg" )
+       {
+-              sprintf( path, "%s.reg", dmapGlobals.mapFileBase );
++              snprintf( path, PATH_MAX, "%s.reg", dmapGlobals.mapFileBase );
++              path[PATH_MAX-1] = 0;
+               fileSystem->RemoveFile( path );
+       }
+       else
+@@ -402,7 +407,8 @@ void Dmap( const idCmdArgs& args )
+       passedName = stripped;
+       
+       // delete any old line leak files
+-      sprintf( path, "%s.lin", dmapGlobals.mapFileBase );
++      snprintf( path, PATH_MAX, "%s.lin", dmapGlobals.mapFileBase );
++      path[PATH_MAX-1] = 0;
+       fileSystem->RemoveFile( path );
+       
+       // delete any old generated binary proc files
diff --git a/debian/patches/series b/debian/patches/series
index 54b1fa3..c04fb76 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
 40-libpng16.patch
 50-system-rapidjson.patch
 60-spelling-errors.patch
+80-gcc7.fix

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

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to