diff options
6 files changed, 77 insertions, 66 deletions
diff --git a/games-arcade/trailblazer/files/trailblazer-0.9-gentoo-fhs.patch b/games-arcade/trailblazer/files/trailblazer-0.9-gentoo-fhs.patch new file mode 100644 index 000000000000..d8f6650b61cc --- /dev/null +++ b/games-arcade/trailblazer/files/trailblazer-0.9-gentoo-fhs.patch @@ -0,0 +1,20 @@ +--- a/map.c ++++ b/map.c +@@ -63,7 +63,7 @@ + } + } + fclose(f); // Close the file +- f = fopen("/usr/share/trailblazer/trail.time","r"); ++ f = fopen("/var/trailblazer/trail.time","r"); + if (f != NULL) + { + for (i = 0;i < MAPMAX;i++) +@@ -87,7 +87,7 @@ + if (Map[i].Data != NULL) free(Map[i].Data); + Map[i].Data = NULL; + } +- f = fopen("/usr/share/trailblazer/trail.time","w"); ++ f = fopen("/var/trailblazer/trail.time","w"); + if (f != NULL) + { + for (i = 0;i < MAPMAX;i++) diff --git a/games-arcade/trailblazer/files/trailblazer-0.9-ldflags.patch b/games-arcade/trailblazer/files/trailblazer-0.9-ldflags.patch deleted file mode 100644 index 034a74e75f9e..000000000000 --- a/games-arcade/trailblazer/files/trailblazer-0.9-ldflags.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.old 2010-09-30 23:56:21.000000000 +0200 -+++ Makefile 2010-09-30 23:56:35.000000000 +0200 -@@ -9,7 +9,7 @@ - bdir = /tmp/trailblazer-$(version) - - all: -- $(CC) $(sources) -o trailblazer $(cflags) $(libs) -+ $(CC) $(LDFLAGS) $(sources) -o trailblazer $(cflags) $(libs) - - install: - cp trailblazer /usr/bin diff --git a/games-arcade/trailblazer/files/trailblazer-0.9-makefile.patch b/games-arcade/trailblazer/files/trailblazer-0.9-makefile.patch new file mode 100644 index 000000000000..70c7cdd90f26 --- /dev/null +++ b/games-arcade/trailblazer/files/trailblazer-0.9-makefile.patch @@ -0,0 +1,19 @@ +--- a/Makefile ++++ b/Makefile +@@ -3,13 +3,13 @@ + # + + sources = game.c main.c road.c map.c gfx.c +-libs = `sdl-config --libs` +-cflags = -O2 -Wall `sdl-config --cflags` ++libs = `sdl-config --libs` -lm ++cflags = $(CFLAGS) $(CPPFLAGS) -Wall `sdl-config --cflags` + version = 0.9 + bdir = /tmp/trailblazer-$(version) + + all: +- $(CC) $(sources) -o trailblazer $(cflags) $(libs) ++ $(CC) $(LDFLAGS) $(sources) -o trailblazer $(cflags) $(libs) + + install: + cp trailblazer /usr/bin diff --git a/games-arcade/trailblazer/files/trailblazer-0.9-underlink.patch b/games-arcade/trailblazer/files/trailblazer-0.9-underlink.patch deleted file mode 100644 index 31e9a1000324..000000000000 --- a/games-arcade/trailblazer/files/trailblazer-0.9-underlink.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.old 2011-06-20 20:49:09.928013768 +0200 -+++ Makefile 2011-06-20 20:49:18.725566328 +0200 -@@ -3,7 +3,7 @@ - # - - sources = game.c main.c road.c map.c gfx.c --libs = `sdl-config --libs` -+libs = `sdl-config --libs` -lm - cflags = -O2 -Wall `sdl-config --cflags` - version = 0.9 - bdir = /tmp/trailblazer-$(version) diff --git a/games-arcade/trailblazer/trailblazer-0.9-r1.ebuild b/games-arcade/trailblazer/trailblazer-0.9-r1.ebuild new file mode 100644 index 000000000000..fac38295d73f --- /dev/null +++ b/games-arcade/trailblazer/trailblazer-0.9-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="Guide a ball through a succession of levels while avoiding holes" +HOMEPAGE="http://www.autismuk.freeserve.co.uk/" +SRC_URI="http://www.autismuk.freeserve.co.uk/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="media-libs/libsdl[video]" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-gentoo-fhs.patch + "${FILESDIR}"/${P}-makefile.patch +) + +src_configure() { + tc-export CC +} + +src_install() { + dobin trailblazer + dodoc README + + insinto /usr/share/${PN} + doins trail.dat + + dodir /var/trailblazer + touch "${ED}"/var/trailblazer/trail.time + fperms 660 /var/trailblazer/trail.time +} diff --git a/games-arcade/trailblazer/trailblazer-0.9.ebuild b/games-arcade/trailblazer/trailblazer-0.9.ebuild deleted file mode 100644 index 6e3182719373..000000000000 --- a/games-arcade/trailblazer/trailblazer-0.9.ebuild +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -inherit eutils games - -DESCRIPTION="Guide a ball through a succession of levels while avoiding holes" -HOMEPAGE="http://www.autismuk.freeserve.co.uk/" -SRC_URI="http://www.autismuk.freeserve.co.uk/${P}.tgz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -DEPEND=">=media-libs/libsdl-1.2.7[video]" -RDEPEND="${DEPEND}" - -src_prepare() { - epatch "${FILESDIR}"/${P}-ldflags.patch \ - "${FILESDIR}"/${P}-underlink.patch - - sed -i \ - -e "s:-O2:${CFLAGS}:" \ - Makefile || die "sed Makefile failed" - - sed -i \ - -e "s:/usr/share/trailblazer/trail\.dat:${GAMES_DATADIR}/${PN}/trail.dat:" \ - -e "s:/usr/share/trailblazer/trail\.time:${GAMES_STATEDIR}/trail.time:" \ - map.c || die "sed map.c failed" -} - -src_install() { - dogamesbin trailblazer - insinto "${GAMES_DATADIR}/${PN}" - doins trail.dat - dodoc README - - dodir "${GAMES_STATEDIR}" \ - && touch "${D}${GAMES_STATEDIR}/trail.time" - - prepgamesdirs - fperms 660 "${GAMES_STATEDIR}/trail.time" -} |