1 |
commit: fbcfa77b21b782c746a97a871773fd34576653bd |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 15 22:41:47 2021 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 15 23:20:16 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fbcfa77b |
7 |
|
8 |
games-action/transcend: EAPI6->8, misc cleanups |
9 |
|
10 |
Slightly annoying to but no longer use Transcend/ in ${S} |
11 |
given higher level directories are also built and it makes |
12 |
user patching (or future need to patch) difficult. |
13 |
|
14 |
Also try to use the more "intended" way to build to drop |
15 |
large sed/makefile concat. |
16 |
|
17 |
Drop unused X deps and prevent from attempting to link with them. |
18 |
|
19 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
20 |
|
21 |
....patch => transcend-0.3-system-portaudio.patch} | 80 ++++++++-------------- |
22 |
games-action/transcend/transcend-0.3-r1.ebuild | 66 ------------------ |
23 |
games-action/transcend/transcend-0.3-r2.ebuild | 66 ++++++++++++++++++ |
24 |
3 files changed, 96 insertions(+), 116 deletions(-) |
25 |
|
26 |
diff --git a/games-action/transcend/files/transcend-0.3-sound.patch b/games-action/transcend/files/transcend-0.3-system-portaudio.patch |
27 |
similarity index 57% |
28 |
rename from games-action/transcend/files/transcend-0.3-sound.patch |
29 |
rename to games-action/transcend/files/transcend-0.3-system-portaudio.patch |
30 |
index 836cd03754a..6fb6566ff84 100644 |
31 |
--- a/games-action/transcend/files/transcend-0.3-sound.patch |
32 |
+++ b/games-action/transcend/files/transcend-0.3-system-portaudio.patch |
33 |
@@ -1,21 +1,23 @@ |
34 |
-Author: Barry deFreese <bdefreese@××××××.org> |
35 |
-Description: Build with portaudio19. |
36 |
---- a/game/SoundPlayer.h |
37 |
-+++ b/game/SoundPlayer.h |
38 |
-@@ -204,7 +204,7 @@ |
39 |
- double mMusicLoudness; |
40 |
- |
41 |
- |
42 |
-- PortAudioStream *mAudioStream; |
43 |
-+ PaStream *mAudioStream; |
44 |
- |
45 |
- // realtime sounds that should be mixed into the next to-speaker call |
46 |
- SimpleVector<PlayableSound *> *mRealtimeSounds; |
47 |
---- a/game/SoundPlayer.cpp |
48 |
-+++ b/game/SoundPlayer.cpp |
49 |
-@@ -47,9 +47,11 @@ |
50 |
- |
51 |
+https://bugs.gentoo.org/372413 |
52 |
+Based on debian patch by: Barry deFreese <bdefreese@××××××.org> |
53 |
+ |
54 |
+While adding pkg-config for portaudio, also use it for the rest |
55 |
+and remove unused X libraries. |
56 |
+--- a/Transcend/Makefile.GnuLinuxX86 |
57 |
++++ b/Transcend/Makefile.GnuLinuxX86 |
58 |
+@@ -20,3 +20,3 @@ |
59 |
+ |
60 |
+-PLATFORM_COMPILE_FLAGS = -DLINUX |
61 |
++PLATFORM_COMPILE_FLAGS = $(shell $(PKG_CONFIG) --cflags gl glut glu portaudio-2.0) |
62 |
+ |
63 |
+@@ -24,3 +24,3 @@ |
64 |
+ # also need portaudio library (which in turn needs pthreads) |
65 |
+-PLATFORM_LINK_FLAGS = -L/usr/X11R6/lib -lGL -lglut -lGLU -lX11 -lXi -lXext -lXmu ${ROOT_PATH}/Transcend/portaudio/lib/libportaudio.a -lpthread |
66 |
++PLATFORM_LINK_FLAGS = $(shell $(PKG_CONFIG) --libs gl glut glu portaudio-2.0) |
67 |
|
68 |
+--- a/Transcend/game/SoundPlayer.cpp |
69 |
++++ b/Transcend/game/SoundPlayer.cpp |
70 |
+@@ -49,5 +49,7 @@ |
71 |
// callback passed into portaudio |
72 |
-static int portaudioCallback( void *inputBuffer, void *outputBuffer, |
73 |
+int portaudioCallback( const void *inputBuffer, void *outputBuffer, |
74 |
@@ -25,11 +27,7 @@ Description: Build with portaudio19. |
75 |
+ PaStreamCallbackFlags statusFlags, |
76 |
+ void *userData ) { |
77 |
|
78 |
- |
79 |
- SoundPlayer *player = (SoundPlayer *)userData; |
80 |
-@@ -147,21 +149,13 @@ |
81 |
- |
82 |
- if( error == paNoError ) { |
83 |
+@@ -149,17 +151,9 @@ |
84 |
|
85 |
- error = Pa_OpenStream( |
86 |
+ error = Pa_OpenDefaultStream( |
87 |
@@ -48,42 +46,24 @@ Description: Build with portaudio19. |
88 |
- paClipOff, // we won't output out of range samples so |
89 |
- // don't bother clipping them |
90 |
portaudioCallback, |
91 |
- (void *)this ); // pass self-pointer to callback function |
92 |
- |
93 |
-Description: Link to dynamic portaudio instead of static. |
94 |
-Author: Miriam Ruiz <miriam@××××××.org> |
95 |
---- a/Makefile.GnuLinuxX86 |
96 |
-+++ b/Makefile.GnuLinuxX86 |
97 |
-@@ -22,7 +22,7 @@ |
98 |
- |
99 |
- # pthread library needed for linux |
100 |
- # also need portaudio library (which in turn needs pthreads) |
101 |
--PLATFORM_LINK_FLAGS = -L/usr/X11R6/lib -lGL -lglut -lGLU -lX11 -lXi -lXext -lXmu ${ROOT_PATH}/Transcend/portaudio/lib/libportaudio.a -lpthread |
102 |
-+PLATFORM_LINK_FLAGS = -L/usr/X11R6/lib -lGL -lglut -lGLU -lX11 -lXi -lXext -lXmu $(shell pkg-config portaudio-2.0 --libs) |
103 |
- |
104 |
- |
105 |
- # All platforms but OSX support g++ and need no linker hacks |
106 |
---- a/game/SoundPlayer.h |
107 |
-+++ b/game/SoundPlayer.h |
108 |
-@@ -46,8 +46,7 @@ |
109 |
- #include "SoundFilter.h" |
110 |
- #include "PlayableSound.h" |
111 |
+--- a/Transcend/game/SoundPlayer.h |
112 |
++++ b/Transcend/game/SoundPlayer.h |
113 |
+@@ -48,4 +48,3 @@ |
114 |
|
115 |
-#include "Transcend/portaudio/pa_common/portaudio.h" |
116 |
-#include "Transcend/portaudio/pablio/pablio.h" |
117 |
+#include <portaudio.h> |
118 |
|
119 |
+@@ -207,3 +206,3 @@ |
120 |
+ |
121 |
+- PortAudioStream *mAudioStream; |
122 |
++ PaStream *mAudioStream; |
123 |
|
124 |
- #include "minorGems/util/SimpleVector.h" |
125 |
---- a/game/SoundPlayerActive.h |
126 |
-+++ b/game/SoundPlayerActive.h |
127 |
-@@ -16,8 +16,7 @@ |
128 |
- |
129 |
- #include "SoundSamples.h" |
130 |
+--- a/Transcend/game/SoundPlayerActive.h |
131 |
++++ b/Transcend/game/SoundPlayerActive.h |
132 |
+@@ -18,4 +18,3 @@ |
133 |
|
134 |
-#include "Transcend/portaudio/pa_common/portaudio.h" |
135 |
-#include "Transcend/portaudio/pablio/pablio.h" |
136 |
+#include <portaudio.h> |
137 |
|
138 |
- |
139 |
- #include "minorGems/util/SimpleVector.h" |
140 |
|
141 |
diff --git a/games-action/transcend/transcend-0.3-r1.ebuild b/games-action/transcend/transcend-0.3-r1.ebuild |
142 |
deleted file mode 100644 |
143 |
index 5e44612b5d3..00000000000 |
144 |
--- a/games-action/transcend/transcend-0.3-r1.ebuild |
145 |
+++ /dev/null |
146 |
@@ -1,66 +0,0 @@ |
147 |
-# Copyright 1999-2018 Gentoo Foundation |
148 |
-# Distributed under the terms of the GNU General Public License v2 |
149 |
- |
150 |
-EAPI=6 |
151 |
- |
152 |
-inherit desktop |
153 |
- |
154 |
-DESCRIPTION="Retro-style, abstract, 2D shooter" |
155 |
-HOMEPAGE="http://transcend.sourceforge.net/" |
156 |
-SRC_URI="mirror://sourceforge/${PN}/Transcend_${PV}_UnixSource.tar.gz" |
157 |
- |
158 |
-LICENSE="GPL-2" |
159 |
-SLOT="0" |
160 |
-KEYWORDS="~amd64 ~x86" |
161 |
-IUSE="" |
162 |
- |
163 |
-DEPEND=" |
164 |
- media-libs/freeglut |
165 |
- media-libs/portaudio |
166 |
- x11-libs/libXi |
167 |
- x11-libs/libXmu |
168 |
- virtual/glu |
169 |
- virtual/opengl" |
170 |
-RDEPEND=${DEPEND} |
171 |
- |
172 |
-S=${WORKDIR}/Transcend_${PV}_UnixSource/Transcend |
173 |
- |
174 |
-# Apply patch from Debian in order to get sound working. bug #372413 |
175 |
-PATCHES=( |
176 |
- "${FILESDIR}"/${P}-sound.patch |
177 |
-) |
178 |
- |
179 |
-src_prepare() { |
180 |
- default |
181 |
- |
182 |
- rm -rf game/Makefile portaudio/ || die |
183 |
- sed \ |
184 |
- -e '/^GXX=/d' \ |
185 |
- -e 's/GXX/CXX/' \ |
186 |
- -e '/^COMPILE_FLAGS =/ s/OPTIMIZE_FLAG/CXXFLAGS/' \ |
187 |
- -e '/^EXE_LINK =/ s/LINK_FLAGS/LDFLAGS/' \ |
188 |
- Makefile.GnuLinuxX86 \ |
189 |
- Makefile.common \ |
190 |
- Makefile.minorGems \ |
191 |
- game/Makefile.all \ |
192 |
- Makefile.minorGems_targets \ |
193 |
- > game/Makefile || die |
194 |
- sed -i \ |
195 |
- -e "s:\"levels\":\"/usr/share/${PN}/levels\":" \ |
196 |
- game/LevelDirectoryManager.cpp \ |
197 |
- game/game.cpp || die |
198 |
-} |
199 |
- |
200 |
-src_configure() { :; } |
201 |
- |
202 |
-src_compile() { |
203 |
- emake -C game |
204 |
-} |
205 |
- |
206 |
-src_install() { |
207 |
- newbin game/Transcend ${PN} |
208 |
- insinto /usr/share/${PN} |
209 |
- doins -r levels/ |
210 |
- dodoc doc/{how_to_play.txt,changeLog.txt} |
211 |
- make_desktop_entry ${PN} "Transcend" |
212 |
-} |
213 |
|
214 |
diff --git a/games-action/transcend/transcend-0.3-r2.ebuild b/games-action/transcend/transcend-0.3-r2.ebuild |
215 |
new file mode 100644 |
216 |
index 00000000000..b3f2a9b7a91 |
217 |
--- /dev/null |
218 |
+++ b/games-action/transcend/transcend-0.3-r2.ebuild |
219 |
@@ -0,0 +1,66 @@ |
220 |
+# Copyright 1999-2021 Gentoo Authors |
221 |
+# Distributed under the terms of the GNU General Public License v2 |
222 |
+ |
223 |
+EAPI=8 |
224 |
+ |
225 |
+inherit desktop toolchain-funcs |
226 |
+ |
227 |
+DESCRIPTION="Retro-style, abstract, 2D shooter" |
228 |
+HOMEPAGE="http://transcend.sourceforge.net/" |
229 |
+SRC_URI="mirror://sourceforge/${PN}/Transcend_${PV}_UnixSource.tar.gz" |
230 |
+S="${WORKDIR}/Transcend_${PV}_UnixSource" |
231 |
+ |
232 |
+LICENSE="GPL-2" |
233 |
+SLOT="0" |
234 |
+KEYWORDS="~amd64 ~x86" |
235 |
+ |
236 |
+RDEPEND=" |
237 |
+ media-libs/freeglut |
238 |
+ media-libs/portaudio |
239 |
+ virtual/glu |
240 |
+ virtual/opengl" |
241 |
+DEPEND="${RDEPEND}" |
242 |
+BDEPEND="virtual/pkgconfig" |
243 |
+ |
244 |
+PATCHES=( |
245 |
+ "${FILESDIR}"/${P}-system-portaudio.patch |
246 |
+) |
247 |
+ |
248 |
+src_prepare() { |
249 |
+ default |
250 |
+ |
251 |
+ rm -r ${PN^}/portaudio || die |
252 |
+ |
253 |
+ sed -e "s|\"levels\"|\"${EPREFIX}/usr/share/${PN}/levels\"|" \ |
254 |
+ -i ${PN^}/game/{LevelDirectoryManager,game}.cpp || die |
255 |
+} |
256 |
+ |
257 |
+src_configure() { |
258 |
+ cd ${PN^} || die |
259 |
+ platformSelection=1 ./configure || die |
260 |
+} |
261 |
+ |
262 |
+src_compile() { |
263 |
+ tc-export PKG_CONFIG |
264 |
+ |
265 |
+ local emakeargs=( |
266 |
+ GXX="$(tc-getCXX)" |
267 |
+ OPTIMIZE_FLAG="${CXXFLAGS}" |
268 |
+ LINK_FLAGS="${LDFLAGS}" |
269 |
+ ) |
270 |
+ |
271 |
+ emake -C ${PN^}/game "${emakeargs[@]}" |
272 |
+} |
273 |
+ |
274 |
+src_install() { |
275 |
+ cd ${PN^} || die |
276 |
+ |
277 |
+ newbin game/${PN^} ${PN} |
278 |
+ |
279 |
+ insinto /usr/share/${PN} |
280 |
+ doins -r levels |
281 |
+ |
282 |
+ dodoc doc/{how_to_play.txt,changeLog.txt} |
283 |
+ |
284 |
+ make_desktop_entry ${PN} ${PN^} applications-games |
285 |
+} |