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