diff options
author | Marcus Alves Grando <mnag@FreeBSD.org> | 2005-11-11 15:57:01 +0000 |
---|---|---|
committer | Marcus Alves Grando <mnag@FreeBSD.org> | 2005-11-11 15:57:01 +0000 |
commit | 13dc09955aebd66de459fc2519ccc75149225c71 (patch) | |
tree | ab46fce75a7bce36ed8754589aaa1b956ee81678 /games/scramble | |
parent | a8a78b71034397cfd9fcbc3a1d3fcb0dc4df1d0e (diff) | |
download | ports-13dc09955aebd66de459fc2519ccc75149225c71.tar.gz ports-13dc09955aebd66de459fc2519ccc75149225c71.zip |
Notes
Diffstat (limited to 'games/scramble')
-rw-r--r-- | games/scramble/Makefile | 60 | ||||
-rw-r--r-- | games/scramble/distinfo | 3 | ||||
-rw-r--r-- | games/scramble/files/patch-src__perm.c | 15 | ||||
-rw-r--r-- | games/scramble/files/patch-src__scramble.c | 51 | ||||
-rw-r--r-- | games/scramble/files/patch-src__sound.c | 17 | ||||
-rw-r--r-- | games/scramble/pkg-descr | 5 | ||||
-rw-r--r-- | games/scramble/pkg-plist | 23 |
7 files changed, 174 insertions, 0 deletions
diff --git a/games/scramble/Makefile b/games/scramble/Makefile new file mode 100644 index 000000000000..46f410e819d5 --- /dev/null +++ b/games/scramble/Makefile @@ -0,0 +1,60 @@ +# New ports collection makefile for: scramble +# Date created: 10 Nov 2005 +# Whom: Dmitry Marakasov <amdmi3@mail.ru> +# +# $FreeBSD$ +# + +PORTNAME= scramble +PORTVERSION= 0.9.5 +CATEGORIES= games +MASTER_SITES= http://www.shiftygames.com/scramble/ + +MAINTAINER= amdmi3@mail.ru +COMMENT= From 6 letters you are to create as many words as you can + +GNU_CONFIGURE= yes +USE_GMAKE= yes +USE_REINPLACE= yes +USE_SDL= sdl mixer image ttf + +CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} +CONFIGURE_ENV= LDFLAGS="`${SDL_CONFIG} --libs`" \ + CPPFLAGS="`${SDL_CONFIG} --cflags`" \ + SDL_CONFIG="${SDL_CONFIG}" + +MAN6= scramble.6 + +.include <bsd.port.pre.mk> + +.if defined(WITH_DICTIONARY) +DICTIONARY=${WITH_DICTIONARY} +.else +DICTIONARY=/usr/share/dict/words + +pre-fetch: + @${ECHO} "" + @${ECHO} "You may want to use different dictionary instead of the default one," + @${ECHO} "which is /usr/share/dict/words. If so, use the following option:" + @${ECHO} "" + @${ECHO} " WITH_DICTIONARY=/path/to/your/dictionary" + @${ECHO} "" +.endif + +post-extract: + @${FIND} -E ${WRKDIR} -type f -iregex ".*\.(c|cpp|h|txt)" -print0 | \ + ${XARGS} -0 ${REINPLACE_CMD} -e 's/[[:cntrl:]]*$$//' + +.if !exists(${DICTIONARY}) +pre-configure: + @${ECHO} "" + @${ECHO} "Dictionary ${DICTIONARY} does not exist" + @${ECHO} "Please, specify correct one with WITH_DICTIONARY option" + @${FALSE} +.endif + +post-patch: + @${REINPLACE_CMD} -e 's|-std=gnu99 ||g' -e 's|SDL/|SDL11/|g' ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's|/usr/share/dict/words|${DICTIONARY}|g' ${WRKSRC}/src/scramble.c + +.include <bsd.port.post.mk> diff --git a/games/scramble/distinfo b/games/scramble/distinfo new file mode 100644 index 000000000000..d7ae59574133 --- /dev/null +++ b/games/scramble/distinfo @@ -0,0 +1,3 @@ +MD5 (scramble-0.9.5.tar.gz) = c46e4f582f14ee12b315f57a9a4b26d4 +SHA256 (scramble-0.9.5.tar.gz) = 9f0d27c65962f333f2a54294d1b42150aed0302fc12548a89c44d9f721d5d56f +SIZE (scramble-0.9.5.tar.gz) = 552301 diff --git a/games/scramble/files/patch-src__perm.c b/games/scramble/files/patch-src__perm.c new file mode 100644 index 000000000000..18d88ac83412 --- /dev/null +++ b/games/scramble/files/patch-src__perm.c @@ -0,0 +1,15 @@ +--- src/perm.c.orig Sun Mar 27 03:45:59 2005 ++++ src/perm.c Thu Nov 10 05:23:00 2005 +@@ -149,11 +149,11 @@ + ****************************************************/ + static void resize() + { ++ struct node ** old_table = dictionary; + unsigned int a; + size_t old_size = sizeOfTable, i; + sizeOfTable *= 2; + numOfEntries = 0; +- struct node ** old_table = dictionary; + + dictionary = (struct node **)malloc(sizeof(struct node *) * sizeOfTable); + if(!dictionary) { diff --git a/games/scramble/files/patch-src__scramble.c b/games/scramble/files/patch-src__scramble.c new file mode 100644 index 000000000000..c132a9d61212 --- /dev/null +++ b/games/scramble/files/patch-src__scramble.c @@ -0,0 +1,51 @@ +--- src/scramble.c.orig Thu Nov 10 05:20:17 2005 ++++ src/scramble.c Thu Nov 10 05:22:01 2005 +@@ -290,14 +290,13 @@ + ****************************************************/ + void putLetter(char * ch, int s) + { +- if(!running) +- return; +- + char ch2[2]; ++ SDL_Rect dest; + ch2[0] = toupper(ch[0]); + ch2[1] = 0; +- +- SDL_Rect dest; ++ ++ if(!running) ++ return; + + s--; + +@@ -694,6 +693,8 @@ + + for(i = 0; i < numberCurrentWords; i++) { + if(strcmp(wordAttempt, currentWordSet[i]) == 0 && currentWordSetShow[i] == 0) { ++ double per; ++ + currentWordSetShow[i] = 1; + playSound(hitSound); + +@@ -706,7 +707,7 @@ + stateChanged = 1; + redrawAll = 1; + wordsFound++; +- double per = ((double)wordsFound / (double)numberCurrentWords); ++ per = ((double)wordsFound / (double)numberCurrentWords); + if(per > percentage) { + nextLevel = 1; + if(nextLevel % 5 && percentage < .8) +@@ -1127,9 +1128,10 @@ + ****************************************************/ + void letter(char c) + { ++ int i; + if(!running) + return; +- int i; ++ + for(i = 0; i < 6; i++) { + if(c == letters[i].letter[0] && !letters[i].played) { + playSound(clickSound); diff --git a/games/scramble/files/patch-src__sound.c b/games/scramble/files/patch-src__sound.c new file mode 100644 index 000000000000..357a0e863300 --- /dev/null +++ b/games/scramble/files/patch-src__sound.c @@ -0,0 +1,17 @@ +--- src/sound.c.orig Thu Nov 10 05:24:37 2005 ++++ src/sound.c Thu Nov 10 05:22:26 2005 +@@ -46,12 +46,13 @@ + Mix_Chunk * loadSound(const char * name) + { + Mix_Chunk * temp; ++ char * newname; + int len1 = strlen(sg_data_path), len2 = strlen(name); + + if(disabled) + return NULL; + +- char * newname = (char*)malloc(len1 + len2 + 1); ++ newname = (char*)malloc(len1 + len2 + 1); + if(newname == NULL) { + fprintf(stderr, "Out of memory!\n"); + exit(1); diff --git a/games/scramble/pkg-descr b/games/scramble/pkg-descr new file mode 100644 index 000000000000..338aebcf1cf6 --- /dev/null +++ b/games/scramble/pkg-descr @@ -0,0 +1,5 @@ +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 diff --git a/games/scramble/pkg-plist b/games/scramble/pkg-plist new file mode 100644 index 000000000000..8e938b1bfbd9 --- /dev/null +++ b/games/scramble/pkg-plist @@ -0,0 +1,23 @@ +bin/scramble +%%DATADIR%%/fonts/arial.ttf +%%DATADIR%%/fonts/keiserso.ttf +%%DATADIR%%/pics/background.png +%%DATADIR%%/pics/little_box.png +%%DATADIR%%/pics/sg_icon.png +%%DATADIR%%/pics/shiftygames.png +%%DATADIR%%/pics/sound_high.png +%%DATADIR%%/pics/sound_low.png +%%DATADIR%%/pics/sound_medium.png +%%DATADIR%%/sounds/click.ogg +%%DATADIR%%/sounds/countdown.ogg +%%DATADIR%%/sounds/hit.ogg +%%DATADIR%%/sounds/miss.ogg +%%DATADIR%%/sounds/move.ogg +%%DATADIR%%/sounds/over.ogg +%%DATADIR%%/sounds/shuffle.ogg +%%DATADIR%%/sounds/tick.ogg +%%DATADIR%%/sounds/warning.ogg +@dirrm %%DATADIR%%/fonts +@dirrm %%DATADIR%%/pics +@dirrm %%DATADIR%%/sounds +@dirrm %%DATADIR%% |