From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 59F20138239 for ; Tue, 28 Jan 2020 18:59:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9289DE082F; Tue, 28 Jan 2020 18:59:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5C610E082F for ; Tue, 28 Jan 2020 18:59:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2532234E39A for ; Tue, 28 Jan 2020 18:59:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B1EB417 for ; Tue, 28 Jan 2020 18:59:14 +0000 (UTC) From: "Jory Pratt" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jory Pratt" Message-ID: <1580237945.93b557ed9b9d5df5776002249a1ca78dd95d1ebf.anarchy@gentoo> Subject: [gentoo-commits] proj/musl:master commit in: media-sound/mpd/, media-sound/mpd/files/ X-VCS-Repository: proj/musl X-VCS-Files: media-sound/mpd/Manifest media-sound/mpd/files/fix-mpd-stacksize.patch media-sound/mpd/files/mpd-0.20.4.init media-sound/mpd/files/mpd-0.20.4.logrotate media-sound/mpd/files/mpd-0.21.1.logrotate media-sound/mpd/files/mpd-0.21.18-fix-stacksize.patch media-sound/mpd/files/mpd-0.21.4.init media-sound/mpd/metadata.xml media-sound/mpd/mpd-0.20.10.ebuild media-sound/mpd/mpd-0.21.18-r1.ebuild X-VCS-Directories: media-sound/mpd/ media-sound/mpd/files/ X-VCS-Committer: anarchy X-VCS-Committer-Name: Jory Pratt X-VCS-Revision: 93b557ed9b9d5df5776002249a1ca78dd95d1ebf X-VCS-Branch: master Date: Tue, 28 Jan 2020 18:59:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1aa4b169-b3b8-4281-9403-dbe2ddd6b207 X-Archives-Hash: 85ee84ae4d19c1515a8ea746e7b627a7 commit: 93b557ed9b9d5df5776002249a1ca78dd95d1ebf Author: Jory Pratt gentoo org> AuthorDate: Tue Jan 28 18:59:05 2020 +0000 Commit: Jory Pratt gentoo org> CommitDate: Tue Jan 28 18:59:05 2020 +0000 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=93b557ed media-sound/mpd: Update for stable, fix stacksize patch Package-Manager: Portage-2.3.86, Repoman-2.3.20 Signed-off-by: Jory Pratt gentoo.org> media-sound/mpd/Manifest | 2 +- media-sound/mpd/files/fix-mpd-stacksize.patch | 19 -- media-sound/mpd/files/mpd-0.20.4.logrotate | 6 - media-sound/mpd/files/mpd-0.21.1.logrotate | 9 + .../mpd/files/mpd-0.21.18-fix-stacksize.patch | 31 +++ .../mpd/files/{mpd-0.20.4.init => mpd-0.21.4.init} | 10 +- media-sound/mpd/metadata.xml | 67 ++--- media-sound/mpd/mpd-0.20.10.ebuild | 263 ------------------ media-sound/mpd/mpd-0.21.18-r1.ebuild | 299 +++++++++++++++++++++ 9 files changed, 379 insertions(+), 327 deletions(-) diff --git a/media-sound/mpd/Manifest b/media-sound/mpd/Manifest index f6e5dde..cc39c32 100644 --- a/media-sound/mpd/Manifest +++ b/media-sound/mpd/Manifest @@ -1 +1 @@ -DIST mpd-0.20.10.tar.xz 778828 BLAKE2B c16b955ace770cf3d5da2ccad81fd3089cf2e60bf47774745d75babcff38fa344646b26dd32617fa2fe86ee0c785b9c8272ea6c90f77266b1a0cba2d48145236 SHA512 bac6a71e5b85600c590eae6b785474574cf0d7b03d9add537161b968a2997a975a597639a9fece119a01a7e27b5207523e4ae30b2f4f35791eff8c3ff26d107c +DIST mpd-0.21.18.tar.xz 676084 BLAKE2B f55ea278da4b50bf24da476ed9e3ff50a8130215702fb5c4a0accdbfeb00ed734983034ce6ee0542623e42d488555b1c709acefbba026f0e01f17f25f749b833 SHA512 68b4d9dc4be8454d7ef92df2a7b42513dc2d97bfd6b11ba99bce6709fc58ccbeab05419863bacb7a3427f1325bc88da74f9f4b48206222349085f02d0135e1a8 diff --git a/media-sound/mpd/files/fix-mpd-stacksize.patch b/media-sound/mpd/files/fix-mpd-stacksize.patch deleted file mode 100644 index 26d6f78..0000000 --- a/media-sound/mpd/files/fix-mpd-stacksize.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/src/thread/Thread.cxx b/src/thread/Thread.cxx -index 2932d47..fd1f3ce 100644 ---- a/src/thread/Thread.cxx -+++ b/src/thread/Thread.cxx -@@ -43,8 +43,12 @@ Thread::Start(void (*_f)(void *ctx), void *_ctx, Error &error) - #ifndef NDEBUG - creating = true; - #endif -- -- int e = pthread_create(&handle, nullptr, ThreadProc, this); -+ pthread_attr_t attr, *attrptr = nullptr; -+ if ((pthread_attr_init(&attr) == 0) -+ && (pthread_attr_setstacksize(&attr, 1024*1024) == 0)) { -+ attrptr = &attr; -+ } -+ int e = pthread_create(&handle, attrptr, ThreadProc, this); - - if (e != 0) { - #ifndef NDEBUG diff --git a/media-sound/mpd/files/mpd-0.20.4.logrotate b/media-sound/mpd/files/mpd-0.20.4.logrotate deleted file mode 100644 index ff47d10..0000000 --- a/media-sound/mpd/files/mpd-0.20.4.logrotate +++ /dev/null @@ -1,6 +0,0 @@ -/var/lib/mpd/log { - missingok - postrotate - /etc/init.d/mpd reload - endscript -} diff --git a/media-sound/mpd/files/mpd-0.21.1.logrotate b/media-sound/mpd/files/mpd-0.21.1.logrotate new file mode 100644 index 0000000..597c4fb --- /dev/null +++ b/media-sound/mpd/files/mpd-0.21.1.logrotate @@ -0,0 +1,9 @@ +/var/lib/mpd/log { + missingok + weekly + delaycompress + compress + postrotate + /etc/init.d/mpd --quiet reload + endscript +} diff --git a/media-sound/mpd/files/mpd-0.21.18-fix-stacksize.patch b/media-sound/mpd/files/mpd-0.21.18-fix-stacksize.patch new file mode 100644 index 0000000..c57803b --- /dev/null +++ b/media-sound/mpd/files/mpd-0.21.18-fix-stacksize.patch @@ -0,0 +1,31 @@ +From 8671aa5b12fd6b857ee24cf8aa55275d283d9014 Mon Sep 17 00:00:00 2001 +From: Jory Pratt +Date: Tue, 28 Jan 2020 12:55:14 -0600 +Subject: [PATCH] Fix stacksize on musl + +--- + src/thread/Thread.cxx | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/thread/Thread.cxx b/src/thread/Thread.cxx +index bb498fd..da65d52 100644 +--- a/src/thread/Thread.cxx ++++ b/src/thread/Thread.cxx +@@ -34,8 +34,12 @@ Thread::Start() + if (handle == nullptr) + throw MakeLastError("Failed to create thread"); + #else +- int e = pthread_create(&handle, nullptr, ThreadProc, this); +- ++ pthread_attr_t attr, *attrptr = nullptr; ++ if ((pthread_attr_init(&attr) == 0) ++ && (pthread_attr_setstacksize(&attr, 1024*1024) == 0)) { ++ attrptr = &attr; ++ } ++ int e = pthread_create(&handle, attrptr, ThreadProc, this); + if (e != 0) + throw MakeErrno(e, "Failed to create thread"); + #endif +-- +2.25.0 + diff --git a/media-sound/mpd/files/mpd-0.20.4.init b/media-sound/mpd/files/mpd-0.21.4.init similarity index 78% rename from media-sound/mpd/files/mpd-0.20.4.init rename to media-sound/mpd/files/mpd-0.21.4.init index 0a4c616..6af55c1 100644 --- a/media-sound/mpd/files/mpd-0.20.4.init +++ b/media-sound/mpd/files/mpd-0.21.4.init @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 : CFGFILE=${CFGFILE:=/etc/mpd.conf} @@ -26,7 +26,7 @@ pidfile=$(get_config pid_file) description="Music Player Daemon" reload() { - ebegin "Reloading ${SVCNAME}" - kill -HUP `cat ${pidfile}` - eend $? -} + ebegin "Reloading ${RC_SVCNAME}" + start-stop-daemon --pidfile ${pidfile} --signal HUP + eend $? + } diff --git a/media-sound/mpd/metadata.xml b/media-sound/mpd/metadata.xml index 23086d3..621b406 100644 --- a/media-sound/mpd/metadata.xml +++ b/media-sound/mpd/metadata.xml @@ -2,40 +2,41 @@ - hwoarang@gentoo.org - Markos Chandras - - - sound@gentoo.org - Gentoo Sound project + zlogene@gentoo.org + Mikle Kolyada - Enable the AdPlug decoder plugin - Use libcdio for ISO9660 parsing support - Support for web stream listening - Use the eventfd function in MPD's event loop - Use external faad library for AAC decoding - Support writing audio to a FIFO - Enables Fluidsynth MIDI software synthesis (discouraged) - Enables support for media-libs/game-music-emu for playing various video game music formats. - Support for ID3 tags - Use the Linux kernel inotify subsystem to notice changes to mpd music library - Support for MP3 streaming via Icecast2 - Enable support for remote mpd databases - Enable the libsoxr resampler - Enable support for mp3 decoding over media-sound/mpg123 - Enables network streaming support - Enable support for the Network File System - Enable Opus codec support - Support writing audio to a pipe - Enables output plugin for recording radio streams - Build with SID (Commodore 64 Audio) support - Use the signalfd function in MPD's event loop - Build plugin to access soundcloud - Enable support for systemd socket activation - Support twolame MPEG-2 encoding - Enable using music from a WebDAV share - Enable MIDI support via wildmidi - Support for ZIP files + Use libcdio for ISO9660 parsing support + Enable ChromaPrint / AcoustID support + Enable CUE sheet support + Support for web stream listening + Use the eventfd function in MPD's event loop + Use external faad library for AAC decoding + Support writing audio to a FIFO + Enables Fluidsynth MIDI software synthesis (discouraged) + Enables support for media-libs/game-music-emu for playing various video game music formats. + Support for ID3 tags + Use the Linux kernel inotify subsystem to notice changes to mpd music library + Support for MP3 streaming via Icecast2 + Enable support for remote mpd databases + Enable the libsoxr resampler + Enable support for mp3 decoding over media-sound/mpg123 + Enables network streaming support + Enable support for the Network File System + Support writing audio to a pipe + Build plugin to access qobuz + Enables output plugin for recording radio streams + Build with SID (Commodore 64 Audio) support + Use the signalfd function in MPD's event loop + Build plugin to access soundcloud + Build plugin to access tidal + Enable support for systemd socket activation + Support twolame MPEG-2 encoding + Enable using music from a WebDAV share + Enable MIDI support via wildmidi + + MusicPlayerDaemon/MPD + https://github.com/MusicPlayerDaemon/MPD/issues + diff --git a/media-sound/mpd/mpd-0.20.10.ebuild b/media-sound/mpd/mpd-0.20.10.ebuild deleted file mode 100644 index 678f54b..0000000 --- a/media-sound/mpd/mpd-0.20.10.ebuild +++ /dev/null @@ -1,263 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit autotools flag-o-matic linux-info systemd user - -DESCRIPTION="The Music Player Daemon (mpd)" -HOMEPAGE="https://www.musicpd.org https://github.com/MusicPlayerDaemon/MPD" -SRC_URI="https://www.musicpd.org/download/${PN}/${PV%.*}/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 ~arm ~arm64 hppa ppc ppc64 ~sh x86 ~x64-macos" -IUSE="adplug +alsa ao audiofile bzip2 cdio +curl debug +eventfd expat faad - +fifo +ffmpeg flac fluidsynth gme +icu +id3tag +inotify +ipv6 jack - lame mms libav libmpdclient libsamplerate libsoxr +mad mikmod modplug - mpg123 musepack +network nfs ogg openal opus oss pipe pulseaudio recorder - samba selinux sid +signalfd sndfile soundcloud sqlite systemd tcpd twolame - unicode upnp vorbis wavpack wildmidi zeroconf zip zlib webdav" - -OUTPUT_PLUGINS="alsa ao fifo jack network openal oss pipe pulseaudio recorder" -DECODER_PLUGINS="adplug audiofile faad ffmpeg flac fluidsynth mad mikmod - modplug mpg123 musepack ogg flac sid vorbis wavpack wildmidi" -ENCODER_PLUGINS="audiofile flac lame twolame vorbis" - -REQUIRED_USE=" - || ( ${OUTPUT_PLUGINS} ) - || ( ${DECODER_PLUGINS} ) - network? ( || ( ${ENCODER_PLUGINS} ) ) - recorder? ( || ( ${ENCODER_PLUGINS} ) ) - opus? ( ogg ) - upnp? ( expat ) - webdav? ( curl expat ) -" - -CDEPEND="!=media-libs/game-music-emu-0.6.0_pre20120802 ) - icu? ( dev-libs/icu:= ) - id3tag? ( media-libs/libid3tag ) - jack? ( virtual/jack ) - lame? ( network? ( media-sound/lame ) ) - libmpdclient? ( media-libs/libmpdclient ) - libsamplerate? ( media-libs/libsamplerate ) - libsoxr? ( media-libs/soxr ) - mad? ( media-libs/libmad ) - mikmod? ( media-libs/libmikmod:0 ) - mms? ( media-libs/libmms ) - modplug? ( media-libs/libmodplug ) - mpg123? ( >=media-sound/mpg123-1.12.2 ) - musepack? ( media-sound/musepack-tools ) - network? ( - >=media-libs/libshout-2 - !lame? ( !vorbis? ( media-libs/libvorbis ) ) - ) - nfs? ( net-fs/libnfs ) - ogg? ( media-libs/libogg ) - openal? ( media-libs/openal ) - opus? ( media-libs/opus ) - pulseaudio? ( media-sound/pulseaudio ) - samba? ( >=net-fs/samba-4.0.25 ) - sid? ( || ( media-libs/libsidplay:2 media-libs/libsidplayfp ) ) - sndfile? ( media-libs/libsndfile ) - soundcloud? ( >=dev-libs/yajl-2:= ) - sqlite? ( dev-db/sqlite:3 ) - systemd? ( sys-apps/systemd ) - tcpd? ( sys-apps/tcp-wrappers ) - twolame? ( media-sound/twolame ) - upnp? ( net-libs/libupnp:= ) - vorbis? ( media-libs/libvorbis ) - wavpack? ( media-sound/wavpack ) - wildmidi? ( media-sound/wildmidi ) - zeroconf? ( net-dns/avahi[dbus] ) - zip? ( dev-libs/zziplib ) - zlib? ( sys-libs/zlib )" -DEPEND="${CDEPEND} - dev-libs/boost - virtual/pkgconfig" -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-mpd ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-0.18.conf.patch - "${FILESDIR}"/fix-mpd-stacksize.patch -) - -pkg_setup() { - use network || ewarn "Icecast and Shoutcast streaming needs networking." - use fluidsynth && ewarn "Using fluidsynth is discouraged by upstream." - - enewuser mpd "" "" "/var/lib/mpd" audio - - if use eventfd; then - CONFIG_CHECK+=" ~EVENTFD" - ERROR_EVENTFD="${P} requires eventfd in-kernel support." - fi - if use signalfd; then - CONFIG_CHECK+=" ~SIGNALFD" - ERROR_SIGNALFD="${P} requires signalfd in-kernel support." - fi - if use inotify; then - CONFIG_CHECK+=" ~INOTIFY_USER" - ERROR_INOTIFY_USER="${P} requires inotify in-kernel support." - fi - if use eventfd || use signalfd || use inotify; then - linux-info_pkg_setup - fi - - elog "If you will be starting mpd via /etc/init.d/mpd, please make - sure that MPD's pid_file is _set_." -} - -src_prepare() { - cp -f doc/mpdconf.example doc/mpdconf.dist || die "cp failed" - default - eautoreconf -} - -src_configure() { - local myeconfargs=( - --enable-database --disable-roar --disable-documentation - --enable-dsd --enable-largefile --disable-osx --disable-shine-encoder - --disable-solaris-output --enable-tcp --enable-un --disable-werror - --docdir="${EPREFIX}"/usr/share/doc/${PF} - ) - - if use network; then - myeconfargs+=( - --enable-shout - $(use_enable vorbis vorbis-encoder) - --enable-httpd-output - $(use_enable lame lame-encoder) - $(use_enable twolame twolame-encoder) - $(use_enable audiofile wave-encoder) - ) - else - myeconfargs+=( - --disable-shout - --disable-vorbis-encoder - --disable-httpd-output - --disable-lame-encoder - --disable-twolame-encoder - --disable-wave-encoder - ) - fi - - if use samba || use upnp; then - myeconfargs+=( --enable-neighbor-plugins ) - fi - - append-lfs-flags - append-ldflags "-L/usr/$(get_libdir)/sidplay/builders" - - myeconfargs+=( - $(use_enable eventfd) - $(use_enable signalfd) - $(use_enable libmpdclient) - $(use_enable expat) - $(use_enable upnp) - $(use_enable adplug) - $(use_enable alsa) - $(use_enable ao) - $(use_enable audiofile) - $(use_enable zlib) - $(use_enable bzip2) - $(use_enable cdio cdio-paranoia) - $(use_enable curl) - $(use_enable samba smbclient) - $(use_enable nfs) - $(use_enable debug) - $(use_enable ffmpeg) - $(use_enable fifo) - $(use_enable flac) - $(use_enable fluidsynth) - $(use_enable gme) - $(use_enable id3tag id3) - $(use_enable inotify) - $(use_enable ipv6) - $(use_enable cdio iso9660) - $(use_enable jack) - $(use_enable soundcloud) - $(use_enable tcpd libwrap) - $(use_enable libsamplerate lsr) - $(use_enable libsoxr soxr) - $(use_enable mad) - $(use_enable mikmod) - $(use_enable mms) - $(use_enable modplug) - $(use_enable musepack mpc) - $(use_enable mpg123) - $(use_enable openal) - $(use_enable opus) - $(use_enable oss) - $(use_enable pipe pipe-output) - $(use_enable pulseaudio pulse) - $(use_enable recorder recorder-output) - $(use_enable sid sidplay) - $(use_enable sndfile sndfile) - $(use_enable sqlite) - $(use_enable systemd systemd_daemon) - $(use_enable vorbis) - $(use_enable wavpack) - $(use_enable wildmidi) - $(use_enable zip zzip) - $(use_enable icu) - $(use_enable webdav) - $(use_enable faad aac) - $(use_with zeroconf zeroconf avahi) - --with-systemdsystemunitdir=$(systemd_get_systemunitdir) - --with-systemduserunitdir=$(systemd_get_userunitdir) - ) - - econf "${myeconfargs[@]}" -} - -src_install() { - emake DESTDIR="${D}" install - - insinto /etc - newins doc/mpdconf.dist mpd.conf - - newinitd "${FILESDIR}"/${PN}-0.20.4.init ${PN} - - if use unicode; then - sed -i -e 's:^#filesystem_charset.*$:filesystem_charset "UTF-8":' \ - "${ED}"/etc/mpd.conf || die "sed failed" - fi - - insinto /etc/logrotate.d - newins "${FILESDIR}"/${PN}-0.20.4.logrotate ${PN} - - use prefix || diropts -m0755 -o mpd -g audio - dodir /var/lib/mpd - keepdir /var/lib/mpd - dodir /var/lib/mpd/music - keepdir /var/lib/mpd/music - dodir /var/lib/mpd/playlists - keepdir /var/lib/mpd/playlists -} - -pkg_postinst() { - # also change the homedir if the user has existed before - usermod -d "/var/lib/mpd" mpd -} diff --git a/media-sound/mpd/mpd-0.21.18-r1.ebuild b/media-sound/mpd/mpd-0.21.18-r1.ebuild new file mode 100644 index 0000000..87c7114 --- /dev/null +++ b/media-sound/mpd/mpd-0.21.18-r1.ebuild @@ -0,0 +1,299 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic linux-info meson systemd xdg-utils + +DESCRIPTION="The Music Player Daemon (mpd)" +HOMEPAGE="https://www.musicpd.org https://github.com/MusicPlayerDaemon/MPD" +SRC_URI="https://www.musicpd.org/download/${PN}/${PV%.*}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~hppa ~ppc ~ppc64 ~sh x86 ~x64-macos" +IUSE="+alsa ao +audiofile bzip2 cdio chromaprint +cue +curl +dbus debug + +eventfd expat faad +ffmpeg +fifo flac fluidsynth gme +icu +id3tag +inotify + +ipv6 jack lame libav libmpdclient libsamplerate libsoxr +mad mikmod mms + modplug mpg123 musepack +network nfs openal opus oss pipe pulseaudio qobuz + recorder samba selinux sid signalfd sndfile soundcloud sqlite systemd + test tidal twolame udisks unicode vorbis wavpack webdav wildmidi upnp + zeroconf zip zlib" + +OUTPUT_PLUGINS="alsa ao fifo jack network openal oss pipe pulseaudio recorder" +DECODER_PLUGINS="audiofile faad ffmpeg flac fluidsynth mad mikmod + modplug mpg123 musepack flac sid vorbis wavpack wildmidi" +ENCODER_PLUGINS="audiofile flac lame twolame vorbis" + +REQUIRED_USE=" + || ( ${OUTPUT_PLUGINS} ) + || ( ${DECODER_PLUGINS} ) + network? ( || ( ${ENCODER_PLUGINS} ) ) + recorder? ( || ( ${ENCODER_PLUGINS} ) ) + upnp? ( expat ) + webdav? ( curl expat ) + " + +RESTRICT="!test? ( test )" + +RDEPEND=" + acct-user/mpd + alsa? ( + media-libs/alsa-lib + media-sound/alsa-utils + ) + + ao? ( media-libs/libao[alsa?,pulseaudio?] ) + audiofile? ( media-libs/audiofile:= ) + + cdio? ( + dev-libs/libcdio:= + dev-libs/libcdio-paranoia + ) + + chromaprint? ( media-libs/chromaprint ) + curl? ( net-misc/curl ) + dbus? ( sys-apps/dbus ) + expat? ( dev-libs/expat ) + faad? ( media-libs/faad2 ) + + ffmpeg? ( + libav? ( media-video/libav:0= ) + !libav? ( media-video/ffmpeg:0= ) + ) + + flac? ( media-libs/flac ) + fluidsynth? ( media-sound/fluidsynth ) + gme? ( >=media-libs/game-music-emu-0.6.0_pre20120802 ) + icu? ( dev-libs/icu:= ) + id3tag? ( media-libs/libid3tag ) + jack? ( virtual/jack ) + lame? ( network? ( media-sound/lame ) ) + libmpdclient? ( media-libs/libmpdclient ) + libsamplerate? ( media-libs/libsamplerate ) + libsoxr? ( media-libs/soxr ) + mad? ( media-libs/libmad ) + mikmod? ( media-libs/libmikmod ) + mms? ( media-libs/libmms ) + modplug? ( media-libs/libmodplug ) + mpg123? ( media-sound/mpg123 ) + musepack? ( media-sound/musepack-tools ) + network? ( media-libs/libshout ) + nfs? ( net-fs/libnfs ) + openal? ( media-libs/openal ) + opus? ( media-libs/opus ) + pulseaudio? ( media-sound/pulseaudio ) + qobuz? ( dev-libs/libgcrypt:0 ) + samba? ( net-fs/samba ) + selinux? ( sec-policy/selinux-mpd ) + sid? ( || ( + media-libs/libsidplay:2 + media-libs/libsidplayfp + ) ) + sndfile? ( media-libs/libsndfile ) + soundcloud? ( >=dev-libs/yajl-2:= ) + sqlite? ( dev-db/sqlite:3 ) + systemd? ( sys-apps/systemd ) + tidal? ( dev-libs/yajl + net-misc/curl ) + twolame? ( media-sound/twolame ) + udisks? ( sys-fs/udisks:2 ) + upnp? ( net-libs/libupnp:0 ) + vorbis? ( media-libs/libvorbis ) + wavpack? ( media-sound/wavpack ) + wildmidi? ( media-sound/wildmidi ) + zeroconf? ( net-dns/avahi[dbus] ) + zip? ( dev-libs/zziplib ) + zlib? ( sys-libs/zlib:= )" + +DEPEND="${RDEPEND} + >=dev-libs/boost-1.58:= + test? ( dev-cpp/gtest )" + +BDEPEND=">=dev-util/meson-0.49.2 + virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-0.18.conf.patch + "${FILESDIR}"/${PN}-0.21.18-fix-stacksize.patch +) + +pkg_setup() { + if use eventfd; then + CONFIG_CHECK+=" ~EVENTFD" + ERROR_EVENTFD="${P} requires eventfd in-kernel support." + fi + + if use signalfd; then + CONFIG_CHECK+=" ~SIGNALFD" + ERROR_SIGNALFD="${P} requires signalfd in-kernel support." + fi + + if use inotify; then + CONFIG_CHECK+=" ~INOTIFY_USER" + ERROR_INOTIFY_USER="${P} requires inotify in-kernel support." + fi + + if use eventfd || use signalfd || use inotify; then + linux-info_pkg_setup + fi + + elog "If you will be starting mpd via /etc/init.d/mpd, please make + sure that MPD's pid_file is _set_." +} + +src_prepare() { + cp -f doc/mpdconf.example doc/mpdconf.dist || die "cp failed" + default +} + +src_configure() { + local emesonargs=( + -Dbzip2=$(usex bzip2 enabled disabled) + -Dcdio_paranoia=$(usex cdio enabled disabled) + -Dchromaprint=$(usex chromaprint enabled disabled) + -Dcue=$(usex cue true false) + -Dcurl=$(usex curl enabled disabled) + -Ddbus=$(usex dbus enabled disabled) + -Ddebug=$(usex debug true false) + -Deventfd=$(usex eventfd true false) + -Dexpat=$(usex expat enabled disabled) + -Dicu=$(usex icu enabled disabled) + -Did3tag=$(usex id3tag enabled disabled) + -Dinotify=$(usex inotify true false) + -Dipv6=$(usex ipv6 enabled disabled) + -Diso9660=$(usex cdio enabled disabled) + -Dlibmpdclient=$(usex libmpdclient enabled disabled) + -Dlibsamplerate=$(usex libsamplerate enabled disabled) + -Dmms=$(usex mms enabled disabled) + -Dnfs=$(usex nfs enabled disabled) + -Dsignalfd=$(usex signalfd true false) + -Dsmbclient=$(usex samba enabled disabled) + -Dsoxr=$(usex libsoxr enabled disabled) + -Dsqlite=$(usex sqlite enabled disabled) + -Dsystemd=$(usex systemd enabled disabled) + -Dtest=$(usex test true false) + -Dudisks=$(usex udisks enabled disabled) + -Dupnp=$(usex upnp enabled disabled) + -Dwebdav=$(usex webdav enabled disabled) + -Dzeroconf=$(usex zeroconf avahi disabled) + -Dzlib=$(usex zlib enabled disabled) + -Dzzip=$(usex zip enabled disabled) + ) + + emesonargs+=( + -Dalsa=$(usex alsa enabled disabled) + -Dao=$(usex ao enabled disabled) + -Dfifo=$(usex fifo true false) + -Djack=$(usex jack enabled disabled) + -Dopenal=$(usex openal enabled disabled) + -Doss=$(usex oss enabled disabled) + -Dpipe=$(usex pipe true false) + -Dpulse=$(usex pulseaudio enabled disabled) + -Drecorder=$(usex recorder true false) + ) + + if use samba || use upnp; then + emesonargs+=( -Dneighbor=true ) + fi + + append-lfs-flags + append-ldflags "-L/usr/$(get_libdir)/sidplay/builders" + + if use network; then + + emesonargs+=( + -Dshine=disabled + -Dshout=enabled + -Dvorbisenc=$(usex vorbis enabled disabled) + -Dhttpd=true + -Dlame=$(usex lame enabled disabled) + -Dtwolame=$(usex twolame enabled disabled) + -Dwave_encoder=$(usex audiofile true false) + ) + fi + + emesonargs+=( + # media-libs/adplug is not packaged anymore + -Dadplug=disabled + -Daudiofile=$(usex audiofile enabled disabled) + -Dfaad=$(usex faad enabled disabled) + -Dffmpeg=$(usex ffmpeg enabled disabled) + -Dflac=$(usex flac enabled disabled) + -Dfluidsynth=$(usex fluidsynth enabled disabled) + -Dgme=$(usex gme enabled disabled) + -Dmad=$(usex mad enabled disabled) + -Dmikmod=$(usex mikmod enabled disabled) + -Dmodplug=$(usex modplug enabled disabled) + -Dmpcdec=$(usex musepack enabled disabled) + -Dmpg123=$(usex mpg123 enabled disabled) + -Dopus=$(usex opus enabled disabled) + -Dsidplay=$(usex sid enabled disabled) + -Dsndfile=$(usex sndfile enabled disabled) + -Dvorbis=$(usex vorbis enabled disabled) + -Dwavpack=$(usex wavpack enabled disabled) + -Dwildmidi=$(usex wildmidi enabled disabled) + + ) + + emesonargs+=( + -Dqobuz=$(usex qobuz enabled disabled) + -Dsoundcloud=$(usex soundcloud enabled disabled) + -Dtidal=$(usex tidal enabled disabled) + ) + + emesonargs+=( + --libdir="/usr/$(get_libdir)" + -Ddocumentation=false + -Dsndio=disabled #not yet in the tree + -Dsolaris_output=disabled + + -Ddatabase=true + -Ddsd=true + -Dtcp=true + + -Dsystemd_system_unit_dir="$(systemd_get_systemunitdir)" + -Dsystemd_user_unit_dir="$(systemd_get_userunitdir)" + ) + + if use icu; then + emesonargs+=( -Diconv=enabled ) + else + emesonargs+=( -Diconv=disabled ) + fi + + meson_src_configure +} + +src_install() { + meson_src_install + + insinto /etc + newins doc/mpdconf.dist mpd.conf + + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}-0.21.1.logrotate ${PN} + + newinitd "${FILESDIR}"/${PN}-0.21.4.init ${PN} + + if use unicode; then + sed -i -e 's:^#filesystem_charset.*$:filesystem_charset "UTF-8":' \ + "${ED}"/etc/mpd.conf || die "sed failed" + fi + + doman doc/mpd.1 + doman doc/mpd.conf.5 + + keepdir /var/lib/mpd + keepdir /var/lib/mpd/music + keepdir /var/lib/mpd/playlists + +} + +pkg_postinst() { + xdg_icon_cache_update +} + +pkg_postrm() { + xdg_icon_cache_update +}