Skip to content

Commit

Permalink
games-arcade/trailblazer: Port to EAPI 7
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/710446
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
SoapGentoo committed Feb 23, 2020
1 parent 2b223ef commit 82d2927
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 66 deletions.
20 changes: 20 additions & 0 deletions games-arcade/trailblazer/files/trailblazer-0.9-gentoo-fhs.patch
Original file line number Diff line number Diff line change
@@ -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++)
11 changes: 0 additions & 11 deletions games-arcade/trailblazer/files/trailblazer-0.9-ldflags.patch

This file was deleted.

19 changes: 19 additions & 0 deletions games-arcade/trailblazer/files/trailblazer-0.9-makefile.patch
Original file line number Diff line number Diff line change
@@ -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
11 changes: 0 additions & 11 deletions games-arcade/trailblazer/files/trailblazer-0.9-underlink.patch

This file was deleted.

38 changes: 38 additions & 0 deletions games-arcade/trailblazer/trailblazer-0.9-r1.ebuild
Original file line number Diff line number Diff line change
@@ -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
}
44 changes: 0 additions & 44 deletions games-arcade/trailblazer/trailblazer-0.9.ebuild

This file was deleted.

0 comments on commit 82d2927

Please sign in to comment.