Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/xmms2/files/, media-sound/xmms2/
Date: Tue, 03 May 2022 05:57:03
Message-Id: 1651557343.24f50fc0c415d1037d79b26c802c944ef0da4035.ionen@gentoo
1 commit: 24f50fc0c415d1037d79b26c802c944ef0da4035
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 3 04:29:08 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Tue May 3 05:55:43 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24f50fc0
7
8 media-sound/xmms2: add 0.9.1
9
10 Special thanks to slyfox for handling a few things upstream
11 and making a release after so long.
12
13 Mostly same as previous snapshot with patches but with several
14 of these upstreamed and now have a proper release tarball
15 including s4 submodule and updated waf to simplify the ebuild.
16
17 Also refreshed older patches (none are new).
18
19 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
20
21 media-sound/xmms2/Manifest | 1 +
22 .../xmms2/files/xmms2-0.9.1-cpp-client.patch | 13 ++
23 media-sound/xmms2/files/xmms2-0.9.1-faad.patch | 13 ++
24 media-sound/xmms2/files/xmms2-0.9.1-rtvg.patch | 23 +++
25 media-sound/xmms2/xmms2-0.9.1.ebuild | 224 +++++++++++++++++++++
26 5 files changed, 274 insertions(+)
27
28 diff --git a/media-sound/xmms2/Manifest b/media-sound/xmms2/Manifest
29 index 38569c9908ac..e49b5778f52a 100644
30 --- a/media-sound/xmms2/Manifest
31 +++ b/media-sound/xmms2/Manifest
32 @@ -1,3 +1,4 @@
33 DIST waf-2.0.22.tar.bz2 687244 BLAKE2B feea82e7e6aaba1187f368aa00025f206a7217196de9be7a97ca6aa8882823decd79db38dda4f1f25e81541eaa44edf029eea8d57e28f7d31b94d9ee93201ea9 SHA512 a3a275fd4c81c7b7385c2da001f3924d272105b8f33839265ebbb38708051b7cb13b9b9019e84325707d04513de0c13b032b1ad21458aec6586d10df4ed8d5f5
34 DIST xmms2-0.8_p20201016.tar.gz 1720185 BLAKE2B e1cad8ed2ece9d8ce905ffe86de53bb4010639d83fd15700eefccf190034577ff8666f3557bfb23741ed8400eba1e6246ef28ff21c4dbbe499239da945befc74 SHA512 0e73771f56c341e5dea15451457426958217de3ac19cad1924c11740f96feb69e385242a27a9cf9258841ed4e6538c12e135492f715bfae6976b31fb358508bf
35 +DIST xmms2-0.9.1.tar.bz2 1940773 BLAKE2B 4044499c2ffc55e66d5836e2e36360486b970ff05f0dc17b62e65111c06cfcc84f58c74427b1afa4455b4e0bdb7784dc8840cc84411bc57cb7b9f0cac4e46359 SHA512 a7d42202571d7eb5d9da4c9f5d55d2f6e072df52892080d6cc4349f66a55f5fece510c9872be9814dd5b258d0c59e2704ea8497c2d3be515c510d602c17b703a
36 DIST xmms2-s4-0.8_p20201016.tar.gz 184231 BLAKE2B 0676f89b743e265af01593c215c609ae48ea368d861fd28b022b4124a00852182686a46ebf90ac44a10343f86ba5c398c47fd85e2688971b2b4445f3c3843af5 SHA512 f510141ca792893feba2c00d9bc437f492fdce7c29b12c9a8432792ca5a1703cc7068e1a9f4641abd50b320fefb5867fb5bc58a58b0b0272cf75828c764f94ed
37
38 diff --git a/media-sound/xmms2/files/xmms2-0.9.1-cpp-client.patch b/media-sound/xmms2/files/xmms2-0.9.1-cpp-client.patch
39 new file mode 100644
40 index 000000000000..491c6fb9771d
41 --- /dev/null
42 +++ b/media-sound/xmms2/files/xmms2-0.9.1-cpp-client.patch
43 @@ -0,0 +1,13 @@
44 +https://github.com/xmms2/xmms2-devel/pull/5
45 +From: Sergei Trofimovich <slyfox@g.o>
46 +Date: Thu, 6 Dec 2018 07:19:08 +0000
47 +Subject: [PATCH] OTHER: fix c++ client dangling reference
48 +--- a/src/include/xmmsclient/xmmsclient++/mainloop.h
49 ++++ b/src/include/xmmsclient/xmmsclient++/mainloop.h
50 +@@ -42,5 +42,5 @@
51 + * mainloop, not start it!
52 + */
53 +- MainloopInterface( xmmsc_connection_t* conn ) :
54 ++ MainloopInterface( xmmsc_connection_t*& conn ) :
55 + running_( false ), conn_( conn ) { }
56 +
57
58 diff --git a/media-sound/xmms2/files/xmms2-0.9.1-faad.patch b/media-sound/xmms2/files/xmms2-0.9.1-faad.patch
59 new file mode 100644
60 index 000000000000..6c282ed6d0a4
61 --- /dev/null
62 +++ b/media-sound/xmms2/files/xmms2-0.9.1-faad.patch
63 @@ -0,0 +1,13 @@
64 +This line has stopped working since security fixes in the faad 2.9.0
65 +release. XMMS2 upstream were informed via IRC but have yet to act on
66 +it. I've run XMMS2 with this patch for months without issue.
67 +
68 +-- Chewi
69 +--- a/src/plugins/faad/faad.c
70 ++++ b/src/plugins/faad/faad.c
71 +@@ -243,5 +243,4 @@
72 + * it frame 1.
73 + */
74 +- NeAACDecPostSeekReset (data->decoder, 1);
75 +
76 + /* FIXME: Because for HE AAC files some versions of libfaad return the wrong
77
78 diff --git a/media-sound/xmms2/files/xmms2-0.9.1-rtvg.patch b/media-sound/xmms2/files/xmms2-0.9.1-rtvg.patch
79 new file mode 100644
80 index 000000000000..86f48ca066dc
81 --- /dev/null
82 +++ b/media-sound/xmms2/files/xmms2-0.9.1-rtvg.patch
83 @@ -0,0 +1,23 @@
84 +Add knob to control valgrind usage during tests.
85 +https://bugs.gentoo.org/424377
86 +--- a/waftools/unittest.py
87 ++++ b/waftools/unittest.py
88 +@@ -147,5 +147,6 @@
89 + def configure(conf):
90 + conf.load("waf_unit_test")
91 +- conf.find_program("valgrind", var="VALGRIND", mandatory=False)
92 ++ if conf.options.enable_valgrind is True:
93 ++ conf.find_program("valgrind", var="VALGRIND", mandatory=False)
94 + conf.find_program("lcov", var="LCOV", mandatory=False)
95 + conf.find_program("genhtml", var="GENHTML", mandatory=False)
96 +--- a/wscript
97 ++++ b/wscript
98 +@@ -624,4 +624,8 @@
99 + opt.add_option('--without-ldconfig', action='store_false',
100 + dest='ldconfig', help="Don't run ldconfig after install")
101 ++ opt.add_option('--with-valgrind', action='store_true', default=None,
102 ++ dest='enable_valgrind', help="Run testsuite under valgrind (if present).")
103 ++ opt.add_option('--without-valgrind', action='store_false', default=None,
104 ++ dest='enable_valgrind', help="Don't run testsuite under valgrind.")
105 +
106 + opt.recurse("src/xmms")
107
108 diff --git a/media-sound/xmms2/xmms2-0.9.1.ebuild b/media-sound/xmms2/xmms2-0.9.1.ebuild
109 new file mode 100644
110 index 000000000000..3352a282436e
111 --- /dev/null
112 +++ b/media-sound/xmms2/xmms2-0.9.1.ebuild
113 @@ -0,0 +1,224 @@
114 +# Copyright 1999-2022 Gentoo Authors
115 +# Distributed under the terms of the GNU General Public License v2
116 +
117 +EAPI=8
118 +
119 +PYTHON_COMPAT=( python3_{8..10} )
120 +inherit multiprocessing optfeature perl-functions python-single-r1 toolchain-funcs
121 +
122 +DESCRIPTION="X(cross)platform Music Multiplexing System, next generation of the XMMS player"
123 +HOMEPAGE="https://github.com/XMMS2"
124 +SRC_URI="https://github.com/xmms2/xmms2-devel/releases/download/${PV}/${P}.tar.bz2"
125 +
126 +LICENSE="GPL-2+ LGPL-2.1+"
127 +SLOT="0"
128 +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~riscv ~x86"
129 +
130 +# IUSE static map to be passed to --with-{optionals,plugins}=opt1,opt2,...
131 +# flag:opt = `usev flag opt`, opt = `usev opt`, :opt = `echo opt`
132 +# (if have a use for some of these disabled features, please fill a bug)
133 +XMMS2_OPTIONALS=(
134 + cxx:xmmsclient++,xmmsclient++-glib :launcher mlib-update:medialib-updater
135 + :nycli perl :pixmaps python server:s4 test:tests
136 + # disabled: et,mdns,migrate-collections,ruby,sqlite2s4,vistest,xmmsclient-cf,xmmsclient-ecore
137 +)
138 +XMMS2_PLUGINS=(
139 + aac:faad airplay alsa ao :asx cdda :cue curl :diskwrite :equalizer
140 + ffmpeg:apefile,asf,avcodec,flv,tta :file flac fluidsynth:fluidsynth,mid1,midsquash
141 + gme :html ices :icymetaint :id3v2 jack :karaoke :m3u mac +mad mms modplug
142 + mp3:mpg123 :mp4 musepack :normalize :null :nulstripper ofa opus oss :pls
143 + pulseaudio:pulse :replaygain samba sid sndfile speex tremor vocoder +vorbis
144 + :wave wavpack :xml xml:rss,xspf zeroconf:daap
145 + # disabled: coreaudio,gvfs,nms,sc68,sun,waveout
146 +)
147 +
148 +IUSE="
149 + ${XMMS2_OPTIONALS[@]%:*}
150 + ${XMMS2_PLUGINS[@]%:*}
151 + +server valgrind"
152 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
153 +RESTRICT="!test? ( test ) !server? ( test )"
154 +
155 +COMMON_DEPEND="
156 + dev-libs/glib:2
157 + sys-libs/readline:=
158 + server? (
159 + aac? ( media-libs/faad2 )
160 + airplay? ( dev-libs/openssl:= )
161 + alsa? ( media-libs/alsa-lib )
162 + ao? ( media-libs/libao )
163 + cdda? (
164 + dev-libs/libcdio-paranoia:=
165 + dev-libs/libcdio:=
166 + media-libs/libdiscid
167 + )
168 + curl? ( net-misc/curl )
169 + ffmpeg? ( media-video/ffmpeg:= )
170 + flac? ( media-libs/flac )
171 + fluidsynth? ( media-sound/fluidsynth:= )
172 + gme? ( media-libs/game-music-emu )
173 + ices? (
174 + media-libs/libogg
175 + media-libs/libshout
176 + media-libs/libvorbis
177 + )
178 + jack? ( virtual/jack )
179 + mac? ( media-sound/mac )
180 + mad? ( media-libs/libmad )
181 + mms? (
182 + media-libs/libmms
183 + media-video/ffmpeg:=
184 + )
185 + modplug? ( media-libs/libmodplug )
186 + mp3? ( media-sound/mpg123 )
187 + musepack? ( media-sound/musepack-tools )
188 + ofa? (
189 + dev-libs/expat
190 + media-libs/libofa
191 + sci-libs/fftw:3.0=
192 + )
193 + opus? (
194 + media-libs/libogg
195 + media-libs/opus
196 + media-libs/opusfile
197 + )
198 + pulseaudio? ( || ( media-libs/libpulse media-sound/pulseaudio ) )
199 + samba? ( net-fs/samba )
200 + sid? ( media-libs/libsidplay:2 )
201 + sndfile? ( media-libs/libsndfile )
202 + speex? (
203 + media-libs/libogg
204 + media-libs/speex
205 + )
206 + tremor? ( media-libs/tremor )
207 + vocoder? (
208 + media-libs/libsamplerate
209 + sci-libs/fftw:3.0=
210 + )
211 + vorbis? ( media-libs/libvorbis )
212 + wavpack? ( media-sound/wavpack )
213 + xml? ( dev-libs/libxml2 )
214 + zeroconf? (
215 + net-dns/avahi[mdnsresponder-compat]
216 + net-misc/curl
217 + )
218 + )"
219 +RDEPEND="
220 + ${COMMON_DEPEND}
221 + perl? (
222 + dev-lang/perl
223 + dev-perl/glib-perl
224 + virtual/perl-Carp
225 + virtual/perl-IO
226 + virtual/perl-Scalar-List-Utils
227 + )
228 + python? (
229 + ${PYTHON_DEPS}
230 + $(python_gen_cond_dep 'dev-python/pygobject[${PYTHON_USEDEP}]')
231 + )"
232 +DEPEND="
233 + ${COMMON_DEPEND}
234 + cxx? ( dev-libs/boost )
235 + test? ( dev-util/cunit )"
236 +BDEPEND="
237 + ${PYTHON_DEPS}
238 + virtual/pkgconfig
239 + perl? ( dev-perl/Pod-Parser )
240 + python? ( $(python_gen_cond_dep 'dev-python/cython[${PYTHON_USEDEP}]') )
241 + test? ( valgrind? ( dev-util/valgrind ) )"
242 +
243 +PATCHES=(
244 + "${FILESDIR}"/${PN}-0.9.1-cpp-client.patch
245 + "${FILESDIR}"/${PN}-0.9.1-faad.patch
246 + "${FILESDIR}"/${PN}-0.9.1-rtvg.patch
247 +)
248 +
249 +src_prepare() {
250 + default
251 +
252 + # meant to be configured, but give a default for out-of-the-box midi
253 + sed -e "s|/path/to/.*sf2|${EPREFIX}/usr/share/sounds/sf2/FluidR3_GM.sf2|" \
254 + -i src/plugins/fluidsynth/fluidsynth.c || die
255 +}
256 +
257 +src_configure() {
258 + local waf=(
259 + ./waf configure
260 + --prefix="${EPREFIX}"/usr
261 + --libdir="${EPREFIX}"/usr/$(get_libdir)
262 + --boost-includes="${ESYSROOT}"/usr/include # needed for prefix
263 + --with-target-platform="${CHOST}"
264 + )
265 +
266 + xmms2_flag() {
267 + local IFS=:
268 + set -- ${1#+}
269 +
270 + if [[ ${1} ]]; then
271 + usev ${1} ,${2:-${1}}
272 + else
273 + echo ,${2}
274 + fi
275 + }
276 +
277 + local flag optionals plugins
278 +
279 + if use server; then
280 + for flag in "${XMMS2_PLUGINS[@]}"; do
281 + plugins+=$(xmms2_flag ${flag})
282 + done
283 + else
284 + waf+=( --without-xmms2d )
285 + fi
286 +
287 + for flag in "${XMMS2_OPTIONALS[@]}"; do
288 + optionals+=$(xmms2_flag ${flag})
289 + done
290 +
291 + waf+=(
292 + # pass even if empty to avoid automagic
293 + --with-optionals=${optionals:1}
294 + --with-plugins=${plugins:1}
295 + )
296 +
297 + if use perl; then
298 + perl_set_version
299 + waf+=( --with-perl-archdir="${ARCH_LIB}" )
300 + fi
301 +
302 + if use valgrind; then
303 + if valgrind true &>/dev/null; then
304 + waf+=( --with-valgrind )
305 + else
306 + ewarn "valgrind was disabled due to failing a basic sanity check" #807271
307 + fi
308 + fi
309 +
310 + tc-export AR CC CXX
311 +
312 + echo "${waf[*]}"
313 + "${waf[@]}" || die
314 +}
315 +
316 +src_compile() {
317 + ./waf build -j$(makeopts_jobs) --verbose --notests || die
318 +}
319 +
320 +src_test() {
321 + ./waf --alltests || die
322 +}
323 +
324 +src_install() {
325 + ./waf install --destdir="${D}" --without-ldconfig --notests || die
326 +
327 + dodoc AUTHORS README.mdown *.ChangeLog
328 +
329 + use python && python_optimize
330 +
331 + # to avoid editing waftools/man.py (use find given not always installed)
332 + find "${ED}" -name '*.gz' -exec gzip -d {} + || die
333 +}
334 +
335 +pkg_postinst() {
336 + use fluidsynth && optfeature "the default MIDI soundfont" media-sound/fluid-soundfont
337 +}