From 35462eae88d37b4fe68b580e3ed1826c5f286679 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Tue, 2 Aug 2016 10:48:57 +0300 Subject: mpd: sync with upstream --- media-sound/mpd/mpd-scm.ebuild | 180 ++++++++++++++++++++++++++--------------- 1 file changed, 115 insertions(+), 65 deletions(-) (limited to 'media-sound/mpd/mpd-scm.ebuild') diff --git a/media-sound/mpd/mpd-scm.ebuild b/media-sound/mpd/mpd-scm.ebuild index 2ef2ce4..e69e5bb 100644 --- a/media-sound/mpd/mpd-scm.ebuild +++ b/media-sound/mpd/mpd-scm.ebuild @@ -3,7 +3,7 @@ # $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/mpd-0.18.ebuild,v 1.1 2013/10/31 12:50:49 angelos Exp $ EAPI=4 -inherit eutils flag-o-matic linux-info multilib readme.gentoo systemd user \ +inherit eutils flag-o-matic linux-info multilib systemd user \ autotools git-2 DESCRIPTION="The Music Player Daemon (mpd)" @@ -13,11 +13,12 @@ EGIT_REPO_URI="git://git.musicpd.org/master/mpd.git" LICENSE="GPL-2" SLOT="0" KEYWORDS="" -IUSE="adplug +alsa ao audiofile bzip2 cdio +curl debug faad +fifo +ffmpeg flac - fluidsynth gme +id3tag inotify ipv6 jack lame mms libmpdclient - libsamplerate +mad mikmod modplug mpg123 musepack +network ogg openal opus - oss pipe pulseaudio recorder sid sndfile soundcloud sqlite systemd tcpd - twolame unicode vorbis wavpack wildmidi zeroconf zip" +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 @@ -26,27 +27,41 @@ ENCODER_PLUGINS="audiofile flac lame twolame vorbis" REQUIRED_USE="|| ( ${OUTPUT_PLUGINS} ) || ( ${DECODER_PLUGINS} ) - network? ( || ( ${ENCODER_PLUGINS} ) ) - recorder? ( || ( ${ENCODER_PLUGINS} ) )" - -RDEPEND="!=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 ) 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 )" -DEPEND="${RDEPEND} + zip? ( dev-libs/zziplib ) + zlib? ( sys-libs/zlib )" +DEPEND="${CDEPEND} + dev-libs/boost virtual/pkgconfig" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-mpd ) +" + pkg_setup() { use network || ewarn "Icecast and Shoutcast streaming needs networking." @@ -81,27 +106,36 @@ pkg_setup() { 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" + 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() { - eautoreconf - - DOC_CONTENTS="If you will be starting mpd via /etc/init.d/mpd, please make - sure that MPD's pid_file is unset." - cp -f doc/mpdconf.example doc/mpdconf.dist || die "cp failed" - epatch "${FILESDIR}"/${PN}conf.patch - + default + eautoreconf } src_configure() { - local mpdconf="--disable-despotify --disable-documentation --disable-roar - --enable-largefile --enable-tcp --enable-un + 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 @@ -115,53 +149,69 @@ src_configure() { --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 alsa) \ - $(use_enable ao) \ - $(use_enable audiofile) \ - $(use_enable bzip2) \ + $(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 cdio iso9660) \ - $(use_enable curl) \ - $(use_enable debug) \ - $(use_enable faad aac) \ - $(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 jack) \ - $(use_enable libmpdclient) \ + $(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 mad) \ - $(use_enable mikmod) \ - $(use_enable mms) \ - $(use_enable modplug) \ - $(use_enable mpg123) \ - $(use_enable musepack mpc) \ - $(use_enable openal) \ - $(use_enable oss) \ + $(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 sid sidplay) \ $(use_enable sndfile sndfile) \ - $(use_enable soundcloud) \ - $(use_enable sqlite) \ - $(use_enable systemd systemd-daemon) \ - $(use_enable tcpd libwrap) \ - $(use_enable vorbis) \ - $(use_enable wavpack) \ - $(use_enable wildmidi) \ - $(use_enable zip zzip) \ + $(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) \ - "$(systemd_with_unitdir)" \ + --with-systemdsystemunitdir=$(systemd_get_systemunitdir) \ ${mpdconf} } @@ -171,7 +221,11 @@ src_install() { insinto /etc newins doc/mpdconf.dist mpd.conf - newinitd "${FILESDIR}"/mpd.init mpd + 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":' \ @@ -188,13 +242,9 @@ src_install() { keepdir /var/lib/mpd/music dodir /var/lib/mpd/playlists keepdir /var/lib/mpd/playlists - - readme.gentoo_create_doc } pkg_postinst() { - readme.gentoo_print_elog - # also change the homedir if the user has existed before usermod -d "/var/lib/mpd" mpd } -- cgit v1.2.3