1 |
commit: 82d2927b141ee193131579408d59732f0e271db8 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 23 10:44:38 2020 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 23 10:44:38 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82d2927b |
7 |
|
8 |
games-arcade/trailblazer: Port to EAPI 7 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/710446 |
11 |
Package-Manager: Portage-2.3.89, Repoman-2.3.20 |
12 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
13 |
|
14 |
.../files/trailblazer-0.9-gentoo-fhs.patch | 20 ++++++++++ |
15 |
.../files/trailblazer-0.9-ldflags.patch | 11 ------ |
16 |
.../files/trailblazer-0.9-makefile.patch | 19 ++++++++++ |
17 |
.../files/trailblazer-0.9-underlink.patch | 11 ------ |
18 |
games-arcade/trailblazer/trailblazer-0.9-r1.ebuild | 38 +++++++++++++++++++ |
19 |
games-arcade/trailblazer/trailblazer-0.9.ebuild | 44 ---------------------- |
20 |
6 files changed, 77 insertions(+), 66 deletions(-) |
21 |
|
22 |
diff --git a/games-arcade/trailblazer/files/trailblazer-0.9-gentoo-fhs.patch b/games-arcade/trailblazer/files/trailblazer-0.9-gentoo-fhs.patch |
23 |
new file mode 100644 |
24 |
index 00000000000..d8f6650b61c |
25 |
--- /dev/null |
26 |
+++ b/games-arcade/trailblazer/files/trailblazer-0.9-gentoo-fhs.patch |
27 |
@@ -0,0 +1,20 @@ |
28 |
+--- a/map.c |
29 |
++++ b/map.c |
30 |
+@@ -63,7 +63,7 @@ |
31 |
+ } |
32 |
+ } |
33 |
+ fclose(f); // Close the file |
34 |
+- f = fopen("/usr/share/trailblazer/trail.time","r"); |
35 |
++ f = fopen("/var/trailblazer/trail.time","r"); |
36 |
+ if (f != NULL) |
37 |
+ { |
38 |
+ for (i = 0;i < MAPMAX;i++) |
39 |
+@@ -87,7 +87,7 @@ |
40 |
+ if (Map[i].Data != NULL) free(Map[i].Data); |
41 |
+ Map[i].Data = NULL; |
42 |
+ } |
43 |
+- f = fopen("/usr/share/trailblazer/trail.time","w"); |
44 |
++ f = fopen("/var/trailblazer/trail.time","w"); |
45 |
+ if (f != NULL) |
46 |
+ { |
47 |
+ for (i = 0;i < MAPMAX;i++) |
48 |
|
49 |
diff --git a/games-arcade/trailblazer/files/trailblazer-0.9-ldflags.patch b/games-arcade/trailblazer/files/trailblazer-0.9-ldflags.patch |
50 |
deleted file mode 100644 |
51 |
index 034a74e75f9..00000000000 |
52 |
--- a/games-arcade/trailblazer/files/trailblazer-0.9-ldflags.patch |
53 |
+++ /dev/null |
54 |
@@ -1,11 +0,0 @@ |
55 |
---- Makefile.old 2010-09-30 23:56:21.000000000 +0200 |
56 |
-+++ Makefile 2010-09-30 23:56:35.000000000 +0200 |
57 |
-@@ -9,7 +9,7 @@ |
58 |
- bdir = /tmp/trailblazer-$(version) |
59 |
- |
60 |
- all: |
61 |
-- $(CC) $(sources) -o trailblazer $(cflags) $(libs) |
62 |
-+ $(CC) $(LDFLAGS) $(sources) -o trailblazer $(cflags) $(libs) |
63 |
- |
64 |
- install: |
65 |
- cp trailblazer /usr/bin |
66 |
|
67 |
diff --git a/games-arcade/trailblazer/files/trailblazer-0.9-makefile.patch b/games-arcade/trailblazer/files/trailblazer-0.9-makefile.patch |
68 |
new file mode 100644 |
69 |
index 00000000000..70c7cdd90f2 |
70 |
--- /dev/null |
71 |
+++ b/games-arcade/trailblazer/files/trailblazer-0.9-makefile.patch |
72 |
@@ -0,0 +1,19 @@ |
73 |
+--- a/Makefile |
74 |
++++ b/Makefile |
75 |
+@@ -3,13 +3,13 @@ |
76 |
+ # |
77 |
+ |
78 |
+ sources = game.c main.c road.c map.c gfx.c |
79 |
+-libs = `sdl-config --libs` |
80 |
+-cflags = -O2 -Wall `sdl-config --cflags` |
81 |
++libs = `sdl-config --libs` -lm |
82 |
++cflags = $(CFLAGS) $(CPPFLAGS) -Wall `sdl-config --cflags` |
83 |
+ version = 0.9 |
84 |
+ bdir = /tmp/trailblazer-$(version) |
85 |
+ |
86 |
+ all: |
87 |
+- $(CC) $(sources) -o trailblazer $(cflags) $(libs) |
88 |
++ $(CC) $(LDFLAGS) $(sources) -o trailblazer $(cflags) $(libs) |
89 |
+ |
90 |
+ install: |
91 |
+ cp trailblazer /usr/bin |
92 |
|
93 |
diff --git a/games-arcade/trailblazer/files/trailblazer-0.9-underlink.patch b/games-arcade/trailblazer/files/trailblazer-0.9-underlink.patch |
94 |
deleted file mode 100644 |
95 |
index 31e9a100032..00000000000 |
96 |
--- a/games-arcade/trailblazer/files/trailblazer-0.9-underlink.patch |
97 |
+++ /dev/null |
98 |
@@ -1,11 +0,0 @@ |
99 |
---- Makefile.old 2011-06-20 20:49:09.928013768 +0200 |
100 |
-+++ Makefile 2011-06-20 20:49:18.725566328 +0200 |
101 |
-@@ -3,7 +3,7 @@ |
102 |
- # |
103 |
- |
104 |
- sources = game.c main.c road.c map.c gfx.c |
105 |
--libs = `sdl-config --libs` |
106 |
-+libs = `sdl-config --libs` -lm |
107 |
- cflags = -O2 -Wall `sdl-config --cflags` |
108 |
- version = 0.9 |
109 |
- bdir = /tmp/trailblazer-$(version) |
110 |
|
111 |
diff --git a/games-arcade/trailblazer/trailblazer-0.9-r1.ebuild b/games-arcade/trailblazer/trailblazer-0.9-r1.ebuild |
112 |
new file mode 100644 |
113 |
index 00000000000..fac38295d73 |
114 |
--- /dev/null |
115 |
+++ b/games-arcade/trailblazer/trailblazer-0.9-r1.ebuild |
116 |
@@ -0,0 +1,38 @@ |
117 |
+# Copyright 1999-2020 Gentoo Authors |
118 |
+# Distributed under the terms of the GNU General Public License v2 |
119 |
+ |
120 |
+EAPI=7 |
121 |
+ |
122 |
+inherit toolchain-funcs |
123 |
+ |
124 |
+DESCRIPTION="Guide a ball through a succession of levels while avoiding holes" |
125 |
+HOMEPAGE="http://www.autismuk.freeserve.co.uk/" |
126 |
+SRC_URI="http://www.autismuk.freeserve.co.uk/${P}.tgz" |
127 |
+ |
128 |
+LICENSE="GPL-2" |
129 |
+SLOT="0" |
130 |
+KEYWORDS="~amd64 ~x86" |
131 |
+ |
132 |
+DEPEND="media-libs/libsdl[video]" |
133 |
+RDEPEND="${DEPEND}" |
134 |
+ |
135 |
+PATCHES=( |
136 |
+ "${FILESDIR}"/${P}-gentoo-fhs.patch |
137 |
+ "${FILESDIR}"/${P}-makefile.patch |
138 |
+) |
139 |
+ |
140 |
+src_configure() { |
141 |
+ tc-export CC |
142 |
+} |
143 |
+ |
144 |
+src_install() { |
145 |
+ dobin trailblazer |
146 |
+ dodoc README |
147 |
+ |
148 |
+ insinto /usr/share/${PN} |
149 |
+ doins trail.dat |
150 |
+ |
151 |
+ dodir /var/trailblazer |
152 |
+ touch "${ED}"/var/trailblazer/trail.time |
153 |
+ fperms 660 /var/trailblazer/trail.time |
154 |
+} |
155 |
|
156 |
diff --git a/games-arcade/trailblazer/trailblazer-0.9.ebuild b/games-arcade/trailblazer/trailblazer-0.9.ebuild |
157 |
deleted file mode 100644 |
158 |
index 6e318271937..00000000000 |
159 |
--- a/games-arcade/trailblazer/trailblazer-0.9.ebuild |
160 |
+++ /dev/null |
161 |
@@ -1,44 +0,0 @@ |
162 |
-# Copyright 1999-2015 Gentoo Foundation |
163 |
-# Distributed under the terms of the GNU General Public License v2 |
164 |
- |
165 |
-EAPI=5 |
166 |
-inherit eutils games |
167 |
- |
168 |
-DESCRIPTION="Guide a ball through a succession of levels while avoiding holes" |
169 |
-HOMEPAGE="http://www.autismuk.freeserve.co.uk/" |
170 |
-SRC_URI="http://www.autismuk.freeserve.co.uk/${P}.tgz" |
171 |
- |
172 |
-LICENSE="GPL-2" |
173 |
-SLOT="0" |
174 |
-KEYWORDS="~amd64 ~x86" |
175 |
-IUSE="" |
176 |
- |
177 |
-DEPEND=">=media-libs/libsdl-1.2.7[video]" |
178 |
-RDEPEND="${DEPEND}" |
179 |
- |
180 |
-src_prepare() { |
181 |
- epatch "${FILESDIR}"/${P}-ldflags.patch \ |
182 |
- "${FILESDIR}"/${P}-underlink.patch |
183 |
- |
184 |
- sed -i \ |
185 |
- -e "s:-O2:${CFLAGS}:" \ |
186 |
- Makefile || die "sed Makefile failed" |
187 |
- |
188 |
- sed -i \ |
189 |
- -e "s:/usr/share/trailblazer/trail\.dat:${GAMES_DATADIR}/${PN}/trail.dat:" \ |
190 |
- -e "s:/usr/share/trailblazer/trail\.time:${GAMES_STATEDIR}/trail.time:" \ |
191 |
- map.c || die "sed map.c failed" |
192 |
-} |
193 |
- |
194 |
-src_install() { |
195 |
- dogamesbin trailblazer |
196 |
- insinto "${GAMES_DATADIR}/${PN}" |
197 |
- doins trail.dat |
198 |
- dodoc README |
199 |
- |
200 |
- dodir "${GAMES_STATEDIR}" \ |
201 |
- && touch "${D}${GAMES_STATEDIR}/trail.time" |
202 |
- |
203 |
- prepgamesdirs |
204 |
- fperms 660 "${GAMES_STATEDIR}/trail.time" |
205 |
-} |