Gentoo Archives: gentoo-commits

From: Michael Sterrett <mr_bones_@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-action/transcend/, games-action/transcend/files/
Date: Wed, 27 Apr 2016 03:06:52
Message-Id: 1461726371.1deff4d1dc9b445b12e1844ea465b4a2e1571719.mr_bones_@gentoo
1 commit: 1deff4d1dc9b445b12e1844ea465b4a2e1571719
2 Author: Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
3 AuthorDate: Wed Apr 27 03:05:38 2016 +0000
4 Commit: Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
5 CommitDate: Wed Apr 27 03:06:11 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1deff4d1
7
8 games-action/transcend: apply patch from debian in order to get sound working. (bug #372413)
9
10 Package-Manager: portage-2.2.26
11
12 .../transcend/files/transcend-0.3-sound.patch | 89 ++++++++++++++++++++++
13 games-action/transcend/transcend-0.3.ebuild | 21 +++--
14 2 files changed, 98 insertions(+), 12 deletions(-)
15
16 diff --git a/games-action/transcend/files/transcend-0.3-sound.patch b/games-action/transcend/files/transcend-0.3-sound.patch
17 new file mode 100644
18 index 0000000..44ac10f
19 --- /dev/null
20 +++ b/games-action/transcend/files/transcend-0.3-sound.patch
21 @@ -0,0 +1,89 @@
22 +Author: Barry deFreese <bdefreese@××××××.org>
23 +Description: Build with portaudio19.
24 +--- a/Transcend/game/SoundPlayer.h
25 ++++ b/Transcend/game/SoundPlayer.h
26 +@@ -204,7 +204,7 @@
27 + double mMusicLoudness;
28 +
29 +
30 +- PortAudioStream *mAudioStream;
31 ++ PaStream *mAudioStream;
32 +
33 + // realtime sounds that should be mixed into the next to-speaker call
34 + SimpleVector<PlayableSound *> *mRealtimeSounds;
35 +--- a/Transcend/game/SoundPlayer.cpp
36 ++++ b/Transcend/game/SoundPlayer.cpp
37 +@@ -47,9 +47,11 @@
38 +
39 +
40 + // callback passed into portaudio
41 +-static int portaudioCallback( void *inputBuffer, void *outputBuffer,
42 ++int portaudioCallback( const void *inputBuffer, void *outputBuffer,
43 + unsigned long framesPerBuffer,
44 +- PaTimestamp outTime, void *userData ) {
45 ++ const PaStreamCallbackTimeInfo *outTime,
46 ++ PaStreamCallbackFlags statusFlags,
47 ++ void *userData ) {
48 +
49 +
50 + SoundPlayer *player = (SoundPlayer *)userData;
51 +@@ -147,21 +149,13 @@
52 +
53 + if( error == paNoError ) {
54 +
55 +- error = Pa_OpenStream(
56 ++ error = Pa_OpenDefaultStream(
57 + &mAudioStream,
58 +- paNoDevice,// default input device
59 + 0, // no input
60 +- paFloat32, // 32 bit floating point input
61 +- NULL,
62 +- Pa_GetDefaultOutputDeviceID(),
63 + 2, // stereo output
64 + paFloat32, // 32 bit floating point output
65 +- NULL,
66 + mSampleRate,
67 + 1024, // frames per buffer
68 +- 0, // number of buffers, if zero then use default minimum
69 +- paClipOff, // we won't output out of range samples so
70 +- // don't bother clipping them
71 + portaudioCallback,
72 + (void *)this ); // pass self-pointer to callback function
73 +
74 +Description: Link to dynamic portaudio instead of static.
75 +Author: Miriam Ruiz <miriam@××××××.org>
76 +--- a/Transcend/Makefile.GnuLinuxX86
77 ++++ b/Transcend/Makefile.GnuLinuxX86
78 +@@ -22,7 +22,7 @@
79 +
80 + # pthread library needed for linux
81 + # also need portaudio library (which in turn needs pthreads)
82 +-PLATFORM_LINK_FLAGS = -L/usr/X11R6/lib -lGL -lglut -lGLU -lX11 -lXi -lXext -lXmu ${ROOT_PATH}/Transcend/portaudio/lib/libportaudio.a -lpthread
83 ++PLATFORM_LINK_FLAGS = -L/usr/X11R6/lib -lGL -lglut -lGLU -lX11 -lXi -lXext -lXmu $(shell pkg-config portaudio-2.0 --libs)
84 +
85 +
86 + # All platforms but OSX support g++ and need no linker hacks
87 +--- a/Transcend/game/SoundPlayer.h
88 ++++ b/Transcend/game/SoundPlayer.h
89 +@@ -46,8 +46,7 @@
90 + #include "SoundFilter.h"
91 + #include "PlayableSound.h"
92 +
93 +-#include "Transcend/portaudio/pa_common/portaudio.h"
94 +-#include "Transcend/portaudio/pablio/pablio.h"
95 ++#include <portaudio.h>
96 +
97 +
98 + #include "minorGems/util/SimpleVector.h"
99 +--- a/Transcend/game/SoundPlayerActive.h
100 ++++ b/Transcend/game/SoundPlayerActive.h
101 +@@ -16,8 +16,7 @@
102 +
103 + #include "SoundSamples.h"
104 +
105 +-#include "Transcend/portaudio/pa_common/portaudio.h"
106 +-#include "Transcend/portaudio/pablio/pablio.h"
107 ++#include <portaudio.h>
108 +
109 +
110 + #include "minorGems/util/SimpleVector.h"
111
112 diff --git a/games-action/transcend/transcend-0.3.ebuild b/games-action/transcend/transcend-0.3.ebuild
113 index 826b88f..e674d91 100644
114 --- a/games-action/transcend/transcend-0.3.ebuild
115 +++ b/games-action/transcend/transcend-0.3.ebuild
116 @@ -1,9 +1,9 @@
117 -# Copyright 1999-2015 Gentoo Foundation
118 +# Copyright 1999-2016 Gentoo Foundation
119 # Distributed under the terms of the GNU General Public License v2
120 # $Id$
121
122 EAPI=5
123 -inherit games
124 +inherit eutils games
125
126 DESCRIPTION="retro-style, abstract, 2D shooter"
127 HOMEPAGE="http://transcend.sourceforge.net/"
128 @@ -18,15 +18,16 @@ DEPEND="x11-libs/libXmu
129 x11-libs/libXi
130 virtual/opengl
131 virtual/glu
132 + media-libs/portaudio
133 media-libs/freeglut"
134 RDEPEND=${DEPEND}
135
136 S=${WORKDIR}/Transcend_${PV}_UnixSource/Transcend
137
138 src_prepare() {
139 - chmod a+x portaudio/configure
140 - mkdir portaudio/{lib,bin}
141 - rm -f game/Makefile
142 + # apply patch from debian in order to get sound working. bug #372413
143 + epatch "${FILESDIR}"/${P}-sound.patch
144 + rm -rf game/Makefile portaudio/ || die
145 sed \
146 -e '/^GXX=/d' \
147 -e 's/GXX/CXX/' \
148 @@ -44,21 +45,17 @@ src_prepare() {
149 game/game.cpp || die
150 }
151
152 -src_configure() {
153 - cd portaudio
154 - egamesconf
155 -}
156 +src_configure() { :; }
157
158 src_compile() {
159 - emake -C portaudio lib/libportaudio.a
160 emake -C game
161 - cp game/Transcend ${PN} || die
162 }
163
164 src_install() {
165 - dogamesbin ${PN}
166 + newgamesbin game/Transcend ${PN}
167 insinto "${GAMES_DATADIR}/${PN}"
168 doins -r levels/
169 dodoc doc/{how_to_play.txt,changeLog.txt}
170 + make_desktop_entry ${PN} "Transcend"
171 prepgamesdirs
172 }