summaryrefslogtreecommitdiff
path: root/games-puzzle/anagramarama
diff options
context:
space:
mode:
Diffstat (limited to 'games-puzzle/anagramarama')
-rw-r--r--games-puzzle/anagramarama/Manifest5
-rw-r--r--games-puzzle/anagramarama/anagramarama-0.2-r1.ebuild34
-rw-r--r--games-puzzle/anagramarama/files/anagramarama-0.2-fhs.patch87
-rw-r--r--games-puzzle/anagramarama/files/anagramarama-0.2-gentoo.patch44
4 files changed, 135 insertions, 35 deletions
diff --git a/games-puzzle/anagramarama/Manifest b/games-puzzle/anagramarama/Manifest
index 251355711db0..4eda88461f6b 100644
--- a/games-puzzle/anagramarama/Manifest
+++ b/games-puzzle/anagramarama/Manifest
@@ -1,4 +1,5 @@
-AUX anagramarama-0.2-gentoo.patch 918 BLAKE2B da8f286fd932f9bf8f8b00541565ea11f60e3d13581a46b86c4b9cb0572fbaa821b672554b3448da026ad15e97c87e39766fcba8ab4ece464cf605cbbb582712 SHA512 d87759b401efc4bb51dcf7f121548038b736d89b026cfc9fb82e467c131dae10cc933dd0aa2ec668c3636d93cb37bb8b6325691ed46366b7668605d8921308ab
+AUX anagramarama-0.2-fhs.patch 3247 BLAKE2B 0d80f5bb60ad7a92c229a2446ecdefe386afea162b09495f777a61c81acc852f07341115ac24e1fbb73919baed3ca0ed5192e38e5df47e6f1e675e1ed34091a9 SHA512 bda05fbdc7bc4449c98cad198f04595613ecb9d462015b58ba358548e0b1a7c1b80b9632252fa4d2f977c4ed4e37d88bfebc45b6c0d83b50a30e2eef34963172
+AUX anagramarama-0.2-gentoo.patch 1043 BLAKE2B a71b7c6fdeaa10146a8b6e924e8bfb5d3f7e87a9c2d71959e49c4c2e10e68d8c8dd6c040debe8581bc44d58f2240ed257cfd727ff19b69c769849fce868a0759 SHA512 2c679972b82fe054118e938392069284738f5a71e11a4dc0e4cf33f06beba0c39b503563ca346d1084155b18d28e85689193c085522194d2e6e4b47508cbb844
DIST anagramarama-0.2.tar.gz 861484 BLAKE2B 9fb6b759b9d2f7a797e8ecf214c8723676577b8a7a88049da7b59a1e4287363c3ac58ee203033e7d7cad777d175599433fffc37fe824da4ca5511e85918b6ae8 SHA512 7cdafaf489100c184a71859f50b64fe8534210d953c4144d822727815ae2f7dd12302447b159039d95c9b3097711ab14931538789ac81c01233cc2c767291603
-EBUILD anagramarama-0.2-r1.ebuild 981 BLAKE2B c9684174378d228f6c147cd4677cb15c680073988797472fbde1f98b3fb624e4b31d0976b068948c8c32c37277ff1a2c46e814c1f8eb5762ca4db63430040398 SHA512 fbe12367b60218d971a180506d29b077aa7d8561874ff067b0b49570a81aea8fce7c0b199d7e684feb83dd7268e7b0603e7e2d70f43bba111ff5155349e4726a
+EBUILD anagramarama-0.2-r1.ebuild 905 BLAKE2B 42753d712ad5a1a44353062c83a8427f3535c2c08deba7248f80b7138e5f9311b30cb77ebe77dd98451e726290b542ae3958b5fcd15e3f8216842851ecd12036 SHA512 4f26ae77bf119530cbe7f09ef192d97da04e29d5a91a8a97c5da01a8618acf5f2e81264a82905787e0de6fc43062653e9eac2d1a334248c486b8418642ed392b
MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-puzzle/anagramarama/anagramarama-0.2-r1.ebuild b/games-puzzle/anagramarama/anagramarama-0.2-r1.ebuild
index 4e1bc1d0b0b2..2fb8281f6204 100644
--- a/games-puzzle/anagramarama/anagramarama-0.2-r1.ebuild
+++ b/games-puzzle/anagramarama/anagramarama-0.2-r1.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-inherit desktop vcs-clean
+EAPI=7
+
+inherit desktop toolchain-funcs vcs-clean
DESCRIPTION="Create as many words as you can before the time runs out"
HOMEPAGE="http://www.coralquest.com/anagramarama/"
@@ -11,34 +12,39 @@ SRC_URI="http://www.omega.clara.net/anagramarama/dist/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
-DEPEND=">=media-libs/libsdl-1.2
+DEPEND="
+ >=media-libs/libsdl-1.2
>=media-libs/sdl-mixer-1.2
>=media-libs/sdl-image-1.2"
RDEPEND="${DEPEND}
- sys-apps/miscfiles
-"
+ sys-apps/miscfiles"
+BDEPEND="virtual/pkgconfig"
S="${WORKDIR}/${PN}"
+PATCHES=(
+ "${FILESDIR}"/${P}-fhs.patch
+ "${FILESDIR}"/${P}-gentoo.patch
+)
+
src_prepare() {
default
ecvs_clean
- sed -i \
- -e "s:wordlist.txt:/usr/share/${PN}/wordlist.txt:" \
- -e "s:audio/:/usr/share/${PN}/audio/:" \
- -e "s:images/:/usr/share/${PN}/images/:" \
- src/{ag.c,dlb.c} \
- || die "sed failed"
- eapply "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_configure() {
+ tc-export CC PKG_CONFIG
}
src_install() {
newbin ag ${PN}
+
insinto "/usr/share/${PN}"
doins wordlist.txt
doins -r images/ audio/
+
dodoc readme
+
make_desktop_entry ${PN} "Anagramarama"
}
diff --git a/games-puzzle/anagramarama/files/anagramarama-0.2-fhs.patch b/games-puzzle/anagramarama/files/anagramarama-0.2-fhs.patch
new file mode 100644
index 000000000000..f30e3450b958
--- /dev/null
+++ b/games-puzzle/anagramarama/files/anagramarama-0.2-fhs.patch
@@ -0,0 +1,87 @@
+--- a/src/ag.c
++++ b/src/ag.c
+@@ -184,15 +184,15 @@
+ ***********************************************************/
+ void bufferSounds(struct sound** soundCache){
+
+- pushSound(&(*soundCache),"click-answer", "audio/click-answer.wav");
+- pushSound(&(*soundCache),"click-shuffle", "audio/click-shuffle.wav");
+- pushSound(&(*soundCache),"foundbig", "audio/foundbig.wav");
+- pushSound(&(*soundCache),"found", "audio/found.wav");
+- pushSound(&(*soundCache),"clear", "audio/clearword.wav");
+- pushSound(&(*soundCache),"duplicate", "audio/duplicate.wav");
+- pushSound(&(*soundCache),"badword", "audio/badword.wav");
+- pushSound(&(*soundCache),"shuffle", "audio/shuffle.wav");
+- pushSound(&(*soundCache),"clock-tick", "audio/clock-tick.wav");
++ pushSound(&(*soundCache),"click-answer", "/usr/share/anagramarama/audio/click-answer.wav");
++ pushSound(&(*soundCache),"click-shuffle", "/usr/share/anagramarama/audio/click-shuffle.wav");
++ pushSound(&(*soundCache),"foundbig", "/usr/share/anagramarama/audio/foundbig.wav");
++ pushSound(&(*soundCache),"found", "/usr/share/anagramarama/audio/found.wav");
++ pushSound(&(*soundCache),"clear", "/usr/share/anagramarama/audio/clearword.wav");
++ pushSound(&(*soundCache),"duplicate", "/usr/share/anagramarama/audio/duplicate.wav");
++ pushSound(&(*soundCache),"badword", "/usr/share/anagramarama/audio/badword.wav");
++ pushSound(&(*soundCache),"shuffle", "/usr/share/anagramarama/audio/shuffle.wav");
++ pushSound(&(*soundCache),"clock-tick", "/usr/share/anagramarama/audio/clock-tick.wav");
+
+ }
+
+@@ -982,7 +982,7 @@
+ int done = 0;
+
+ filelocation = rand()%10000;
+- wordlist=fopen("wordlist.txt","r");
++ wordlist=fopen("/usr/share/anagramarama/wordlist.txt","r");
+
+ for (i=0;i<=filelocation;i++){
+
+@@ -992,7 +992,7 @@
+ else{
+ // go back to the start of the file
+ fclose(wordlist);
+- fopen("wordlist.txt", "r");
++ fopen("/usr/share/anagramarama/wordlist.txt", "r");
+ }
+ }
+
+@@ -1011,7 +1011,7 @@
+ else{
+ // go back to the start of the file
+ fclose(wordlist);
+- fopen("wordlist.txt", "r");
++ fopen("/usr/share/anagramarama/wordlist.txt", "r");
+ fscanf(wordlist, "%s", wordFromList);
+ }
+ }
+@@ -1485,7 +1485,7 @@
+ int i;
+
+ // show background
+- ShowBMP("images/background.bmp",screen, 0,0);
++ ShowBMP("/usr/share/anagramarama/images/background.bmp",screen, 0,0);
+
+ destroyLetters(&(*letters));
+
+@@ -1760,9 +1760,9 @@
+ createDLBTree(&dlbHead);
+
+ // cache in-game graphics
+- letterBank = SDL_LoadBMP("images/letterBank.bmp");
+- smallLetterBank = SDL_LoadBMP("images/smallLetterBank.bmp");
+- numberBank = SDL_LoadBMP("images/numberBank.bmp");
++ letterBank = SDL_LoadBMP("/usr/share/anagramarama/images/letterBank.bmp");
++ smallLetterBank = SDL_LoadBMP("/usr/share/anagramarama/images/smallLetterBank.bmp");
++ numberBank = SDL_LoadBMP("/usr/share/anagramarama/images/numberBank.bmp");
+
+ rootWord = malloc(sizeof(char)*9);
+ newGame(&head, dlbHead, screen, &letters);
+--- a/src/dlb.c
++++ b/src/dlb.c
+@@ -100,7 +100,7 @@
+ //printf("createDLBTree\n");
+
+ // open wordlist file
+- wordlist = fopen("wordlist.txt", "r");
++ wordlist = fopen("/usr/share/anagramarama/wordlist.txt", "r");
+
+ // get each word from the list
+ while (fscanf(wordlist, "%s", wordFromList) != EOF){
diff --git a/games-puzzle/anagramarama/files/anagramarama-0.2-gentoo.patch b/games-puzzle/anagramarama/files/anagramarama-0.2-gentoo.patch
index fb60615055db..77ef37bd4046 100644
--- a/games-puzzle/anagramarama/files/anagramarama-0.2-gentoo.patch
+++ b/games-puzzle/anagramarama/files/anagramarama-0.2-gentoo.patch
@@ -1,34 +1,40 @@
---- a/makefile.old 2009-02-08 18:24:33.000000000 +0100
-+++ b/makefile 2009-02-08 18:29:12.000000000 +0100
-@@ -1,5 +1,4 @@
+--- a/makefile
++++ b/makefile
+@@ -1,6 +1,13 @@
-LFLAGS=-Wall -funroll-loops -fomit-frame-pointer -pipe -O9
-CFLAGS=-Wall `sdl-config --cflags --libs` -funroll-loops -fomit-frame-pointer -pipe -O9 -lSDL_mixer
-+LDLIBS=`sdl-config --cflags --libs` -lSDL_mixer
- CC=gcc
+-CC=gcc
++PKG_CONFIG ?= pkg-config
++
++SDL_CFLAGS = `$(PKG_CONFIG) --cflags sdl`
++SDL_LIBS = `$(PKG_CONFIG) --libs sdl`
++
++SDL_MIXER_CFLAGS = `$(PKG_CONFIG) --cflags SDL_mixer`
++SDL_MIXER_LIBS = `$(PKG_CONFIG) --libs SDL_mixer`
++
++LDLIBS=$(SDL_LIBS) $(SDL_MIXER_LIBS)
++CPPFLAGS+=$(SDL_CFLAGS) $(SDL_MIXER_CFLAGS)
C_FILES=src/dlb.c src/linked.c src/sprite.c src/ag.c
-@@ -9,19 +8,19 @@
+ OBJ_FILES=src/dlb.o src/linked.o src/sprite.o src/ag.o
+@@ -9,19 +16,7 @@
all:ag
ag: $(OBJ_FILES)
- $(CC) $(CFLAGS) -o $(OUT_FILE) $(OBJ_FILES)
-+ $(CC) $(LDFLAGS) -o $(OUT_FILE) $(OBJ_FILES) $(LDLIBS)
-
- src/dlb.o: src/dlb.c
+-
+-src/dlb.o: src/dlb.c
- $(CC) $(LFLAGS) -c -o $@ $^
-+ $(CC) $(CFLAGS) -c -o $@ $^
-
- src/linked.o: src/linked.c
+-
+-src/linked.o: src/linked.c
- $(CC) $(LFLAGS) -c -o $@ $^
-+ $(CC) $(CFLAGS) -c -o $@ $^
-
- src/sprite.o: src/sprite.c
+-
+-src/sprite.o: src/sprite.c
- $(CC) $(LFLAGS) -c -o $@ $^
-+ $(CC) $(CFLAGS) -c -o $@ $^
-
- src/ag.o: src/ag.c
+-
+-src/ag.o: src/ag.c
- $(CC) $(LFLAGS) -c -o $@ $^
-+ $(CC) $(CFLAGS) -c -o $@ $^
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(OUT_FILE) $(OBJ_FILES) $(LDLIBS)
clean:
rm -f src/*.o