Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Oct 2012 04:58:31 +0200
From:      nemysis <nemysis@gmx.ch>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/172866: [PATCH] games/icebreaker: update to 1.9.5, take maintainership, Makefile changed, OptionsNG
Message-ID:  <20121019025834.BAFA4D19@hub.freebsd.org>
Resent-Message-ID: <201210190300.q9J3015X048174@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         172866
>Category:       ports
>Synopsis:       [PATCH] games/icebreaker: update to 1.9.5, take maintainership, Makefile changed, OptionsNG
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 19 03:00:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     nemysis
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD FreeBSD_Ports 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC
>Description:
- Update to 1.9.5
- Take maintainership

Added file(s):
- files/patch-dialog.c
- files/patch-hiscore.c
- files/patch-line.c
- files/patch-options.c
- files/patch-penguin.c
- files/patch-themes.c

Removed file(s):
- files/patch-aa
- files/patch-options_c
- pkg-plist

Makefile changed:

+LICENSE=	GPLv2
+BUILD_DEPENDS=	pnmtopng:${PORTSDIR}/graphics/netpbm
+PLIST_FILES=
+PLIST_DIRSTRY=
+PORTDATA=	*
+PORTDOCS=

+.include <bsd.port.options.mk>

+post-patch:
+		${WRKSRC}/Makefile
+		${WRKSRC}/icebreaker.desktop

+post-build:
+post-install:

Generated and tested manually, tested with port test and with RedPorts (all RELEASES, CLANG), sent with FreeBSD Port Tools 0.99_6 (mode: update, diff: ports)
>How-To-Repeat:

portlint -A
WARN: Makefile: [40]: use ${VARIABLE}, instead of $(VARIABLE).
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
WARN: Makefile: only one MASTER_SITE configured.  Consider adding additional mirrors.
0 fatal errors and 3 warnings found.

WARN: Makefile: [40]: because is used

+	-e 's|mandir=$$(prefix)/share/man|mandir=$$(prefix)/man|' \

port test: clean


Build log

https://redports.org/buildarchive/20121019020651-45485/

>Fix:

--- icebreaker-1.9.5.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/games/icebreaker/Makefile ./Makefile
--- /usr/ports/games/icebreaker/Makefile	2012-02-18 11:17:54.000000000 +0100
+++ ./Makefile	2012-10-19 04:50:12.000000000 +0200
@@ -6,24 +6,64 @@
 #
 
 PORTNAME=	icebreaker
-PORTVERSION=	1.2.1
-PORTREVISION=	9
+PORTVERSION=	1.9.5
 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 -ruN --exclude=CVS /usr/ports/games/icebreaker/distinfo ./distinfo
--- /usr/ports/games/icebreaker/distinfo	2011-07-03 16:24:07.000000000 +0200
+++ ./distinfo	2012-10-19 02:58:36.000000000 +0200
@@ -1,2 +1,2 @@
-SHA256 (icebreaker-1.2.1.tgz) = 95c6d70756f90facc92012549c25740d7432b31da7eafef9bf8fef208fa0ab58
-SIZE (icebreaker-1.2.1.tgz) = 56622
+SHA256 (icebreaker-1.9.5.tgz) = f283bc82df84b5f016efa6b1e6095914379cf2acac9c5692025275ff96102867
+SIZE (icebreaker-1.9.5.tgz) = 116012
diff -ruN --exclude=CVS /usr/ports/games/icebreaker/files/patch-aa ./files/patch-aa
--- /usr/ports/games/icebreaker/files/patch-aa	2006-03-08 15:14:49.000000000 +0100
+++ ./files/patch-aa	1970-01-01 01:00:00.000000000 +0100
@@ -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 -ruN --exclude=CVS /usr/ports/games/icebreaker/files/patch-dialog.c ./files/patch-dialog.c
--- /usr/ports/games/icebreaker/files/patch-dialog.c	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-dialog.c	2012-10-19 03:42:15.000000000 +0200
@@ -0,0 +1,57 @@
+--- dialog.c.orig	2002-05-26 22:13:00.000000000 +0200
++++ dialog.c	2012-10-19 03:27:46.000000000 +0200
+@@ -384,12 +384,12 @@
+ 
+ 	if (strlen(commandline.theme)>0)
+ 	{
+-		snprintf(originaltheme,MAXTHEMENAMELENGTH+1,"%s",commandline.theme);
++		snprintf(originaltheme,sizeof(originaltheme),"%s",commandline.theme);
+ 		originalthemecl=true;
+ 	}
+ 	else
+ 	{
+-		snprintf(originaltheme,MAXTHEMENAMELENGTH+1,"%s",options.theme);
++		snprintf(originaltheme,sizeof(originaltheme),"%s",options.theme);
+ 		originalthemecl=false;	
+ 	}
+ 				
+@@ -662,7 +662,7 @@
+ 		{ // "random", at the end of the list
+ 			
+ 			strncpy(val,"random",MAXMENUVALUELENGTH);
+-			snprintf(options.theme,MAXMENUVALUELENGTH,"random");
++			strcpy(options.theme,"random");
+ 			
+ 			settheme("linux"); // just for pretty
+ 			
+@@ -676,7 +676,7 @@
+ 		else
+ 		{
+ 			strncpy(val,themelist[(t+1)%themecount],MAXMENUVALUELENGTH);
+-			snprintf(options.theme,MAXMENUVALUELENGTH,themelist[(t+1)%themecount]);
++			snprintf(options.theme,sizeof(options.theme),"%s",themelist[(t+1)%themecount]);
+ 			
+ 			settheme(options.theme);
+ 			
+@@ -729,10 +729,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);
+ 	}
+ 	
+@@ -814,7 +814,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 -ruN --exclude=CVS /usr/ports/games/icebreaker/files/patch-hiscore.c ./files/patch-hiscore.c
--- /usr/ports/games/icebreaker/files/patch-hiscore.c	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-hiscore.c	2012-10-19 03:43:00.000000000 +0200
@@ -0,0 +1,45 @@
+--- hiscore.c.orig	2002-05-26 22:13:00.000000000 +0200
++++ hiscore.c	2012-10-19 03:30:36.000000000 +0200
+@@ -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,13 +201,13 @@
+ 	// 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];
+ 	}
+ 	
+ 	// and toss in the new data 
+ 	//(this is why these arrays are size HISCORENUM+1)
+-	snprintf(temphiscorename[HISCORENUM],50,username);
++	snprintf(temphiscorename[HISCORENUM],50,"%s",username);
+ 	temphiscoreval[HISCORENUM]=score;
+ 
+ 	// fill the "helper" array. 
+@@ -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 -ruN --exclude=CVS /usr/ports/games/icebreaker/files/patch-line.c ./files/patch-line.c
--- /usr/ports/games/icebreaker/files/patch-line.c	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-line.c	2012-10-19 03:43:36.000000000 +0200
@@ -0,0 +1,13 @@
+--- line.c.orig	2002-05-25 20:15:22.000000000 +0200
++++ line.c	2012-10-19 03:32:02.000000000 +0200
+@@ -30,8 +30,9 @@
+ 
+ Line createline(int linenum)
+ {
+-	Line l;
++	static Line l;
+ 
++	memset(&l, 0, sizeof(l));
+ 	switch (linenum)
+ 	{
+ 		case 1: 
diff -ruN --exclude=CVS /usr/ports/games/icebreaker/files/patch-options.c ./files/patch-options.c
--- /usr/ports/games/icebreaker/files/patch-options.c	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-options.c	2012-10-19 03:48:33.000000000 +0200
@@ -0,0 +1,65 @@
+--- options.c.orig	2002-05-23 06:52:35.000000000 +0200
++++ options.c	2012-10-19 03:48:29.000000000 +0200
+@@ -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 -ruN --exclude=CVS /usr/ports/games/icebreaker/files/patch-options_c ./files/patch-options_c
--- /usr/ports/games/icebreaker/files/patch-options_c	2003-06-27 06:17:13.000000000 +0200
+++ ./files/patch-options_c	1970-01-01 01:00:00.000000000 +0100
@@ -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 -ruN --exclude=CVS /usr/ports/games/icebreaker/files/patch-penguin.c ./files/patch-penguin.c
--- /usr/ports/games/icebreaker/files/patch-penguin.c	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-penguin.c	2012-10-19 03:44:27.000000000 +0200
@@ -0,0 +1,13 @@
+--- penguin.c.orig	2002-05-26 22:13:00.000000000 +0200
++++ penguin.c	2012-10-19 03:36:12.000000000 +0200
+@@ -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 -ruN --exclude=CVS /usr/ports/games/icebreaker/files/patch-themes.c ./files/patch-themes.c
--- /usr/ports/games/icebreaker/files/patch-themes.c	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-themes.c	2012-10-19 03:44:50.000000000 +0200
@@ -0,0 +1,61 @@
+--- themes.c.orig	2002-05-26 22:13:00.000000000 +0200
++++ themes.c	2012-10-19 03:39:14.000000000 +0200
+@@ -183,7 +183,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)
+@@ -329,7 +329,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"))
+@@ -340,7 +340,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"))
+@@ -351,7 +351,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"))
+@@ -362,7 +362,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,NULL,loadfilebuf);
+ 				}
+ 			}
+@@ -474,11 +474,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 -ruN --exclude=CVS /usr/ports/games/icebreaker/pkg-descr ./pkg-descr
--- /usr/ports/games/icebreaker/pkg-descr	2000-10-19 15:17:30.000000000 +0200
+++ ./pkg-descr	2012-10-19 04:04:50.000000000 +0200
@@ -21,4 +21,4 @@
 life. This will continue until you lose, or until you exceed level one hundred
 or so, which Ain't Gonna Happen.
 
-WWW: http://www.mattdm.org/icebreaker/
+WWW: http://mattdm.org/icebreaker/
diff -ruN --exclude=CVS /usr/ports/games/icebreaker/pkg-plist ./pkg-plist
--- /usr/ports/games/icebreaker/pkg-plist	2006-03-08 15:14:49.000000000 +0100
+++ ./pkg-plist	1970-01-01 01:00:00.000000000 +0100
@@ -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%%
--- icebreaker-1.9.5.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121019025834.BAFA4D19>