aboutsummaryrefslogtreecommitdiff
path: root/games/anagramarama
diff options
context:
space:
mode:
Diffstat (limited to 'games/anagramarama')
-rw-r--r--games/anagramarama/Makefile70
-rw-r--r--games/anagramarama/distinfo2
-rw-r--r--games/anagramarama/files/patch-makefile37
-rw-r--r--games/anagramarama/files/patch-src-ag.c28
-rw-r--r--games/anagramarama/pkg-descr13
-rw-r--r--games/anagramarama/pkg-plist18
6 files changed, 168 insertions, 0 deletions
diff --git a/games/anagramarama/Makefile b/games/anagramarama/Makefile
new file mode 100644
index 000000000000..bf5ee412055e
--- /dev/null
+++ b/games/anagramarama/Makefile
@@ -0,0 +1,70 @@
+# New ports collection makefile for: games/anagramarama
+# Date created: 10 Aug 2005
+# Whom: Alejandro Pulver <alejandro@varnet.biz>
+#
+# $FreeBSD$
+#
+
+PORTNAME= anagramarama
+PORTVERSION= 0.2
+CATEGORIES= games
+MASTER_SITES= http://www.omega.clara.net/anagramarama/dist/
+
+MAINTAINER= alejandro@varnet.biz
+COMMENT= Anagramarama - a word game for Linux, Windows and BeOS
+
+USE_GMAKE= yes
+USE_SDL= mixer sdl
+USE_REINPLACE= yes
+
+MAKEFILE= makefile
+
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
+OPTIONS= OPTIMIZED_CFLAGS "Enable compilation optimizations" on
+
+.include <bsd.port.pre.mk>
+
+post-patch:
+# Fix Makefile
+ @${REINPLACE_CMD} -e 's|sdl-config|${SDL_CONFIG}| ; \
+ s|\(-Wall\)|${CFLAGS} \1|' \
+ ${WRKSRC}/${MAKEFILE}
+
+# Fix SDL include statement and path to ${DATADIR}
+ @${REINPLACE_CMD} -e 's|\(#include.*\)SDL/\(SDL.*\)|\1\2| ; \
+ s|\(audio/\)|${DATADIR}/\1| ; \
+ s|\(images/\)|${DATADIR}/\1| ; \
+ s|\(wordlist.txt\)|${DATADIR}/\1|' \
+ ${WRKSRC}/src/*.c ${WRKSRC}/src/*.h
+
+# Enable/disable optimized CFLAGS
+.if !defined(WITH_OPTIMIZED_CFLAGS)
+ @${REINPLACE_CMD} -e 's|$$(OPT)||' \
+ ${WRKSRC}/${MAKEFILE}
+.endif
+
+do-install:
+# Program
+ ${INSTALL_PROGRAM} ${WRKSRC}/ag ${PREFIX}/bin
+
+# Data
+ ${MKDIR} ${DATADIR}
+
+# Data: audio
+ ${MKDIR} ${DATADIR}/audio
+.for f in badword.wav clearword.wav click-answer.wav click-shuffle.wav \
+ clock-tick.wav duplicate.wav found.wav foundbig.wav shuffle.wav
+ ${INSTALL_DATA} ${WRKSRC}/audio/${f} ${DATADIR}/audio
+ ${MKDIR} ${DATADIR}/images
+.endfor
+
+# Data: images
+.for f in background.bmp letterBank.bmp numberBank.bmp smallLetterBank.bmp
+ ${INSTALL_DATA} ${WRKSRC}/images/${f} ${DATADIR}/images
+.endfor
+
+# Data: wordlist.txt
+ ${INSTALL_DATA} ${WRKSRC}/wordlist.txt ${DATADIR}
+
+.include <bsd.port.post.mk>
diff --git a/games/anagramarama/distinfo b/games/anagramarama/distinfo
new file mode 100644
index 000000000000..4ff1ab1dde85
--- /dev/null
+++ b/games/anagramarama/distinfo
@@ -0,0 +1,2 @@
+MD5 (anagramarama-0.2.tar.gz) = 6dcd8dc515f9c69df8a19119c04d9517
+SIZE (anagramarama-0.2.tar.gz) = 861484
diff --git a/games/anagramarama/files/patch-makefile b/games/anagramarama/files/patch-makefile
new file mode 100644
index 000000000000..9be11c68e4d6
--- /dev/null
+++ b/games/anagramarama/files/patch-makefile
@@ -0,0 +1,37 @@
+--- makefile.orig Mon Jan 27 15:17:54 2003
++++ makefile Mon Jul 11 13:37:04 2005
+@@ -1,6 +1,6 @@
+-LFLAGS=-Wall -funroll-loops -fomit-frame-pointer -pipe -O9
+-CFLAGS=-Wall `sdl-config --cflags --libs` -funroll-loops -fomit-frame-pointer -pipe -O9 -lSDL_mixer
+-CC=gcc
++CFLAGS=-Wall $(OPT) `sdl-config --cflags`
++LFLAGS=`sdl-config --libs` -lSDL_mixer
++OPT=-funroll-loops -fomit-frame-pointer -O3
+
+ C_FILES=src/dlb.c src/linked.c src/sprite.c src/ag.c
+ OBJ_FILES=src/dlb.o src/linked.o src/sprite.o src/ag.o
+@@ -9,19 +9,19 @@
+ all:ag
+
+ ag: $(OBJ_FILES)
+- $(CC) $(CFLAGS) -o $(OUT_FILE) $(OBJ_FILES)
++ $(CC) $(LFLAGS) -o $(OUT_FILE) $(OBJ_FILES)
+
+ src/dlb.o: src/dlb.c
+- $(CC) $(LFLAGS) -c -o $@ $^
++ $(CC) $(CFLAGS) -c -o $@ $^
+
+ src/linked.o: src/linked.c
+- $(CC) $(LFLAGS) -c -o $@ $^
++ $(CC) $(CFLAGS) -c -o $@ $^
+
+ src/sprite.o: src/sprite.c
+- $(CC) $(LFLAGS) -c -o $@ $^
++ $(CC) $(CFLAGS) -c -o $@ $^
+
+ src/ag.o: src/ag.c
+- $(CC) $(LFLAGS) -c -o $@ $^
++ $(CC) $(CFLAGS) -c -o $@ $^
+
+ clean:
+ rm -f src/*.o
diff --git a/games/anagramarama/files/patch-src-ag.c b/games/anagramarama/files/patch-src-ag.c
new file mode 100644
index 000000000000..842f724c6274
--- /dev/null
+++ b/games/anagramarama/files/patch-src-ag.c
@@ -0,0 +1,28 @@
+--- src/ag.c.orig Wed Jul 13 15:52:56 2005
++++ src/ag.c Wed Jul 13 15:54:22 2005
+@@ -1723,6 +1723,12 @@
+ SDL_Surface *screen;
+ struct sprite* letters = NULL;
+ //pthread_t audio;
++ // buffer sounds
++ int audio_rate = MIX_DEFAULT_FREQUENCY;
++ Uint16 audio_format = AUDIO_S16;
++ int audio_channels = 1;
++ int audio_buffers = 256;
++
+
+ // seed the random generator
+ srand(time(NULL));
+@@ -1742,12 +1748,6 @@
+ }
+
+ SDL_WM_SetCaption("Anagramarama", "ANAGRAMARAMA");
+-
+- // buffer sounds
+- int audio_rate = MIX_DEFAULT_FREQUENCY;
+- Uint16 audio_format = AUDIO_S16;
+- int audio_channels = 1;
+- int audio_buffers = 256;
+
+ if(Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers)){
+ printf("unable to open audio!\n");
diff --git a/games/anagramarama/pkg-descr b/games/anagramarama/pkg-descr
new file mode 100644
index 000000000000..6364fb18992d
--- /dev/null
+++ b/games/anagramarama/pkg-descr
@@ -0,0 +1,13 @@
+Anagramarama - a FREE word game for Linux, Windows and BeOS.
+
+The aim is to find as many words as possible in the time available. Get the
+longest word and you'll advance to the next level.
+
+Three words describe it...
+
+Simple Addictive Fun
+
+WWW: http://www.coralquest.com/anagramarama/
+
+- Alejandro Pulver
+alejandro@varnet.biz
diff --git a/games/anagramarama/pkg-plist b/games/anagramarama/pkg-plist
new file mode 100644
index 000000000000..b3d3128b6eca
--- /dev/null
+++ b/games/anagramarama/pkg-plist
@@ -0,0 +1,18 @@
+bin/ag
+%%DATADIR%%/audio/badword.wav
+%%DATADIR%%/audio/clearword.wav
+%%DATADIR%%/audio/click-answer.wav
+%%DATADIR%%/audio/click-shuffle.wav
+%%DATADIR%%/audio/clock-tick.wav
+%%DATADIR%%/audio/duplicate.wav
+%%DATADIR%%/audio/found.wav
+%%DATADIR%%/audio/foundbig.wav
+%%DATADIR%%/audio/shuffle.wav
+%%DATADIR%%/images/background.bmp
+%%DATADIR%%/images/letterBank.bmp
+%%DATADIR%%/images/numberBank.bmp
+%%DATADIR%%/images/smallLetterBank.bmp
+%%DATADIR%%/wordlist.txt
+@dirrm %%DATADIR%%/images
+@dirrm %%DATADIR%%/audio
+@dirrm %%DATADIR%%