diff options
author | David Seifert <soap@gentoo.org> | 2020-07-05 02:23:17 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2020-07-05 02:23:17 +0200 |
commit | efd1894c63543eaacbcfd078113111399ee03583 (patch) | |
tree | 3575c84412b8a8a01c2a076586fd384c8f3a3257 /games-arcade | |
parent | dev-libs/libbulletml: Pass AR/CXX to build system (diff) | |
download | gentoo-efd1894c63543eaacbcfd078113111399ee03583.tar.gz gentoo-efd1894c63543eaacbcfd078113111399ee03583.tar.bz2 gentoo-efd1894c63543eaacbcfd078113111399ee03583.zip |
games-arcade/tuxpuck: Fix build system
Closes: https://bugs.gentoo.org/724420
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'games-arcade')
5 files changed, 161 insertions, 104 deletions
diff --git a/games-arcade/tuxpuck/files/tuxpuck-0.8.2-Makefile.patch b/games-arcade/tuxpuck/files/tuxpuck-0.8.2-Makefile.patch new file mode 100644 index 000000000000..30b97283a2e2 --- /dev/null +++ b/games-arcade/tuxpuck/files/tuxpuck-0.8.2-Makefile.patch @@ -0,0 +1,139 @@ +--- a/data/Makefile ++++ b/data/Makefile +@@ -1,5 +1,4 @@ + # Makefile for TuxPuck , Copyright Jacob Kroon 2001-2002 +-CC = gcc + SOURCES = pad_png.c puck_png.c tux_png.c glass_png.c scoreboard_png.c \ + arcana_png.c mousebar_png.c title_jpg.c board_jpg.c \ + logo_jpg.c crash_ogg.c nock_ogg.c tux_apps_ogg.c \ +@@ -9,27 +8,33 @@ + + OBJS=$(SOURCES:.c=.o) + +-%.o : %.c +- $(CC) $(CFLAGS) -c -o $@ $< +- + libdata.a : $(OBJS) +- ar r libdata.a $(OBJS) +- ranlib libdata.a ++ $(AR) r libdata.a $(OBJS) ++ $(RANLIB) libdata.a + +-$(SOURCES): +- cd ../utils/; $(MAKE) ++monos_fnt.c: + ../utils/ttf2font ttfs/mono.ttf monos.fnt 30 30 + ../utils/data2c monos.fnt monos_fnt ++ rm monos.fnt ++monob_fnt.c: + ../utils/ttf2font ttfs/mono.ttf monob.fnt 45 45 + ../utils/data2c monob.fnt monob_fnt +- rm *.fnt ++ rm monob.fnt ++title_jpg.c: + ../utils/data2c jpgs/title.jpg title_jpg ++board_jpg.c: + ../utils/data2c jpgs/board.jpg board_jpg ++logo_jpg.c: + ../utils/data2c jpgs/logo.jpg logo_jpg ++pad_png.c: pngs/pad.png + ../utils/data2c pngs/pad.png pad_png ++puck_png.c: pngs/puck.png + ../utils/data2c pngs/puck.png puck_png ++scoreboard_png.c: + ../utils/data2c pngs/scoreboard.png scoreboard_png ++mousebar_png.c: + ../utils/data2c pngs/mousebar.png mousebar_png ++glass_png.c: + ../utils/data2c pngs/glass.png glass_png + ../utils/data2c pngs/piece1.png piece1_png + ../utils/data2c pngs/piece2.png piece2_png +@@ -38,15 +43,22 @@ + ../utils/data2c pngs/piece5.png piece5_png + mv glass_png.c temp; cat temp piece?_png.c > glass_png.c + rm piece?_png.c temp ++crash_ogg.c: + ../utils/data2c sounds/crash.ogg crash_ogg ++nock_ogg.c: + ../utils/data2c sounds/nock.ogg nock_ogg ++tux_eyes_spr.c: + # Tux + ../utils/anim tux/eyes.ac tux_eyes.spr + ../utils/data2c tux_eyes.spr tux_eyes_spr + rm tux_eyes.spr ++tux_png.c: tux/tux.png + ../utils/data2c tux/tux.png tux_png ++tux_apps_ogg.c: + ../utils/data2c tux/apps.ogg tux_apps_ogg ++tux_boos_ogg.c: + ../utils/data2c tux/boos.ogg tux_boos_ogg ++arcana_png.c: + # Arcana + ../utils/data2c arcana/arcana.png arcana_png + clean : +--- a/Makefile ++++ b/Makefile +@@ -1,13 +1,14 @@ + # Makefile for TuxPuck , Copyright Jacob Kroon 2001-2002 + NAME = tuxpuck + VERSION = 0.8.2 +-CC = gcc +-CFLAGS += -D_VERSION=\"$(VERSION)\" -g -Wall ++CPPFLAGS += -D_VERSION=\"$(VERSION)\" ++CFLAGS += -Wall + CSOURCES = tuxpuck.c video.c audio.c menu.c sprite.c font.c timer.c \ + board.c entity.c glass.c scoreboard.c player.c zoom.c png.c \ + jpg.c intro.c tux.c arcana.c + INCLUDES = tuxpuck.h video.h audio.h font.h +- ++SDL_CFLAGS = $(shell $$PKG_CONFIG --cflags sdl) ++SDL_LIBS = $(shell $$PKG_CONFIG --libs sdl) + + ############################################################# + +@@ -17,11 +18,11 @@ + endif + + %.o : %.c +- $(CC) $(CFLAGS) `sdl-config --cflags` -c -o $@ $< ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(SDL_CFLAGS) -c -o $@ $< + + $(NAME) : $(OBJS) +- cd data; $(MAKE) +- $(CC) $(CFLAGS) $(OBJS) data/libdata.a `sdl-config --libs` -lm -lpng \ ++ cd data && $(MAKE) ++ $(CC) $(LDFLAGS) $(CFLAGS) $(OBJS) data/libdata.a $(SDL_LIBS) -lm -lpng \ + -ljpeg -lz -lvorbisfile -lvorbis -logg -o $(NAME) + + w32icon.o : data/icons/tuxpuck.ico +--- a/utils/Makefile ++++ b/utils/Makefile +@@ -1,18 +1,23 @@ + # Makefile for TuxPuck Utils , Copyright Jacob Kroon 2001-2002 +-CC = gcc +-CFLAGS += -g -Wall -Werror ++CFLAGS += -Wall ++ ++FREETYPE_CFLAGS = $(shell $$PKG_CONFIG --cflags freetype2) ++FREETYPE_LIBS = $(shell $$PKG_CONFIG --libs freetype2) ++ ++SDL_CFLAGS = $(shell $$PKG_CONFIG --cflags sdl) ++SDL_LIBS = $(shell $$PKG_CONFIG --libs sdl) + ############################################################# + + all : ttf2font data2c anim + + ttf2font : ttf2font.c +- $(CC) $(CFLAGS) ttf2font.c `freetype-config --cflags --libs` -o ttf2font ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) ttf2font.c -o ttf2font $(FREETYPE_CFLAGS) $(FREETYPE_LIBS) + + data2c : data2c.c +- $(CC) $(CFLAGS) data2c.c `sdl-config --cflags --libs` -o data2c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) data2c.c -o data2c $(SDL_CFLAGS) $(SDL_LIBS) + + anim : anim.c +- $(CC) $(CFLAGS) anim.c `sdl-config --cflags --libs` -o anim ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) anim.c -o anim $(SDL_CFLAGS) $(SDL_LIBS) + + clean : + rm -f *~ data2c ttf2font anim diff --git a/games-arcade/tuxpuck/files/tuxpuck-0.8.2-freetype_pkgconfig.patch b/games-arcade/tuxpuck/files/tuxpuck-0.8.2-freetype_pkgconfig.patch deleted file mode 100644 index 410024e48dcd..000000000000 --- a/games-arcade/tuxpuck/files/tuxpuck-0.8.2-freetype_pkgconfig.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- tuxpuck-0.8.2/utils/Makefile -+++ tuxpuck-0.8.2/utils/Makefile -@@ -6,7 +6,7 @@ - all : ttf2font data2c anim - - ttf2font : ttf2font.c -- $(CC) $(CFLAGS) ttf2font.c `freetype-config --cflags --libs` -o ttf2font -+ $(CC) $(CFLAGS) ttf2font.c `pkg-config --cflags --libs freetype2` -o ttf2font - - data2c : data2c.c - $(CC) $(CFLAGS) data2c.c `sdl-config --cflags --libs` -o data2c diff --git a/games-arcade/tuxpuck/files/tuxpuck-0.8.2-ldflags.patch b/games-arcade/tuxpuck/files/tuxpuck-0.8.2-ldflags.patch deleted file mode 100644 index b4abb60f0fd4..000000000000 --- a/games-arcade/tuxpuck/files/tuxpuck-0.8.2-ldflags.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.old 2010-10-05 10:34:57.000000000 +0200 -+++ b/Makefile 2010-10-05 10:35:28.000000000 +0200 -@@ -20,7 +20,7 @@ - - $(NAME) : $(OBJS) - cd data; $(MAKE) -- $(CC) $(CFLAGS) $(OBJS) data/libdata.a `sdl-config --libs` -lm -lpng \ -+ $(CC) $(LDFLAGS) $(CFLAGS) $(OBJS) data/libdata.a `sdl-config --libs` -lm -lpng \ - -ljpeg -lz -lvorbisfile -lvorbis -logg -o $(NAME) - - w32icon.o : data/icons/tuxpuck.ico diff --git a/games-arcade/tuxpuck/files/tuxpuck-0.8.2-parallel.patch b/games-arcade/tuxpuck/files/tuxpuck-0.8.2-parallel.patch deleted file mode 100644 index 7d9b199f55cf..000000000000 --- a/games-arcade/tuxpuck/files/tuxpuck-0.8.2-parallel.patch +++ /dev/null @@ -1,58 +0,0 @@ ---- a/data/Makefile.old 2015-01-07 14:22:34.852150894 +0100 -+++ b/data/Makefile 2015-01-07 14:57:44.079822614 +0100 -@@ -15,20 +15,29 @@ - ar r libdata.a $(OBJS) - ranlib libdata.a - --$(SOURCES): -- cd ../utils/; $(MAKE) -+monos_fnt.c: - ../utils/ttf2font ttfs/mono.ttf monos.fnt 30 30 - ../utils/data2c monos.fnt monos_fnt -+ rm monos.fnt -+monob_fnt.c: - ../utils/ttf2font ttfs/mono.ttf monob.fnt 45 45 - ../utils/data2c monob.fnt monob_fnt -- rm *.fnt -+ rm monob.fnt -+title_jpg.c: - ../utils/data2c jpgs/title.jpg title_jpg -+board_jpg.c: - ../utils/data2c jpgs/board.jpg board_jpg -+logo_jpg.c: - ../utils/data2c jpgs/logo.jpg logo_jpg -+pad_png.c: pngs/pad.png - ../utils/data2c pngs/pad.png pad_png -+puck_png.c: pngs/puck.png - ../utils/data2c pngs/puck.png puck_png -+scoreboard_png.c: - ../utils/data2c pngs/scoreboard.png scoreboard_png -+mousebar_png.c: - ../utils/data2c pngs/mousebar.png mousebar_png -+glass_png.c: - ../utils/data2c pngs/glass.png glass_png - ../utils/data2c pngs/piece1.png piece1_png - ../utils/data2c pngs/piece2.png piece2_png -@@ -37,15 +46,22 @@ - ../utils/data2c pngs/piece5.png piece5_png - mv glass_png.c temp; cat temp piece?_png.c > glass_png.c - rm piece?_png.c temp -+crash_ogg.c: - ../utils/data2c sounds/crash.ogg crash_ogg -+nock_ogg.c: - ../utils/data2c sounds/nock.ogg nock_ogg -+tux_eyes_spr.c: - # Tux - ../utils/anim tux/eyes.ac tux_eyes.spr - ../utils/data2c tux_eyes.spr tux_eyes_spr - rm tux_eyes.spr -+tux_png.c: tux/tux.png - ../utils/data2c tux/tux.png tux_png -+tux_apps_ogg.c: - ../utils/data2c tux/apps.ogg tux_apps_ogg -+tux_boos_ogg.c: - ../utils/data2c tux/boos.ogg tux_boos_ogg -+arcana_png.c: - # Arcana - ../utils/data2c arcana/arcana.png arcana_png - clean : diff --git a/games-arcade/tuxpuck/tuxpuck-0.8.2-r2.ebuild b/games-arcade/tuxpuck/tuxpuck-0.8.2-r2.ebuild index d853da6c5d16..d2fdb0c45bcc 100644 --- a/games-arcade/tuxpuck/tuxpuck-0.8.2-r2.ebuild +++ b/games-arcade/tuxpuck/tuxpuck-0.8.2-r2.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 +EAPI=7 + +inherit desktop toolchain-funcs DESCRIPTION="Hover hockey" HOMEPAGE="http://home.no.net/munsuun/tuxpuck/" @@ -11,38 +12,32 @@ SRC_URI="http://home.no.net/munsuun/tuxpuck/files/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~x86" -IUSE="" RDEPEND=" media-libs/libsdl media-libs/libpng:0= - virtual/jpeg:0 media-libs/libvorbis -" + virtual/jpeg:0" DEPEND="${RDEPEND} - media-libs/freetype:2 - virtual/pkgconfig -" + media-libs/freetype:2" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${P}-Makefile.patch + "${FILESDIR}"/${P}-png15.patch +) src_prepare() { default + # Bug #376741 - Make unpack call compatible with both # PMS and <sys-apps/portage-2.1.10.10. cd man || die unpack ./${PN}.6.gz - cd .. || die - sed -i \ - -e 's/-Werror//' \ - -e '/^CC/d' \ - Makefile \ - utils/Makefile \ - data/Makefile \ - || die "sed failed" - - eapply "${FILESDIR}"/${P}-ldflags.patch \ - "${FILESDIR}"/${P}-png15.patch \ - "${FILESDIR}"/${P}-parallel.patch \ - "${FILESDIR}"/${P}-freetype_pkgconfig.patch +} + +src_configure() { + tc-export AR CC PKG_CONFIG RANLIB } src_compile() { @@ -53,9 +48,12 @@ src_compile() { src_install() { dobin tuxpuck - doman man/tuxpuck.6 + dodoc *.txt + einstalldocs + + doman man/tuxpuck.6 + doicon data/icons/${PN}.ico make_desktop_entry ${PN} "TuxPuck" /usr/share/pixmaps/${PN}.ico - einstalldocs } |