ports/88768: New port: games/scramble From 6 letters you are to create as many words as you can
Dmitry Marakasov
amdmi3 at mail.ru
Thu Nov 10 02:50:29 UTC 2005
>Number: 88768
>Category: ports
>Synopsis: New port: games/scramble From 6 letters you are to create as many words as you can
>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:50:24 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 at hades.panopticon:/usr/obj/usr/src/sys/HADES i386
>Description:
Test your word knowledge, and spelling skills, with this anagram
game. You are given 6 letters to create as many words as you can
in the time alotted.
WWW: http://www.shiftygames.com/scramble/scramble.html
>How-To-Repeat:
>Fix:
--- scramble-0.9.5.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:
#
# scramble
# scramble/files
# scramble/files/patch-src-scramble.c
# scramble/files/patch-src-sound.c
# scramble/files/patch-src-perm.c
# scramble/Makefile
# scramble/distinfo
# scramble/pkg-descr
# scramble/pkg-plist
#
echo c - scramble
mkdir -p scramble > /dev/null 2>&1
echo c - scramble/files
mkdir -p scramble/files > /dev/null 2>&1
echo x - scramble/files/patch-src-scramble.c
sed 's/^X//' >scramble/files/patch-src-scramble.c << 'END-of-scramble/files/patch-src-scramble.c'
X--- src/scramble.c.orig Thu Nov 10 05:20:17 2005
X+++ src/scramble.c Thu Nov 10 05:22:01 2005
X@@ -290,14 +290,13 @@
X ****************************************************/
X void putLetter(char * ch, int s)
X {
X- if(!running)
X- return;
X-
X char ch2[2];
X+ SDL_Rect dest;
X ch2[0] = toupper(ch[0]);
X ch2[1] = 0;
X-
X- SDL_Rect dest;
X+
X+ if(!running)
X+ return;
X
X s--;
X
X@@ -694,6 +693,8 @@
X
X for(i = 0; i < numberCurrentWords; i++) {
X if(strcmp(wordAttempt, currentWordSet[i]) == 0 && currentWordSetShow[i] == 0) {
X+ double per;
X+
X currentWordSetShow[i] = 1;
X playSound(hitSound);
X
X@@ -706,7 +707,7 @@
X stateChanged = 1;
X redrawAll = 1;
X wordsFound++;
X- double per = ((double)wordsFound / (double)numberCurrentWords);
X+ per = ((double)wordsFound / (double)numberCurrentWords);
X if(per > percentage) {
X nextLevel = 1;
X if(nextLevel % 5 && percentage < .8)
X@@ -1127,9 +1128,10 @@
X ****************************************************/
X void letter(char c)
X {
X+ int i;
X if(!running)
X return;
X- int i;
X+
X for(i = 0; i < 6; i++) {
X if(c == letters[i].letter[0] && !letters[i].played) {
X playSound(clickSound);
END-of-scramble/files/patch-src-scramble.c
echo x - scramble/files/patch-src-sound.c
sed 's/^X//' >scramble/files/patch-src-sound.c << 'END-of-scramble/files/patch-src-sound.c'
X--- src/sound.c.orig Thu Nov 10 05:24:37 2005
X+++ src/sound.c Thu Nov 10 05:22:26 2005
X@@ -46,12 +46,13 @@
X Mix_Chunk * loadSound(const char * name)
X {
X Mix_Chunk * temp;
X+ char * newname;
X int len1 = strlen(sg_data_path), len2 = strlen(name);
X
X if(disabled)
X return NULL;
X
X- char * newname = (char*)malloc(len1 + len2 + 1);
X+ newname = (char*)malloc(len1 + len2 + 1);
X if(newname == NULL) {
X fprintf(stderr, "Out of memory!\n");
X exit(1);
END-of-scramble/files/patch-src-sound.c
echo x - scramble/files/patch-src-perm.c
sed 's/^X//' >scramble/files/patch-src-perm.c << 'END-of-scramble/files/patch-src-perm.c'
X--- src/perm.c.orig Sun Mar 27 03:45:59 2005
X+++ src/perm.c Thu Nov 10 05:23:00 2005
X@@ -149,11 +149,11 @@
X ****************************************************/
X static void resize()
X {
X+ struct node ** old_table = dictionary;
X unsigned int a;
X size_t old_size = sizeOfTable, i;
X sizeOfTable *= 2;
X numOfEntries = 0;
X- struct node ** old_table = dictionary;
X
X dictionary = (struct node **)malloc(sizeof(struct node *) * sizeOfTable);
X if(!dictionary) {
END-of-scramble/files/patch-src-perm.c
echo x - scramble/Makefile
sed 's/^X//' >scramble/Makefile << 'END-of-scramble/Makefile'
X# New ports collection makefile for: scramble
X# Date created: 10 Nov 2005
X# Whom: Dmitry Marakasov <amdmi3 at mail.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME= scramble
XPORTVERSION= 0.9.5
XCATEGORIES= games
XMASTER_SITES= http://www.shiftygames.com/scramble/
X
XMAINTAINER= amdmi3 at mail.ru
XCOMMENT= From 6 letters you are to create as many words as you can
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= scramble.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/scramble.c
X @${REINPLACE_CMD} -e 's|-std=gnu99 ||g' ${WRKSRC}/configure
X
X.include <bsd.port.post.mk>
END-of-scramble/Makefile
echo x - scramble/distinfo
sed 's/^X//' >scramble/distinfo << 'END-of-scramble/distinfo'
XMD5 (scramble-0.9.5.tar.gz) = c46e4f582f14ee12b315f57a9a4b26d4
XSIZE (scramble-0.9.5.tar.gz) = 552301
END-of-scramble/distinfo
echo x - scramble/pkg-descr
sed 's/^X//' >scramble/pkg-descr << 'END-of-scramble/pkg-descr'
XTest your word knowledge, and spelling skills, with this anagram
Xgame. You are given 6 letters to create as many words as you can
Xin the time alotted.
X
XWWW: http://www.shiftygames.com/scramble/scramble.html
END-of-scramble/pkg-descr
echo x - scramble/pkg-plist
sed 's/^X//' >scramble/pkg-plist << 'END-of-scramble/pkg-plist'
Xbin/scramble
X%%DATADIR%%/fonts/arial.ttf
X%%DATADIR%%/fonts/keiserso.ttf
X%%DATADIR%%/pics/background.png
X%%DATADIR%%/pics/little_box.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/countdown.ogg
X%%DATADIR%%/sounds/hit.ogg
X%%DATADIR%%/sounds/miss.ogg
X%%DATADIR%%/sounds/move.ogg
X%%DATADIR%%/sounds/over.ogg
X%%DATADIR%%/sounds/shuffle.ogg
X%%DATADIR%%/sounds/tick.ogg
X%%DATADIR%%/sounds/warning.ogg
X at dirrm %%DATADIR%%/fonts
X at dirrm %%DATADIR%%/pics
X at dirrm %%DATADIR%%/sounds
X at dirrm %%DATADIR%%
END-of-scramble/pkg-plist
exit
--- scramble-0.9.5.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list