diff options
-rw-r--r-- | media-sound/mpd/mpd-scm.ebuild | 194 |
1 files changed, 101 insertions, 93 deletions
diff --git a/media-sound/mpd/mpd-scm.ebuild b/media-sound/mpd/mpd-scm.ebuild index e07a56e..96d39c0 100644 --- a/media-sound/mpd/mpd-scm.ebuild +++ b/media-sound/mpd/mpd-scm.ebuild @@ -14,7 +14,7 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="" IUSE="adplug +alsa ao audiofile bzip2 cdio +curl debug +eventfd expat faad - +fifo +ffmpeg flac fluidsynth +glib gme +icu +id3tag +inotify +ipv6 jack + +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 @@ -25,26 +25,21 @@ 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} ) +REQUIRED_USE=" + || ( ${OUTPUT_PLUGINS} ) || ( ${DECODER_PLUGINS} ) - ao? ( glib ) - gme? ( glib ) - jack? ( glib ) - network? ( || ( ${ENCODER_PLUGINS} ) - glib ) + network? ( || ( ${ENCODER_PLUGINS} ) ) 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 ) + alsa? ( + media-sound/alsa-utils + media-libs/alsa-lib + ) ao? ( media-libs/libao[alsa?,pulseaudio?] ) audiofile? ( media-libs/audiofile ) bzip2? ( app-arch/bzip2 ) @@ -52,14 +47,16 @@ CDEPEND="!<sys-cluster/mpich2-1.4_rc2 curl? ( net-misc/curl ) expat? ( dev-libs/expat ) faad? ( media-libs/faad2 ) - ffmpeg? ( virtual/ffmpeg ) + 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 ) + jack? ( virtual/jack ) lame? ( network? ( media-sound/lame ) ) libmpdclient? ( media-libs/libmpdclient ) libsamplerate? ( media-libs/libsamplerate ) @@ -69,23 +66,25 @@ CDEPEND="!<sys-cluster/mpich2-1.4_rc2 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 ) ) ) + 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 ) + samba? ( >=net-fs/samba-4.0.25 ) + sid? ( || ( media-libs/libsidplay:2 media-libs/libsidplayfp ) ) sndfile? ( media-libs/libsndfile ) - soundcloud? ( >=dev-libs/yajl-2 ) + 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 ) + upnp? ( net-libs/libupnp:= ) vorbis? ( media-libs/libvorbis ) wavpack? ( media-sound/wavpack ) wildmidi? ( media-sound/wildmidi ) @@ -133,86 +132,99 @@ src_prepare() { } src_configure() { - local mpdconf="--enable-database --disable-roar --disable-documentation + 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}" + --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) + 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)" + $(use_enable audiofile wave-encoder) + ) else - mpdconf+=" --disable-shout --disable-vorbis-encoder - --disable-httpd-output --disable-lame-encoder - --disable-twolame-encoder --disable-wave-encoder" + 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 - mpdconf+=" --enable-neighbor-plugins" + myeconfargs+=( --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} + 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 faad aac) + $(use_with zeroconf zeroconf avahi) + --with-systemdsystemunitdir=$(systemd_get_systemunitdir) + --with-systemduserunitdir=$(systemd_get_userunitdir) + ) + + econf "${myeconfargs[@]}" } src_install() { @@ -223,10 +235,6 @@ src_install() { 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" |