r14282 - in packages/trunk/billard-gl/debian: . patches

Barry deFreese bdefreese at alioth.debian.org
Thu Jun 20 18:45:10 UTC 2013


Author: bdefreese
Date: 2013-06-20 18:45:10 +0000 (Thu, 20 Jun 2013)
New Revision: 14282

Added:
   packages/trunk/billard-gl/debian/billard-gl.manpages
Modified:
   packages/trunk/billard-gl/debian/billard-gl.install
   packages/trunk/billard-gl/debian/changelog
   packages/trunk/billard-gl/debian/compat
   packages/trunk/billard-gl/debian/control
   packages/trunk/billard-gl/debian/patches/05_Makefile.patch
   packages/trunk/billard-gl/debian/patches/99_cosmetic_fixes.patch
   packages/trunk/billard-gl/debian/rules
Log:
Update to dh style rules.  Add hardening flags

Modified: packages/trunk/billard-gl/debian/billard-gl.install
===================================================================
--- packages/trunk/billard-gl/debian/billard-gl.install	2013-06-19 18:56:12 UTC (rev 14281)
+++ packages/trunk/billard-gl/debian/billard-gl.install	2013-06-20 18:45:10 UTC (rev 14282)
@@ -1 +1,3 @@
 src/billard-gl usr/games
+debian/billard-gl.desktop usr/share/applications
+debian/billard-gl.xpm usr/share/pixmaps

Added: packages/trunk/billard-gl/debian/billard-gl.manpages
===================================================================
--- packages/trunk/billard-gl/debian/billard-gl.manpages	                        (rev 0)
+++ packages/trunk/billard-gl/debian/billard-gl.manpages	2013-06-20 18:45:10 UTC (rev 14282)
@@ -0,0 +1 @@
+debian/billard-gl.6

Modified: packages/trunk/billard-gl/debian/changelog
===================================================================
--- packages/trunk/billard-gl/debian/changelog	2013-06-19 18:56:12 UTC (rev 14281)
+++ packages/trunk/billard-gl/debian/changelog	2013-06-20 18:45:10 UTC (rev 14282)
@@ -1,10 +1,17 @@
-billard-gl (1.75-12) UNRELEASED; urgency=low
+billard-gl (1.75-12) unstable; urgency=low
 
+  [ Vincent Legout ]
   * Add 06_language_pack.patch: Fix a segmentation fault due to missing
     strings in language files (Closes: #580711)
 
- -- Vincent Legout <vincent at legout.info>  Sat, 08 May 2010 22:29:21 +0800
+  [ Barry deFreese ]
+  * Update rules to dh style.
+    + Bump debhelper build-dep and compat to 9.
+  * Update 05_Makefile.patch to set LFLAGS = $(LDFLAGS).
+  * Bump Standards Version to 3.9.4.
 
+ -- Barry deFreese <bdefreese at debian.org>  Wed, 19 Jun 2013 17:25:00 -0400
+
 billard-gl (1.75-11) unstable; urgency=low
 
   [ Gonéri Le bouder ]

Modified: packages/trunk/billard-gl/debian/compat
===================================================================
--- packages/trunk/billard-gl/debian/compat	2013-06-19 18:56:12 UTC (rev 14281)
+++ packages/trunk/billard-gl/debian/compat	2013-06-20 18:45:10 UTC (rev 14282)
@@ -1 +1 @@
-5
+9

Modified: packages/trunk/billard-gl/debian/control
===================================================================
--- packages/trunk/billard-gl/debian/control	2013-06-19 18:56:12 UTC (rev 14281)
+++ packages/trunk/billard-gl/debian/control	2013-06-20 18:45:10 UTC (rev 14282)
@@ -3,8 +3,8 @@
 Priority: optional
 Maintainer: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
 Uploaders: Bartosz Fenski <fenio at debian.org>, Barry deFreese <bdefreese at debian.org>
-Build-Depends: debhelper (>= 5), freeglut3-dev, dpkg-dev (>= 1.13.19)
-Standards-Version: 3.8.4
+Build-Depends: debhelper (>= 9), freeglut3-dev, dpkg-dev (>= 1.16.1~)
+Standards-Version: 3.9.4
 Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/billard-gl/
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/billard-gl/?op=log
 Homepage: http://www.billardgl.de/index-en.html

Modified: packages/trunk/billard-gl/debian/patches/05_Makefile.patch
===================================================================
--- packages/trunk/billard-gl/debian/patches/05_Makefile.patch	2013-06-19 18:56:12 UTC (rev 14281)
+++ packages/trunk/billard-gl/debian/patches/05_Makefile.patch	2013-06-20 18:45:10 UTC (rev 14282)
@@ -1,8 +1,10 @@
 Author: Thierry Reding <thierry at doppeltgemoppelt.de>
 Description: Fix makefile to generate lowercase name for executable.
  Enable debian/rules to pass additional CFLAGS.
---- a/src/Makefile
-+++ b/src/Makefile
+Index: billard-gl-1.75/src/Makefile
+===================================================================
+--- billard-gl-1.75.orig/src/Makefile	2013-06-19 18:29:12.000000000 -0400
++++ billard-gl-1.75/src/Makefile	2013-06-19 18:29:45.000000000 -0400
 @@ -7,12 +7,12 @@
  
  CC	=	gcc
@@ -13,9 +15,10 @@
 +CXXFLAGS=	-pipe -Wall -W -DNO_DEBUG $(MORE_CFLAGS)
  INCPATH	=	-I/usr/X11R6/include 
  LINK	=	g++
- LFLAGS	=	
+-LFLAGS	=	
 -LIBS	=	-L/usr/X11R6/lib -lGL -lGLU -lglut -lXmu -lXext -lX11 -lm -lXi
-+LIBS	=	-lGL -lGLU -lglut
++LFLAGS	=	$(LDFLAGS)
++LIBS	=	-lGL -lGLU -lglut
  
  ## -lqgl -lGLU
  

Modified: packages/trunk/billard-gl/debian/patches/99_cosmetic_fixes.patch
===================================================================
--- packages/trunk/billard-gl/debian/patches/99_cosmetic_fixes.patch	2013-06-19 18:56:12 UTC (rev 14281)
+++ packages/trunk/billard-gl/debian/patches/99_cosmetic_fixes.patch	2013-06-20 18:45:10 UTC (rev 14282)
@@ -1,7 +1,11 @@
 Author: Thierry Reding <thierry at doppeltgemoppelt.de>
 Description: Fixes a couple of compiler warnings.
---- a/src/BillardGL.cpp
-+++ b/src/BillardGL.cpp
+Updated: 6/20/2013 - Barry deFreese <bdefreese at debian.org>.
+         Fixed several warnings on string conversions and missing parens.
+Index: billard-gl-1.75/src/BillardGL.cpp
+===================================================================
+--- billard-gl-1.75.orig/src/BillardGL.cpp	2013-06-19 18:36:57.000000000 -0400
++++ billard-gl-1.75/src/BillardGL.cpp	2013-06-20 04:35:45.000000000 -0400
 @@ -35,8 +35,6 @@
  
  #include "BillardGL.h"
@@ -11,8 +15,10 @@
  //Tabellen
  GLfloat Bewegungstabelle[2000][16][3];
  GLint   Soundtabelle[1000];
---- a/src/bmp.cpp
-+++ b/src/bmp.cpp
+Index: billard-gl-1.75/src/bmp.cpp
+===================================================================
+--- billard-gl-1.75.orig/src/bmp.cpp	2013-06-19 18:36:57.000000000 -0400
++++ billard-gl-1.75/src/bmp.cpp	2013-06-20 04:35:45.000000000 -0400
 @@ -4,14 +4,16 @@
  // Modified by Volker Blanz, 25.4.2001
  //
@@ -32,8 +38,10 @@
  // from ioutil:
  
  WORDX readWord(FILE *f) {
---- a/src/Kugel.cpp
-+++ b/src/Kugel.cpp
+Index: billard-gl-1.75/src/Kugel.cpp
+===================================================================
+--- billard-gl-1.75.orig/src/Kugel.cpp	2013-06-19 18:36:57.000000000 -0400
++++ billard-gl-1.75/src/Kugel.cpp	2013-06-20 05:21:02.000000000 -0400
 @@ -123,7 +123,7 @@
          glBindTexture(GL_TEXTURE_2D,Texturen[TG]);
  	sprintf(Name,"Texturen/%i/%i.bmp",TG,Nr); 
@@ -43,3 +51,243 @@
  	if (tex_r.nrh!=tex_r.nch) {
  	  GLfloat Aspekt=(tex_r.nch+1.0)/(tex_r.nrh+1.0);
  	  texcoord = (GLfloat*) malloc (20*(Aufloesung+1)*(Aufloesung+2)*sizeof(GLfloat));
+@@ -419,17 +419,17 @@
+ }
+ 
+ void Kugel::neuePositionCM(GLfloat neuPos[]) {
+-  GLfloat Pos[]={neuPos[0]/2.8575,neuPos[1]/2.8575,neuPos[2]/2.8575};
++  GLfloat Pos[]={static_cast<GLfloat>(neuPos[0]/2.8575),static_cast<GLfloat>(neuPos[1]/2.8575),static_cast<GLfloat>(neuPos[2]/2.8575)};
+   neuePosition(Pos);
+ }
+ 
+ void Kugel::neuePositionCM(GLfloat neuPos_x,GLfloat neuPos_y,GLfloat neuPos_z) {
+-  GLfloat Pos[]={neuPos_x/2.8575,neuPos_y/2.8575,neuPos_z/2.8575};
++  GLfloat Pos[]={static_cast<GLfloat>(neuPos_x/2.8575),static_cast<GLfloat>(neuPos_y/2.8575),static_cast<GLfloat>(neuPos_z/2.8575)};
+   neuePosition(Pos);
+ }
+ 
+ void Kugel::neuePositionCM(GLfloat neuPos_x,GLfloat neuPos_y) {
+-  GLfloat Pos[]={neuPos_x/2.8575,neuPos_y/2.8575,0.0};
++  GLfloat Pos[]={static_cast<GLfloat>(neuPos_x/2.8575),static_cast<GLfloat>(neuPos_y/2.8575),0.0};
+   neuePosition(Pos);
+ }
+ 
+@@ -449,17 +449,17 @@
+ }
+ 
+ void Kugel::neuePositionINCH(GLfloat neuPos[]) {
+-  GLfloat Pos[]={neuPos[0]/1.125,neuPos[1]/1.125,neuPos[2]/1.125};
++  GLfloat Pos[]={static_cast<GLfloat>(neuPos[0]/1.125),static_cast<GLfloat>(neuPos[1]/1.125),static_cast<GLfloat>(neuPos[2]/1.125)};
+   neuePosition(Pos);
+ }
+ 
+ void Kugel::neuePositionINCH(GLfloat neuPos_x,GLfloat neuPos_y,GLfloat neuPos_z) {
+-  GLfloat Pos[]={neuPos_x/1.125,neuPos_y/1.125,neuPos_z/1.125};
++  GLfloat Pos[]={static_cast<GLfloat>(neuPos_x/1.125),static_cast<GLfloat>(neuPos_y/1.125),static_cast<GLfloat>(neuPos_z/1.125)};
+   neuePosition(Pos);
+ }
+ 
+ void Kugel::neuePositionINCH(GLfloat neuPos_x,GLfloat neuPos_y) {
+-  GLfloat Pos[]={neuPos_x/1.125,neuPos_y/1.125,0.0};
++  GLfloat Pos[]={static_cast<GLfloat>(neuPos_x/1.125),static_cast<GLfloat>(neuPos_y/1.125),0.0};
+   neuePosition(Pos);
+ }
+ 
+Index: billard-gl-1.75/src/Textfeld.cpp
+===================================================================
+--- billard-gl-1.75.orig/src/Textfeld.cpp	2002-04-23 12:08:13.000000000 -0400
++++ billard-gl-1.75/src/Textfeld.cpp	2013-06-20 06:30:40.000000000 -0400
+@@ -168,12 +168,12 @@
+   Horchen=0;
+ }  
+ 
+-void Textfeld::Initialisiere(GLint DLA, char TextZ[]){
++void Textfeld::Initialisiere(GLint DLA, const char TextZ[]){
+   Initialisiere(DLA);
+   SetzeText(TextZ);
+ }
+ 
+-void Textfeld::InitialisiereKDL(GLint DLA, char TextZ[]){
++void Textfeld::InitialisiereKDL(GLint DLA, const char TextZ[]){
+   Initialisiere(DLA);
+   SetzeTextKDL(TextZ);
+ }
+@@ -245,7 +245,7 @@
+ }
+ 
+ 
+-void Textfeld::SetzeText(char TextZ[]){
++void Textfeld::SetzeText(const char TextZ[]){
+   int i=0;
+   while (TextZ[i] && i<1999) {
+     Zeichenkette[i]=TextZ[i];
+@@ -255,7 +255,7 @@
+   GeneriereDisplayList();
+ }
+ 
+-void Textfeld::SetzeTextKDL(char TextZ[]){
++void Textfeld::SetzeTextKDL(const char TextZ[]){
+   int i=0;
+   while (TextZ[i] && i<1999) {
+     Zeichenkette[i]=TextZ[i];
+Index: billard-gl-1.75/src/Textfeld.h
+===================================================================
+--- billard-gl-1.75.orig/src/Textfeld.h	2002-04-23 12:10:50.000000000 -0400
++++ billard-gl-1.75/src/Textfeld.h	2013-06-20 06:28:31.000000000 -0400
+@@ -3,13 +3,13 @@
+   Textfeld();
+   GLint dummyInitialisiere(GLint);
+   void Initialisiere(GLint);
+-  void Initialisiere(GLint,char[]);
+-  void InitialisiereKDL(GLint,char[]);
++  void Initialisiere(GLint,const char[]);
++  void InitialisiereKDL(GLint,const char[]);
+   void male();
+   void Positioniere(GLfloat,GLfloat,GLfloat,GLint);
+   void PositioniereFix(GLfloat,GLfloat,GLfloat,GLint);
+-  void SetzeText(char[]);
+-  void SetzeTextKDL(char[]);
++  void SetzeText(const char[]);
++  void SetzeTextKDL(const char[]);
+   GLint Zeichen(char);
+   char* Text();
+ 
+Index: billard-gl-1.75/src/Schild.h
+===================================================================
+--- billard-gl-1.75.orig/src/Schild.h	2002-04-23 12:10:11.000000000 -0400
++++ billard-gl-1.75/src/Schild.h	2013-06-20 06:39:37.000000000 -0400
+@@ -4,10 +4,10 @@
+   Schild();
+   void Initialisiere();
+   void InitialisiereLogo();
+-  void Initialisiere(GLint,char[]);
+-  void InitialisiereBuchstabe(GLint,char[]);
+-  void Initialisiere(GLint,char[],char);
+-  void Initialisiere(GLint,char[],char[]);
++  void Initialisiere(GLint,const char[]);
++  void InitialisiereBuchstabe(GLint,const char[]);
++  void Initialisiere(GLint,const char[],char);
++  void Initialisiere(GLint,const char[],const char[]);
+   void male();
+   void Positioniere(GLfloat,GLfloat,GLfloat,GLfloat);
+   void PositioniereFix(GLfloat,GLfloat,GLfloat,GLfloat);
+Index: billard-gl-1.75/src/Schild.cpp
+===================================================================
+--- billard-gl-1.75.orig/src/Schild.cpp	2002-04-23 12:09:55.000000000 -0400
++++ billard-gl-1.75/src/Schild.cpp	2013-06-20 07:05:24.000000000 -0400
+@@ -31,8 +31,8 @@
+ }
+ 
+ void Schild::Initialisiere(GLint TexGr,
+-			   char Name[],
+-			   char AlphaName[]){
++			   const char Name[],
++			   const char AlphaName[]){
+   FMatrix texr,texg,texb,texa;     // Matrix-Bilder, in die die Textur kommt
+   if (!SchildIndex) {
+     SchildIndex=glGenLists(1);
+@@ -80,7 +80,7 @@
+ }
+ 
+ void Schild::Initialisiere(GLint TexGr,
+-			   char Name[]){
++			   const char Name[]){
+   FMatrix texr,texg,texb;     // Matrix-Bilder, in die die Textur kommt
+   if (!SchildIndex) {
+     SchildIndex=glGenLists(1);
+@@ -155,7 +155,7 @@
+ }
+ 
+ void Schild::InitialisiereBuchstabe(GLint TexGr,
+-			   char Name[]){
++			   const char Name[]){
+   FMatrix texr,texg,texb;     // Matrix-Bilder, in die die Textur kommt
+   if (!SchildIndex) {
+     SchildIndex=glGenLists(1);
+@@ -199,7 +199,7 @@
+ }
+ 
+ void Schild::Initialisiere(GLint TexGr,
+-			   char Name[],
++			   const char Name[],
+ 			   char Land){
+   Land='c';
+   FMatrix texr,texg,texb;     // Matrix-Bilder, in die die Textur kommt
+Index: billard-gl-1.75/src/Schiedsrichter.cpp
+===================================================================
+--- billard-gl-1.75.orig/src/Schiedsrichter.cpp	2002-04-22 06:40:54.000000000 -0400
++++ billard-gl-1.75/src/Schiedsrichter.cpp	2013-06-20 07:04:45.000000000 -0400
+@@ -115,8 +115,8 @@
+   KugelnAnBande[Kugel]=JA;
+   
+   if (!ErsteBeruehrteKugel && ((Bande==20) ||
+-			      (Bande==21) && (Kugelx<-63.5) ||
+-			      (Bande==23) && (Kugelx<-63.5))) {
++			      ((Bande==21) && (Kugelx<-63.5)) ||
++			      ((Bande==23) && (Kugelx<-63.5)))) {
+       BandeAusserhalbKopffeldvorKugelBeruehrt = JA;
+   }
+ }
+@@ -236,17 +236,17 @@
+ 	  ErsteVersenkteKugel &&
+ 	  ErsteBeruehrteKugel != 8 &&
+ 	  ErsteVersenkteKugel != 8) {
+-	if ((SpielerAmStoss == SPIELER1) &&
+-	    (ErsteVersenkteKugel < 8) ||
+-	    (SpielerAmStoss == SPIELER2) &&
+-	    (ErsteVersenkteKugel > 8)) {
++	if (((SpielerAmStoss == SPIELER1) &&
++	    (ErsteVersenkteKugel < 8)) ||
++	    ((SpielerAmStoss == SPIELER2) &&
++	    (ErsteVersenkteKugel > 8))) {
+ 	  GruppenVerteilung = S1_GANZE_S2_HALBE;
+ 	  //printf("Gruppenverteilung:  S1_GANZE_S2_HALBE\n");
+ 	}
+-	if ((SpielerAmStoss == SPIELER1) &&
+-	    (ErsteVersenkteKugel > 8) ||
+-	    (SpielerAmStoss == SPIELER2) &&
+-	    (ErsteVersenkteKugel < 8)) {
++	if (((SpielerAmStoss == SPIELER1) &&
++	    (ErsteVersenkteKugel > 8)) ||
++	    ((SpielerAmStoss == SPIELER2) &&
++	    (ErsteVersenkteKugel < 8))) {
+ 	  GruppenVerteilung = S1_HALBE_S2_GANZE;
+ 	  //printf("Gruppenverteilung:  S1_HALBE_S2_GANZE\n");
+ 	}      
+@@ -274,10 +274,10 @@
+ 	}
+       }
+ 
+-      if ((SpielerAmStoss==SPIELER1) &&
+-	  (FoulsHintereinanderSpieler1 == 3) ||
+-	  (SpielerAmStoss==SPIELER2) &&
+-	  (FoulsHintereinanderSpieler2 == 3)) {
++      if (((SpielerAmStoss==SPIELER1) &&
++	  (FoulsHintereinanderSpieler1 == 3)) ||
++	  ((SpielerAmStoss==SPIELER2) &&
++	  (FoulsHintereinanderSpieler2 == 3))) {
+ 	Verloren = JA;
+ 	//printf("Verloren durch drei Fouls hintereinander\n");
+       }
+@@ -485,7 +485,7 @@
+ 
+ GLint Schiedsrichter::FarbigeKugel(GLint Kugel){
+   if (Spiel==ACHTBALL) {
+-    if (0<Kugel && Kugel<8 || 8<Kugel && Kugel<16) {
++    if ((0<Kugel && Kugel<8) || (8<Kugel && Kugel<16)) {
+       return JA;
+     }
+    }
+Index: billard-gl-1.75/src/SpielfeldAufbau.cpp
+===================================================================
+--- billard-gl-1.75.orig/src/SpielfeldAufbau.cpp	2002-04-22 06:43:39.000000000 -0400
++++ billard-gl-1.75/src/SpielfeldAufbau.cpp	2013-06-20 07:12:58.000000000 -0400
+@@ -78,7 +78,7 @@
+ 	    }
+ 	  }
+ 	}
+-      } while ((nummer[1]<8)&&(nummer[15]<8)||(nummer[1]>8)&&(nummer[15]>8));
++      } while (((nummer[1]<8)&&(nummer[15]<8))||((nummer[1]>8)&&(nummer[15]>8)));
+       
+       Kugel[nummer[0]].neuePositionCM(-63.5,0.0);
+       Kugel[nummer[1]].neuePositionCM(63.5+12*asw3+random(Epsilon),-2.0*a+random(Epsilon));

Modified: packages/trunk/billard-gl/debian/rules
===================================================================
--- packages/trunk/billard-gl/debian/rules	2013-06-19 18:56:12 UTC (rev 14281)
+++ packages/trunk/billard-gl/debian/rules	2013-06-20 18:45:10 UTC (rev 14282)
@@ -1,76 +1,31 @@
 #!/usr/bin/make -f
 
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+MORE_CFLAGS=$(shell dpkg-buildflags --get CPPFLAGS) \
+	$(shell dpkg-buildflags --get CFLAGS) \
+	$(shell dpkg-buildflags --get CXXFLAGS)
+
 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
-export MORE_CFLAGS=-g
+export MORE_CFLAGS+=-g
 else
-export MORE_CFLAGS=-O2
+export MORE_CFLAGS+=-O2
 endif
 
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 	INSTALL_PROGRAM += -s
 endif
 
-build: build-stamp
+%:
+	dh $@ -Dsrc
 
-build-stamp:
-	dh_testdir
-	$(MAKE) -C src
-	touch build-stamp
+override_dh_auto_install:
 
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp
-	$(MAKE) -C src clean
-	dh_clean
+override_dh_installchangelogs:
+	dh_installchangelogs src/README
 
-install-indep:
-	dh_testdir
-	dh_testroot
-	dh_install -i
-	# dh_fixperms doesn't catch this
+override_dh_fixperms:
+	dh_fixperms
 	chmod 0644 debian/billard-gl-data/usr/share/games/billard-gl/Texturen/2/filzkachel.bmp
 
-install-arch: build
-	dh_testdir
-	dh_testroot
-	dh_install -a
-	install -D -m 644 $(CURDIR)/debian/billard-gl.desktop $(CURDIR)/debian/billard-gl/usr/share/applications/billard-gl.desktop
-	install -D -m 644 $(CURDIR)/debian/billard-gl.xpm $(CURDIR)/debian/billard-gl/usr/share/pixmaps/billard-gl.xpm
-
-install: install-arch install-indep
-
-binary-indep: install-indep
-	dh_testdir
-	dh_testroot
-	dh_installdocs -i
-	dh_installchangelogs -i src/README
-	dh_link -i
-	dh_compress -i
-	dh_fixperms -i
-	dh_installdeb -i
-	dh_gencontrol -i
-	dh_md5sums -i
-	dh_builddeb -i
-
-binary-arch: install-arch
-	dh_testdir
-	dh_testroot
-	dh_installdocs -a
-	dh_installmenu -a
-	dh_installman -a debian/billard-gl.6
-	dh_installchangelogs -a src/README
-	dh_link -a
-	dh_strip -a
-	dh_compress -a
-	dh_fixperms -a
-	dh_installdeb -a
-	dh_shlibdeps -a
-	dh_gencontrol -a
-	dh_md5sums -a
-	dh_builddeb -a
-
-binary: binary-indep binary-arch
-
-.PHONY: build clean clean-patched binary-indep binary-arch binary \
-        install-indep install-arch install




More information about the Pkg-games-commits mailing list