Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/xmms2/
Date: Thu, 15 Feb 2018 22:01:58
Message-Id: 1518732107.e8032b8eaf7c33c0650401f3176457e209ca5212.slyfox@gentoo
1 commit: e8032b8eaf7c33c0650401f3176457e209ca5212
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 15 22:01:36 2018 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 15 22:01:47 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8032b8e
7
8 media-sound/xmms2: drop obsolete USE=gvfs, bug #647604
9
10 Reported-by: Pacho Ramos
11 Closes: https://bugs.gentoo.org/647604
12 Package-Manager: Portage-2.3.24, Repoman-2.3.6
13
14 media-sound/xmms2/xmms2-0.8_p20161122-r3.ebuild | 296 ++++++++++++++++++++++++
15 1 file changed, 296 insertions(+)
16
17 diff --git a/media-sound/xmms2/xmms2-0.8_p20161122-r3.ebuild b/media-sound/xmms2/xmms2-0.8_p20161122-r3.ebuild
18 new file mode 100644
19 index 00000000000..a9ab805984b
20 --- /dev/null
21 +++ b/media-sound/xmms2/xmms2-0.8_p20161122-r3.ebuild
22 @@ -0,0 +1,296 @@
23 +# Copyright 1999-2018 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=6
27 +
28 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
29 +USE_RUBY="ruby20 ruby21 ruby22"
30 +
31 +inherit eutils multiprocessing python-single-r1 ruby-single toolchain-funcs
32 +
33 +# generated as 'python2 ./utils/gen-tarball.py' from clean git tree
34 +MY_P="${P%_p*}DrO_o-949-gca15e830"
35 +
36 +DESCRIPTION="X(cross)platform Music Multiplexing System. Next generation of the XMMS player"
37 +HOMEPAGE="https://xmms2.org/wiki/Main_Page"
38 +#SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
39 +SRC_URI="https://dev.gentoo.org/~slyfox/distfiles/${MY_P}.tar.bz2"
40 +LICENSE="GPL-2 LGPL-2.1"
41 +
42 +SLOT="0"
43 +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~x86"
44 +
45 +IUSE="aac airplay +alsa ao asf cdda curl cxx ffmpeg flac fluidsynth ices
46 +jack mac mlib-update mms +mad modplug mp3 mp4 musepack ofa opus oss
47 +perl phonehome pulseaudio python ruby samba +server sid sndfile speex
48 +test valgrind +vorbis vocoder wavpack xml zeroconf"
49 +
50 +RDEPEND="server? (
51 + >=dev-db/sqlite-3.3.4
52 +
53 + aac? ( >=media-libs/faad2-2.0 )
54 + airplay? ( dev-libs/openssl:0= )
55 + alsa? ( media-libs/alsa-lib )
56 + ao? ( media-libs/libao )
57 + cdda? ( dev-libs/libcdio-paranoia
58 + >=media-libs/libdiscid-0.1.1
59 + >=media-sound/cdparanoia-3.9.8 )
60 + curl? ( >=net-misc/curl-7.15.1 )
61 + ffmpeg? ( virtual/ffmpeg )
62 + flac? ( media-libs/flac )
63 + fluidsynth? ( media-sound/fluidsynth )
64 + ices? ( media-libs/libogg
65 + media-libs/libshout
66 + media-libs/libvorbis )
67 + jack? ( virtual/jack )
68 + mac? ( media-sound/mac )
69 + mms? ( virtual/ffmpeg
70 + >=media-libs/libmms-0.3 )
71 + modplug? ( media-libs/libmodplug )
72 + mad? ( media-libs/libmad )
73 + mp3? ( >=media-sound/mpg123-1.5.1 )
74 + musepack? ( media-sound/musepack-tools )
75 + ofa? ( media-libs/libofa )
76 + opus? ( media-libs/opus
77 + media-libs/opusfile )
78 + pulseaudio? ( media-sound/pulseaudio )
79 + samba? ( >=net-fs/samba-4.2 )
80 + sid? ( media-sound/sidplay
81 + media-libs/resid )
82 + sndfile? ( media-libs/libsndfile )
83 + speex? ( media-libs/speex
84 + media-libs/libogg )
85 + vorbis? ( media-libs/libvorbis )
86 + vocoder? ( sci-libs/fftw:3.0= media-libs/libsamplerate )
87 + wavpack? ( media-sound/wavpack )
88 + xml? ( dev-libs/libxml2 )
89 + zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
90 + )
91 +
92 + >=dev-libs/glib-2.12.9
93 + cxx? ( >=dev-libs/boost-1.32 )
94 + perl? ( >=dev-lang/perl-5.8.8 )
95 + python? ( ${PYTHON_DEPS} )
96 + ruby? ( ${RUBY_DEPS} )
97 +"
98 +
99 +DEPEND="${RDEPEND}
100 + dev-lang/python
101 + virtual/pkgconfig
102 + perl? ( dev-perl/Module-Build
103 + virtual/perl-Module-Metadata )
104 + python? ( >=dev-python/cython-0.15.1
105 + dev-python/pyrex )
106 + test? ( dev-util/cunit
107 + valgrind? ( dev-util/valgrind ) )
108 +"
109 +
110 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
111 +
112 +S="${WORKDIR}/${MY_P}"
113 +
114 +pkg_setup() {
115 + # used both for building xmms2 and
116 + # optionally linking client library
117 + # against python
118 + python-single-r1_pkg_setup
119 +}
120 +
121 +# use_enable() is taken as proto
122 +# $1 - useflag
123 +# $2 - xmms2 option/plugin name (equals to $1 if not set)
124 +
125 +xmms2_flag() {
126 + [[ -z $1 ]] && eerror "!!! empty arg. usage: xmms2_flag <USEFLAG> [<xmms2_flagname>]."
127 +
128 + local UWORD=${2:-$1}
129 +
130 + case $1 in
131 + ENABLED)
132 + echo ",${UWORD}"
133 + ;;
134 + DISABLED)
135 + ;;
136 + *)
137 + use $1 && echo ",${UWORD}"
138 + ;;
139 + esac
140 +}
141 +
142 +src_prepare() {
143 + ./waf # inflate waf
144 + cd .waf* || die
145 + # needs port
146 + #epatch "${FILESDIR}/${PN}"-0.8DrO_o-waflib-fix-perl.patch #578778
147 + cd "${S}"
148 +
149 + eapply "${FILESDIR}/${PN}"-0.8-ffmpeg2.patch #536232
150 +
151 + eapply "${FILESDIR}/${PN}"-0.8-rtvg.patch #424377
152 +
153 + # required to build tarball from git tree
154 + eapply "${FILESDIR}/${P}"-tarball.patch
155 +
156 + # fix hash to be the same on LE/BE platforms
157 + eapply "${FILESDIR}/${P}"-be-hash.patch
158 +
159 + # handle mac-3 -> -4 API change
160 + eapply "${FILESDIR}/${P}"-mac-4.patch
161 +
162 + eapply_user
163 +}
164 +
165 +src_configure() {
166 + # ./configure alike options.
167 + local waf_params="--prefix=/usr \
168 + --libdir=/usr/$(get_libdir) \
169 + --with-target-platform=${CHOST} \
170 + --mandir=/usr/share/man \
171 + --infodir=/usr/share/info \
172 + --datadir=/usr/share \
173 + --sysconfdir=/etc \
174 + --localstatedir=/var/lib"
175 +
176 + local optionals=""
177 + local plugins=""
178 + if ! use server ; then
179 + waf_params+=" --without-xmms2d"
180 + else
181 + # some fun static mappings:
182 + local option_map=( # USE # sorted xmms2 option flag (same, as USE if empty)
183 + "phonehome et"
184 + "ENABLED launcher"
185 + "mlib-update medialib-updater"
186 + "ENABLED nycli"
187 + " perl"
188 + "ENABLED pixmaps"
189 + " python"
190 + " ruby"
191 + "DISABLED tests"
192 + "DISABLED vistest"
193 + "cxx xmmsclient++"
194 + "cxx xmmsclient++-glib"
195 + "DISABLED xmmsclient-cf"
196 + "DISABLED xmmsclient-ecore" # not in tree
197 +
198 + "test tests"
199 + )
200 +
201 + local plugin_map=( # USE # sorted xmms2 plugin flag (same, as USE if empty)
202 + " alsa"
203 + " airplay"
204 + " ao"
205 + "ffmpeg apefile"
206 + "ffmpeg avcodec"
207 + " asf"
208 + "ENABLED asx"
209 + " cdda"
210 + "DISABLED coreaudio" # MacOS only?
211 + " curl"
212 + "ENABLED cue"
213 + "zeroconf daap"
214 + "ENABLED diskwrite"
215 + "ENABLED equalizer"
216 + "aac faad"
217 + "ENABLED file"
218 + " flac"
219 + " fluidsynth"
220 + "ffmpeg flv"
221 + "ffmpeg tta"
222 + "DISABLED gme" # not in tree
223 + "DISABLED gvfs" # obsolete #647604
224 + "ENABLED html"
225 + " ices"
226 + "ENABLED icymetaint"
227 + "ENABLED id3v2"
228 + " jack"
229 + "ENABLED karaoke"
230 + "ENABLED m3u"
231 + " mac"
232 + " mms"
233 + " mad"
234 + "ENABLED midsquash"
235 + " mp4" # bug #387961 (aac, mp3, ape can sit there)
236 + "mp3 mpg123"
237 + " modplug"
238 + " musepack"
239 + "DISABLED nms" # not in tree
240 + "ENABLED normalize"
241 + "ENABLED null"
242 + "ENABLED nulstripper"
243 + " ofa"
244 + " opus"
245 + " oss"
246 + "ENABLED pls"
247 + "pulseaudio pulse"
248 + "ENABLED replaygain"
249 + "xml rss"
250 + " samba"
251 + "DISABLED sc68" #not in tree
252 + " sid"
253 + " sndfile"
254 + " speex"
255 + "DISABLED sun" # {Open,Net}BSD only
256 + "DISABLED tremor" # not in tree
257 + " vorbis"
258 + " vocoder"
259 + "ffmpeg tta"
260 + "ENABLED wave"
261 + "DISABLED waveout" # windows only
262 + " wavpack"
263 + "xml xspf"
264 + "ENABLED xml"
265 + )
266 +
267 + local option
268 + for option in "${option_map[@]}"; do
269 + optionals+=$(xmms2_flag $option)
270 + done
271 +
272 + local plugin
273 + for plugin in "${plugin_map[@]}"; do
274 + plugins+=$(xmms2_flag $plugin)
275 + done
276 + fi # ! server
277 +
278 + # pass them explicitely even if empty as we try to avoid magic deps
279 + waf_params+=" --with-optionals=${optionals:1}" # skip first ',' if yet
280 + waf_params+=" --with-plugins=${plugins:1}"
281 + waf_params+=" $(use_with valgrind)"
282 +
283 + CC="$(tc-getCC)" \
284 + CPP="$(tc-getCPP)" \
285 + AR="$(tc-getAR)" \
286 + RANLIB="$(tc-getRANLIB)" \
287 + CXX="$(tc-getCXX)" \
288 + ./waf configure ${waf_params} || die "'waf configure' failed"
289 +}
290 +
291 +src_compile() {
292 + # waf is very keen to run tests in build phase (bug #424377) but
293 + # it does not bother running tests twice, so the hack below works:
294 + ./waf --verbose build || ./waf --verbose build || die "waf build failed"
295 +}
296 +
297 +src_test() {
298 + # rerun tests
299 + ./waf --alltests || die "waf --alltests failed"
300 +}
301 +
302 +src_install() {
303 + ./waf --without-ldconfig --destdir="${D}" install || die "'waf install' failed"
304 + dodoc AUTHORS TODO
305 +}
306 +
307 +pkg_postinst() {
308 + elog "This version is built on experimental development code"
309 + elog "If you encounter any errors report them at https://bugs.xmms2.org"
310 + elog "and visit #xmms2 at irc://irc.freenode.net"
311 + if use phonehome ; then
312 + einfo ""
313 + einfo "The phone-home client xmms2-et was activated"
314 + einfo "This client sends anonymous usage-statistics to the xmms2"
315 + einfo "developers which may help finding bugs"
316 + einfo "Disable the phonehome useflag if you don't like that"
317 + fi
318 +}