FreeBSD Bugzilla – Attachment 132321 Details for
Bug 176572
games/golddig: Update to version 3.1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 16.13 KB, created by
tkato432
on 2013-02-28 18:10:15 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
tkato432
Created:
2013-02-28 18:10:15 UTC
Size:
16.13 KB
patch
obsolete
>diff -urN /usr/ports/games/golddig/Makefile games/golddig/Makefile >--- /usr/ports/games/golddig/Makefile 2012-11-08 07:24:04.000000000 +0900 >+++ games/golddig/Makefile 2013-02-27 03:38:25.000000000 +0900 >@@ -2,25 +2,27 @@ > # $FreeBSD: head/games/golddig/Makefile 306447 2012-10-26 14:57:50Z bapt $ > > PORTNAME= golddig >-PORTVERSION= 2.0 >+PORTVERSION= 3.1 > PORTREVISION= 3 > CATEGORIES= games >-MASTER_SITES= ftp://qiclab.scn.rain.com/pub/games/ >-DISTNAME= golddig2 >-EXTRACT_SUFX= .tar.Z >+MASTER_SITES= http://www.NetBSD.org/~chuck/gz/ >+DISTNAME= ${PORTNAME}C${PORTVERSION} > > MAINTAINER= ports@FreeBSD.org > COMMENT= Getting the Gold and Avoiding Death > >-MAN6= golddig.6 > USE_XORG= x11 >+MAKE_ENV= X11BASE="${LOCALBASE}" >+MAKE_JOBS_SAFE= yes > >-pre-patch: >- @(cd ${WRKSRC}; for i in 245 244 246 247; do \ >- ${AWK} '{if (/^#!/) x++} {if(x) print $$0'} $$i| /bin/sh; \ >- done; ${MV} golddig2/* .) >+LDFLAGS+= -L${LOCALBASE}/lib > >-pre-install: >- @${MKDIR} ${PREFIX}/lib/golddig >+MAN6= gdedit.6 golddig.6 >+ >+DESKTOP_ENTRIES="Gold Digger" "" "" "${PORTNAME}" "" "" >+ >+post-patch: >+ @${GREP} -lR "@PREFIX@" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \ >+ 's|@PREFIX@|${PREFIX}|' > > .include <bsd.port.mk> >diff -urN /usr/ports/games/golddig/distinfo games/golddig/distinfo >--- /usr/ports/games/golddig/distinfo 2012-11-08 07:24:04.000000000 +0900 >+++ games/golddig/distinfo 2013-02-24 18:24:08.000000000 +0900 >@@ -1,2 +1,2 @@ >-SHA256 (golddig2.tar.Z) = ea72b666157e88b32e7e5de885d19763d81445499056fd3afeb4288994d50355 >-SIZE (golddig2.tar.Z) = 68321 >+SHA256 (golddigC3.1.tar.gz) = 823c1029ff47443c9aa52867db80bcafadebdaec123071f18031c48591b0c9ea >+SIZE (golddigC3.1.tar.gz) = 62024 >diff -urN /usr/ports/games/golddig/files/patch-aa games/golddig/files/patch-aa >--- /usr/ports/games/golddig/files/patch-aa 2012-11-08 07:24:04.000000000 +0900 >+++ games/golddig/files/patch-aa 1970-01-01 09:00:00.000000000 +0900 >@@ -1,43 +0,0 @@ >---- shared.c.orig Thu Dec 2 11:49:23 2004 >-+++ shared.c Thu Dec 2 11:52:16 2004 >-@@ -58,7 +58,7 @@ >- #include "bitmap/window.bits" >- #include "bitmap/anti.bits" >- >--char *sprintf(); /* UNIX brain damage */ >-+/* char *sprintf(); /* UNIX brain damage */ >- >- /* All in and out movements except up */ >- #define NOUPBITS DLEAVE | LLEAVE | RLEAVE | HENTER | VENTER >-@@ -312,21 +312,25 @@ >- FILE *levelfile; >- register int i,j; >- int x,y; >-- char buf[300]; >-+ char buf[1300]; >- >- /* Manufaction the file name by starting with the world name and */ >- /* appending the level number to it. */ >-- strcpy(filename,LIB); >-- strcat(filename,"/"); >-- strcat(filename,worldname); >-+ if (strchr (worldname, '/')) >-+ *filename = 0; >-+ else { >-+ strncpy(filename,LIB,sizeof(filename) - 3); >-+ strncat(filename,"/",sizeof(filename) - 3); >-+ } >-+ strncat(filename,worldname,sizeof(filename) - 3); >- sprintf(filename + strlen(filename),"%03d",levelnum); >- /* Open level file for reading */ >- levelfile = fopen(filename,"r"); >- /* If level file does not exist, use the default level file. */ >- if(levelfile == NULL) { >- /* Build the default level name */ >-- strcpy(buf,LIB); >-- strcat(buf,"/default"); >-+ strncpy(buf,LIB,sizeof(filename)); >-+ strncat(buf,"/default",sizeof(filename)); >- /* Open default level file for reading */ >- levelfile = fopen(buf,"r"); >- if(levelfile == NULL) { >diff -urN /usr/ports/games/golddig/files/patch-ab games/golddig/files/patch-ab >--- /usr/ports/games/golddig/files/patch-ab 2012-11-08 07:24:04.000000000 +0900 >+++ games/golddig/files/patch-ab 1970-01-01 09:00:00.000000000 +0900 >@@ -1,19 +0,0 @@ >-*** scores.c~ Thu Dec 14 20:40:34 1989 >---- scores.c Sun Nov 20 01:51:07 1994 >-*************** >-*** 9,15 **** >- #include <X11/keysym.h> >- #include "golddig.h" >- >-! char *getenv(),*sprintf(); >- >- #define NUMHIGH 15 /* Number of high scores that will be remembered */ >- >---- 9,15 ---- >- #include <X11/keysym.h> >- #include "golddig.h" >- >-! char *getenv()/*,*sprintf()*/; >- >- #define NUMHIGH 15 /* Number of high scores that will be remembered */ >- >diff -urN /usr/ports/games/golddig/files/patch-ac games/golddig/files/patch-ac >--- /usr/ports/games/golddig/files/patch-ac 2012-11-08 07:24:04.000000000 +0900 >+++ games/golddig/files/patch-ac 1970-01-01 09:00:00.000000000 +0900 >@@ -1,251 +0,0 @@ >-This patch is not required to compile/run golddig. Its only purpose is to >-improve the game (IMHO) --jmz >- >-*** golddig.c~ Thu Dec 14 20:41:03 1989 >---- golddig.c Sun Nov 20 01:23:40 1994 >-*************** >-*** 29,34 **** >---- 29,38 ---- >- >- #define EVMASK KeyPressMask | ExposureMask | ButtonPressMask | FocusChangeMask >- >-+ int x_lives, x_initial_score; >-+ #define TURBO 15 >-+ int x_turbo = TURBO; >-+ >- int newlevel = 0; /* Non-zero if a new level was just drawn */ >- struct itimerval cycletime; /* Structure used when setting up timer */ >- /* These are the graphics cursors used for drawing the player at */ >-*************** >-*** 167,177 **** >- puts("z,<,q,u,R13 - make hole left"); >- puts("x,>,e,o,R15 - make hole right"); >- puts("r,y,R7 - put down any held item"); >-! puts("1-9 - change the game speed"); >- puts("\n^S,^Z - pause the game"); >- puts("^Q,^Y - reactivate the game"); >- puts("^C - kill the game"); >- puts("^R - redraw the screen"); >- break; >- /* A space bar changes the command to STAND */ >- case XK_space: case XK_R11: >---- 171,182 ---- >- puts("z,<,q,u,R13 - make hole left"); >- puts("x,>,e,o,R15 - make hole right"); >- puts("r,y,R7 - put down any held item"); >-! puts("0-9 - change the game speed (0 is *very* fast)"); >- puts("\n^S,^Z - pause the game"); >- puts("^Q,^Y - reactivate the game"); >- puts("^C - kill the game"); >- puts("^R - redraw the screen"); >-+ puts("^A - restart the level"); >- break; >- /* A space bar changes the command to STAND */ >- case XK_space: case XK_R11: >-*************** >-*** 251,256 **** >---- 256,262 ---- >- regen_tree(); >- /* Freeze action until a key is pressed */ >- newlevel = 1; >-+ x_initial_score = score; >- } >- >- /* Move player one movement */ >-*************** >-*** 299,304 **** >---- 305,311 ---- >- ((code & UPLEVEL) && ! (code & INACTIVE))) { >- /* Increment the level number */ >- levelnum ++; >-+ x_lives++; >- /* Load the next level in if the current one is done */ >- init_level(); >- /* Redraw the level */ >-*************** >-*** 309,316 **** >- return; >- } >- /* If the block is a killer block, kill the player */ >-! if(code & KILLIN) >- died("was crushed"); >- } >- /* Do not let PUTDOWN order stay after movement has started */ >- else if(curorder == PUTDOWN) >---- 316,332 ---- >- return; >- } >- /* If the block is a killer block, kill the player */ >-! if(code & KILLIN) { >-! if(--x_lives) { /* restart level */ >-! goldleft = 0; player.ypos = 0; code |= UPLEVEL; code |= INACTIVE; >-! score = x_initial_score; >-! init_level(); >-! redrawall(); >-! XFlush(disp); >-! return; >-! } >- died("was crushed"); >-+ } >- } >- /* Do not let PUTDOWN order stay after movement has started */ >- else if(curorder == PUTDOWN) >-*************** >-*** 350,357 **** >- /* Check if the player is overlapping one of the bad guys while not */ >- /* holding armor. */ >- if(! (fast_lookup[player.hold].code & ARMOR) && >-! overlap_badguy(player.xpos,player.ypos,-1)) >- died("was eaten"); >- /* Redraw player if he moved. Redraw occasionally anyway. */ >- if(player.xpos != player.xold || player.ypos != player.yold || >- (curtick & 0xf) == 0) >---- 366,382 ---- >- /* Check if the player is overlapping one of the bad guys while not */ >- /* holding armor. */ >- if(! (fast_lookup[player.hold].code & ARMOR) && >-! overlap_badguy(player.xpos,player.ypos,-1)) { >-! if(--x_lives) { /* restart level */ >-! goldleft = 0; player.ypos = 0; >-! score = x_initial_score; >-! init_level(); >-! redrawall(); >-! XFlush(disp); >-! return; >-! } >- died("was eaten"); >-+ } >- /* Redraw player if he moved. Redraw occasionally anyway. */ >- if(player.xpos != player.xold || player.ypos != player.yold || >- (curtick & 0xf) == 0) >-*************** >-*** 422,428 **** >- sscanf(argv[i]+2,"%d",&speed); >- } >- else { >-! printf("usage: golddig [-l <level>] [-s <speed 1-9>] [<world name>]\n"); >- exit(1); >- } >- } >---- 447,453 ---- >- sscanf(argv[i]+2,"%d",&speed); >- } >- else { >-! printf("usage: golddig [-l <level>] [-s <speed 0-9>] [<world name>]\n"); >- exit(1); >- } >- } >-*************** >-*** 434,440 **** >- } >- /* remember what the starting level was */ >- levelstart = levelnum; >-! >- /* start up x windows and all graphics cursors for drawing level */ >- xstart(EVMASK); >- /* reassemble the graphics cursors to prepare for actual play */ >---- 459,467 ---- >- } >- /* remember what the starting level was */ >- levelstart = levelnum; >-! x_lives = 6 - levelnum; >-! if (x_lives < 1) >-! x_lives = 1; >- /* start up x windows and all graphics cursors for drawing level */ >- xstart(EVMASK); >- /* reassemble the graphics cursors to prepare for actual play */ >-*************** >-*** 467,475 **** >- init_level(); >- >- /* initialize timer structure according to speed */ >-! if(speed <= 0) >- speed = 1; >-! if(speed <= 5) >- cycletime.it_interval.tv_usec = (5-speed) * 50000 + 125000; >- else >- cycletime.it_interval.tv_usec = 625000 / speed; >---- 494,504 ---- >- init_level(); >- >- /* initialize timer structure according to speed */ >-! if(speed < 0) >- speed = 1; >-! if(speed == 0) >-! cycletime.it_interval.tv_usec = 625000 / x_turbo; >-! else if(speed <= 5) >- cycletime.it_interval.tv_usec = (5-speed) * 50000 + 125000; >- else >- cycletime.it_interval.tv_usec = 625000 / speed; >-*************** >-*** 517,528 **** >- case XK_R: case XK_r: >- redrawall(); >- break; >- } >- /* Pressing a number changes the game speed */ >-! else if(keyhit >= XK_1 && keyhit <= XK_9) { >- speed = (int) (keyhit - XK_0); >- /* Compute new cycle delay */ >-! if(speed <= 5) >- cycletime.it_interval.tv_usec = (5-speed) * 50000 + 125000; >- else >- cycletime.it_interval.tv_usec = 625000 / speed; >---- 546,569 ---- >- case XK_R: case XK_r: >- redrawall(); >- break; >-+ /* ^A restarts the current level */ >-+ case XK_A: case XK_a: >-+ if(--x_lives) { /* restart level */ >-+ goldleft = 0; player.ypos = 0; >-+ score = x_initial_score; >-+ init_level(); >-+ redrawall(); >-+ } else >-+ died("was abandoned"); >-+ break; >- } >- /* Pressing a number changes the game speed */ >-! else if(keyhit >= XK_0 && keyhit <= XK_9) { >- speed = (int) (keyhit - XK_0); >- /* Compute new cycle delay */ >-! if(speed == 0) >-! cycletime.it_interval.tv_usec = 625000 / x_turbo; >-! else if(speed <= 5) >- cycletime.it_interval.tv_usec = (5-speed) * 50000 + 125000; >- else >- cycletime.it_interval.tv_usec = 625000 / speed; >-*** shared.c~ Sun Nov 20 00:59:30 1994 >---- shared.c Sun Nov 20 01:25:00 1994 >-*************** >-*** 279,287 **** >- void draw_score() >- { >- char buf[50]; >- >- /* Build the output string */ >-! sprintf(buf,"score: %d level: %d speed: %d",score,levelnum,speed); >- /* Clear the current score line */ >- XFillRectangle(disp,wind,blackgc,0,ysize << 4,xsize << 4,SCORESIZE); >- /* Actually draw the text */ >---- 279,288 ---- >- void draw_score() >- { >- char buf[50]; >-+ extern int x_lives; >- >- /* Build the output string */ >-! sprintf(buf,"score: %d level: %d speed: %d lives: %d",score,levelnum,speed,x_lives); >- /* Clear the current score line */ >- XFillRectangle(disp,wind,blackgc,0,ysize << 4,xsize << 4,SCORESIZE); >- /* Actually draw the text */ >-*** makelev.c~ Thu Dec 14 20:40:34 1989 >---- makelev.c Sun Nov 20 01:54:47 1994 >-*************** >-*** 1,3 **** >---- 1,4 ---- >-+ int x_lives; >- /* This program was written by Alexander Siegel in September of 1989 */ >- /* at Cornell University. It may may copied freely for private use or */ >- /* public dispersion provided that this comment is not removed. This */ >diff -urN /usr/ports/games/golddig/files/patch-ad games/golddig/files/patch-ad >--- /usr/ports/games/golddig/files/patch-ad 2012-11-08 07:24:04.000000000 +0900 >+++ games/golddig/files/patch-ad 1970-01-01 09:00:00.000000000 +0900 >@@ -1,57 +0,0 @@ >---- Makefile.orig Mon May 1 18:11:58 2000 >-+++ Makefile Mon May 1 18:11:59 2000 >-@@ -9,40 +9,44 @@ >- # Name of level editor executable >- EDITOR = makelev >- # Directory where games binaries are stored >--BIN = /usr/public/${HOSTTYPE}/games >-+BIN = ${PREFIX}/bin >- # Directory where the library for this game will be stored >--LIB = /usr/public/sun3/games/lib/${GAME} >-+LIB = ${PREFIX}/lib/${GAME} >- # Directory where manual pages are kept >--MANEXT = p >--MAN = /usr/public/man/man${MANEXT} >-+MANEXT = 6 >-+MAN = ${PREFIX}/man/man${MANEXT} >- # Font used to display score >- SCOREFONT = -adobe-times-bold-r-normal--18-180-75-75-p-99-iso8859-1 >- # Height of SCOREFONT >- SCORESIZE = 18 >- >- # Common compilers >--#CC = cc >--CC = gcc >-+CC = cc >-+#CC = gcc >- >- # Some common choices for CFLAGS. >- #CFLAGS = -O2 >- #CFLAGS = -O >--CFLAGS = -O -W -Wreturn-type -Wunused -g -finline-functions >-+CFLAGS += -W -Wreturn-type -Wunused -finline-functions -I${LOCALBASE}/include >- #CFLAGS = -g >--LDFLAGS = -g >-+LDFLAGS = -L ${LOCALBASE}/lib >- >- all: ${GAME} ${EDITOR} >- >- install: all >- -mkdir ${LIB} >- cp ${GAME} ${EDITOR} ${BIN} >-+ chown root:games ${BIN}/${GAME} >-+ chmod g+s ${BIN}/${GAME} >- # The next line sets up the level files so that anyone can edit all of >- # the levels. Remove this line to have better security. >-- chmod 4755 ${BIN}/${EDITOR} >-+# chmod 4755 ${BIN}/${EDITOR} >- touch ${LIB}/scores >-+ chown root:games ${LIB}/scores >-+ chmod g+w ${LIB}/scores >- # Allow anyone to modify the high score file. An alternative is to >- # change the mode bits of ${GAME} to be 4755. >-- chmod 666 ${LIB}/scores >-+# chmod 666 ${LIB}/scores >- cp goldlev* default ${LIB} >- cp golddig.p ${MAN}/golddig.${MANEXT} >- >diff -urN /usr/ports/games/golddig/pkg-install games/golddig/pkg-install >--- /usr/ports/games/golddig/pkg-install 1970-01-01 09:00:00.000000000 +0900 >+++ games/golddig/pkg-install 2013-02-24 18:42:36.000000000 +0900 >@@ -0,0 +1,11 @@ >+#!/bin/sh >+ >+SCOREDIR="/var/games" >+SCOREFILE="/var/games/golddig.scores" >+ >+[ "$2" != "POST-INSTALL" -o -f "$SCOREFILE" ] && exit 0 >+ >+mkdir -p $SCOREDIR >+touch $SCOREFILE >+chown root:games $SCOREFILE >+chmod 664 $SCOREFILE >diff -urN /usr/ports/games/golddig/pkg-plist games/golddig/pkg-plist >--- /usr/ports/games/golddig/pkg-plist 2012-11-08 07:24:04.000000000 +0900 >+++ games/golddig/pkg-plist 2013-02-24 18:54:12.000000000 +0900 >@@ -1,23 +1,31 @@ >+bin/gdedit > bin/golddig >-bin/makelev >-lib/golddig/default >-lib/golddig/goldlev001 >-lib/golddig/goldlev002 >-lib/golddig/goldlev003 >-lib/golddig/goldlev004 >-lib/golddig/goldlev005 >-lib/golddig/goldlev006 >-lib/golddig/goldlev007 >-lib/golddig/goldlev008 >-lib/golddig/goldlev009 >-lib/golddig/goldlev010 >-lib/golddig/goldlev011 >-lib/golddig/goldlev012 >-lib/golddig/goldlev013 >-lib/golddig/goldlev014 >-lib/golddig/goldlev015 >-lib/golddig/goldlev016 >-lib/golddig/goldlev017 >-lib/golddig/goldlev018 >-lib/golddig/scores >-@dirrm lib/golddig >+%%DATADIR%%/default >+%%DATADIR%%/goldlev001 >+%%DATADIR%%/goldlev002 >+%%DATADIR%%/goldlev003 >+%%DATADIR%%/goldlev004 >+%%DATADIR%%/goldlev005 >+%%DATADIR%%/goldlev006 >+%%DATADIR%%/goldlev007 >+%%DATADIR%%/goldlev008 >+%%DATADIR%%/goldlev009 >+%%DATADIR%%/goldlev010 >+%%DATADIR%%/goldlev011 >+%%DATADIR%%/goldlev012 >+%%DATADIR%%/goldlev013 >+%%DATADIR%%/goldlev014 >+%%DATADIR%%/goldlev015 >+%%DATADIR%%/goldlev016 >+%%DATADIR%%/goldlev017 >+%%DATADIR%%/goldlev018 >+%%DATADIR%%/goldlev019 >+%%DATADIR%%/goldlev020 >+%%DATADIR%%/goldlev021 >+%%DATADIR%%/goldlev022 >+%%DATADIR%%/goldlev023 >+%%DATADIR%%/goldlev024 >+%%DATADIR%%/goldlev025 >+%%DATADIR%%/goldlev026 >+@dirrm %%DATADIR%% >+@unexec [ -s /var/games/golddig.scores ] || rm -f /var/games/golddig.scores
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 176572
: 132321