Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/mpd/
Date: Fri, 15 Nov 2019 13:13:12
Message-Id: 1573823522.4e215a8a40060eedddf7fb1c9a06612054420c52.zlogene@gentoo
1 commit: 4e215a8a40060eedddf7fb1c9a06612054420c52
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Fri Nov 15 13:12:02 2019 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Fri Nov 15 13:12:02 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e215a8a
7
8 media-sound/mpd: fix tidal support, migrate to acct-user
9
10 Package-Manager: Portage-2.3.76, Repoman-2.3.16
11 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
12
13 media-sound/mpd/mpd-0.21.16-r1 | 300 +++++++++++++++++++++++++++++++++++++++++
14 1 file changed, 300 insertions(+)
15
16 diff --git a/media-sound/mpd/mpd-0.21.16-r1 b/media-sound/mpd/mpd-0.21.16-r1
17 new file mode 100644
18 index 00000000000..e2533be2192
19 --- /dev/null
20 +++ b/media-sound/mpd/mpd-0.21.16-r1
21 @@ -0,0 +1,300 @@
22 +# Copyright 1999-2019 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=7
26 +
27 +inherit flag-o-matic linux-info meson systemd user xdg-utils
28 +
29 +DESCRIPTION="The Music Player Daemon (mpd)"
30 +HOMEPAGE="https://www.musicpd.org https://github.com/MusicPlayerDaemon/MPD"
31 +SRC_URI="https://www.musicpd.org/download/${PN}/${PV%.*}/${P}.tar.xz"
32 +
33 +LICENSE="GPL-2"
34 +SLOT="0"
35 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sh ~x86 ~x64-macos"
36 +IUSE="adplug +alsa ao audiofile bzip2 cdio chromaprint +cue +curl +dbus debug
37 + +eventfd expat faad +ffmpeg +fifo flac fluidsynth gme +icu +id3tag +inotify
38 + +ipv6 jack lame libav libmpdclient libsamplerate libsoxr +mad mikmod mms
39 + modplug mpg123 musepack +network nfs openal opus oss pipe pulseaudio qobuz
40 + recorder samba selinux sid signalfd sndfile soundcloud sqlite systemd
41 + test tidal twolame udisks unicode vorbis wavpack webdav wildmidi upnp
42 + zeroconf zip zlib"
43 +
44 +OUTPUT_PLUGINS="alsa ao fifo jack network openal oss pipe pulseaudio recorder"
45 +DECODER_PLUGINS="adplug audiofile faad ffmpeg flac fluidsynth mad mikmod
46 + modplug mpg123 musepack flac sid vorbis wavpack wildmidi"
47 +ENCODER_PLUGINS="audiofile flac lame twolame vorbis"
48 +
49 +REQUIRED_USE="
50 + || ( ${OUTPUT_PLUGINS} )
51 + || ( ${DECODER_PLUGINS} )
52 + network? ( || ( ${ENCODER_PLUGINS} ) )
53 + recorder? ( || ( ${ENCODER_PLUGINS} ) )
54 + upnp? ( expat )
55 + webdav? ( curl expat )
56 + "
57 +
58 +RESTRICT="!test? ( test )"
59 +
60 +RDEPEND="
61 + acct-user/mpd
62 + adplug? ( media-libs/adplug:= )
63 + alsa? (
64 + media-libs/alsa-lib
65 + media-sound/alsa-utils
66 + )
67 +
68 + ao? ( media-libs/libao[alsa?,pulseaudio?] )
69 + audiofile? ( media-libs/audiofile:= )
70 +
71 + cdio? (
72 + dev-libs/libcdio:=
73 + dev-libs/libcdio-paranoia
74 + )
75 +
76 + chromaprint? ( media-libs/chromaprint )
77 + curl? ( net-misc/curl )
78 + dbus? ( sys-apps/dbus )
79 + expat? ( dev-libs/expat )
80 + faad? ( media-libs/faad2 )
81 +
82 + ffmpeg? (
83 + libav? ( media-video/libav:0= )
84 + !libav? ( media-video/ffmpeg:0= )
85 + )
86 +
87 + flac? ( media-libs/flac )
88 + fluidsynth? ( media-sound/fluidsynth )
89 + gme? ( >=media-libs/game-music-emu-0.6.0_pre20120802 )
90 + icu? ( dev-libs/icu:= )
91 + id3tag? ( media-libs/libid3tag )
92 + jack? ( virtual/jack )
93 + lame? ( network? ( media-sound/lame ) )
94 + libmpdclient? ( media-libs/libmpdclient )
95 + libsamplerate? ( media-libs/libsamplerate )
96 + libsoxr? ( media-libs/soxr )
97 + mad? ( media-libs/libmad )
98 + mikmod? ( media-libs/libmikmod )
99 + mms? ( media-libs/libmms )
100 + modplug? ( media-libs/libmodplug )
101 + mpg123? ( media-sound/mpg123 )
102 + musepack? ( media-sound/musepack-tools )
103 + network? ( media-libs/libshout )
104 + nfs? ( net-fs/libnfs )
105 + openal? ( media-libs/openal )
106 + opus? ( media-libs/opus )
107 + pulseaudio? ( media-sound/pulseaudio )
108 + qobuz? ( dev-libs/libgcrypt:0 )
109 + samba? ( net-fs/samba )
110 + selinux? ( sec-policy/selinux-mpd )
111 + sid? ( || (
112 + media-libs/libsidplay:2
113 + media-libs/libsidplayfp
114 + ) )
115 + sndfile? ( media-libs/libsndfile )
116 + soundcloud? ( >=dev-libs/yajl-2:= )
117 + sqlite? ( dev-db/sqlite:3 )
118 + systemd? ( sys-apps/systemd )
119 + tidal? ( dev-libs/yajl
120 + net-misc/curl )
121 + twolame? ( media-sound/twolame )
122 + udisks? ( sys-fs/udisks:2 )
123 + upnp? ( net-libs/libupnp:0 )
124 + vorbis? ( media-libs/libvorbis )
125 + wavpack? ( media-sound/wavpack )
126 + wildmidi? ( media-sound/wildmidi )
127 + zeroconf? ( net-dns/avahi[dbus] )
128 + zip? ( dev-libs/zziplib )
129 + zlib? ( sys-libs/zlib:= )"
130 +
131 +DEPEND="${RDEPEND}
132 + >=dev-libs/boost-1.58:=
133 + test? ( dev-cpp/gtest )"
134 +
135 +BDEPEND=">=dev-util/meson-0.49.2
136 + virtual/pkgconfig"
137 +
138 +PATCHES=(
139 + "${FILESDIR}"/${PN}-0.18.conf.patch
140 +)
141 +
142 +pkg_setup() {
143 + enewuser mpd "" "" "/var/lib/mpd" audio
144 +
145 + if use eventfd; then
146 + CONFIG_CHECK+=" ~EVENTFD"
147 + ERROR_EVENTFD="${P} requires eventfd in-kernel support."
148 + fi
149 +
150 + if use signalfd; then
151 + CONFIG_CHECK+=" ~SIGNALFD"
152 + ERROR_SIGNALFD="${P} requires signalfd in-kernel support."
153 + fi
154 +
155 + if use inotify; then
156 + CONFIG_CHECK+=" ~INOTIFY_USER"
157 + ERROR_INOTIFY_USER="${P} requires inotify in-kernel support."
158 + fi
159 +
160 + if use eventfd || use signalfd || use inotify; then
161 + linux-info_pkg_setup
162 + fi
163 +
164 + elog "If you will be starting mpd via /etc/init.d/mpd, please make
165 + sure that MPD's pid_file is _set_."
166 +}
167 +
168 +src_prepare() {
169 + cp -f doc/mpdconf.example doc/mpdconf.dist || die "cp failed"
170 + default
171 +}
172 +
173 +src_configure() {
174 + local emesonargs=(
175 + -Dbzip2=$(usex bzip2 enabled disabled)
176 + -Dcdio_paranoia=$(usex cdio enabled disabled)
177 + -Dchromaprint=$(usex chromaprint enabled disabled)
178 + -Dcue=$(usex cue true false)
179 + -Dcurl=$(usex curl enabled disabled)
180 + -Ddbus=$(usex dbus enabled disabled)
181 + -Ddebug=$(usex debug true false)
182 + -Deventfd=$(usex eventfd true false)
183 + -Dexpat=$(usex expat enabled disabled)
184 + -Dicu=$(usex icu enabled disabled)
185 + -Did3tag=$(usex id3tag enabled disabled)
186 + -Dinotify=$(usex inotify true false)
187 + -Dipv6=$(usex ipv6 enabled disabled)
188 + -Diso9660=$(usex cdio enabled disabled)
189 + -Dlibmpdclient=$(usex libmpdclient enabled disabled)
190 + -Dlibsamplerate=$(usex libsamplerate enabled disabled)
191 + -Dmms=$(usex mms enabled disabled)
192 + -Dnfs=$(usex nfs enabled disabled)
193 + -Dsignalfd=$(usex signalfd true false)
194 + -Dsmbclient=$(usex samba enabled disabled)
195 + -Dsoxr=$(usex libsoxr enabled disabled)
196 + -Dsqlite=$(usex sqlite enabled disabled)
197 + -Dsystemd=$(usex systemd enabled disabled)
198 + -Dtest=$(usex test true false)
199 + -Dudisks=$(usex udisks enabled disabled)
200 + -Dupnp=$(usex upnp enabled disabled)
201 + -Dwebdav=$(usex webdav enabled disabled)
202 + -Dzeroconf=$(usex zeroconf avahi disabled)
203 + -Dzlib=$(usex zlib enabled disabled)
204 + -Dzzip=$(usex zip enabled disabled)
205 + )
206 +
207 + emesonargs+=(
208 + -Dalsa=$(usex alsa enabled disabled)
209 + -Dao=$(usex ao enabled disabled)
210 + -Dfifo=$(usex fifo true false)
211 + -Djack=$(usex jack enabled disabled)
212 + -Dopenal=$(usex openal enabled disabled)
213 + -Doss=$(usex oss enabled disabled)
214 + -Dpipe=$(usex pipe true false)
215 + -Dpulse=$(usex pulseaudio enabled disabled)
216 + -Drecorder=$(usex recorder true false)
217 + )
218 +
219 + if use samba || use upnp; then
220 + emesonargs+=( -Dneighbor=true )
221 + fi
222 +
223 + append-lfs-flags
224 + append-ldflags "-L/usr/$(get_libdir)/sidplay/builders"
225 +
226 + if use network; then
227 +
228 + emesonargs+=(
229 + -Dshine=disabled
230 + -Dshout=enabled
231 + -Dvorbisenc=$(usex vorbis enabled disabled)
232 + -Dhttpd=true
233 + -Dlame=$(usex lame enabled disabled)
234 + -Dtwolame=$(usex twolame enabled disabled)
235 + -Dwave_encoder=$(usex audiofile true false)
236 + )
237 + fi
238 +
239 + emesonargs+=(
240 + -Dadplug=$(usex adplug enabled disabled)
241 + -Daudiofile=$(usex audiofile enabled disabled)
242 + -Dfaad=$(usex faad enabled disabled)
243 + -Dffmpeg=$(usex ffmpeg enabled disabled)
244 + -Dflac=$(usex flac enabled disabled)
245 + -Dfluidsynth=$(usex fluidsynth enabled disabled)
246 + -Dgme=$(usex gme enabled disabled)
247 + -Dmad=$(usex mad enabled disabled)
248 + -Dmikmod=$(usex mikmod enabled disabled)
249 + -Dmodplug=$(usex modplug enabled disabled)
250 + -Dmpcdec=$(usex musepack enabled disabled)
251 + -Dmpg123=$(usex mpg123 enabled disabled)
252 + -Dopus=$(usex opus enabled disabled)
253 + -Dsidplay=$(usex sid enabled disabled)
254 + -Dsndfile=$(usex sndfile enabled disabled)
255 + -Dvorbis=$(usex vorbis enabled disabled)
256 + -Dwavpack=$(usex wavpack enabled disabled)
257 + -Dwildmidi=$(usex wildmidi enabled disabled)
258 +
259 + )
260 +
261 + emesonargs+=(
262 + -Dqobuz=$(usex qobuz enabled disabled)
263 + -Dsoundcloud=$(usex soundcloud enabled disabled)
264 + -Dtidal=$(usex tidal enabled disabled)
265 + )
266 +
267 + emesonargs+=(
268 + --libdir="/usr/$(get_libdir)"
269 + -Ddocumentation=false
270 + -Dsndio=disabled #not yet in the tree
271 + -Dsolaris_output=disabled
272 +
273 + -Ddatabase=true
274 + -Ddsd=true
275 + -Dtcp=true
276 +
277 + -Dsystemd_system_unit_dir="$(systemd_get_systemunitdir)"
278 + -Dsystemd_user_unit_dir="$(systemd_get_userunitdir)"
279 + )
280 +
281 + if use icu; then
282 + emesonargs+=( -Diconv=enabled )
283 + else
284 + emesonargs+=( -Diconv=disabled )
285 + fi
286 +
287 + meson_src_configure
288 +}
289 +
290 +src_install() {
291 + meson_src_install
292 +
293 + insinto /etc
294 + newins doc/mpdconf.dist mpd.conf
295 +
296 + insinto /etc/logrotate.d
297 + newins "${FILESDIR}"/${PN}-0.21.1.logrotate ${PN}
298 +
299 + newinitd "${FILESDIR}"/${PN}-0.21.4.init ${PN}
300 +
301 + if use unicode; then
302 + sed -i -e 's:^#filesystem_charset.*$:filesystem_charset "UTF-8":' \
303 + "${ED}"/etc/mpd.conf || die "sed failed"
304 + fi
305 +
306 + doman doc/mpd.1
307 + doman doc/mpd.conf.5
308 +
309 + keepdir /var/lib/mpd
310 + keepdir /var/lib/mpd/music
311 + keepdir /var/lib/mpd/playlists
312 +
313 +}
314 +
315 +pkg_postinst() {
316 + xdg_icon_cache_update
317 +}
318 +
319 +pkg_postrm() {
320 + xdg_icon_cache_update
321 +}