diff options
author | miwi <miwi@FreeBSD.org> | 2013-03-02 13:41:16 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2013-03-02 13:41:16 +0800 |
commit | cda2033e8dd50c2d2f1241d589cd05b645db5055 (patch) | |
tree | 490d1471f4188bb1d684d6b3c72893090a2c224f /games | |
parent | 37ff9a5af394b1a4b9135c0667b167026795101f (diff) | |
download | freebsd-ports-gnome-cda2033e8dd50c2d2f1241d589cd05b645db5055.tar.gz freebsd-ports-gnome-cda2033e8dd50c2d2f1241d589cd05b645db5055.tar.zst freebsd-ports-gnome-cda2033e8dd50c2d2f1241d589cd05b645db5055.zip |
- Update 3.1
PR: 176572
Submitted by: ports fury
Diffstat (limited to 'games')
-rw-r--r-- | games/golddig/Makefile | 25 | ||||
-rw-r--r-- | games/golddig/distinfo | 4 | ||||
-rw-r--r-- | games/golddig/files/patch-aa | 43 | ||||
-rw-r--r-- | games/golddig/files/patch-ab | 19 | ||||
-rw-r--r-- | games/golddig/files/patch-ac | 251 | ||||
-rw-r--r-- | games/golddig/files/patch-ad | 57 | ||||
-rw-r--r-- | games/golddig/pkg-install | 11 | ||||
-rw-r--r-- | games/golddig/pkg-plist | 52 |
8 files changed, 56 insertions, 406 deletions
diff --git a/games/golddig/Makefile b/games/golddig/Makefile index 1f59b6b4f044..03c681d544a4 100644 --- a/games/golddig/Makefile +++ b/games/golddig/Makefile @@ -2,25 +2,26 @@ # $FreeBSD$ PORTNAME= golddig -PORTVERSION= 2.0 -PORTREVISION= 3 +PORTVERSION= 3.1 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 --git a/games/golddig/distinfo b/games/golddig/distinfo index 00cc81041ccb..8f4fbb88c3d9 100644 --- a/games/golddig/distinfo +++ b/games/golddig/distinfo @@ -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 --git a/games/golddig/files/patch-aa b/games/golddig/files/patch-aa deleted file mode 100644 index ced0b8b3c9b6..000000000000 --- a/games/golddig/files/patch-aa +++ /dev/null @@ -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 --git a/games/golddig/files/patch-ab b/games/golddig/files/patch-ab deleted file mode 100644 index 8edbc59ca95f..000000000000 --- a/games/golddig/files/patch-ab +++ /dev/null @@ -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 --git a/games/golddig/files/patch-ac b/games/golddig/files/patch-ac deleted file mode 100644 index 89a8c12cf13e..000000000000 --- a/games/golddig/files/patch-ac +++ /dev/null @@ -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 --git a/games/golddig/files/patch-ad b/games/golddig/files/patch-ad deleted file mode 100644 index 6efae3fb0ef4..000000000000 --- a/games/golddig/files/patch-ad +++ /dev/null @@ -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 --git a/games/golddig/pkg-install b/games/golddig/pkg-install new file mode 100644 index 000000000000..a26303a0056a --- /dev/null +++ b/games/golddig/pkg-install @@ -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 --git a/games/golddig/pkg-plist b/games/golddig/pkg-plist index 2690a5eb94f9..2b4e25db71c7 100644 --- a/games/golddig/pkg-plist +++ b/games/golddig/pkg-plist @@ -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 |