diff options
author | David Seifert <soap@gentoo.org> | 2020-06-21 21:59:10 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2020-06-21 21:59:10 +0200 |
commit | 6e9895992e492799647d700ba967ff6ff810c612 (patch) | |
tree | 783879aed13e39cd804ee45966552f6a78f73a73 /games-puzzle | |
parent | games-roguelike/wrogue: [QA] Pass CC to build system (diff) | |
download | gentoo-6e9895992e492799647d700ba967ff6ff810c612.tar.gz gentoo-6e9895992e492799647d700ba967ff6ff810c612.tar.bz2 gentoo-6e9895992e492799647d700ba967ff6ff810c612.zip |
games-puzzle/anagramarama: [QA] Pass CC to build system
Closes: https://bugs.gentoo.org/724718
Package-Manager: Portage-2.3.101, Repoman-2.3.22
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'games-puzzle')
3 files changed, 132 insertions, 33 deletions
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 |