Package: armagetron Version: 0.2.7.0-1.1 Severity: wishlist As agreed on email, I am doing an NMU of armagetron to get it to use the new C++ ABI. In the process, I fixed a few other bugs. This is the interdiff between version 0.2.7.0-1 and 0.2.7.0-1.1, and this is the changelog:
armagetron (0.2.7.0-1.1) unstable; urgency=low * Non-maintainer upload with approval from the maintainer to move this package to the new C++ ABI. * Convert to use dpatch for use by the new patch, add build-depend on dpatch. * Fix C++ build problem. (Closes: #318998) * Correct grammar in package description. (Closes: #311736) * Add quotes to needs, section and icon field in the menu file to avoid lintian/linda warning. * Avoid multiline build-depend, move it all to one long line to avoid lintian warning. * Updated config.sub and config.guess to make sure it build on as many platforms as possible. * Correct the upstream URL in README.Debian to match the one in the copyright file. -- Petter Reinholdtsen <[EMAIL PROTECTED]> Fri, 26 Aug 2005 08:55:46 +0200 The patch in debian/patches/10_gcc4.dpatch is the patch from bug #318998. diff -u armagetron-0.2.7.0/debian/README.Debian armagetron-0.2.7.0/debian/README.Debian --- armagetron-0.2.7.0/debian/README.Debian +++ armagetron-0.2.7.0/debian/README.Debian @@ -1,7 +1,7 @@ armagetron for Debian --------------------- -Armagetron is hosted at http://armagetron.sourceforge.net/ +Armagetron is hosted at http://sourceforge.net/projects/armagetronad/ There are several mailing lists available. Subscription information and archives are available via http://sourceforge.net/mail/?group_id=6185. diff -u armagetron-0.2.7.0/debian/armagetron.menu armagetron-0.2.7.0/debian/armagetron.menu --- armagetron-0.2.7.0/debian/armagetron.menu +++ armagetron-0.2.7.0/debian/armagetron.menu @@ -1,3 +1,3 @@ -?package(armagetron):needs=X11 section=Games/Arcade\ +?package(armagetron):needs="X11" section="Games/Arcade"\ title="Armagetron" command="/usr/games/armagetron"\ - icon=/usr/share/pixmaps/armagetron.xpm + icon="/usr/share/pixmaps/armagetron.xpm" diff -u armagetron-0.2.7.0/debian/changelog armagetron-0.2.7.0/debian/changelog --- armagetron-0.2.7.0/debian/changelog +++ armagetron-0.2.7.0/debian/changelog @@ -1,3 +1,22 @@ +armagetron (0.2.7.0-1.1) unstable; urgency=low + + * Non-maintainer upload with approval from the maintainer to move + this package to the new C++ ABI. + * Convert to use dpatch for use by the new patch, add build-depend + on dpatch. + * Fix C++ build problem. (Closes: #318998) + * Correct grammar in package description. (Closes: #311736) + * Add quotes to needs, section and icon field in the menu file to + avoid lintian/linda warning. + * Avoid multiline build-depend, move it all to one long line to + avoid lintian warning. + * Updated config.sub and config.guess to make sure it build on as + many platforms as possible. + * Correct the upstream URL in README.Debian to match the one in the + copyright file. + + -- Petter Reinholdtsen <[EMAIL PROTECTED]> Fri, 26 Aug 2005 08:55:46 +0200 + armagetron (0.2.7.0-1) unstable; urgency=high * Apply security patch from upstream to fix out-of-bounds array access diff -u armagetron-0.2.7.0/debian/control armagetron-0.2.7.0/debian/control --- armagetron-0.2.7.0/debian/control +++ armagetron-0.2.7.0/debian/control @@ -3,9 +3,7 @@ Priority: optional Maintainer: Andreas Bombe <[EMAIL PROTECTED]> Standards-Version: 3.6.1 -Build-Depends: debhelper (>= 4), xlibmesa-gl-dev | libgl-dev, - xlibmesa-glu-dev | libglu-dev, libsdl-image1.2-dev (>= 1.2.2), - libsdl1.2-dev (>= 1.2.2), autotools-dev +Build-Depends: debhelper (>= 4), xlibmesa-gl-dev | libgl-dev, xlibmesa-glu-dev | libglu-dev, libsdl-image1.2-dev (>= 1.2.2), libsdl1.2-dev (>= 1.2.2), autotools-dev, dpatch Package: armagetron-common Architecture: all @@ -36,7 +34,7 @@ work and in part to the fabulous sound effects. To add some extra fascination into the game, unlike to other Tron clones, in armagetron you can accelerate. Alas, there's no accelerate button. If you want to drive fast, you have to - drive good -- and really really close to the walls. + drive well -- and really really close to the walls. . Armagetron can be played against AI opponents, against other humans over the network, or a mixture of both. diff -u armagetron-0.2.7.0/debian/rules armagetron-0.2.7.0/debian/rules --- armagetron-0.2.7.0/debian/rules +++ armagetron-0.2.7.0/debian/rules @@ -49,14 +49,14 @@ test -r /usr/share/misc/config.guess && cp /usr/share/misc/config.guess . test -r /usr/share/misc/config.sub && cp /usr/share/misc/config.sub . -configure-stamp.client: +configure-stamp.client: patch-stamp dh_testdir mkdir client cd client && ../configure $(confflags) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-glout cd client && perl -pi -e 's/\s-lpng\b//; s/\s-lz\b//' `find -name Makefile` touch $@ -configure-stamp.server: +configure-stamp.server: patch-stamp dh_testdir mkdir server cd server && ../configure $(confflags) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --disable-glout @@ -75,7 +75,7 @@ $(MAKE) -C server touch $@ -clean: +clean: unpatch dh_testdir dh_testroot rm -rf client server @@ -140,0 +141,2 @@ + +include /usr/share/dpatch/dpatch.make only in patch2: unchanged: --- armagetron-0.2.7.0.orig/debian/patches/10_gcc4.dpatch +++ armagetron-0.2.7.0/debian/patches/10_gcc4.dpatch @@ -0,0 +1,367 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## debian/patches/10_gcc4.dpatch by Christian Aichinger <[EMAIL PROTECTED]> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Get armagetron building with G++ version 4. Fixes #318998 + [EMAIL PROTECTED]@ +diff -Nur armagetron-0.2.7.0/src/engine/eGrid.h armagetron/src/engine/eGrid.h +--- armagetron-0.2.7.0/src/engine/eGrid.h 2004-06-04 18:20:57.000000000 +0200 ++++ armagetron/src/engine/eGrid.h 2005-08-07 21:58:40.000000000 +0200 +@@ -131,9 +131,9 @@ + + + const tList<eCamera>& Cameras() const{return cameras;} +- const tList<eGameObject>& GameObjects() const{return gameObjects;} +- const tList<eGameObject>& GameObjectsInteresting() const{return gameObjectsInteresting;} +- const tList<eGameObject>& GameObjectsInactive() const{return gameObjectsInactive;} ++ const tList<class eGameObject>& GameObjects() const{return gameObjects;} ++ const tList<class eGameObject>& GameObjectsInteresting() const{return gameObjectsInteresting;} ++ const tList<class eGameObject>& GameObjectsInactive() const{return gameObjectsInactive;} + + + int NumberOfCameras(); +@@ -148,10 +148,10 @@ + // REAL CameraHeight(int i){return eCamera::HeightNum(i);} + + +- void AddGameObjectInteresting (eGameObject *o); +- void RemoveGameObjectInteresting (eGameObject *o); +- void AddGameObjectInactive (eGameObject *o); +- void RemoveGameObjectInactive (eGameObject *o); ++ void AddGameObjectInteresting (class eGameObject *o); ++ void RemoveGameObjectInteresting (class eGameObject *o); ++ void AddGameObjectInactive (class eGameObject *o); ++ void RemoveGameObjectInactive (class eGameObject *o); + + typedef void WallProcessor ( eWall* w ); // function prototype for wall query functions + void ProcessWallsInRange ( WallProcessor* proc, +@@ -198,9 +198,9 @@ + tList<eFace, false, true> faces; + + // objects +- tList<eGameObject> gameObjects; +- tList<eGameObject> gameObjectsInactive; +- tList<eGameObject> gameObjectsInteresting; ++ tList<class eGameObject> gameObjects; ++ tList<class eGameObject> gameObjectsInactive; ++ tList<class eGameObject> gameObjectsInteresting; + + // cameras + tList<eCamera> cameras; +diff -Nur armagetron-0.2.7.0/src/engine/eVoter.cpp armagetron/src/engine/eVoter.cpp +--- armagetron-0.2.7.0/src/engine/eVoter.cpp 2004-06-04 18:20:57.000000000 +0200 ++++ armagetron/src/engine/eVoter.cpp 2005-08-07 22:14:05.000000000 +0200 +@@ -69,8 +69,9 @@ + friend class eMenuItemVote; + public: + // constructors/destructor +- eVoteItem( void ): creationTime_( tSysTimeFloat() ), user_( 0 ), id_( ++se_votingItemID ), menuItem_( 0 ) ++ eVoteItem( void ): creationTime_( tSysTimeFloat() ), user_( 0 ), id_( ++se_votingItemID ) + { ++ this->menuItem_ = 0; + items_.Add( this ); + }; + +@@ -329,7 +330,7 @@ + tArray< tCONTROLLED_PTR( eVoter ) > voters_[2]; // array of voters approving or disapproving of the vote + static tList< eVoteItem > items_; // list of vote items + unsigned short id_; // running id of voting item +- eMenuItemVote *menuItem_; // menu item ++ class eMenuItemVote *menuItem_; // menu item + + eVoteItem& operator=( const eVoteItem& ); + eVoteItem( const eVoteItem& ); +diff -Nur armagetron-0.2.7.0/src/engine/eWall.h armagetron/src/engine/eWall.h +--- armagetron-0.2.7.0/src/engine/eWall.h 2004-06-04 18:20:57.000000000 +0200 ++++ armagetron/src/engine/eWall.h 2005-08-07 21:40:11.000000000 +0200 +@@ -89,7 +89,7 @@ + + eWallView view[MAX_VIEWERS]; + protected: +- tCHECKED_PTR(eWallHolder) holder_; ++ tCHECKED_PTR(class eWallHolder) holder_; + tJUST_CONTROLLED_PTR<eGrid> grid; + REAL len; + int flipped; +diff -Nur armagetron-0.2.7.0/src/network/nConfig.cpp armagetron/src/network/nConfig.cpp +--- armagetron-0.2.7.0/src/network/nConfig.cpp 2004-06-04 18:20:57.000000000 +0200 ++++ armagetron/src/network/nConfig.cpp 2005-08-07 23:25:55.000000000 +0200 +@@ -49,7 +49,7 @@ + + //con << "got conf message for " << name << "\n"; + +- int i; ++ int i=0; + + for(tConfItemBase *item = s_ConfItemAnchor; item ; item = item->Next()){ + nConfItemBase *netitem = dynamic_cast<nConfItemBase*> (item); +diff -Nur armagetron-0.2.7.0/src/network/nConfig.h armagetron/src/network/nConfig.h +--- armagetron-0.2.7.0/src/network/nConfig.h 2004-06-04 18:20:57.000000000 +0200 ++++ armagetron/src/network/nConfig.h 2005-08-07 21:47:36.000000000 +0200 +@@ -76,36 +76,36 @@ + public: + nConfItem(const char *title,const char *help,T& t) + :tConfItem<T>(t), +- tConfItemBase(title, help, na){} ++ tConfItemBase(title, help, this->na){} + virtual ~nConfItem(){} + + + virtual void NetReadVal(nMessage &m){ + T dummy=0; + m >> dummy; +- if (sn_compare(dummy,*target)){ ++ if (sn_compare(dummy,*(this->target))){ + if (printChange) + { + tOutput o; + o.SetTemplateParameter(1, title); +- o.SetTemplateParameter(2, *target); ++ o.SetTemplateParameter(2, *(this->target)); + o.SetTemplateParameter(3, dummy); + o << "$nconfig_value_changed"; + con << con.ColorString(1,.3,.3) << o; + } +- *target=dummy; ++ *(this->target)=dummy; + changed=true; + } + } + + virtual void NetWriteVal(nMessage &m){ +- m << *target; ++ m << *(this->target); + } + + void Set( const T& newval ) + { +- bool changed = ( newval != *target ); +- *target = newval; ++ bool changed = ( newval != *(this->target) ); ++ *(this->target) = newval; + + if ( changed ) + { +diff -Nur armagetron-0.2.7.0/src/network/nNetwork.cpp armagetron/src/network/nNetwork.cpp +--- armagetron-0.2.7.0/src/network/nNetwork.cpp 2005-08-07 21:36:20.000000000 +0200 ++++ armagetron/src/network/nNetwork.cpp 2005-08-07 23:24:00.000000000 +0200 +@@ -30,6 +30,7 @@ + #include "nSimulatePing.h" + #include "nConfig.h" + #include "nNetwork.h" ++#include "nNetObject.h" + #include "tConsole.h" + #include "tDirectories.h" + #include "nNet.h" +@@ -701,6 +702,10 @@ + static int max_nMessages=0; + #endif + ++class nNetObject *nMessage::nNetObject_ObjectDangerous(int i) { ++ return nNetObject::ObjectDangerous(i); ++} ++ + nMessage::nMessage(unsigned short*& buffer,short sn_myNetID, int lenLeft ) + :descriptor(ntohs(*(buffer++))),messageID(ntohs(*(buffer++))), + senderID(sn_myNetID),readOut(0){ +diff -Nur armagetron-0.2.7.0/src/network/nNetwork.h armagetron/src/network/nNetwork.h +--- armagetron-0.2.7.0/src/network/nNetwork.h 2004-06-18 05:53:03.000000000 +0200 ++++ armagetron/src/network/nNetwork.h 2005-08-07 23:36:38.000000000 +0200 +@@ -278,6 +278,11 @@ + friend class nNetObject; + friend class nWaitForAck; + ++ ++ // We need this hack because for nNetObject:: to work, nNetObject has to be ++ // a complete type. Since we can't guarantee that here, we wrap this up and ++ // put it into nNetwork.cpp ++ class nNetObject *nNetObject_ObjectDangerous(int i); + // void AddRef(); + // void Release(); + +@@ -429,7 +434,7 @@ + Read(id); + + if ( 0 != id ) +- p = dynamic_cast<T*> ( nNetObject::ObjectDangerous(id) ); ++ p = dynamic_cast<T*> ( nNetObject_ObjectDangerous(id) ); + else + p = NULL; + +@@ -452,7 +457,7 @@ + Read(id); + + if ( 0 != id ) +- p = dynamic_cast<T*> ( nNetObject::ObjectDangerous(id) ); ++ p = dynamic_cast<T*> ( nNetObject_ObjectDangerous(id) ); + else + p = NULL; + +diff -Nur armagetron-0.2.7.0/src/network/nPriorizing.h armagetron/src/network/nPriorizing.h +--- armagetron-0.2.7.0/src/network/nPriorizing.h 2004-06-04 18:20:57.000000000 +0200 ++++ armagetron/src/network/nPriorizing.h 2005-08-07 22:30:42.000000000 +0200 +@@ -80,7 +80,7 @@ + nType type_; // type of this task + REAL priority_; // something terrible happens if this task is not executed within 1/priority_ seconds + REAL waiting_; // time this task is already waiting ( plus small offset ) +- nBandwidthTaskPriorizer* priorizer_; // the arbitrator taking care of this task ++ class nBandwidthTaskPriorizer* priorizer_; // the arbitrator taking care of this task + }; + + // bandwidth priorizer: selects bandwidth taks +@@ -90,8 +90,8 @@ + typedef tHeap< nBandwidthTask > nTaskHeap; + typedef nBandwidthTask::nType nType; + +- nTaskHeap& Tasks( nType t ) +- { ++ nTaskHeap& Tasks( nType t ) { ++ + tASSERT( 0 <= t && t < nBandwidthTask::Type_Count ); + + return tasks_[ t ]; +diff -Nur armagetron-0.2.7.0/src/tools/tList.h armagetron/src/tools/tList.h +--- armagetron-0.2.7.0/src/tools/tList.h 2004-06-04 18:20:58.000000000 +0200 ++++ armagetron/src/tools/tList.h 2005-08-07 20:54:04.000000000 +0200 +@@ -97,8 +97,8 @@ + public: + + ~tList(){ +- for(int i=Len()-1;i>=0;i--) +- (reinterpret_cast<int *>(operator()(i)))[offset]=-1; ++ for(int i=this->Len()-1;i>=0;i--) ++ (reinterpret_cast<int *>(this->operator()(i)))[offset]=-1; + } + + tList(int size=0):tArray<T*, MALLOC>(size){} +@@ -107,8 +107,8 @@ + offset=&idnum-(reinterpret_cast<int *>(t)); + + if (idnum<0){ // tEventQueue relies on the fact that we put t in +- idnum=Len(); // the last place. +- operator[](idnum)=t; ++ idnum=this->Len(); // the last place. ++ this->operator[](idnum)=t; + if ( REFERENCE ) + { + tReferencer< T >::AddReference( t ); +@@ -138,18 +138,18 @@ + #endif + // the check for Len() is done, since this may be + // called on an allready descructed list. +- if ( Len() > idnum+1 ) ++ if ( this->Len() > idnum+1 ) + { +- T *other=operator()(Len()-1); ++ T *other=operator()(this->Len()-1); + tASSERT( other ); +- operator()(idnum)=other; ++ this->operator()(idnum)=other; + int &other_id=(reinterpret_cast<int *>(other))[offset]; +- tASSERT( other_id == Len()-1 ); ++ tASSERT( other_id == this->Len()-1 ); + other_id=idnum; + } +- operator[](Len()-1) = NULL; ++ operator[](this->Len()-1) = NULL; + +- SetLen(Len()-1); ++ SetLen(this->Len()-1); + + if ( REFERENCE ) + { +diff -Nur armagetron-0.2.7.0/src/tools/tLocale.h armagetron/src/tools/tLocale.h +--- armagetron-0.2.7.0/src/tools/tLocale.h 2004-06-04 18:20:58.000000000 +0200 ++++ armagetron/src/tools/tLocale.h 2005-08-07 20:56:44.000000000 +0200 +@@ -109,8 +109,8 @@ + public: + tOutputItemBase(tOutput& o); + virtual ~tOutputItemBase(); +- virtual void Print(tString& target) const = NULL; +- virtual void Clone(tOutput& o) const = NULL; ++ virtual void Print(tString& target) const = 0; ++ virtual void Clone(tOutput& o) const = 0; + }; + + +diff -Nur armagetron-0.2.7.0/src/tools/tSafePTR.h armagetron/src/tools/tSafePTR.h +--- armagetron-0.2.7.0/src/tools/tSafePTR.h 2004-06-04 18:20:58.000000000 +0200 ++++ armagetron/src/tools/tSafePTR.h 2005-08-07 20:38:42.000000000 +0200 +@@ -47,7 +47,7 @@ + ~tCheckedPTRBase(); + + tCheckedPTRBase& operator=(void *x){target=x; return *this;} +-// void * operator->() const {return target;} ++ void * operator->() const {return target;} + // void & operator*() const {return *target;} + //operator void *() const {return target;} + operator bool() const{return target!=NULL;} +@@ -411,7 +411,7 @@ + if ( this->GetRefcount() != 1 ) + st_Breakpoint(); + +- refCtr_ = -1000; ++ this->refCtr_ = -1000; + } + }; + +diff -Nur armagetron-0.2.7.0/src/tron/gCycle.cpp armagetron/src/tron/gCycle.cpp +--- armagetron-0.2.7.0/src/tron/gCycle.cpp 2004-06-19 04:16:22.000000000 +0200 ++++ armagetron/src/tron/gCycle.cpp 2005-08-07 21:54:08.000000000 +0200 +@@ -1150,7 +1150,7 @@ + skewDot-=lr*1000*animts; + if (crash_sparks && animts>0) + { +- gPlayerWall *tmpplayerWall; ++ gPlayerWall *tmpplayerWall = NULL; // shut gcc up + + if(fl.ehit) tmpplayerWall=dynamic_cast<gPlayerWall*>(fl.ehit->GetWall()); + if(fr.ehit) tmpplayerWall=dynamic_cast<gPlayerWall*>(fr.ehit->GetWall()); +@@ -1173,7 +1173,7 @@ + skewDot-=lr*100*animts; + if (crash_sparks && animts>0) + { +- gPlayerWall *tmpplayerWall; ++ gPlayerWall *tmpplayerWall = NULL; + + if(fl.ehit) tmpplayerWall=dynamic_cast<gPlayerWall*>(fl.ehit->GetWall()); + if(fr.ehit) tmpplayerWall=dynamic_cast<gPlayerWall*>(fr.ehit->GetWall()); +diff -Nur armagetron-0.2.7.0/src/tron/gCycle.h armagetron/src/tron/gCycle.h +--- armagetron-0.2.7.0/src/tron/gCycle.h 2004-06-19 04:15:19.000000000 +0200 ++++ armagetron/src/tron/gCycle.h 2005-08-07 21:43:19.000000000 +0200 +@@ -201,9 +201,9 @@ + private: + gEnemyInfluence enemyInfluence; + +- tCHECKED_PTR(gNetPlayerWall) currentWall; ++ tCHECKED_PTR(class gNetPlayerWall) currentWall; + // the eWall we are currently making +- tCHECKED_PTR(gNetPlayerWall) lastWall; ++ tCHECKED_PTR(class gNetPlayerWall) lastWall; + + // unsigned short currentWallID; + +@@ -270,8 +270,8 @@ + virtual bool Alive()const {return alive>=1;} + + const eTempEdge* Edge(); +- const gPlayerWall* CurrentWall(); +- const gPlayerWall* LastWall(); ++ const class gPlayerWall* CurrentWall(); ++ const class gPlayerWall* LastWall(); + + #ifndef DEDICATED + virtual void Render(const eCamera *cam); +diff -Nur armagetron-0.2.7.0/src/tron/gMenus.cpp armagetron/src/tron/gMenus.cpp +--- armagetron-0.2.7.0/src/tron/gMenus.cpp 2004-06-22 12:26:19.000000000 +0200 ++++ armagetron/src/tron/gMenus.cpp 2005-08-07 22:02:54.000000000 +0200 +@@ -1140,7 +1140,7 @@ + } + } + +- eCoord pcpos = (0,0); ++ eCoord pcpos(0,0); + if (p->Object() && p->Object()->Alive()) { + pcpos = p->Object()->Position(); } + only in patch2: unchanged: --- armagetron-0.2.7.0.orig/debian/patches/00list +++ armagetron-0.2.7.0/debian/patches/00list @@ -0,0 +1 @@ +10_gcc4 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]