diff options
author | mva <mva@FreeBSD.org> | 2013-01-14 06:14:17 +0800 |
---|---|---|
committer | mva <mva@FreeBSD.org> | 2013-01-14 06:14:17 +0800 |
commit | f656b630634e127fae10ad311aec9bb9c68e3101 (patch) | |
tree | 6503ba69f761d13c571ae0d607c3537733f53b9f /games/icebreaker | |
parent | 7a051589495fde59ba3e92be183f49def368a080 (diff) | |
download | freebsd-ports-gnome-f656b630634e127fae10ad311aec9bb9c68e3101.tar.gz freebsd-ports-gnome-f656b630634e127fae10ad311aec9bb9c68e3101.tar.zst freebsd-ports-gnome-f656b630634e127fae10ad311aec9bb9c68e3101.zip |
- Update to 1.9.7
- Pass maintainership to submitter
- Add LICENSE
PR: ports/172866
Submitted by: nemysis <nemysis@gmx.ch>
Diffstat (limited to 'games/icebreaker')
-rw-r--r-- | games/icebreaker/Makefile | 68 | ||||
-rw-r--r-- | games/icebreaker/distinfo | 4 | ||||
-rw-r--r-- | games/icebreaker/files/patch-aa | 59 | ||||
-rw-r--r-- | games/icebreaker/files/patch-dialog.c | 24 | ||||
-rw-r--r-- | games/icebreaker/files/patch-hiscore.c | 38 | ||||
-rw-r--r-- | games/icebreaker/files/patch-line.c | 13 | ||||
-rw-r--r-- | games/icebreaker/files/patch-options.c | 65 | ||||
-rw-r--r-- | games/icebreaker/files/patch-options_c | 12 | ||||
-rw-r--r-- | games/icebreaker/files/patch-penguin.c | 13 | ||||
-rw-r--r-- | games/icebreaker/files/patch-themes.c | 52 | ||||
-rw-r--r-- | games/icebreaker/pkg-plist | 9 |
11 files changed, 259 insertions, 98 deletions
diff --git a/games/icebreaker/Makefile b/games/icebreaker/Makefile index 62f7c3110f2a..62cf2029524b 100644 --- a/games/icebreaker/Makefile +++ b/games/icebreaker/Makefile @@ -1,29 +1,65 @@ -# New ports collection makefile for: icebreaker -# Date created: 19 October 2000 -# Whom: Maxim Sobolev <sobomax@FreeBSD.org> -# +# Created by: Maxim Sobolev <sobomax@FreeBSD.org> # $FreeBSD$ -# PORTNAME= icebreaker -PORTVERSION= 1.2.1 -PORTREVISION= 9 +PORTVERSION= 1.9.7 CATEGORIES= games -MASTER_SITES= http://mattdm.org/icebreaker/1.2.x/ +MASTER_SITES= http://mattdm.org/icebreaker/1.9.x/ EXTRACT_SUFX= .tgz -MAINTAINER= ports@FreeBSD.org -COMMENT= A game similar to Jezzball or Barrack +MAINTAINER= nemysis@gmx.ch +COMMENT= Game similar to Jezzball or Barrack + +LICENSE= GPLv2 + +BUILD_DEPENDS= pnmtopng:${PORTSDIR}/graphics/netpbm USE_SDL= mixer sdl USE_GMAKE= yes -MAKE_ENV+= prefix="${PREFIX}" \ - highscoredir="${PREFIX}/share/icebreaker/scores" \ - mandir="${MANPREFIX}/man" \ - CHMOD="${CHMOD}" \ - CHOWN="${CHOWN}" \ - MKDIR="${MKDIR}" + +PLIST_FILES= bin/${PORTNAME} \ + share/pixmaps/${PORTNAME}.png \ + share/applications/${PORTNAME}.desktop +PLIST_DIRSTRY= share/applications + +PORTDATA= * +PORTDOCS= ChangeLog README README.SDL README.ifyoumakechanges README.themes TODO MAN6= ${PORTNAME}.6 +.include <bsd.port.options.mk> + +post-patch: + @${REINPLACE_CMD} \ + -e 's|CC=gcc|CC?=g++|' \ + -e 's|sdl-config|$(SDL_CONFIG)|' \ + -e 's|prefix=/usr/local|prefix=${PREFIX}|' \ + -e 's|mandir=$$(prefix)/share/man|mandir=$$(prefix)/man|' \ + -e 's|highscoredir=/var/local/lib/games|highscoredir=/var/games|' \ + -e 's|CFLAGS=|CFLAGS+=|' \ + -e 's|OPTIMIZE=-O3|OPTIMIZE=|' \ + -e 's|$$(CC) $$(CFLAGS) $$^ -o icebreaker $$(SDL_LIB)|$$(CC) $$(LDFLAGS) $$(CFLAGS) $$^ -o icebreaker $$(SDL_LIB)|' \ + -e 's|install -s -g games -m 2755 icebreaker $(bindir)|install -g games -m 2755 icebreaker $(bindir)|' \ + -e 's|install -s -m 755 icebreaker $(bindir)|install -m 755 icebreaker $(bindir)|' \ + -e 's|chown -f games:games|chown -f root:games|' \ + ${WRKSRC}/Makefile + @${REINPLACE_CMD} \ + -e 's|%{Summary}|Game similar to Jezzball or Barrack|' \ + -e 's|/usr/share/icebreaker/icebreaker_48.bmp|icebreaker|' \ + ${WRKSRC}/icebreaker.desktop + +post-build: + @(cd ${WRKSRC} && ${LOCALBASE}/bin/winicontoppm -bestqual icebreaker_32.ico | \ + ${LOCALBASE}/bin/pnmtopng > icebreaker.png) + +post-install: + ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.png ${PREFIX}/share/pixmaps + ${MKDIR} ${PREFIX}/share/applications + ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.desktop ${PREFIX}/share/applications + +.if ${PORT_OPTIONS:MDOCS} + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR} +.endif + .include <bsd.port.mk> diff --git a/games/icebreaker/distinfo b/games/icebreaker/distinfo index 7ad1357b937b..ab8b51edb8b9 100644 --- a/games/icebreaker/distinfo +++ b/games/icebreaker/distinfo @@ -1,2 +1,2 @@ -SHA256 (icebreaker-1.2.1.tgz) = 95c6d70756f90facc92012549c25740d7432b31da7eafef9bf8fef208fa0ab58 -SIZE (icebreaker-1.2.1.tgz) = 56622 +SHA256 (icebreaker-1.9.7.tgz) = ca8b344a6a37b2041fba83271ae5e7566cbc8dc4c3367addd46f2a2f3573017e +SIZE (icebreaker-1.9.7.tgz) = 189167 diff --git a/games/icebreaker/files/patch-aa b/games/icebreaker/files/patch-aa deleted file mode 100644 index 4c23262989f8..000000000000 --- a/games/icebreaker/files/patch-aa +++ /dev/null @@ -1,59 +0,0 @@ ---- Makefile.orig Wed Mar 8 15:04:42 2006 -+++ Makefile Wed Mar 8 15:04:46 2006 -@@ -1,6 +1,6 @@ --CC=gcc - --SDLCONFIG=sdl-config -+SDLCONFIG=$(SDL_CONFIG) -+CC?=gcc - - ifndef prefix - prefix=/usr/local -@@ -21,16 +21,16 @@ - endif - - ifndef OPTIMIZE -- OPTIMIZE=-O3 -+ OPTIMIZE= - endif - --CFLAGS=-Wall $(OPTIMIZE) $(SDL_CFLAGS) -DDATAPREFIX=\"$(datadir)/icebreaker\" -DHISCOREPREFIX=\"$(highscoredir)\" -+CFLAGS+=-Wall $(OPTIMIZE) $(SDL_CFLAGS) -DDATAPREFIX=\"$(datadir)/icebreaker\" -DHISCOREPREFIX=\"$(highscoredir)\" - - SRC=icebreaker.c cursor.c grid.c laundry.c line.c penguin.c sound.c \ - level.c intro.c text.c status.c transition.c hiscore.c dialog.c \ - options.c fullscreen.c - --SDL_MIXER=-lSDL_mixer -+SDL_MIXER=-lSDL_mixer -lsmpeg - SDL_LIB=$(SDL_LDFLAGS) $(SDL_MIXER) - SDL_CFLAGS := $(shell $(SDLCONFIG) --cflags) - SDL_LDFLAGS := $(shell $(SDLCONFIG) --libs) -@@ -103,17 +103,17 @@ - sed 's/\$$VERDATE/$(VERDATE)/' > $@ - - install: all -- mkdir -p $(prefix)/bin -- mkdir -p $(prefix)/share/icebreaker -- mkdir -p $(highscoredir) -- mkdir -p $(mandir)/man6 -- -- install -m 644 *.wav *.bmp $(prefix)/share/icebreaker -- install -g games -s -m 2755 icebreaker $(prefix)/bin -- install -m 644 icebreaker.6 $(mandir)/man6 -+ $(MKDIR) $(prefix)/share/icebreaker -+ $(MKDIR) $(highscoredir) -+ -+ $(BSD_INSTALL_DATA) *.wav *.bmp $(prefix)/share/icebreaker -+ $(BSD_INSTALL_PROGRAM) icebreaker $(prefix)/bin -+ $(BSD_INSTALL_MAN) icebreaker.6 $(mandir)/man6 - touch $(highscoredir)/icebreaker.scores -- chown games:games $(highscoredir)/icebreaker.scores -- chmod 664 $(highscoredir)/icebreaker.scores -+ $(CHOWN) root:games $(prefix)/bin/icebreaker -+ $(CHMOD) 2755 $(prefix)/bin/icebreaker -+ $(CHOWN) root:games $(highscoredir)/icebreaker.scores -+ $(CHMOD) 664 $(highscoredir)/icebreaker.scores - - - include $(SRC:.c=.d) diff --git a/games/icebreaker/files/patch-dialog.c b/games/icebreaker/files/patch-dialog.c new file mode 100644 index 000000000000..a020ace4d954 --- /dev/null +++ b/games/icebreaker/files/patch-dialog.c @@ -0,0 +1,24 @@ +--- dialog.c.orig 2002-06-02 16:25:51.000000000 +0200 ++++ dialog.c 2013-01-13 19:29:58.000000000 +0100 +@@ -287,10 +287,10 @@ + + for (i=0;i<HISCORENUM;i++) + { +- snprintf(buf,4,"%d.",i+1); ++ snprintf(buf,sizeof(buf),"%d.",i+1); + puttext(scorelistrect.x+BLOCKWIDTH,scorelistrect.y+45+i*(CHARHEIGHT*2+5),2,color.normaltext,buf); + puttext(scorelistrect.x+BLOCKWIDTH*4,scorelistrect.y+45+i*(CHARHEIGHT*2+5),2,color.normaltext,hiscorename[i]); +- snprintf(buf,30,"%ld",hiscoreval[i]); ++ snprintf(buf,sizeof(buf),"%ld",hiscoreval[i]); + puttext(scorelistrect.x+scorelistrect.w-(BLOCKWIDTH*5),scorelistrect.y+45+i*(CHARHEIGHT*2+5),2,color.normaltext,buf); + } + +@@ -372,7 +372,7 @@ + { + puttext(helprect.x+BLOCKWIDTH/2,helprect.y+BLOCKHEIGHT/2+i*(CHARHEIGHT*2+4),2,color.normaltext,helptext[i]); + } +- snprintf(buf,80,"v%d.%d.%d %s",VERMAJOR,VERMINOR,VERSUB,"Copyright (c) 2000-2002 Matthew Miller. Released under the GPL."); ++ snprintf(buf,sizeof(buf),"v%d.%d.%d %s",VERMAJOR,VERMINOR,VERSUB,"Copyright (c) 2000-2002 Matthew Miller. Released under the GPL."); + puttext(helprect.x+BLOCKWIDTH/2,helprect.y+helprect.h-CHARHEIGHT*3,1,color.copyrighttext,buf); + puttext(helprect.x+BLOCKWIDTH/2,helprect.y+helprect.h-CHARHEIGHT*1-3,1,color.copyrighttext,"Thanks to my wonderful wife Karen for inspiration (and for patience)!"); + diff --git a/games/icebreaker/files/patch-hiscore.c b/games/icebreaker/files/patch-hiscore.c new file mode 100644 index 000000000000..64512d02b27f --- /dev/null +++ b/games/icebreaker/files/patch-hiscore.c @@ -0,0 +1,38 @@ +--- hiscore.c.orig 2002-06-02 16:28:35.000000000 +0200 ++++ hiscore.c 2013-01-13 20:24:43.000000000 +0100 +@@ -72,7 +72,7 @@ + // make sure all entries are zeroed out to start. + for (i=0;i<HISCORENUM;i++) + { +- snprintf(temphiscorename[i],7,"Nobody"); ++ strcpy(temphiscorename[i],"Nobody"); + temphiscoreval[i]=100; //100 is better than 0. :) + } + +@@ -103,7 +103,7 @@ + // ok, so now, we can copy things over in the proper sorted order + for (i=0;i<HISCORENUM;i++) + { +- snprintf(hiscorename[i],50,temphiscorename[arrayindex[i]]); ++ snprintf(hiscorename[i],50,"%s",temphiscorename[arrayindex[i]]); + hiscoreval[i]=temphiscoreval[arrayindex[i]]; + } + +@@ -201,7 +201,7 @@ + // make sure the temp array contains the right data + for (i=0;i<HISCORENUM;i++) + { +- snprintf(temphiscorename[i],50,hiname[i]); ++ snprintf(temphiscorename[i],50,"%s",hiname[i]); + temphiscoreval[i]=hival[i]; + } + +@@ -221,7 +221,7 @@ + // and take the top ones back. + for (i=0;i<HISCORENUM;i++) + { +- snprintf(hiname[i],50,temphiscorename[arrayindex[i]]); ++ snprintf(hiname[i],50,"%s",temphiscorename[arrayindex[i]]); + hival[i]=temphiscoreval[arrayindex[i]]; + } + } diff --git a/games/icebreaker/files/patch-line.c b/games/icebreaker/files/patch-line.c new file mode 100644 index 000000000000..7b62544ee805 --- /dev/null +++ b/games/icebreaker/files/patch-line.c @@ -0,0 +1,13 @@ +--- line.c.orig 2002-05-31 05:15:45.000000000 +0200 ++++ line.c 2013-01-13 19:49:19.000000000 +0100 +@@ -30,8 +30,9 @@ + + Line createline(int linenum) + { +- Line l; ++ static Line l; + ++ memset(&l, 0, sizeof(l)); + switch (linenum) + { + case 1: diff --git a/games/icebreaker/files/patch-options.c b/games/icebreaker/files/patch-options.c new file mode 100644 index 000000000000..47c91bab57e8 --- /dev/null +++ b/games/icebreaker/files/patch-options.c @@ -0,0 +1,65 @@ +--- options.c.orig 2002-05-31 05:15:46.000000000 +0200 ++++ options.c 2013-01-13 19:54:42.000000000 +0100 +@@ -66,7 +66,7 @@ + options.autopause=AUTOPAUSEOFF; + options.difficulty=NORMAL; + options.fullscreen=FULLSCREENOFF; +- snprintf(options.theme,MAXTHEMENAMELENGTH+1,"linux"); ++ strcpy(options.theme,"linux"); + } + + int readoptions(void) +@@ -81,7 +81,7 @@ + + setdefaultoptions(); + +- snprintf(filename,255,"%s/%s",homedir,OPTIONFILE); ++ snprintf(filename,sizeof(filename),"%s/%s",homedir,OPTIONFILE); + + optionfile=fopen(filename,"r"); + if (optionfile==NULL) +@@ -99,7 +99,7 @@ + } + + sprintf(scanformat,"%%20s %%%ds",10+MAXTHEMENAMELENGTH); +- if (sscanf(linebuf,"%20s %10s",optbuf,valbuf)==2) ++ if (sscanf(linebuf,"%19s %9s",optbuf,valbuf)==2) + { + if (!strcmp(optbuf,"sound")) + { +@@ -135,7 +135,7 @@ + } + else if (!strcmp(optbuf,"theme")) + { +- snprintf(options.theme,MAXTHEMENAMELENGTH+1,"%s",valbuf); ++ snprintf(options.theme,sizeof(options.theme),"%s",valbuf); + } + // FIX: add username + } +@@ -150,7 +150,7 @@ + { + FILE * optionfile; + char filename[255]; +- snprintf(filename,255,"%s/%s",homedir,OPTIONFILE); ++ snprintf(filename,sizeof(filename),"%s/%s",homedir,OPTIONFILE); + + optionfile=fopen(filename,"w"); + if (optionfile==NULL) +@@ -292,7 +292,7 @@ + else + { + // fix -- we should probably search for malicious characters here. +- snprintf(commandline.theme,MAXTHEMENAMELENGTH+1,"%s",argv[i]+strlen(FLAGTHEME)); ++ snprintf(commandline.theme,sizeof(commandline.theme),"%s",argv[i]+strlen(FLAGTHEME)); + } + } + else if (strncmp(argv[i],FLAGTHEMELONG "=" ,strlen(FLAGTHEMELONG "=")) == 0) +@@ -312,7 +312,7 @@ + else + { + // fix -- we should probably search for malicious characters here. +- snprintf(commandline.theme,MAXTHEMENAMELENGTH+1,"%s",argv[i]+strlen(FLAGTHEMELONG "=")); ++ snprintf(commandline.theme,sizeof(commandline.theme),"%s",argv[i]+strlen(FLAGTHEMELONG "=")); + } + } + else if (strncmp(argv[i],FLAGTHEMELONG,strlen(FLAGTHEMELONG)) == 0) diff --git a/games/icebreaker/files/patch-options_c b/games/icebreaker/files/patch-options_c deleted file mode 100644 index 6ad8e49f5850..000000000000 --- a/games/icebreaker/files/patch-options_c +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-options_c,v 1.1 2003/06/17 01:32:49 avsm Exp $ ---- options.c.orig Tue Jun 17 02:20:08 2003 -+++ options.c Tue Jun 17 02:21:20 2003 -@@ -71,7 +71,7 @@ int readoptions(void) - linebuf[i]=tolower(linebuf[i]); - } - -- if (sscanf(linebuf,"%20s %10s",optbuf,valbuf)==2) -+ if (sscanf(linebuf,"%19s %9s",optbuf,valbuf)==2) - { - if (!strcmp(optbuf,"sound")) - { diff --git a/games/icebreaker/files/patch-penguin.c b/games/icebreaker/files/patch-penguin.c new file mode 100644 index 000000000000..b8ee0a4dc253 --- /dev/null +++ b/games/icebreaker/files/patch-penguin.c @@ -0,0 +1,13 @@ +--- penguin.c.orig 2002-05-31 05:15:46.000000000 +0200 ++++ penguin.c 2013-01-13 19:57:45.000000000 +0100 +@@ -40,8 +40,9 @@ + + Penguin createpenguinxy(int x, int y) + { +- Penguin p; ++ static Penguin p; + ++ memset(&p, 0, sizeof(p)); + switch (random() % 4) + { + case 0: diff --git a/games/icebreaker/files/patch-themes.c b/games/icebreaker/files/patch-themes.c new file mode 100644 index 000000000000..45d82eb9ffac --- /dev/null +++ b/games/icebreaker/files/patch-themes.c @@ -0,0 +1,52 @@ +--- themes.c.orig 2002-05-31 05:49:53.000000000 +0200 ++++ themes.c 2013-01-13 19:42:26.000000000 +0100 +@@ -192,7 +192,7 @@ + + foundcolor.spritetransparent = 0; + +- snprintf(themefilename, 256,"%s/%s%s",DATAPREFIX,themename,THEMEFILEEXTENSION); ++ snprintf(themefilename, sizeof(themefilename),"%s/%s%s",DATAPREFIX,themename,THEMEFILEEXTENSION); + + themefile=fopen(themefilename,"r"); + if (themefile==NULL) +@@ -338,7 +338,7 @@ + "We'll try to load it anyway, but don't be surpised if there's a problem.\n" + "(Filename is %s)\n",themename,valbuf); + } +- snprintf(loadfilebuf, 256,"%s/%s",DATAPREFIX,valbuf); ++ snprintf(loadfilebuf, sizeof(loadfilebuf),"%s/%s",DATAPREFIX,valbuf); + spriteimage=loadsprite(themename,loadfilebuf); + } + else if (!strcmp(optbuf,"spritemirrorbitmap")) +@@ -349,7 +349,7 @@ + "We'll try to load it anyway, but don't be surpised if there's a problem.\n" + "(Filename is %s)\n",themename,valbuf); + } +- snprintf(loadfilebuf, 256,"%s/%s",DATAPREFIX,valbuf); ++ snprintf(loadfilebuf, sizeof(loadfilebuf),"%s/%s",DATAPREFIX,valbuf); + spritemirrorimage=loadsprite(themename,loadfilebuf); + } + else if (!strcmp(optbuf,"soundouch")) +@@ -360,7 +360,7 @@ + "We'll try to load it anyway, but don't be surpised if there's a problem.\n" + "(Filename is %s)\n",themename,valbuf); + } +- snprintf(loadfilebuf, 256,"%s/%s",DATAPREFIX,valbuf); ++ snprintf(loadfilebuf, sizeof(loadfilebuf),"%s/%s",DATAPREFIX,valbuf); + loadsounds(themename,loadfilebuf,NULL); + } + else if (!strcmp(optbuf,"soundcrash")) +@@ -483,11 +483,11 @@ + { + fprintf(stderr,"Hey! You can't have a theme named random! Please remove the random.ibt\n" + "file from your themes directory.\n"); +- snprintf(themename,MAXTHEMENAMELENGTH+1,"linux"); ++ strcpy(themename,"linux"); + } + else + { +- snprintf(themename,MAXTHEMENAMELENGTH+1,themelist[random() %themecount]); ++ snprintf(themename,sizeof(themename),"%s",themelist[random() %themecount]); + } + freethemenames(&themelist,themecount); + return settheme(themename); diff --git a/games/icebreaker/pkg-plist b/games/icebreaker/pkg-plist deleted file mode 100644 index ddca40fdd281..000000000000 --- a/games/icebreaker/pkg-plist +++ /dev/null @@ -1,9 +0,0 @@ -bin/icebreaker -%%DATADIR%%/crash.wav -%%DATADIR%%/icebreaker_48.bmp -%%DATADIR%%/ouch.wav -%%DATADIR%%/penguin.bmp -%%DATADIR%%/penguinicon_32.bmp -%%DATADIR%%/scores/icebreaker.scores -@dirrm %%DATADIR%%/scores -@dirrm %%DATADIR%% |