Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Nov 2005 05:43:01 +0300 (MSK)
From:      Dmitry Marakasov <amdmi3@mail.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/88767: New port: games/hangman Challenge your spelling skills in the old western style
Message-ID:  <20051110024301.2D89111FD@hades.panopticon>
Resent-Message-ID: <200511100240.jAA2eJaP075346@freefall.freebsd.org>

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

>Number:         88767
>Category:       ports
>Synopsis:       New port: games/hangman Challenge your spelling skills in the old western style
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 10 02:40:19 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Marakasov
>Release:        FreeBSD 6.0-RELEASE i386
>Organization:
>Environment:
System: FreeBSD hades.panopticon 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Tue Nov 8 08:55:44 MSK 2005 amdmi3@hades.panopticon:/usr/obj/usr/src/sys/HADES i386

>Description:
Challenge your spelling skills in the old western style. Get it
right and we'll let you try again, until you get it wrong. But we
will give you another chance if you get it wrong.

WWW: http://www.shiftygames.com/hangman/hangman.html
>How-To-Repeat:
>Fix:

--- hangman-0.9.2.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	hangman
#	hangman/files
#	hangman/files/patch-src-sound.c
#	hangman/files/patch-src-dict.c
#	hangman/Makefile
#	hangman/distinfo
#	hangman/pkg-descr
#	hangman/pkg-plist
#
echo c - hangman
mkdir -p hangman > /dev/null 2>&1
echo c - hangman/files
mkdir -p hangman/files > /dev/null 2>&1
echo x - hangman/files/patch-src-sound.c
sed 's/^X//' >hangman/files/patch-src-sound.c << 'END-of-hangman/files/patch-src-sound.c'
X--- src/sound.c.orig	Sun Apr 11 01:27:01 2004
X+++ src/sound.c	Thu Nov 10 05:14:05 2005
X@@ -47,10 +47,12 @@
X {
X 	Mix_Chunk * temp = NULL;
X 	char * newname = NULL;
X+	int len1, len2;
X 
X 	assert(name);
X 
X-	int len1 = strlen(sg_data_path), len2 = strlen(name);
X+	len1 = strlen(sg_data_path);
X+	len2 = strlen(name);
X 
X 	if(disabled)
X 		return NULL;
END-of-hangman/files/patch-src-sound.c
echo x - hangman/files/patch-src-dict.c
sed 's/^X//' >hangman/files/patch-src-dict.c << 'END-of-hangman/files/patch-src-dict.c'
X--- src/dict.c.orig	Sun Apr 11 01:22:40 2004
X+++ src/dict.c	Thu Nov 10 05:18:25 2005
X@@ -84,11 +84,15 @@
X  ****************************************************/
X static void resize()
X {
X+	struct node *d;
X+	struct node *t;
X+        struct node ** old_table = dictionary;
X 	unsigned int a;
X+	size_t i;
X         size_t old_size = sizeOfTable;
X-        sizeOfTable *= 2;
X         numOfEntries = 0;
X-        struct node ** old_table = dictionary;
X+
X+        sizeOfTable *= 2;
X 
X         dictionary = (struct node **)malloc(sizeof(struct node *) * sizeOfTable);
X         if(!dictionary) {
X@@ -99,8 +103,9 @@
X 
X         /* now copy old table into new table
X 	   and delete the old one */
X-        for(size_t i = 0; i < old_size; i++) {
X-		struct node * d = NULL, * t = old_table[i];
X+        for(i = 0; i < old_size; i++) {
X+		d = NULL;
X+		t = old_table[i];
X 		while(t) {
X 			addToDictionary(t->word);
X 			d = t;
X@@ -157,10 +162,11 @@
X {
X 	FILE * input = NULL;
X 	unsigned int a;
X+	size_t i;
X 
X 	/* Delete the old dictionary if one exists */
X 	if(dictionary) {
X-		for(size_t i = 0; i < sizeOfTable; i++) {
X+		for(i = 0; i < sizeOfTable; i++) {
X 			struct node * t = dictionary[i];
X 			while(t) {
X 				free(t->word);
END-of-hangman/files/patch-src-dict.c
echo x - hangman/Makefile
sed 's/^X//' >hangman/Makefile << 'END-of-hangman/Makefile'
X# New ports collection makefile for:	hangman
X# Date created:		10 Nov 2005
X# Whom:			Dmitry Marakasov <amdmi3@mail.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	hangman
XPORTVERSION=	0.9.2
XCATEGORIES=	games
XMASTER_SITES=	http://www.shiftygames.com/hangman/
X
XMAINTAINER=	amdmi3@mail.ru
XCOMMENT=	Challenge your spelling skills in the old western style
X
XGNU_CONFIGURE=	yes
XUSE_GMAKE=	yes
XUSE_REINPLACE=	yes
XUSE_SDL=	sdl mixer image ttf
X
XCONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
XCONFIGURE_ENV=	LDFLAGS="`${SDL_CONFIG} --libs`" \
X		CPPFLAGS="`${SDL_CONFIG} --cflags`" \
X		SDL_CONFIG="${SDL_CONFIG}"
X
XMAN6=		hangman.6
X
X.include <bsd.port.pre.mk>
X
X.if defined(WITH_DICTIONARY)
XDICTIONARY=${WITH_DICTIONARY}
X.else
XDICTIONARY=/usr/share/dict/words
X
Xpre-fetch:
X	@${ECHO} ""
X	@${ECHO} "You may want to use different dictionary instead of the default one,"
X	@${ECHO} "which is /usr/share/dict/words. If so, use the following option:"
X	@${ECHO} ""
X	@${ECHO} "	WITH_DICTIONARY=/path/to/your/dictionary"
X	@${ECHO} ""
X.endif
X
X.if !exists(${DICTIONARY})
Xpre-configure:
X	@${ECHO} ""
X	@${ECHO} "Dictionary ${DICTIONARY} does not exist"
X	@${ECHO} "Please, specify correct one with WITH_DICTIONARY option"
X	@${FALSE}
X.endif
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's|SDL/|SDL11/|g' ${WRKSRC}/configure
X	@${REINPLACE_CMD} -e 's|/usr/share/dict/words|${DICTIONARY}|g' ${WRKSRC}/src/hangman.c
X	@${REINPLACE_CMD} -e 's|-std=gnu99||g' ${WRKSRC}/configure
X
X.include <bsd.port.post.mk>
END-of-hangman/Makefile
echo x - hangman/distinfo
sed 's/^X//' >hangman/distinfo << 'END-of-hangman/distinfo'
XMD5 (hangman-0.9.2.tar.gz) = 15081ba8a9d69ff82f6bc93004342693
XSIZE (hangman-0.9.2.tar.gz) = 1023712
END-of-hangman/distinfo
echo x - hangman/pkg-descr
sed 's/^X//' >hangman/pkg-descr << 'END-of-hangman/pkg-descr'
XChallenge your spelling skills in the old western style. Get it
Xright and we'll let you try again, until you get it wrong. But we
Xwill give you another chance if you get it wrong.
X
XWWW: http://www.shiftygames.com/hangman/hangman.html
END-of-hangman/pkg-descr
echo x - hangman/pkg-plist
sed 's/^X//' >hangman/pkg-plist << 'END-of-hangman/pkg-plist'
Xbin/hangman
X%%DATADIR%%/fonts/washing.ttf
X%%DATADIR%%/pics/background.png
X%%DATADIR%%/pics/background2.png
X%%DATADIR%%/pics/noose.png
X%%DATADIR%%/pics/sg_icon.png
X%%DATADIR%%/pics/shiftygames.png
X%%DATADIR%%/pics/sound_high.png
X%%DATADIR%%/pics/sound_low.png
X%%DATADIR%%/pics/sound_medium.png
X%%DATADIR%%/sounds/click.ogg
X%%DATADIR%%/sounds/letterSelectSound.ogg
X%%DATADIR%%/sounds/nooseDropSound.ogg
X%%DATADIR%%/sounds/over.ogg
X%%DATADIR%%/sounds/wordHitSound.ogg
X%%DATADIR%%/sounds/wordMissSound.ogg
X@dirrm %%DATADIR%%/fonts
X@dirrm %%DATADIR%%/pics
X@dirrm %%DATADIR%%/sounds
X@dirrm %%DATADIR%%
END-of-hangman/pkg-plist
exit
--- hangman-0.9.2.shar ends here ---


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



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