* [gentoo-commits] proj/musl:master commit in: media-sound/mpd/, media-sound/mpd/files/
@ 2017-03-29 16:53 Aric Belsito
0 siblings, 0 replies; 2+ messages in thread
From: Aric Belsito @ 2017-03-29 16:53 UTC (permalink / raw
To: gentoo-commits
commit: 775dd5b1a1f7ebee22d1f0fb935f2c50cc1a7b6b
Author: Rasmus Thomsen <rasmus.thomsen <AT> live <DOT> de>
AuthorDate: Wed Mar 29 16:46:39 2017 +0000
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Wed Mar 29 16:52:55 2017 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=775dd5b1
media-sound/mpd: add ebuild with musl fixes
media-sound/mpd/Manifest | 8 +
media-sound/mpd/files/fix-mpd-stacksize.patch | 19 ++
media-sound/mpd/files/mpd-0.18.conf.patch | 78 ++++++++
media-sound/mpd/files/mpd-0.9.15-systemd.patch | 106 ++++++++++
media-sound/mpd/files/mpd.logrotate | 7 +
media-sound/mpd/files/mpd2.init | 36 ++++
media-sound/mpd/metadata.xml | 41 ++++
media-sound/mpd/mpd-0.19.19.ebuild | 257 +++++++++++++++++++++++++
8 files changed, 552 insertions(+)
diff --git a/media-sound/mpd/Manifest b/media-sound/mpd/Manifest
new file mode 100644
index 0000000..be5136d
--- /dev/null
+++ b/media-sound/mpd/Manifest
@@ -0,0 +1,8 @@
+AUX fix-mpd-stacksize.patch 598 SHA256 7ae663ecc08498e1d822349cf580eb738f43218308ae0b75efe128276f8ab98a SHA512 f425c20e18207a406f84a6a664f02625fca9d42977b1289f4ba8595406b26f6aa73b4f1cb5a1115858cb75fa7844f42d7174adba3f6af1af216c44901a1ccaa0 WHIRLPOOL 5858b739aee09b6d63a40edb0873c318cd1ad68327936147aafb419b50efd5a971b58aeea5396cbd40d4991842411e35cb594e048a6da7c409816929455341f0
+AUX mpd-0.18.conf.patch 2969 SHA256 a8eb3e339513d6284f6be0a63f9676e44d768fc77d40ebe9f3073dd3171f0fae SHA512 4b646bc5d8fe4c76421f4cb0dbc7894cf9118492662ea1127f90c48f84760a1167988692c2b63f49182afcd46c578de7203356bbf9dd47787f9129f7c3dbf4a5 WHIRLPOOL 58f4a56426f66cd3337aafbfd6612bfc850fa022d13a150ff7f923e48f5d225c376ff751dab0ac5c6753320c060f04fc53a88e64b5ae3238499d3ce563df7654
+AUX mpd-0.9.15-systemd.patch 3056 SHA256 6acef4297941a7d146897465f2dcc9b88e4b3a632e50167177e8105249522c4a SHA512 c9f8b909121f6f3b08ca4bf37ae744aa1468a306e8671681babac228aa5d4b528d094214e2596a862d0b685d01a448b6fd6b8170d6990e10f387f1e498c9dd3b WHIRLPOOL dd1290608de22ad342cc879a7ea316932c4233875d434aa49ee82c7b4e602c3a3bfc5a3c63b71b30338fa9109f4a8d8cb2a276b0b0797b8ef0f4f646bcae0d9a
+AUX mpd.logrotate 199 SHA256 e1cbf1c8c77e32789c4dc55bb7761d17c5708a5cb9b9753a7517c15de98696cb SHA512 c55ef8f0e691ef0b358e5dc81a206328de4ccef449959fd7e6f9e95e07cbbee7446639278ebe6f4517063c9a6169e07bca0109958dc722a2caea1503693410ae WHIRLPOOL 85737af75673b8bb7492373bcc02d21205400b2db67340128dffe9fc7a41e98150562730bb8d2b7d94c9dc91dd11dc15c554db75af782b57634dd056a36339ce
+AUX mpd2.init 727 SHA256 6ca354f8b8c4b0e8595f7dbda1058fd471a6b538469ea10e7caf8e7f263f621a SHA512 be2b52b3b69dcfb34e7753dce908c4f3c5b2d2e768c9177dbf06d72be487ccb2f2b58c292c0e19c5c6faf83bcabd1acb8fc6f1214b2de030b005b7759566892a WHIRLPOOL c1cb941224c1e7c23fdc722b898f416a4625bf05e9c1cf4d38e8f06ca3b9c45babb37a8cc516bab5185b5206e2839cf67e0334f37a820367d8178d638770621f
+DIST mpd-0.19.19.tar.xz 707356 SHA256 bc856cda4136403446d53d11576f86990b61d1fe4668f6008e9eae47450d4e1d SHA512 949bfab2aa5dffb4089ce2023accc934648091d36768f8e4c75f62b4038e21db1e2ef3bb07a0f1cf6a91d0532cac8e7146be948d84dc4d7cdc5b252b7d815b64 WHIRLPOOL 1b2c68d998a26de41bca25cbeab0c6478406c831ac4322162d2c258622224137a1a2dcd88b690ee1869c7f2652201fd534ee773a6e51f6e61bdb5926783f4d75
+EBUILD mpd-0.19.19.ebuild 7686 SHA256 c0228c78aa6d20a9dbd23fce8a0e7e7c23d2cb4cee49042ff396ea0ca5db3b37 SHA512 fb3273f53bf83312070adec629009f4f41b85239edf184c68b174f5091f494de9a030f3438c69bb0fda3bc9c116f5956426b1d758415323744cfb3a2d916708b WHIRLPOOL 9d7af469fc41720db991a0ad28ecf78156f66d422364be03579b8485a9855c166494934cf9d7e022b1be112d47aa09a6a8a5b549c72ba4f01fb7ad7df15ca4de
+MISC metadata.xml 2249 SHA256 1b97f04a2698651751529dae3dd5ea97adf287745210844efc755538862524dd SHA512 f17f2e7c9be709ef89cfa429738ebe50962a9f16ce54fe30561be7dc43e02b6f927c4fec83fa4358450fff269970487d5796f59c99d6166a2961e54419f0daa0 WHIRLPOOL b54d4533213f5cb1d7f1fd03143a50f8c15c02e6aa0deeddc1f139a5898a0a7530bca910d404ea17e7b7ad66859d0bfeb5f939f004e2e9c58bdd8f4495138ebb
diff --git a/media-sound/mpd/files/fix-mpd-stacksize.patch b/media-sound/mpd/files/fix-mpd-stacksize.patch
new file mode 100644
index 0000000..26d6f78
--- /dev/null
+++ b/media-sound/mpd/files/fix-mpd-stacksize.patch
@@ -0,0 +1,19 @@
+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.18.conf.patch b/media-sound/mpd/files/mpd-0.18.conf.patch
new file mode 100644
index 0000000..d71056f
--- /dev/null
+++ b/media-sound/mpd/files/mpd-0.18.conf.patch
@@ -0,0 +1,78 @@
+diff --git a/doc/mpdconf.dist b/doc/mpdconf.dist
+index 470a5c9..9f595a6 100644
+--- a/doc/mpdconf.dist
++++ b/doc/mpdconf.dist
+@@ -10,14 +10,14 @@
+ # be disabled and audio files will only be accepted over ipc socket (using
+ # file:// protocol) or streaming files over an accepted protocol.
+ #
+-#music_directory "~/music"
++music_directory "/var/lib/mpd/music"
+ #
+ # This setting sets the MPD internal playlist directory. The purpose of this
+ # directory is storage for playlists created by MPD. The server will use
+ # playlist files not created by the server but only if they are in the MPD
+ # format. This setting defaults to playlist saving being disabled.
+ #
+-#playlist_directory "~/.mpd/playlists"
++playlist_directory "/var/lib/mpd/playlists"
+ #
+ # This setting sets the location of the MPD database. This file is used to
+ # load the database at server start up and store the database while the
+@@ -25,7 +25,7 @@
+ # MPD to accept files over ipc socket (using file:// protocol) or streaming
+ # files over an accepted protocol.
+ #
+-#db_file "~/.mpd/database"
++db_file "/var/lib/mpd/database"
+ #
+ # These settings are the locations for the daemon log files for the daemon.
+ # These logs are great for troubleshooting, depending on your log_level
+@@ -34,20 +34,20 @@
+ # The special value "syslog" makes MPD use the local syslog daemon. This
+ # setting defaults to logging to syslog, otherwise logging is disabled.
+ #
+-#log_file "~/.mpd/log"
++log_file "/var/lib/mpd/log"
+ #
+ # This setting sets the location of the file which stores the process ID
+-# for use of mpd --kill and some init scripts. This setting is disabled by
+-# default and the pid file will not be stored.
++# for use of mpd --kill and some init scripts. This setting is required when
++# using the Gentoo init script.
+ #
+-#pid_file "~/.mpd/pid"
++pid_file "/var/lib/mpd/pid"
+ #
+ # This setting sets the location of the file which contains information about
+ # most variables to get MPD back into the same general shape it was in before
+ # it was brought down. This setting is disabled by default and the server
+ # state will be reset on server start up.
+ #
+-#state_file "~/.mpd/state"
++state_file "/var/lib/mpd/state"
+ #
+ # The location of the sticker database. This is a database which
+ # manages dynamic information attached to songs.
+@@ -64,7 +64,7 @@
+ # initialization. This setting is disabled by default and MPD is run as the
+ # current user.
+ #
+-#user "nobody"
++user "mpd"
+ #
+ # This setting specifies the group that MPD will run as. If not specified
+ # primary group of user specified with "user" setting will be used (if set).
+@@ -78,10 +78,10 @@
+ # This setting can deny access to control of the daemon.
+ #
+ # For network
+-#bind_to_address "any"
++bind_to_address "localhost"
+ #
+ # And for Unix Socket
+-#bind_to_address "~/.mpd/socket"
++bind_to_address "/var/lib/mpd/socket"
+ #
+ # This setting is the TCP port that is desired for the daemon to get assigned
+ # to.
diff --git a/media-sound/mpd/files/mpd-0.9.15-systemd.patch b/media-sound/mpd/files/mpd-0.9.15-systemd.patch
new file mode 100644
index 0000000..cd03ebe
--- /dev/null
+++ b/media-sound/mpd/files/mpd-0.9.15-systemd.patch
@@ -0,0 +1,106 @@
+Description: transition to libsystemd from deprecated libsystemd-daemon
+ systemd 209 merged the various libsystemd-* libraries into a single
+ libsystemd.so, so we check for that instead and rename the configure
+ option, define, etc accordingly.
+Author: Florian Schlichting <fsfs@debian.org>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779762
+Forwarded: not-needed (solved in a less invasive and backward-compatible way upstream)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -572,10 +572,10 @@
+ MPD_DEPENDS([enable_sqlite], [enable_glib],
+ [Cannot use --enable-sqlite with --disable-glib])
+
+-AC_ARG_ENABLE(systemd-daemon,
+- AS_HELP_STRING([--enable-systemd-daemon],
+- [use the systemd daemon library (default=auto)]),,
+- [enable_systemd_daemon=$linux_auto])
++AC_ARG_ENABLE(systemd,
++ AS_HELP_STRING([--enable-systemd],
++ [use the systemd library (default=auto)]),,
++ [enable_systemd=$linux_auto])
+
+ AC_ARG_ENABLE(tcp,
+ AS_HELP_STRING([--disable-tcp],
+@@ -762,11 +762,11 @@
+ AC_MSG_ERROR([No client interfaces configured!])
+ fi
+
+-MPD_AUTO_PKG(systemd_daemon, SYSTEMD_DAEMON, libsystemd-daemon,
+- [systemd activation], [libsystemd-daemon not found])
+-AM_CONDITIONAL(ENABLE_SYSTEMD_DAEMON, test x$enable_systemd_daemon = xyes)
+-if test x$enable_systemd_daemon = xyes; then
+- AC_DEFINE([ENABLE_SYSTEMD_DAEMON], 1, [Define to use the systemd daemon library])
++MPD_AUTO_PKG(systemd, SYSTEMD, libsystemd,
++ [systemd activation], [libsystemd not found])
++AM_CONDITIONAL(ENABLE_SYSTEMD, test x$enable_systemd = xyes)
++if test x$enable_systemd = xyes; then
++ AC_DEFINE([ENABLE_SYSTEMD], 1, [Define to use the systemd library])
+ fi
+
+ dnl ---------------------------------------------------------------------------
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -58,7 +58,7 @@
+ $(ICU_LDADD) \
+ libutil.a \
+ $(FS_LIBS) \
+- $(SYSTEMD_DAEMON_LIBS) \
++ $(SYSTEMD_LIBS) \
+ $(GLIB_LIBS)
+
+ src_mpd_SOURCES = \
+--- a/config.h.in
++++ b/config.h.in
+@@ -75,8 +75,8 @@
+ /* Define to enable sqlite database support */
+ #undef ENABLE_SQLITE
+
+-/* Define to use the systemd daemon library */
+-#undef ENABLE_SYSTEMD_DAEMON
++/* Define to use the systemd library */
++#undef ENABLE_SYSTEMD
+
+ /* Define to enable the TwoLAME encoder plugin */
+ #undef ENABLE_TWOLAME_ENCODER
+--- a/src/Listen.cxx
++++ b/src/Listen.cxx
+@@ -32,7 +32,7 @@
+ #include <string.h>
+ #include <assert.h>
+
+-#ifdef ENABLE_SYSTEMD_DAEMON
++#ifdef ENABLE_SYSTEMD
+ #include <systemd/sd-daemon.h>
+ #endif
+
+@@ -77,7 +77,7 @@
+ }
+ }
+
+-#ifdef ENABLE_SYSTEMD_DAEMON
++#ifdef ENABLE_SYSTEMD
+
+ static bool
+ listen_systemd_activation(Error &error_r)
+@@ -109,7 +109,7 @@
+
+ listen_socket = new ClientListener(loop, partition);
+
+-#ifdef ENABLE_SYSTEMD_DAEMON
++#ifdef ENABLE_SYSTEMD
+ if (listen_systemd_activation(error))
+ return true;
+
+--- a/doc/user.xml
++++ b/doc/user.xml
+@@ -110,7 +110,7 @@
+ libupnp-dev \
+ libavahi-client-dev \
+ libsqlite3-dev \
+- libsystemd-daemon-dev libwrap0-dev \
++ libsystemd-dev libwrap0-dev \
+ libcppunit-dev xmlto \
+ libboost-dev \
+ libglib2.0-dev libicu-dev
diff --git a/media-sound/mpd/files/mpd.logrotate b/media-sound/mpd/files/mpd.logrotate
new file mode 100644
index 0000000..c913c1f
--- /dev/null
+++ b/media-sound/mpd/files/mpd.logrotate
@@ -0,0 +1,7 @@
+/var/lib/mpd/log {
+ missingok
+ postrotate
+ [ -f /var/run/mpd.pid ] && cat /var/run/mpd.pid | xargs /bin/kill -HUP
+ [ -f /var/lib/mpd/pid ] && cat /var/lib/mpd/pid | xargs /bin/kill -HUP
+ endscript
+}
diff --git a/media-sound/mpd/files/mpd2.init b/media-sound/mpd/files/mpd2.init
new file mode 100644
index 0000000..ae5a2cc
--- /dev/null
+++ b/media-sound/mpd/files/mpd2.init
@@ -0,0 +1,36 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+ use net netmount nfsmount alsasound esound pulseaudio
+}
+
+checkconfig() {
+ if ! [ -f /etc/mpd.conf ]; then
+ eerror "Configuration file /etc/mpd.conf does not exist."
+ return 1
+ fi
+
+ if ! grep -q '^\s*pid_file' /etc/mpd.conf; then
+ eerror "Invalid configuration: pid_file needs to be set."
+ return 1
+ fi
+
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting Music Player Daemon"
+ start-stop-daemon --start --quiet --exec /usr/bin/mpd -- /etc/mpd.conf 2>/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Music Player Daemon"
+ /usr/bin/mpd --kill
+ eend $?
+}
diff --git a/media-sound/mpd/metadata.xml b/media-sound/mpd/metadata.xml
new file mode 100644
index 0000000..dc07436
--- /dev/null
+++ b/media-sound/mpd/metadata.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sound@gentoo.org</email>
+ <name>Gentoo Sound project</name>
+ </maintainer>
+ <use>
+ <flag name="adplug">Enable the AdPlug decoder plugin</flag>
+ <flag name="cdio">Use libcdio for ISO9660 parsing support</flag>
+ <flag name="curl">Support for web stream listening</flag>
+ <flag name="eventfd">Use the eventfd function in MPD's event loop</flag>
+ <flag name="faad">Use external faad library for AAC decoding</flag>
+ <flag name="fifo">Support writing audio to a FIFO</flag>
+ <flag name="fluidsynth">Enables Fluidsynth MIDI software synthesis (discouraged)</flag>
+ <flag name="glib">Enable GLib usage</flag>
+ <flag name="gme">Enables support for <pkg>media-libs/game-music-emu</pkg> for playing various video game music formats.</flag>
+ <flag name="id3tag">Support for ID3 tags</flag>
+ <flag name="inotify">Use the Linux kernel inotify subsystem to notice changes to mpd music library</flag>
+ <flag name="lame">Support for MP3 streaming via Icecast2</flag>
+ <flag name="libmpdclient">Enable support for remote mpd databases</flag>
+ <flag name="libsoxr">Enable the libsoxr resampler</flag>
+ <flag name="mpg123">Enable support for mp3 decoding over media-sound/mpg123</flag>
+ <flag name="network">Enables network streaming support</flag>
+ <flag name="nfs">Enable support for the Network File System</flag>
+ <flag name="opus">Enable Opus codec support</flag>
+ <flag name="pipe">Support writing audio to a pipe</flag>
+ <flag name="recorder">Enables output plugin for recording radio streams</flag>
+ <flag name="sid">Build with SID (Commodore 64 Audio) support</flag>
+ <flag name="signalfd">Use the signalfd function in MPD's event loop</flag>
+ <flag name="soundcloud">Build plugin to access soundcloud</flag>
+ <flag name="systemd">Enable support for systemd socket activation</flag>
+ <flag name="twolame">Support twolame MPEG-2 encoding</flag>
+ <flag name="wildmidi">Enable MIDI support via wildmidi</flag>
+ <flag name="zip">Support for ZIP files</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-sound/mpd/mpd-0.19.19.ebuild b/media-sound/mpd/mpd-0.19.19.ebuild
new file mode 100644
index 0000000..d582e37
--- /dev/null
+++ b/media-sound/mpd/mpd-0.19.19.ebuild
@@ -0,0 +1,257 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic linux-info multilib systemd user
+
+DESCRIPTION="The Music Player Daemon (mpd)"
+HOMEPAGE="https://www.musicpd.org"
+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 ~x86-fbsd ~x64-macos"
+IUSE="adplug +alsa ao audiofile bzip2 cdio +curl debug +eventfd expat faad
+ +fifo +ffmpeg flac fluidsynth +glib 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"
+
+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} )
+ ao? ( glib )
+ gme? ( glib )
+ jack? ( glib )
+ network? ( || ( ${ENCODER_PLUGINS} )
+ glib )
+ recorder? ( || ( ${ENCODER_PLUGINS} ) )
+ sid? ( glib )
+ soundcloud? ( glib )
+ sqlite? ( glib )
+ opus? ( ogg )
+ upnp? ( expat )
+ vorbis? ( glib )
+ wavpack? ( glib )"
+
+CDEPEND="!<sys-cluster/mpich2-1.4_rc2
+ adplug? ( media-libs/adplug )
+ alsa? ( media-sound/alsa-utils
+ media-libs/alsa-lib )
+ ao? ( media-libs/libao[alsa?,pulseaudio?] )
+ audiofile? ( media-libs/audiofile )
+ bzip2? ( app-arch/bzip2 )
+ cdio? ( dev-libs/libcdio-paranoia )
+ curl? ( net-misc/curl )
+ expat? ( dev-libs/expat )
+ faad? ( media-libs/faad2 )
+ ffmpeg? (
+ libav? ( media-video/libav:0= )
+ !libav? ( media-video/ffmpeg:0= )
+ )
+ flac? ( media-libs/flac[ogg?] )
+ fluidsynth? ( media-sound/fluidsynth )
+ glib? ( dev-libs/glib:2 )
+ gme? ( >=media-libs/game-music-emu-0.6.0_pre20120802 )
+ icu? ( dev-libs/icu:= )
+ id3tag? ( media-libs/libid3tag )
+ jack? ( media-sound/jack-audio-connection-kit )
+ lame? ( network? ( media-sound/lame ) )
+ libmpdclient? ( media-libs/libmpdclient )
+ libsamplerate? ( media-libs/libsamplerate )
+ 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[smbclient] >=net-fs/samba-4.0.25 ) )
+ sid? ( || ( media-libs/libsidplay:2 media-libs/libsidplayfp ) )
+ sndfile? ( media-libs/libsndfile )
+ soundcloud? ( >=dev-libs/yajl-2 )
+ libsoxr? ( media-libs/soxr )
+ 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}"/${PN}-0.9.15-systemd.patch # bug 584742
+ "${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 mpdconf="--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
+ mpdconf+=" --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
+ mpdconf+=" --disable-shout --disable-vorbis-encoder
+ --disable-httpd-output --disable-lame-encoder
+ --disable-twolame-encoder --disable-wave-encoder"
+ fi
+
+ if use samba || use upnp; then
+ mpdconf+=" --enable-neighbor-plugins"
+ fi
+
+ append-lfs-flags
+ append-ldflags "-L/usr/$(get_libdir)/sidplay/builders"
+
+ econf \
+ $(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) \
+ $(use_enable vorbis) \
+ $(use_enable wavpack) \
+ $(use_enable wildmidi) \
+ $(use_enable zip zzip) \
+ $(use_enable icu) \
+ $(use_enable glib) \
+ $(use_enable faad aac) \
+ $(use_with zeroconf zeroconf avahi) \
+ --with-systemdsystemunitdir=$(systemd_get_systemunitdir) \
+ ${mpdconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ insinto /etc
+ newins doc/mpdconf.dist mpd.conf
+
+ newinitd "${FILESDIR}"/${PN}2.init ${PN}
+
+ systemd_newuserunit systemd/${PN}.service ${PN}.service
+ sed -i '/WantedBy=/c WantedBy=default.target' \
+ "${ED}"/usr/lib/systemd/user/mpd.service || die "sed failed"
+
+ 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}.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
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/musl:master commit in: media-sound/mpd/, media-sound/mpd/files/
@ 2020-01-28 18:59 Jory Pratt
0 siblings, 0 replies; 2+ messages in thread
From: Jory Pratt @ 2020-01-28 18:59 UTC (permalink / raw
To: gentoo-commits
commit: 93b557ed9b9d5df5776002249a1ca78dd95d1ebf
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 28 18:59:05 2020 +0000
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> 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 <anarchy <AT> 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 <anarchy@gentoo.org>
+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 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>hwoarang@gentoo.org</email>
- <name>Markos Chandras</name>
- </maintainer>
- <maintainer type="project">
- <email>sound@gentoo.org</email>
- <name>Gentoo Sound project</name>
+ <email>zlogene@gentoo.org</email>
+ <name>Mikle Kolyada</name>
</maintainer>
<use>
- <flag name="adplug">Enable the AdPlug decoder plugin</flag>
- <flag name="cdio">Use libcdio for ISO9660 parsing support</flag>
- <flag name="curl">Support for web stream listening</flag>
- <flag name="eventfd">Use the eventfd function in MPD's event loop</flag>
- <flag name="faad">Use external faad library for AAC decoding</flag>
- <flag name="fifo">Support writing audio to a FIFO</flag>
- <flag name="fluidsynth">Enables Fluidsynth MIDI software synthesis (discouraged)</flag>
- <flag name="gme">Enables support for <pkg>media-libs/game-music-emu</pkg> for playing various video game music formats.</flag>
- <flag name="id3tag">Support for ID3 tags</flag>
- <flag name="inotify">Use the Linux kernel inotify subsystem to notice changes to mpd music library</flag>
- <flag name="lame">Support for MP3 streaming via Icecast2</flag>
- <flag name="libmpdclient">Enable support for remote mpd databases</flag>
- <flag name="libsoxr">Enable the libsoxr resampler</flag>
- <flag name="mpg123">Enable support for mp3 decoding over media-sound/mpg123</flag>
- <flag name="network">Enables network streaming support</flag>
- <flag name="nfs">Enable support for the Network File System</flag>
- <flag name="opus">Enable Opus codec support</flag>
- <flag name="pipe">Support writing audio to a pipe</flag>
- <flag name="recorder">Enables output plugin for recording radio streams</flag>
- <flag name="sid">Build with SID (Commodore 64 Audio) support</flag>
- <flag name="signalfd">Use the signalfd function in MPD's event loop</flag>
- <flag name="soundcloud">Build plugin to access soundcloud</flag>
- <flag name="systemd">Enable support for systemd socket activation</flag>
- <flag name="twolame">Support twolame MPEG-2 encoding</flag>
- <flag name="webdav">Enable using music from a WebDAV share</flag>
- <flag name="wildmidi">Enable MIDI support via wildmidi</flag>
- <flag name="zip">Support for ZIP files</flag>
+ <flag name="cdio">Use libcdio for ISO9660 parsing support</flag>
+ <flag name="chromaprint">Enable ChromaPrint / AcoustID support</flag>
+ <flag name="cue">Enable CUE sheet support</flag>
+ <flag name="curl">Support for web stream listening</flag>
+ <flag name="eventfd">Use the eventfd function in MPD's event loop</flag>
+ <flag name="faad">Use external faad library for AAC decoding</flag>
+ <flag name="fifo">Support writing audio to a FIFO</flag>
+ <flag name="fluidsynth">Enables Fluidsynth MIDI software synthesis (discouraged)</flag>
+ <flag name="gme">Enables support for <pkg>media-libs/game-music-emu</pkg> for playing various video game music formats.</flag>
+ <flag name="id3tag">Support for ID3 tags</flag>
+ <flag name="inotify">Use the Linux kernel inotify subsystem to notice changes to mpd music library</flag>
+ <flag name="lame">Support for MP3 streaming via Icecast2</flag>
+ <flag name="libmpdclient">Enable support for remote mpd databases</flag>
+ <flag name="libsoxr">Enable the libsoxr resampler</flag>
+ <flag name="mpg123">Enable support for mp3 decoding over media-sound/mpg123</flag>
+ <flag name="network">Enables network streaming support</flag>
+ <flag name="nfs">Enable support for the Network File System</flag>
+ <flag name="pipe">Support writing audio to a pipe</flag>
+ <flag name="qobuz">Build plugin to access qobuz</flag>
+ <flag name="recorder">Enables output plugin for recording radio streams</flag>
+ <flag name="sid">Build with SID (Commodore 64 Audio) support</flag>
+ <flag name="signalfd">Use the signalfd function in MPD's event loop</flag>
+ <flag name="soundcloud">Build plugin to access soundcloud</flag>
+ <flag name="tidal">Build plugin to access tidal</flag>
+ <flag name="systemd">Enable support for systemd socket activation</flag>
+ <flag name="twolame">Support twolame MPEG-2 encoding</flag>
+ <flag name="webdav">Enable using music from a WebDAV share</flag>
+ <flag name="wildmidi">Enable MIDI support via wildmidi</flag>
</use>
+ <upstream>
+ <remote-id type="github">MusicPlayerDaemon/MPD</remote-id>
+ <bugs-to>https://github.com/MusicPlayerDaemon/MPD/issues</bugs-to>
+ </upstream>
</pkgmetadata>
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="!<sys-cluster/mpich2-1.4_rc2
- adplug? ( media-libs/adplug )
- alsa? (
- media-sound/alsa-utils
- media-libs/alsa-lib
- )
- ao? ( media-libs/libao[alsa?,pulseaudio?] )
- audiofile? ( media-libs/audiofile )
- bzip2? ( app-arch/bzip2 )
- cdio? ( dev-libs/libcdio-paranoia )
- curl? ( net-misc/curl )
- expat? ( dev-libs/expat )
- faad? ( media-libs/faad2 )
- ffmpeg? (
- libav? ( media-video/libav:0= )
- !libav? ( media-video/ffmpeg:0= )
- )
- flac? ( media-libs/flac[ogg?] )
- 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: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
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-28 18:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-28 18:59 [gentoo-commits] proj/musl:master commit in: media-sound/mpd/, media-sound/mpd/files/ Jory Pratt
-- strict thread matches above, loose matches on Subject: below --
2017-03-29 16:53 Aric Belsito
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox