tags 619717 - upstream tags 619714 + patch quit Pascal Giard wrote:
> I'm a bit puzzled by your bug report... > The patch you provided is not required for Debian unless I'm missing > something. I've modified the Makefile.am from upstream long time ago. > Am I missing something? Oh! When I unpack the source, the brace expansions (except in the zip target) are already fine, just as you say. Then "debian/rules patch-stamp" makes trouble, via 01-atris-1.0.7.Makefile.am_pathfix.diff. So it looks like this wasn't an upstream bug after all. Here's a better patch. --- debian/changelog | 9 ++++++++ Makefile.am | 20 +++++++++++++----- atris.c | 14 +++++++----- configure.in | 10 +++++++- .../00-atris-1.0.7.configure.in_pathfix.diff | 4 +- .../01-atris-1.0.7.Makefile.am_pathfix.diff | 21 +++++++++++++++---- debian/patches/02-atris-1.0.7.proper_statedir.diff | 8 +++--- .../03-atris-1.0.7.font_from_ttf-freefont.diff | 4 +- debian/patches/04-atris-1.0.7.window_mode_fix.diff | 4 +- .../patches/05-atris-1.0.7.atrisrc.perms.fix.diff | 4 +- debian/patches/series | 6 +++++ debian/source/format | 1 + highscore.c | 2 +- identity.c | 2 +- 14 files changed, 76 insertions(+), 33 deletions(-) create mode 100644 debian/patches/series create mode 100644 debian/source/format diff --git a/debian/changelog b/debian/changelog index 225cd23d..7e8d4d87 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +atris (1.0.7.dfsg.1-7.2) local; urgency=low + + * [debian/patches/01-atris-1.0.7.Makefile.am_pathfix.diff]: + - Avoid brace expansions (closes: #619717). + * [debian/patches, debian/source/format]: + - Use source format 3.0 (quilt) (closes: #619714). + + -- Jonathan Nieder <jrnie...@gmail.com> Sun, 11 Dec 2011 10:23:38 -0600 + atris (1.0.7.dfsg.1-7.1) unstable; urgency=low * Non-maintainer upload. diff --git a/Makefile.am b/Makefile.am index 7f9e6a1e..561186a4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -51,21 +51,27 @@ SUBDIRS = .protos graphics styles Docs # Special install rule for the game install: install-am - make install_gamedata target=@GAME_INSTALLDIR@ + make install_gamedata target=$(DESTDIR)@GAME_INSTALLDIR@ \ + statedir=$(DESTDIR)@STATE_INSTALLDIR@ install_gamedata: sh mkinstalldirs $(target)/ cp -rv graphics \ styles \ - Atris.Players \ - Atris.Scores \ $(target)/ - chmod 666 $(target)/Atris.Players - chmod 666 $(target)/Atris.Scores + -rm -f $(target)/graphics/Makefile* $(target)/styles/Makefile* + + sh mkinstalldirs / $(statedir)/ + cp -rv Atris.Players \ + Atris.Scores \ + $(statedir)/ + chmod 666 $(statedir)/Atris.Players $(statedir)/Atris.Scores + chown .games $(statedir)/Atris.Players $(statedir)/Atris.Scores install_gamedocs: sh mkinstalldirs $(target)/ cp -rv README* COPYING* Docs* $(target)/ + -rm -f $(target)/Docs/Makefile* # Rule to build tar-gzipped distribution package $(PACKAGE)-$(VERSION).tar.gz: dist @@ -84,7 +90,9 @@ zip: distdir $(PACKAGE) mv $(PACKAGE) $(PACKAGE)-$(VERSION)/$(PACKAGE).exe mv $(PACKAGE)-$(VERSION) $(PACKAGE) cp ~/*.dll $(PACKAGE) - rm $(PACKAGE)/config* $(PACKAGE)/*.[ch] $(PACKAGE)/Make* $(PACKAGE)/*.m4 $(PACKAGE)/{install-sh,missing,mkinstalldirs,autogen.sh} + rm $(PACKAGE)/config* $(PACKAGE)/*.[ch] $(PACKAGE)/Make* $(PACKAGE)/*.m4 + rm $(PACKAGE)/install-sh $(PACKAGE)/missing $(PACKAGE)/mkinstalldirs + rm $(PACKAGE)/autogen.sh rm $(PACKAGE)/*.in -r $(PACKAGE)/.protos zip -r9 $(PACKAGE)-$(VERSION)-win32.zip $(PACKAGE) rm -r $(PACKAGE) diff --git a/atris.c b/atris.c index a621e225..0e52ac9d 100644 --- a/atris.c +++ b/atris.c @@ -147,6 +147,8 @@ save_options(char *filespec) void load_options(char * filespec) { + umask(0022); + FILE *fin = fopen(filespec, "rt"); Options.full_screen = TRUE; @@ -947,7 +949,7 @@ main(int argc, char *argv[]) /* Initialize the display in a 640x480 native-depth mode */ flags = // SDL_HWSURFACE | SDL_SWSURFACE | - SDL_FULLSCREEN | + // SDL_FULLSCREEN | // SDL_SRCCOLORKEY | // SDL_ANYFORMAT | 0; @@ -976,11 +978,11 @@ main(int argc, char *argv[]) Debug("Changing directory to [%s]\n",ATRIS_LIBDIR); /* Set up the font */ - sfont = TTF_OpenFont("graphics/NewMediumNormal.ttf",18); - font = TTF_OpenFont("graphics/NewMediumNormal.ttf",24); - lfont = TTF_OpenFont("graphics/NewMediumNormal.ttf",36); - hfont = TTF_OpenFont("graphics/NewMediumNormal.ttf",96); - if ( font == NULL ) PANIC("Couldn't open [graphics/NewMediumNormal.ttf].", ATRIS_LIBDIR); + sfont = TTF_OpenFont("/usr/share/fonts/truetype/freefont/FreeSans.ttf",18); + font = TTF_OpenFont("/usr/share/fonts/truetype/freefont/FreeSans.ttf",24); + lfont = TTF_OpenFont("/usr/share/fonts/truetype/freefont/FreeSans.ttf",36); + hfont = TTF_OpenFont("/usr/share/fonts/truetype/freefont/FreeSans.ttf",96); + if ( font == NULL ) PANIC("Couldn't open [freefont/FreeSans.ttf].", "/usr/share/fonts/truetype/"); TTF_SetFontStyle(font, renderstyle); TTF_SetFontStyle(sfont, renderstyle); /* Initialize scores */ diff --git a/configure.in b/configure.in index 61b14f30..034f17c0 100644 --- a/configure.in +++ b/configure.in @@ -52,16 +52,19 @@ AC_CHECK_FUNCS(select,,[ case "$target" in *-*-mingw32*) GAME_INSTALLDIR="C:/Program\\ Files/$PACKAGE" + STATE_INSTALLDIR="C:/Program\\ Files/$PACKAGE" CFLAGS="$CFLAGS -s" ;; *) - GAME_INSTALLDIR="\$(prefix)/games/$PACKAGE" + GAME_INSTALLDIR="\$(datadir)/games/$PACKAGE" + STATE_INSTALLDIR="\$(localstatedir)/games/$PACKAGE" ;; esac AC_SUBST(GAME_INSTALLDIR) +AC_SUBST(STATE_INSTALLDIR) dnl Check for SDL SDL_VERSION=1.1.6 @@ -69,7 +72,7 @@ AM_PATH_SDL($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found! Get it from http://www.libsdl.org ]) ) -CFLAGS="$CFLAGS -Wall -Wimplicit -Wsign-compare -Wpointer-arith $SDL_CFLAGS -DATRIS_LIBDIR=\\\"$GAME_INSTALLDIR\\\"" +CFLAGS="$CFLAGS -Wall -Wimplicit -Wsign-compare -Wpointer-arith $SDL_CFLAGS -DATRIS_LIBDIR=\\\"$GAME_INSTALLDIR\\\" -DATRIS_STATEDIR=\\\"$STATE_INSTALLDIR\\\"" LIBS="$LIBS $SDL_LIBS" # Finally create all the generated files @@ -92,7 +95,10 @@ Configuration: Host System Type: ${host} Libraries: ${LIBS} Install path: ${prefix} + Data Install path: ${datadir} + Binary Install path: ${bindir} Game files: ${GAME_INSTALLDIR} + Game state files: ${STATE_INSTALLDIR} Now type 'make' to build $PACKAGE $VERSION. " diff --git a/debian/patches/00-atris-1.0.7.configure.in_pathfix.diff b/debian/patches/00-atris-1.0.7.configure.in_pathfix.diff index 07acf2b8..44eab34a 100644 --- a/debian/patches/00-atris-1.0.7.configure.in_pathfix.diff +++ b/debian/patches/00-atris-1.0.7.configure.in_pathfix.diff @@ -1,5 +1,5 @@ ---- configure.in.old 2003-07-14 19:21:05.000000000 -0400 -+++ configure.in 2004-09-12 15:07:23.000000000 -0400 +--- a/configure.in 2003-07-14 19:21:05.000000000 -0400 ++++ b/configure.in 2004-09-12 15:07:23.000000000 -0400 @@ -52,16 +52,19 @@ case "$target" in *-*-mingw32*) diff --git a/debian/patches/01-atris-1.0.7.Makefile.am_pathfix.diff b/debian/patches/01-atris-1.0.7.Makefile.am_pathfix.diff index bc9b503f..9e45ecc8 100644 --- a/debian/patches/01-atris-1.0.7.Makefile.am_pathfix.diff +++ b/debian/patches/01-atris-1.0.7.Makefile.am_pathfix.diff @@ -1,5 +1,5 @@ ---- Makefile.am.old 2004-09-12 15:41:48.000000000 -0400 -+++ Makefile.am 2004-09-12 15:40:15.000000000 -0400 +--- a/Makefile.am ++++ b/Makefile.am @@ -51,21 +51,27 @@ # Special install rule for the game @@ -17,14 +17,14 @@ $(target)/ - chmod 666 $(target)/Atris.Players - chmod 666 $(target)/Atris.Scores -+ -rm -f $(target)/{graphics,styles}/Makefile* ++ -rm -f $(target)/graphics/Makefile* $(target)/styles/Makefile* + + sh mkinstalldirs / $(statedir)/ + cp -rv Atris.Players \ + Atris.Scores \ + $(statedir)/ -+ chmod 666 $(statedir)/Atris.{Players,Scores} -+ chown .games $(statedir)/Atris.{Players,Scores} ++ chmod 666 $(statedir)/Atris.Players $(statedir)/Atris.Scores ++ chown .games $(statedir)/Atris.Players $(statedir)/Atris.Scores install_gamedocs: sh mkinstalldirs $(target)/ @@ -33,3 +33,14 @@ # Rule to build tar-gzipped distribution package $(PACKAGE)-$(VERSION).tar.gz: dist +@@ -84,7 +90,9 @@ + mv $(PACKAGE) $(PACKAGE)-$(VERSION)/$(PACKAGE).exe + mv $(PACKAGE)-$(VERSION) $(PACKAGE) + cp ~/*.dll $(PACKAGE) +- rm $(PACKAGE)/config* $(PACKAGE)/*.[ch] $(PACKAGE)/Make* $(PACKAGE)/*.m4 $(PACKAGE)/{install-sh,missing,mkinstalldirs,autogen.sh} ++ rm $(PACKAGE)/config* $(PACKAGE)/*.[ch] $(PACKAGE)/Make* $(PACKAGE)/*.m4 ++ rm $(PACKAGE)/install-sh $(PACKAGE)/missing $(PACKAGE)/mkinstalldirs ++ rm $(PACKAGE)/autogen.sh + rm $(PACKAGE)/*.in -r $(PACKAGE)/.protos + zip -r9 $(PACKAGE)-$(VERSION)-win32.zip $(PACKAGE) + rm -r $(PACKAGE) diff --git a/debian/patches/02-atris-1.0.7.proper_statedir.diff b/debian/patches/02-atris-1.0.7.proper_statedir.diff index 54120dd1..5378738a 100644 --- a/debian/patches/02-atris-1.0.7.proper_statedir.diff +++ b/debian/patches/02-atris-1.0.7.proper_statedir.diff @@ -1,5 +1,5 @@ ---- highscore.c.old 2000-11-10 13:35:16.000000000 -0500 -+++ highscore.c 2004-09-12 15:07:33.000000000 -0400 +--- a/highscore.c 2000-11-10 13:35:16.000000000 -0500 ++++ b/highscore.c 2004-09-12 15:07:33.000000000 -0400 @@ -59,7 +59,7 @@ if (!loaded) return; @@ -9,8 +9,8 @@ if (!fout) { Debug("Unable to write High Score file [Atris.Scores]: %s\n", strerror(errno)); return; ---- identity.c.old 2000-11-10 13:35:16.000000000 -0500 -+++ identity.c 2004-09-12 15:07:38.000000000 -0400 +--- a/identity.c 2000-11-10 13:35:16.000000000 -0500 ++++ b/identity.c 2004-09-12 15:07:38.000000000 -0400 @@ -17,7 +17,7 @@ #include "xflame.pro" #include "display.pro" diff --git a/debian/patches/03-atris-1.0.7.font_from_ttf-freefont.diff b/debian/patches/03-atris-1.0.7.font_from_ttf-freefont.diff index 64430036..27c7ed69 100644 --- a/debian/patches/03-atris-1.0.7.font_from_ttf-freefont.diff +++ b/debian/patches/03-atris-1.0.7.font_from_ttf-freefont.diff @@ -1,5 +1,5 @@ ---- atris.c.old 2005-03-11 02:16:39.867540968 -0500 -+++ atris.c 2005-03-11 02:21:28.503661608 -0500 +--- a/atris.c 2005-03-11 02:16:39.867540968 -0500 ++++ b/atris.c 2005-03-11 02:21:28.503661608 -0500 @@ -976,11 +976,11 @@ Debug("Changing directory to [%s]\n",ATRIS_LIBDIR); diff --git a/debian/patches/04-atris-1.0.7.window_mode_fix.diff b/debian/patches/04-atris-1.0.7.window_mode_fix.diff index 94331862..adcf9dd2 100644 --- a/debian/patches/04-atris-1.0.7.window_mode_fix.diff +++ b/debian/patches/04-atris-1.0.7.window_mode_fix.diff @@ -1,5 +1,5 @@ ---- atris.c.old 2005-11-30 00:19:00.000000000 -0500 -+++ atris.c 2005-11-30 00:19:28.000000000 -0500 +--- a/atris.c 2005-11-30 00:19:00.000000000 -0500 ++++ b/atris.c 2005-11-30 00:19:28.000000000 -0500 @@ -947,7 +947,7 @@ /* Initialize the display in a 640x480 native-depth mode */ flags = // SDL_HWSURFACE | diff --git a/debian/patches/05-atris-1.0.7.atrisrc.perms.fix.diff b/debian/patches/05-atris-1.0.7.atrisrc.perms.fix.diff index 95f8e7ae..60c728c3 100644 --- a/debian/patches/05-atris-1.0.7.atrisrc.perms.fix.diff +++ b/debian/patches/05-atris-1.0.7.atrisrc.perms.fix.diff @@ -1,5 +1,5 @@ ---- atris.c.old 2007-04-04 16:04:36.000000000 -0400 -+++ atris.c 2007-04-04 16:05:26.000000000 -0400 +--- a/atris.c 2007-04-04 16:04:36.000000000 -0400 ++++ b/atris.c 2007-04-04 16:05:26.000000000 -0400 @@ -147,6 +147,8 @@ void load_options(char * filespec) diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..78fd1910 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,6 @@ +00-atris-1.0.7.configure.in_pathfix.diff +01-atris-1.0.7.Makefile.am_pathfix.diff +02-atris-1.0.7.proper_statedir.diff +03-atris-1.0.7.font_from_ttf-freefont.diff +04-atris-1.0.7.window_mode_fix.diff +05-atris-1.0.7.atrisrc.perms.fix.diff diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/highscore.c b/highscore.c index 003e8f44..2cf964fa 100644 --- a/highscore.c +++ b/highscore.c @@ -59,7 +59,7 @@ save_high_scores() if (!loaded) return; - fout = fopen("Atris.Scores","wt"); + fout = fopen(ATRIS_STATEDIR "/Atris.Scores","wt"); if (!fout) { Debug("Unable to write High Score file [Atris.Scores]: %s\n", strerror(errno)); return; diff --git a/identity.c b/identity.c index 941ab571..276cf913 100644 --- a/identity.c +++ b/identity.c @@ -17,7 +17,7 @@ #include "xflame.pro" #include "display.pro" -#define ID_FILENAME "Atris.Players" +#define ID_FILENAME ATRIS_STATEDIR "/Atris.Players" /*************************************************************************** * input_string() -- 1.7.8 -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org