Bug 176997 - [PATCH] games/maelstrom: OptionsNG, added license, icon, desktop entry , take maintainership
[PATCH] games/maelstrom: OptionsNG, added license, icon, desktop entry , take...
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: beech
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-15 16:40 UTC by nemysis
Modified: 2013-03-17 20:30 UTC (History)
0 users

See Also:


Attachments
maelstrom-3.0.6_9.patch (6.35 KB, patch)
2013-03-15 16:40 UTC, nemysis
no flags Details | Diff
maelstrom.diff (41.10 KB, patch)
2013-03-16 12:40 UTC, nemysis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nemysis 2013-03-15 16:40:00 UTC
Makefile changed:
+		SF/nemysisfreebsdp/:icons
+DISTFILES=	Maelstrom-${DISTVERSION}${EXTRACT_SUFX} \
+		${PORTNAME}.png:icons
+EXTRACT_ONLY=	Maelstrom-${DISTVERSION}${EXTRACT_SUFX}
+LICENSE=	GPLv2
+DATADIR=	${PREFIX}/share/Maelstrom
+DOCSDIR=	${PREFIX}/share/doc/Maelstrom
+PORTDOCS=	*
+DESKTOP_ENTRIES="Maelstrom" "${COMMENT}" \
+		"${PREFIX}/share/pixmaps/${PORTNAME}.png" \ <-- .png must be uses or not work icon for Maelstrom.desktop
+		"Maelstrom" "Game;ArcadeGame;" false
+.include <bsd.port.options.mk>
+.if ${PORT_OPTIONS:MDOCS}
+	${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}.png ${PREFIX}/share/pixmaps/

Changed and refined:
 pkg-plist <-- clean, not more PORTDOCS

- Take maintainership

Generated and tested manually, tested with port test, sent with FreeBSD Port Tools 0.99_6 (mode: change, diff: ports)

How-To-Repeat: 
portlint -A
looks fine.

port test: clean
Comment 1 Edwin Groothuis freebsd_committer 2013-03-15 16:40:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->beech

beech@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 nemysis 2013-03-16 12:40:14 UTC
Removed obsolete patch files

files/patch-ac
files/patch-ab
files/patch-ad

merge in files/patch-screenlib-SDL_FrameBuf.cpp from files/patch-ad
Comment 3 dfilter freebsd_committer 2013-03-17 20:22:46 UTC
Author: beech
Date: Sun Mar 17 20:22:26 2013
New Revision: 314485
URL: http://svnweb.freebsd.org/changeset/ports/314485

Log:
  - Convert to OptionsNG
  - Add license, desktop
  - Bump portrevision
  - Pass maintainership to submitter
  
  PR:		ports/176997
  Submitted by:	nemysis <nemysis@gmx.ch>

Added:
  head/games/maelstrom/files/patch-Makefile.in   (contents, props changed)
  head/games/maelstrom/files/patch-configure   (contents, props changed)
  head/games/maelstrom/files/patch-controls.cpp   (contents, props changed)
  head/games/maelstrom/files/patch-dialog.h   (contents, props changed)
  head/games/maelstrom/files/patch-load.cpp   (contents, props changed)
  head/games/maelstrom/files/patch-maclib-Mac_FontServ.h   (contents, props changed)
  head/games/maelstrom/files/patch-maclib-Mac_Resource.h   (contents, props changed)
  head/games/maelstrom/files/patch-maclib-Mac_Sound.h   (contents, props changed)
  head/games/maelstrom/files/patch-maclib-Mac_Wave.h   (contents, props changed)
  head/games/maelstrom/files/patch-maclib-macres.cpp   (contents, props changed)
  head/games/maelstrom/files/patch-maclib-snd2wav.cpp   (contents, props changed)
  head/games/maelstrom/files/patch-main.cpp   (contents, props changed)
  head/games/maelstrom/files/patch-myerror.cpp   (contents, props changed)
  head/games/maelstrom/files/patch-netlogic-game.cpp   (contents, props changed)
  head/games/maelstrom/files/patch-netlogic-netplay.cpp   (contents, props changed)
  head/games/maelstrom/files/patch-netscore.cpp   (contents, props changed)
  head/games/maelstrom/files/patch-screenlib-SDL_FrameBuf.h   (contents, props changed)
Deleted:
  head/games/maelstrom/files/patch-ab
  head/games/maelstrom/files/patch-ac
  head/games/maelstrom/files/patch-ad
Modified:
  head/games/maelstrom/Makefile   (contents, props changed)
  head/games/maelstrom/distinfo   (contents, props changed)
  head/games/maelstrom/files/patch-buttonlist.h   (contents, props changed)
  head/games/maelstrom/files/patch-screenlib-SDL_FrameBuf.cpp   (contents, props changed)
  head/games/maelstrom/pkg-plist   (contents, props changed)

Modified: head/games/maelstrom/Makefile
==============================================================================
--- head/games/maelstrom/Makefile	Sun Mar 17 20:17:15 2013	(r314484)
+++ head/games/maelstrom/Makefile	Sun Mar 17 20:22:26 2013	(r314485)
@@ -1,27 +1,38 @@
-# New ports collection makefile for:	Maelstrom
-# Date created:				13 May 1998
-# Whom:					Andrey Zakhvatov
-#
+# Created by: Andrey Zakhvatov
 # $FreeBSD$
-#
 
 PORTNAME=	maelstrom
 PORTVERSION=	3.0.6
-PORTREVISION=	8
+PORTREVISION=	9
 CATEGORIES=	games
-MASTER_SITES=	http://slouken.libsdl.org/projects/Maelstrom/src/
+MASTER_SITES=	http://slouken.libsdl.org/projects/Maelstrom/src/ \
+		SF/nemysisfreebsdp/:icons
 DISTNAME=	Maelstrom-${PORTVERSION}
+DISTFILES=	Maelstrom-${DISTVERSION}${EXTRACT_SUFX} \
+		${PORTNAME}.png:icons
 DIST_SUBDIR=	${PORTNAME}
+EXTRACT_ONLY=	Maelstrom-${DISTVERSION}${EXTRACT_SUFX}
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	nemysis@gmx.ch
 COMMENT=	Asteroids-style game for X Window System
 
+LICENSE=	GPLv2
+
 USE_SDL=	sdl net
 USE_XORG=	xpm
 GNU_CONFIGURE=	yes
 MAKE_JOBS_SAFE=	yes
 
-.if !defined(NOPORTDOCS)
+DATADIR=	${PREFIX}/share/Maelstrom
+DOCSDIR=	${PREFIX}/share/doc/Maelstrom
+PORTDOCS=	*
+
+DESKTOP_ENTRIES="Maelstrom" "${COMMENT}" ${PORTNAME} \
+		"Maelstrom" "Game;ArcadeGame;" false
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDOCS}
 INSTALL_TARGET=	install install_gamedocs
 .endif
 
@@ -30,5 +41,6 @@ post-install:
 	${CHMOD} 2755 ${PREFIX}/bin/Maelstrom
 	${CHMOD} 664 ${PREFIX}/share/Maelstrom/Maelstrom-Scores
 	${CHOWN} root:games ${PREFIX}/share/Maelstrom/Maelstrom-Scores
+	${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}.png ${PREFIX}/share/pixmaps/
 
 .include <bsd.port.mk>

Modified: head/games/maelstrom/distinfo
==============================================================================
--- head/games/maelstrom/distinfo	Sun Mar 17 20:17:15 2013	(r314484)
+++ head/games/maelstrom/distinfo	Sun Mar 17 20:22:26 2013	(r314485)
@@ -1,2 +1,4 @@
 SHA256 (maelstrom/Maelstrom-3.0.6.tar.gz) = e7983c2c7376cdcca1944db1706d92aedd529638cf13358c88a60df982ba7b46
 SIZE (maelstrom/Maelstrom-3.0.6.tar.gz) = 1013073
+SHA256 (maelstrom/maelstrom.png) = 814b1b6f6aacc5faf2befa52df0b97ff89efc8d5bffb3146c0cd6e354fda7799
+SIZE (maelstrom/maelstrom.png) = 2058

Added: head/games/maelstrom/files/patch-Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-Makefile.in	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,13 @@
+--- Makefile.in.orig	2002-10-20 06:19:42.000000000 +0200
++++ Makefile.in	2013-03-16 13:24:43.000000000 +0100
+@@ -444,8 +444,8 @@
+ 	chmod 666 $(target)/Maelstrom-Scores
+ 
+ install_gamedocs:
+-	sh mkinstalldirs $(target)/
+-	cp -rv README* COPYING* Docs*	$(target)/
++	sh mkinstalldirs $(prefix)/share/doc/Maelstrom/
++	cp -rv README* COPYING* Docs/* $(prefix)/share/doc/Maelstrom/
+ 
+ # Rule to build tar-gzipped distribution package
+ $(PACKAGE)-$(VERSION).tar.gz: dist

Modified: head/games/maelstrom/files/patch-buttonlist.h
==============================================================================
--- head/games/maelstrom/files/patch-buttonlist.h	Sun Mar 17 20:17:15 2013	(r314484)
+++ head/games/maelstrom/files/patch-buttonlist.h	Sun Mar 17 20:22:26 2013	(r314485)
@@ -1,5 +1,5 @@
---- buttonlist.h.orig	Wed Jan 26 01:41:32 2000
-+++ buttonlist.h	Sun Aug 22 19:24:13 2004
+--- buttonlist.h.orig	2000-01-25 17:41:32.000000000 +0100
++++ buttonlist.h	2013-03-16 11:40:09.000000000 +0100
 @@ -16,7 +16,7 @@
  
  	void Add_Button(Uint16 x, Uint16 y, Uint16 width, Uint16 height, 

Added: head/games/maelstrom/files/patch-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-configure	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,12 @@
+--- configure.orig	2002-10-20 05:43:07.000000000 +0200
++++ configure	2013-03-16 13:28:11.000000000 +0100
+@@ -3231,6 +3231,9 @@
+         ac_default_prefix=/boot/beos
+         GAME_INSTALLDIR="\$(prefix)/games/$PACKAGE"
+         ;;
++    *-*-freebsd*)
++	GAME_INSTALLDIR="\$(prefix)/share/$PACKAGE"
++	;;
+     *)
+         GAME_INSTALLDIR="\$(prefix)/games/$PACKAGE"
+         ;;

Added: head/games/maelstrom/files/patch-controls.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-controls.cpp	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,11 @@
+--- controls.cpp.orig	2001-03-24 19:04:28.000000000 +0100
++++ controls.cpp	2013-03-16 13:30:14.000000000 +0100
+@@ -83,7 +83,7 @@
+ 	if ( fname ) {
+ 		*fname = datafile;
+ 	}
+-	sprintf(datafile,  "%s"DIR_SEP"%s", home, MAELSTROM_DATA);
++	snprintf(datafile, sizeof(datafile), "%s"DIR_SEP"%s", home, MAELSTROM_DATA);
+ 	if ( (data=fopen(datafile, mode)) == NULL )
+ 		return(NULL);
+ 	return(data);

Added: head/games/maelstrom/files/patch-dialog.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-dialog.h	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,20 @@
+--- dialog.h.orig	2001-07-20 17:08:10.000000000 +0200
++++ dialog.h	2013-03-16 10:15:10.000000000 +0100
+@@ -92,7 +92,7 @@
+ 		va_list ap;
+ 
+ 		va_start(ap, fmt);
+-		vsprintf(errbuf, fmt, ap);
++		vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ 		va_end(ap);
+ 		errstr = errbuf;
+         }
+@@ -878,7 +878,7 @@
+ 		if ( entry->text ) {
+ 			Fontserv->FreeText(entry->text);
+ 		}
+-		sprintf(buf, "%d", *entry->variable);
++		snprintf(buf, sizeof(buf), "%d", *entry->variable);
+ 
+ 		if ( entry->hilite ) {
+ 			clear = Fg;

Added: head/games/maelstrom/files/patch-load.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-load.cpp	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,20 @@
+--- load.cpp.orig	2000-02-15 03:47:39.000000000 +0100
++++ load.cpp	2013-03-16 10:17:30.000000000 +0100
+@@ -81,7 +81,7 @@
+ 	SDL_Surface *bmp, *title;
+ 	
+ 	/* Open the title file -- we know its colormap is our global one */
+-	sprintf(file, "Images"DIR_SEP"Maelstrom_Titles#%d.bmp", title_id);
++	snprintf(file, sizeof(file), "Images"DIR_SEP"Maelstrom_Titles#%d.bmp", title_id);
+ 	bmp = SDL_LoadBMP(path.Path(file));
+ 	if ( bmp == NULL ) {
+ 		return(NULL);
+@@ -103,7 +103,7 @@
+ 	Uint16 w, h;
+ 	
+ 	/* Open the cicn sprite file.. */
+-	sprintf(file, "Images"DIR_SEP"Maelstrom_Icon#%hd.cicn", cicn_id);
++	snprintf(file, sizeof(file), "Images"DIR_SEP"Maelstrom_Icon#%hd.cicn", cicn_id);
+ 	if ( (cicn_src=SDL_RWFromFile(path.Path(file), "r")) == NULL ) {
+ 		error("GetCIcon(%hd): Can't open CICN %s: ",
+ 					cicn_id, path.Path(file));

Added: head/games/maelstrom/files/patch-maclib-Mac_FontServ.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-maclib-Mac_FontServ.h	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,11 @@
+--- maclib/Mac_FontServ.h.orig	1999-12-02 18:15:33.000000000 +0100
++++ maclib/Mac_FontServ.h	2013-03-16 10:18:56.000000000 +0100
+@@ -135,7 +135,7 @@
+ 		va_list ap;
+ 
+ 		va_start(ap, fmt);
+-		vsprintf(errbuf, fmt, ap);
++		vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ 		va_end(ap);
+ 		errstr = errbuf;
+ 	}

Added: head/games/maelstrom/files/patch-maclib-Mac_Resource.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-maclib-Mac_Resource.h	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,11 @@
+--- maclib/Mac_Resource.h.orig	1999-12-03 19:01:47.000000000 +0100
++++ maclib/Mac_Resource.h	2013-03-16 10:47:19.000000000 +0100
+@@ -96,7 +96,7 @@
+ 		va_list ap;
+ 
+ 		va_start(ap, fmt);
+-		vsprintf(errbuf, fmt, ap);
++		vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ 		va_end(ap);
+ 		errstr = errbuf;
+ 	}

Added: head/games/maelstrom/files/patch-maclib-Mac_Sound.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-maclib-Mac_Sound.h	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,11 @@
+--- maclib/Mac_Sound.h.orig	2002-10-20 04:53:34.000000000 +0200
++++ maclib/Mac_Sound.h	2013-03-16 10:48:58.000000000 +0100
+@@ -199,7 +199,7 @@
+ 		va_list ap;
+ 
+ 		va_start(ap, fmt);
+-		vsprintf(errbuf, fmt, ap);
++		vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ 		va_end(ap);
+ 		errstr = errbuf;
+ 	}

Added: head/games/maelstrom/files/patch-maclib-Mac_Wave.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-maclib-Mac_Wave.h	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,11 @@
+--- maclib/Mac_Wave.h.orig	2000-01-25 17:44:10.000000000 +0100
++++ maclib/Mac_Wave.h	2013-03-16 10:50:39.000000000 +0100
+@@ -108,7 +108,7 @@
+ 		va_list ap;
+ 
+ 		va_start(ap, fmt);
+-		vsprintf(errbuf, fmt, ap);
++		vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ 		va_end(ap);
+ 		errstr = errbuf;
+ 	}

Added: head/games/maelstrom/files/patch-maclib-macres.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-maclib-macres.cpp	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,13 @@
+--- maclib/macres.cpp.orig	2000-01-25 17:44:20.000000000 +0100
++++ maclib/macres.cpp	2013-03-16 10:55:45.000000000 +0100
+@@ -58,8 +58,8 @@
+ 				ids[j], res->ResourceName(types[i], ids[j]));
+ 			if ( argv[2] ) {
+ 				char path[23];
+-				sprintf(path,"%s/%s:%hu", argv[2],
+-							types[i], ids[j]);
++				snprintf(path, sizeof(path), "%s/%s:%hu",
++					argv[2], types[i], ids[j]);
+ 				FILE *output;
+ 				Mac_ResData *D;
+             			if ( (output=fopen(path, "w")) != NULL ) {

Added: head/games/maelstrom/files/patch-maclib-snd2wav.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-maclib-snd2wav.cpp	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,11 @@
+--- maclib/snd2wav.cpp.orig	2001-03-28 05:54:50.000000000 +0200
++++ maclib/snd2wav.cpp	2013-03-16 10:58:23.000000000 +0100
+@@ -82,7 +82,7 @@
+ 			continue;
+ 		}
+ 		wave.Load(snd, rate);
+-		sprintf(wavname, "snd_%d.wav", ids[i]);
++		snprintf(wavname, sizeof(wavname), "snd_%d.wav", ids[i]);
+ 		wave.Save(wavname);
+ 	}
+ 	delete macx;

Added: head/games/maelstrom/files/patch-main.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-main.cpp	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,34 @@
+--- main.cpp.orig	2002-10-20 04:53:32.000000000 +0200
++++ main.cpp	2013-03-16 11:03:28.000000000 +0100
+@@ -445,7 +445,7 @@
+ 		DrawText(xOff+309-7, yOff+240-6, text, geneva, STYLE_BOLD,
+ 							0x00, 0x00, 0x00);
+ 	}
+-	sprintf(text, "%d", gSoundLevel);
++	snprintf(text, sizeof(text), "%d", gSoundLevel);
+ 	DrawText(xOff+309-7, yOff+240-6, text, geneva, STYLE_BOLD,
+ 						30000>>8, 30000>>8, 0xFF);
+ 	screen->Update();
+@@ -547,11 +547,11 @@
+ 		}
+ 		DrawText(xOff+5, botDiv+42+(index*18), hScores[index].name,
+ 						font, STYLE_BOLD, R, G, B);
+-		sprintf(buffer, "%u", hScores[index].score);
++		snprintf(buffer, sizeof(buffer), "%u", hScores[index].score);
+ 		sw = fontserv->TextWidth(buffer, font, STYLE_BOLD);
+ 		DrawText(sRt-sw, botDiv+42+(index*18), buffer, 
+ 						font, STYLE_BOLD, R, G, B);
+-		sprintf(buffer, "%u", hScores[index].wave);
++		snprintf(buffer, sizeof(buffer), "%u", hScores[index].wave);
+ 		sw = fontserv->TextWidth(buffer, font, STYLE_BOLD);
+ 		DrawText(wRt-sw, botDiv+42+(index*18), buffer, 
+ 						font, STYLE_BOLD, R, G, B);
+@@ -560,7 +560,7 @@
+ 
+ 	DrawText(xOff+5, botDiv+46+(10*18)+3, "Last Score: ", 
+ 					bigfont, STYLE_NORM, 0xFF, 0xFF, 0xFF);
+-	sprintf(buffer, "%d", GetScore());
++	snprintf(buffer, sizeof(buffer), "%d", GetScore());
+ 	sw = fontserv->TextWidth("Last Score: ", bigfont, STYLE_NORM);
+ 	DrawText(xOff+5+sw, botDiv+46+(index*18)+3, buffer, 
+ 					bigfont, STYLE_NORM, 0xFF, 0xFF, 0xFF);

Added: head/games/maelstrom/files/patch-myerror.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-myerror.cpp	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,29 @@
+--- myerror.cpp.orig	1998-07-14 03:50:17.000000000 +0200
++++ myerror.cpp	2013-03-16 12:24:50.000000000 +0100
+@@ -16,7 +16,7 @@
+ 	va_list ap;
+ 
+ 	va_start(ap, fmt);
+-	vsprintf(mesg, fmt, ap);
++	vsnprintf(mesg, sizeof(mesg), fmt, ap);
+ 	fputs(mesg, stderr);
+ 	va_end(ap);
+ }
+@@ -27,7 +27,7 @@
+ 	va_list ap;
+ 
+ 	va_start(ap, fmt);
+-	vsprintf(mesg, fmt, ap);
++	vsnprintf(mesg, sizeof(mesg), fmt, ap);
+ 	fputs(mesg, stdout);
+ 	va_end(ap);
+ }
+@@ -37,7 +37,7 @@
+ 	char buffer[BUFSIZ];
+ 
+ 	if ( *msg ) {
+-		sprintf(buffer, "%s: %s\n", msg, strerror(errno));
++		snprintf(buffer, sizeof(buffer), "%s: %s\n", msg, strerror(errno));
+ 		error(buffer);
+ 	} else
+ 		error((char *)strerror(errno));

Added: head/games/maelstrom/files/patch-netlogic-game.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-netlogic-game.cpp	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,127 @@
+--- netlogic/game.cpp.orig	2001-07-23 04:24:03.000000000 +0200
++++ netlogic/game.cpp	2013-03-16 13:13:14.000000000 +0100
+@@ -232,7 +232,7 @@
+ 
+ 			lastDisplayed = gDisplayed;
+ 			screen->FillRect(0, 0, SCREEN_WIDTH, 12, ourBlack);
+-			sprintf(caption,
++			snprintf(caption, sizeof(caption),
+ 				"You are player %d --- displaying player %d",
+ 						gOurPlayer+1, gDisplayed+1);
+ 			DrawText(SPRITES_WIDTH, 11, caption, geneva,
+@@ -357,7 +357,7 @@
+ 				/* -- Erase old and draw new score */
+ 				screen->FillRect(45, gStatusLine+1,
+ 					score_width, text_height, ourBlack);
+-				sprintf(numbuf, "%d", Score);
++				snprintf(numbuf, sizeof(numbuf), "%d", Score);
+ 				score_width = DrawText(45, gStatusLine+11, 
+ 						numbuf, geneva, STYLE_BOLD,
+ 							0xFF, 0xFF, 0xFF);
+@@ -380,7 +380,7 @@
+ 		if (lastWave != gWave) {
+ 			screen->FillRect(255, gStatusLine+1,
+ 					wave_width, text_height, ourBlack);
+-			sprintf(numbuf, "%d", gWave);
++			snprintf(numbuf, sizeof(numbuf), "%d", gWave);
+ 			wave_width = DrawText(255, gStatusLine+11, 
+ 					numbuf, geneva, STYLE_BOLD,
+ 							0xFF, 0xFF, 0xFF);
+@@ -391,7 +391,7 @@
+ 		if (lastLives != Lives) {
+ 			screen->FillRect(319, gStatusLine+1,
+ 					lives_width, text_height, ourBlack);
+-			sprintf(numbuf, "%-3.1d", Lives);
++			snprintf(numbuf, sizeof(numbuf), "%-3.1d", Lives);
+ 			lives_width = DrawText(319, gStatusLine+11,
+ 					numbuf, geneva, STYLE_BOLD,
+ 							0xFF, 0xFF, 0xFF);
+@@ -402,7 +402,7 @@
+ 		if (lastBonus != Bonus) {
+ 			screen->FillRect(384, gStatusLine+1,
+ 					bonus_width, text_height, ourBlack);
+-			sprintf(numbuf, "%-7.1d", Bonus);
++			snprintf(numbuf, sizeof(numbuf), "%-7.1d", Bonus);
+ 			bonus_width = DrawText(384, gStatusLine+11,
+ 					numbuf, geneva, STYLE_BOLD,
+ 							0xFF, 0xFF, 0xFF);
+@@ -414,7 +414,7 @@
+ 			if (lastFrags != Frags) {
+ 				screen->FillRect(fragoff, gStatusLine+1,
+ 					frags_width, text_height, ourBlack);
+-				sprintf(numbuf, "%-3.1d", Frags);
++				snprintf(numbuf, sizeof(numbuf), "%-3.1d", Frags);
+ 				frags_width = DrawText(fragoff, gStatusLine+11,
+ 						numbuf, geneva, STYLE_BOLD,
+ 							0xFF, 0xFF, 0xFF);
+@@ -747,10 +747,11 @@
+ 		for ( i=0; i<gNumPlayers; ++i ) {
+ 			char buffer[BUFSIZ], num1[12], num2[12];
+ 
+-			sprintf(num1, "%7.1d", final[i].Score);
+-			sprintf(num2, "%3.1d", final[i].Frags);
+-			sprintf(buffer, "Player %d: %-.7s Points, %-.3s Frags",
+-						final[i].Player, num1, num2);
++			snprintf(num1, sizeof(num1), "%7.1d", final[i].Score);
++			snprintf(num2, sizeof(num2), "%3.1d", final[i].Frags);
++			snprintf(buffer, sizeof(buffer),
++				 "Player %d: %-.7s Points, %-.3s Frags",
++				 final[i].Player, num1, num2);
+ 			DrawText(160, 380+i*newyork_height, buffer,
+ 				newyork, STYLE_NORM, 30000>>8, 30000>>8, 0xFF);
+ 		}
+@@ -898,7 +899,7 @@
+ 	
+ 
+ 	/* -- Draw the wave completed message */
+-	sprintf(numbuf, "Wave %d completed.", gWave);
++	snprintf(numbuf, sizeof(numbuf), "Wave %d completed.", gWave);
+ 	sw = fontserv->TextWidth(numbuf, geneva, STYLE_BOLD);
+ 	x = (SCREEN_WIDTH - sw) / 2;
+ 	DrawText(x,  150, numbuf, geneva, STYLE_BOLD, 0xFF, 0xFF, 0x00);
+@@ -935,7 +936,7 @@
+ 		if (OurShip->GetBonusMult() != 1) {
+ 			SDL_Surface *sprite;
+ 
+-			sprintf(numbuf, "%-5.1d", OurShip->GetBonus());
++			snprintf(numbuf, sizeof(numbuf), "%-5.1d", OurShip->GetBonus());
+ 			DrawText(x, 200, numbuf, geneva, STYLE_BOLD,
+ 							0xFF, 0xFF, 0xFF);
+ 			x += 75;
+@@ -951,10 +952,10 @@
+ 	Delay(SOUND_DELAY);
+ 	sound->PlaySound(gFunk, 5);
+ 
+-	sprintf(numbuf, "%-5.1d", OurShip->GetBonus());
++	snprintf(numbuf, sizeof(numbuf), "%-5.1d", OurShip->GetBonus());
+ 	bonus_width = DrawText(x, 200, numbuf, geneva, STYLE_BOLD,
+ 							0xFF, 0xFF, 0xFF);
+-	sprintf(numbuf, "%-5.1d", OurShip->GetScore());
++	snprintf(numbuf, sizeof(numbuf), "%-5.1d", OurShip->GetScore());
+ 	score_width = DrawText(xt, 220, numbuf, geneva, STYLE_BOLD,
+ 							0xFF, 0xFF, 0xFF);
+ 	screen->Update();
+@@ -997,12 +998,12 @@
+ 	
+ 			screen->FillRect(x, 200-text_height+2,
+ 					bonus_width, text_height, ourBlack);
+-			sprintf(numbuf, "%-5.1d", OurShip->GetBonus());
++			snprintf(numbuf, sizeof(numbuf), "%-5.1d", OurShip->GetBonus());
+ 			bonus_width = DrawText(x, 200, numbuf,
+ 					geneva, STYLE_BOLD, 0xFF, 0xFF, 0xFF);
+ 			screen->FillRect(xt, 220-text_height+2,
+ 					score_width, text_height, ourBlack);
+-			sprintf(numbuf, "%-5.1d", OurShip->GetScore());
++			snprintf(numbuf, sizeof(numbuf), "%-5.1d", OurShip->GetScore());
+ 			score_width = DrawText(xt, 220, numbuf,
+ 					geneva, STYLE_BOLD, 0xFF, 0xFF, 0xFF);
+ 
+@@ -1015,7 +1016,7 @@
+ 	HandleEvents(10);
+ 
+ 	/* -- Draw the "next wave" message */
+-	sprintf(numbuf, "Prepare for Wave %d...", gWave+1);
++	snprintf(numbuf, sizeof(numbuf), "Prepare for Wave %d...", gWave+1);
+ 	sw = fontserv->TextWidth(numbuf, geneva, STYLE_BOLD);
+ 	x = (SCREEN_WIDTH - sw)/2;
+ 	DrawText(x, 259, numbuf, geneva, STYLE_BOLD, 0xFF, 0xFF, 0x00);

Added: head/games/maelstrom/files/patch-netlogic-netplay.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-netlogic-netplay.cpp	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,22 @@
+--- netlogic/netplay.cpp.orig	2002-10-20 06:11:52.000000000 +0200
++++ netlogic/netplay.cpp	2013-03-16 13:16:57.000000000 +0100
+@@ -670,7 +670,9 @@
+ 		strcpy(message, "Waiting for players:");
+ 		for ( i=0; i<gNumPlayers; ++i ) {
+ 			if ( ! acked[i] )
+-				sprintf(&message[strlen(message)], " %d", i+1);
++				snprintf(&message[strlen(message)],
++					 sizeof(message)-strlen(message),
++					 " %d", i+1);
+ 		}
+ 		Message(message);
+ 
+@@ -725,7 +727,7 @@
+ 			/* Check the player... */
+ 			if ( (i != gOurPlayer) && (netbuf[1] == gOurPlayer) ) {
+ 				/* Print message, sleep 3 seconds absolutely */
+-				sprintf(message, 
++			  snprintf(message, sizeof(message),
+ 	"Error: Another player (%d) thinks they are player 1!\r\n", i+1);
+ 				ErrorMessage(message);
+ 				/* Suck up retransmission packets */

Added: head/games/maelstrom/files/patch-netscore.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-netscore.cpp	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,11 @@
+--- netscore.cpp.orig	2001-07-23 05:25:17.000000000 +0200
++++ netscore.cpp	2013-03-16 11:30:57.000000000 +0100
+@@ -59,7 +59,7 @@
+ 
+ 	/* Send the scores */
+ 	crc = get_checksum(key, KEY_LEN);
+-	sprintf(netbuf, SCOREFMT, crc, high.name, high.score, high.wave);
++	snprintf(netbuf, sizeof(netbuf), SCOREFMT, crc, high.name, high.score, high.wave);
+ 	SDLNet_TCP_Send(remote, netbuf, strlen(netbuf));
+ 	n = SDLNet_TCP_Recv(remote, netbuf, 1024);
+ 	if ( n > 0 ) {

Modified: head/games/maelstrom/files/patch-screenlib-SDL_FrameBuf.cpp
==============================================================================
--- head/games/maelstrom/files/patch-screenlib-SDL_FrameBuf.cpp	Sun Mar 17 20:17:15 2013	(r314484)
+++ head/games/maelstrom/files/patch-screenlib-SDL_FrameBuf.cpp	Sun Mar 17 20:22:26 2013	(r314485)
@@ -1,5 +1,14 @@
---- screenlib/SDL_FrameBuf.cpp.old	2006-10-25 22:37:21.000000000 +0200
-+++ screenlib/SDL_FrameBuf.cpp	2006-10-25 22:38:26.000000000 +0200
+--- screenlib/SDL_FrameBuf.cpp.orig	2001-07-22 23:03:13.000000000 +0200
++++ screenlib/SDL_FrameBuf.cpp	2013-03-16 11:45:02.000000000 +0100
+@@ -628,7 +628,7 @@
+ 
+ 		found = 0;
+ 		for ( which=0; !found; ++which ) {
+-			sprintf(file, "%s%d.bmp", prefix, which);
++			snprintf(file, sizeof(file), "%s%d.bmp", prefix, which);
+ 			if ( ((fp=fopen(file, "r")) == NULL) &&
+ 			     ((fp=fopen(file, "w")) != NULL) ) {
+ 				found = 1;
 @@ -847,10 +847,8 @@
  			/* Update the dirty rectangle map with the new list */
  			for ( i=0; i<dirtymaplen; ++i ) {

Added: head/games/maelstrom/files/patch-screenlib-SDL_FrameBuf.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-screenlib-SDL_FrameBuf.h	Sun Mar 17 20:22:26 2013	(r314485)
@@ -0,0 +1,11 @@
+--- screenlib/SDL_FrameBuf.h.orig	2000-09-24 19:55:39.000000000 +0200
++++ screenlib/SDL_FrameBuf.h	2013-03-16 11:33:01.000000000 +0100
+@@ -165,7 +165,7 @@
+ 		va_list ap;
+ 
+ 		va_start(ap, fmt);
+-		vsprintf(errbuf, fmt, ap);
++		vsnprintf(errbuf, sizeof(errbuf), fmt, ap);
+ 		va_end(ap);
+ 		errstr = errbuf;
+         }

Modified: head/games/maelstrom/pkg-plist
==============================================================================
--- head/games/maelstrom/pkg-plist	Sun Mar 17 20:17:15 2013	(r314484)
+++ head/games/maelstrom/pkg-plist	Sun Mar 17 20:22:26 2013	(r314485)
@@ -1,58 +1,39 @@
 bin/Maelstrom
 bin/Maelstrom-netd
-%%PORTDOCS%%share/doc/Maelstrom/Ambrosia_Software,_Inc._FAQ
-%%PORTDOCS%%share/doc/Maelstrom/COPYING
-%%PORTDOCS%%share/doc/Maelstrom/COPYING.GPL
-%%PORTDOCS%%share/doc/Maelstrom/Maelstrom-Announce
-%%PORTDOCS%%share/doc/Maelstrom/Maelstrom.FAQ
-%%PORTDOCS%%share/doc/Maelstrom/MaelstromGPL_press_release
-%%PORTDOCS%%share/doc/Maelstrom/Makefile
-%%PORTDOCS%%share/doc/Maelstrom/Makefile.in
-%%PORTDOCS%%share/doc/Maelstrom/Networking.Paper
-%%PORTDOCS%%share/doc/Maelstrom/Porting.Paper
-%%PORTDOCS%%share/doc/Maelstrom/Quotes
-%%PORTDOCS%%share/doc/Maelstrom/README
-%%PORTDOCS%%share/doc/Maelstrom/README.joystick
-%%PORTDOCS%%share/doc/Maelstrom/README.network
-%%PORTDOCS%%share/doc/Maelstrom/README.options
-%%PORTDOCS%%share/doc/Maelstrom/RSA.README
-%%PORTDOCS%%share/doc/Maelstrom/Technical_Notes-v1.0
-%%PORTDOCS%%share/doc/Maelstrom/Technical_Notes-v1.1
-%%PORTDOCS%%share/doc/Maelstrom/Technical_Notes-v2.0
-share/Maelstrom/Images/Maelstrom_Icon#100.cicn
-share/Maelstrom/Images/Maelstrom_Icon#101.cicn
-share/Maelstrom/Images/Maelstrom_Icon#102.cicn
-share/Maelstrom/Images/Maelstrom_Icon#103.cicn
-share/Maelstrom/Images/Maelstrom_Icon#104.cicn
-share/Maelstrom/Images/Maelstrom_Icon#110.cicn
-share/Maelstrom/Images/Maelstrom_Icon#128.cicn
-share/Maelstrom/Images/Maelstrom_Icon#129.cicn
-share/Maelstrom/Images/Maelstrom_Icon#130.cicn
-share/Maelstrom/Images/Maelstrom_Icon#131.cicn
-share/Maelstrom/Images/Maelstrom_Icon#132.cicn
-share/Maelstrom/Images/Maelstrom_Icon#133.cicn
-share/Maelstrom/Images/Maelstrom_Icon#134.cicn
-share/Maelstrom/Images/Maelstrom_Icon#135.cicn
-share/Maelstrom/Images/Maelstrom_Icon#136.cicn
-share/Maelstrom/Images/Maelstrom_Icon#137.cicn
-share/Maelstrom/Images/Maelstrom_Titles#100.bmp
-share/Maelstrom/Images/Maelstrom_Titles#101.bmp
-share/Maelstrom/Images/Maelstrom_Titles#102.bmp
-share/Maelstrom/Images/Maelstrom_Titles#128.bmp
-share/Maelstrom/Images/Maelstrom_Titles#129.bmp
-share/Maelstrom/Images/Maelstrom_Titles#130.bmp
-share/Maelstrom/Images/Maelstrom_Titles#133.bmp
-share/Maelstrom/Images/Maelstrom_Titles#134.bmp
-share/Maelstrom/Images/Maelstrom_Titles#135.bmp
-share/Maelstrom/Images/Maelstrom_Titles#999.bmp
-share/Maelstrom/Images/Makefile
-share/Maelstrom/Images/Makefile.in
-share/Maelstrom/Maelstrom-Scores
-share/Maelstrom/Maelstrom_Fonts
-share/Maelstrom/Maelstrom_Sounds
-share/Maelstrom/Maelstrom_Sprites
-share/Maelstrom/icon.bmp
-share/Maelstrom/icon.xpm
-@dirrm share/Maelstrom/Images
-@dirrm share/Maelstrom
-%%PORTDOCS%%@dirrm share/doc/Maelstrom
+%%DATADIR%%/Images/Maelstrom_Icon#100.cicn
+%%DATADIR%%/Images/Maelstrom_Icon#101.cicn
+%%DATADIR%%/Images/Maelstrom_Icon#102.cicn
+%%DATADIR%%/Images/Maelstrom_Icon#103.cicn
+%%DATADIR%%/Images/Maelstrom_Icon#104.cicn
+%%DATADIR%%/Images/Maelstrom_Icon#110.cicn
+%%DATADIR%%/Images/Maelstrom_Icon#128.cicn
+%%DATADIR%%/Images/Maelstrom_Icon#129.cicn
+%%DATADIR%%/Images/Maelstrom_Icon#130.cicn
+%%DATADIR%%/Images/Maelstrom_Icon#131.cicn
+%%DATADIR%%/Images/Maelstrom_Icon#132.cicn
+%%DATADIR%%/Images/Maelstrom_Icon#133.cicn
+%%DATADIR%%/Images/Maelstrom_Icon#134.cicn
+%%DATADIR%%/Images/Maelstrom_Icon#135.cicn
+%%DATADIR%%/Images/Maelstrom_Icon#136.cicn
+%%DATADIR%%/Images/Maelstrom_Icon#137.cicn
+%%DATADIR%%/Images/Maelstrom_Titles#100.bmp
+%%DATADIR%%/Images/Maelstrom_Titles#101.bmp
+%%DATADIR%%/Images/Maelstrom_Titles#102.bmp
+%%DATADIR%%/Images/Maelstrom_Titles#128.bmp
+%%DATADIR%%/Images/Maelstrom_Titles#129.bmp
+%%DATADIR%%/Images/Maelstrom_Titles#130.bmp
+%%DATADIR%%/Images/Maelstrom_Titles#133.bmp
+%%DATADIR%%/Images/Maelstrom_Titles#134.bmp
+%%DATADIR%%/Images/Maelstrom_Titles#135.bmp
+%%DATADIR%%/Images/Maelstrom_Titles#999.bmp
+%%DATADIR%%/Images/Makefile
+%%DATADIR%%/Images/Makefile.in
+%%DATADIR%%/Maelstrom-Scores
+%%DATADIR%%/Maelstrom_Fonts
+%%DATADIR%%/Maelstrom_Sounds
+%%DATADIR%%/Maelstrom_Sprites
+%%DATADIR%%/icon.bmp
+%%DATADIR%%/icon.xpm
+share/pixmaps/maelstrom.png
+@dirrm %%DATADIR%%/Images
+@dirrm %%DATADIR%%
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 beech freebsd_committer 2013-03-17 20:22:56 UTC
State Changed
From-To: open->closed

Committed, Thanks!