From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- media-sound/mpd/Manifest | 24 +++ media-sound/mpd/files/mpd-0.18.conf.patch | 78 ++++++++ media-sound/mpd/files/mpd-0.20.4.init | 32 +++ media-sound/mpd/files/mpd-0.20.4.logrotate | 6 + 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 | 44 +++++ media-sound/mpd/mpd-0.19.19.ebuild | 256 ++++++++++++++++++++++++ media-sound/mpd/mpd-0.19.21-r1.ebuild | 253 ++++++++++++++++++++++++ media-sound/mpd/mpd-0.19.21.ebuild | 256 ++++++++++++++++++++++++ media-sound/mpd/mpd-0.20.10.ebuild | 260 +++++++++++++++++++++++++ media-sound/mpd/mpd-0.20.4.ebuild | 253 ++++++++++++++++++++++++ media-sound/mpd/mpd-0.20.6.ebuild | 260 +++++++++++++++++++++++++ media-sound/mpd/mpd-0.20.8.ebuild | 260 +++++++++++++++++++++++++ media-sound/mpd/mpd-0.20.9.ebuild | 260 +++++++++++++++++++++++++ 16 files changed, 2391 insertions(+) create mode 100644 media-sound/mpd/Manifest create mode 100644 media-sound/mpd/files/mpd-0.18.conf.patch create mode 100644 media-sound/mpd/files/mpd-0.20.4.init create mode 100644 media-sound/mpd/files/mpd-0.20.4.logrotate create mode 100644 media-sound/mpd/files/mpd-0.9.15-systemd.patch create mode 100644 media-sound/mpd/files/mpd.logrotate create mode 100644 media-sound/mpd/files/mpd2.init create mode 100644 media-sound/mpd/metadata.xml create mode 100644 media-sound/mpd/mpd-0.19.19.ebuild create mode 100644 media-sound/mpd/mpd-0.19.21-r1.ebuild create mode 100644 media-sound/mpd/mpd-0.19.21.ebuild create mode 100644 media-sound/mpd/mpd-0.20.10.ebuild create mode 100644 media-sound/mpd/mpd-0.20.4.ebuild create mode 100644 media-sound/mpd/mpd-0.20.6.ebuild create mode 100644 media-sound/mpd/mpd-0.20.8.ebuild create mode 100644 media-sound/mpd/mpd-0.20.9.ebuild (limited to 'media-sound/mpd') diff --git a/media-sound/mpd/Manifest b/media-sound/mpd/Manifest new file mode 100644 index 000000000000..f2a204a86b3f --- /dev/null +++ b/media-sound/mpd/Manifest @@ -0,0 +1,24 @@ +AUX mpd-0.18.conf.patch 2969 SHA256 a8eb3e339513d6284f6be0a63f9676e44d768fc77d40ebe9f3073dd3171f0fae SHA512 4b646bc5d8fe4c76421f4cb0dbc7894cf9118492662ea1127f90c48f84760a1167988692c2b63f49182afcd46c578de7203356bbf9dd47787f9129f7c3dbf4a5 WHIRLPOOL 58f4a56426f66cd3337aafbfd6612bfc850fa022d13a150ff7f923e48f5d225c376ff751dab0ac5c6753320c060f04fc53a88e64b5ae3238499d3ce563df7654 +AUX mpd-0.20.4.init 690 SHA256 7bef9d2025b627cec085c0c67f7dccdd47b69434ebed9ad0337f0cf31e9febe4 SHA512 d4c60d7b5b6e4067439be96aaa9d8d6f7bd7607ad42a618b04af94815cdbe900e06f11c6897f96cab623d6859d681feb11fa02f36fdce4841ed59c88ef86666f WHIRLPOOL 1ee35ee5dd2adf3df15343c6b82d004d6dcbae8f53b0238e88f333998e632ce66f4ff038dffe7fea13b85771da77deeb4906dccd832e24394b99015f6dcf9ed1 +AUX mpd-0.20.4.logrotate 79 SHA256 4c732b3129f7747f0f2becc7498319aabd1784ad358d1e2e2083b8777078aa62 SHA512 b4616307eb4b06e42a53120bb37276ea19cb1b3096094214062835f71093a1d196bc515b6b6f1e23dbd83a49151565807071959408c4f1078d95925660d3b324 WHIRLPOOL 9f542501a536a0baa16c3f0af028d6e52fab4e9758da762114f8aa29f32e5d10f38fa1d7bb75a812e56b41451136bb13cf05f0c7559be4b08cab6503747498c9 +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 +DIST mpd-0.19.21.tar.xz 708512 SHA256 8305b8bc026f4b6bde28b8dd09bfdddbe5590acf36358eed4d083a396e301730 SHA512 a65690012a74def273ffb4e87465d8f3f7f2ce6f6e9117e35aa0891cd638f904df0ef4c4923c39e9a0c3e1d93d09aab713979adf5c191b54fa7e8b5b81abd232 WHIRLPOOL 397bc2158591137ab8a30e3377458dcef0ea600e218723831977ea7ec9f5b14ae1221b2b7456daa9e249b3aa95c61f7a1f0742656ace42c837e28892dd3d7604 +DIST mpd-0.20.10.tar.xz 778828 SHA256 52fbc1125cdba41ba999add2820d45f3ce7cf493006bb04d8f0b2937204d3121 SHA512 bac6a71e5b85600c590eae6b785474574cf0d7b03d9add537161b968a2997a975a597639a9fece119a01a7e27b5207523e4ae30b2f4f35791eff8c3ff26d107c WHIRLPOOL f0e2ab6b76848c88f57e13b16258c9d4810e9642f54c3f8d3378fedf484b97ed62c4afad6f217235de4e282d0b2ff99ffc40eac19774b72c1a2291f4f7e54e21 +DIST mpd-0.20.4.tar.xz 770132 SHA256 712b25351c12616630c580204e1c3dcba3ae2993a56cff1c346c87e334d69728 SHA512 d0c01ae6a3fd59e5ccdc24225bd9bb9e63620f1a395d317573499cc045de81f2abd803ca87eb1b2ca1d26d25167aaa6f5523e96f9512619272b857190efa0a72 WHIRLPOOL 9446b7096c6d2eb41a9421ad8e58e7a70a66e7abb381e75edabf0718c0098646e82ca16d7157e6c453836825eb03a2eca09ff7f80e95918718e42da85ae30c9e +DIST mpd-0.20.6.tar.xz 772140 SHA256 f4055e1189e5cc00e83706b2e0b5ead924ced0303e073d7802ee9f9a8eba4b47 SHA512 3377e095eaf8cd3ae14e4218fd85d1bcd79d29899ad4c61f5cd2a0b714c5e8aa22aa3b8bd54477195b93ddd44b8e82f8c6428c8f36174c98cba631554224dcfe WHIRLPOOL e3509fb61bed5e766d17ed66178d049bd13b3b088046e7c4d2400d5aebc2d82936ef60297e99db6b386bd474c40caecc3c6d5fd6f703810f3438dce8febfe41f +DIST mpd-0.20.8.tar.xz 773128 SHA256 7d177f29663c4a0997413401e52bbf11d2bb472773bbcf9294f839c4b8751e35 SHA512 063feafae7137ea5b61498132b4fcc2e04e23bb9d6fa849a0c6d90c40ecc0a841617dec0f53021bfc5add559b59388d20ef211e1bc88fcaca46b5ecbf1bb8960 WHIRLPOOL 2dcc30e9eebdb466486cf6aff93796b2837ede92c5a01f20643ba64af86b9583b1702ac578653d897be3a9cfee2bb5b817584804a2d5192b31920dcdd7a47d62 +DIST mpd-0.20.9.tar.xz 773404 SHA256 cd77a2869e32354b004cc6b34fcb0bee56114caa2d9ed862aaa8071441e34eb7 SHA512 3b29fed4146ca09e3b5866aeea280ca3fb412d182a940da6c1418525e251385fdb18bb58ea99754ad5ba3704a3e2033ff2ef54c392117af7c0be30b78708a2e7 WHIRLPOOL 31fb2302c1165f53848145f6725020ed41aa446653f7132730fbe755d7e19e30266bcbcd61c9cdf6c603db4d34afe64814a887f539e9116ccc2c89054825e1e7 +EBUILD mpd-0.19.19.ebuild 7647 SHA256 55c9daa1f5cd33b4c44f8b15ce829f8a4d7dfe5bcc75bca63bfd7d7d065f51b3 SHA512 8c69f7db31ae45d0531dfd4f98984bbd88c70118ffa9188ae6be2152105accadedacf7219883700ed1f40e9c32a02f37dcb1d2c809ff452223241606f7d86169 WHIRLPOOL 7f8e580ca4efb3b811f49b1e517d8b756710ff2373504bc8094f36ca2167c292a868ec1c2663f535216bf4c2fcad93ea7ccea468c095283ff8ec8d40afe67fe2 +EBUILD mpd-0.19.21-r1.ebuild 7541 SHA256 771618362478efef1b7188eb1e91765a118fa44b553a316a70002f2859b06e13 SHA512 0df1083f07267d02a593bc696ee594a839cfac5513c21ed3ad5a36d927e80d11fe4c8192630ccd413afe9f818dac2a3b3278ca070c53a4cbb85905932818f0b6 WHIRLPOOL a9ec6faba5ed5647427f1850041c1fb0bc4eaf2acdd06d30fd5b81ec14f9902a0aedeaa0d3e76d231f6ab5d3335d139ab1239a54189aa455d7e6d23ad7252ec6 +EBUILD mpd-0.19.21.ebuild 7661 SHA256 a8233595991e67cf0baf648bb62dd76cfeafc2174858cb07b968024c64ac57d6 SHA512 41fb613f3f8b2cf1926ce6682103e389c126e4fa05845a0a7a0bd723a8fa188da6230fa84ab19851b02a8bbc469616016228509b6f50c508364cdfe9e55409eb WHIRLPOOL 510358706cfb353149a2e61812bd5cfec1c60746b6b6e5da4cd944f53506fdc685cd022805968df5a11266ffd6de62f806829329f70f17d1e67f8711c657ad5b +EBUILD mpd-0.20.10.ebuild 7198 SHA256 fa2219d68e983e2fe9cd96f85d761ad30c54d3568bfe21d45d605fb0c31c03cf SHA512 05a65009c7de5795c939687881e21b43901528f3b45698181fea4c44ef36bd9998d6284ed445bfcc5eee8664f319d61363391d229db7673de4fcd5d75b0a98f4 WHIRLPOOL cabcfd7c09477be9530a99e9e7c5041b112be26b025e07c145c12667332cdf709fb9accc178057d63f730c28d7abc36d8ade22c07e022dfcbd2eca82a387f020 +EBUILD mpd-0.20.4.ebuild 7572 SHA256 9b0aa673e0a2a8c4f4780908440153529370ba8ef11aa44d467ce4228cb20332 SHA512 9b641695c28ecd914491275b4e837ad0c681b16f79c3cb898c323c4aa9d944e55576ff91339e759dfc59545452efd6d5dc283a60a81600158f57f3fdeefebc8a WHIRLPOOL f592c0f232fd35f3d8ee65346522ad6b790a9076f65234320aa218dcfe68a6a7c142f68bdda23a74ffb280b565bc35ecce4d56f3d44989045a1963dbcfd2d2a2 +EBUILD mpd-0.20.6.ebuild 7212 SHA256 cd6f578adcbc133459514d50a0f3563a6aefc1f8133c1919aa3193b761d5fb51 SHA512 5616b50c1bd4c3e279ba20ca8fbe8c9bdb6556c796f1940047bb21fdd635cd0fa1e9ef62abbd83ae75499fccc9fcdb34cb6300c3f901a135505480d677982640 WHIRLPOOL f98250a93612cff802ba1c5a55799401a12b5a44d5f6297eac01ae50a0c8aeeee59bf1bbdb83666210124bbb204706503ff7b59a82073eb32c72c065b54e8d37 +EBUILD mpd-0.20.8.ebuild 7214 SHA256 949cc46846acabc7a0680bbc910a0b218fc5c6c1f6e9f0c2fecfe8677f1e0646 SHA512 2a73288afaa5fceeacb38efe9584e1e5c7ac30c5d230b751d333b8d9e22ea88c77e5996f51180863613087ae043e874ba544490418c7e7bda0b79230df01ef23 WHIRLPOOL 52026762bbf5f522b1b0783f9def8ef6daf6c465c520e8a442ae6e0dd9a0c0019ab318be98636a9e07f9f505bebb30f72fac3ae3ebdf794e0559695d45557f81 +EBUILD mpd-0.20.9.ebuild 7214 SHA256 949cc46846acabc7a0680bbc910a0b218fc5c6c1f6e9f0c2fecfe8677f1e0646 SHA512 2a73288afaa5fceeacb38efe9584e1e5c7ac30c5d230b751d333b8d9e22ea88c77e5996f51180863613087ae043e874ba544490418c7e7bda0b79230df01ef23 WHIRLPOOL 52026762bbf5f522b1b0783f9def8ef6daf6c465c520e8a442ae6e0dd9a0c0019ab318be98636a9e07f9f505bebb30f72fac3ae3ebdf794e0559695d45557f81 +MISC ChangeLog 8307 SHA256 e536c58df3121af0b941fa5f9cac97cd937f31f4088ff9c2dd710b1d9f40a7b1 SHA512 6433b30c05877ece08fa9e4e37559903262c98af9bfe7eba5c7612f0841eb0daa39594cedffd785b92d904760abbcfa2db276be89400bacc122c954e71302039 WHIRLPOOL c0800c2916349f99f7802622919dc8a440a2a29352660ded70cd788fabad3874f07032154c65d084df6ccf69b9200b246b1f373795d43da49b9833cdc18cf630 +MISC ChangeLog-2015 53813 SHA256 3bfde23e96541dbd8c1494fb4dbcd82d529cdc4f937e3dae20394275559d6588 SHA512 3ac4683ab616c9b1b0f61e7c393267faf0091031481ed1c759d60860a6d895586f57536dc67138a1502a14350f76738fb68e4cba9780e89f45ea4faa1350d358 WHIRLPOOL 073fc7946e7c80cc1de5f8e5b1df67df70639903f3b1d2c7500fb34e31c1cf36d6649c70f2f819fba886ff0a06b197f9fd775ef4c551bfc64b51ebd7179830e1 +MISC metadata.xml 2426 SHA256 09b47c4cd017f2beaa6235827fd72a18c587355494d5e03339b7da1a6993cf52 SHA512 d14e3facfa691178ebb911cd117c9f2f6e5b8a634c8682e521ff006efd7b705549ae2468decae533056ec1b6eb4c06d0fb81b644d20c464ad650e298f74892bf WHIRLPOOL b1892f305a7db7da57cb7fd0ff8ad40802bcb21b4ea08da0ee1d57dfb86c7c3e989b7d1a7d729a6008d4ef0abfc87a6d7e7b712ebc6966779ce687f9c1883d43 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 000000000000..d71056f7cd0d --- /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.20.4.init b/media-sound/mpd/files/mpd-0.20.4.init new file mode 100644 index 000000000000..3eb0bc2bcb82 --- /dev/null +++ b/media-sound/mpd/files/mpd-0.20.4.init @@ -0,0 +1,32 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +: CFGFILE=${CFGFILE:=/etc/mpd.conf} + +depend() { + need localmount + use net netmount nfsmount alsasound esound pulseaudio + config ${CFGFILE} +} + +get_config() { + x=$1 + test -e ${CFGFILE} || return 1 + sed -n \ + -e '/^[ \t]*'${x}'/{s:^[ \t]*'${x}'[ \t]\+"\?\([^#"]\+\)[^"]*"\?$:\1: ; p }' \ + ${CFGFILE} +} + +extra_started_commands='reload' +command=/usr/bin/mpd +command_args=${opts:=${CFGFILE}} +required_files=${CFGFILE} +pidfile=$(get_config pid_file) +description="Music Player Daemon" + +reload() { + ebegin "Reloading ${SVCNAME}" + kill -HUP `cat ${pidfile}` + eend $? +} diff --git a/media-sound/mpd/files/mpd-0.20.4.logrotate b/media-sound/mpd/files/mpd-0.20.4.logrotate new file mode 100644 index 000000000000..ff47d1098cf1 --- /dev/null +++ b/media-sound/mpd/files/mpd-0.20.4.logrotate @@ -0,0 +1,6 @@ +/var/lib/mpd/log { + missingok + postrotate + /etc/init.d/mpd reload + endscript +} 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 000000000000..cd03ebe16855 --- /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 +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 + #include + +-#ifdef ENABLE_SYSTEMD_DAEMON ++#ifdef ENABLE_SYSTEMD + #include + #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 000000000000..c913c1facc43 --- /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 000000000000..ae5a2cce0ebc --- /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 000000000000..a824cdeb5ff0 --- /dev/null +++ b/media-sound/mpd/metadata.xml @@ -0,0 +1,44 @@ + + + + + hwoarang@gentoo.org + Markos Chandras + + + sound@gentoo.org + Gentoo Sound project + + + 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) + Enable GLib usage + 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 MIDI support via wildmidi + Support for ZIP files + + + MusicPlayerDaemon/MPD + + 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 000000000000..6802c56a0465 --- /dev/null +++ b/media-sound/mpd/mpd-0.19.19.ebuild @@ -0,0 +1,256 @@ +# 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="!=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 ) ) + 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 +) + +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 +} diff --git a/media-sound/mpd/mpd-0.19.21-r1.ebuild b/media-sound/mpd/mpd-0.19.21-r1.ebuild new file mode 100644 index 000000000000..95bd8d46b86a --- /dev/null +++ b/media-sound/mpd/mpd-0.19.21-r1.ebuild @@ -0,0 +1,253 @@ +# Copyright 1999-2016 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="!=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 ) ) + 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 +) + +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) \ + --with-systemduserunitdir=$(systemd_get_userunitdir) \ + ${mpdconf} +} + +src_install() { + emake DESTDIR="${D}" install + + insinto /etc + newins doc/mpdconf.dist mpd.conf + + newinitd "${FILESDIR}"/${PN}2.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}.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.19.21.ebuild b/media-sound/mpd/mpd-0.19.21.ebuild new file mode 100644 index 000000000000..0d1a80bd0ea4 --- /dev/null +++ b/media-sound/mpd/mpd-0.19.21.ebuild @@ -0,0 +1,256 @@ +# Copyright 1999-2016 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="!=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 ) ) + 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 +) + +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/system/${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 +} diff --git a/media-sound/mpd/mpd-0.20.10.ebuild b/media-sound/mpd/mpd-0.20.10.ebuild new file mode 100644 index 000000000000..7e3851e85edd --- /dev/null +++ b/media-sound/mpd/mpd-0.20.10.ebuild @@ -0,0 +1,260 @@ +# Copyright 1999-2017 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 ~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 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} ) + network? ( || ( ${ENCODER_PLUGINS} ) ) + recorder? ( || ( ${ENCODER_PLUGINS} ) ) + opus? ( ogg ) + upnp? ( 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 ) + 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:= ) + 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 +) + +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 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.20.4.ebuild b/media-sound/mpd/mpd-0.20.4.ebuild new file mode 100644 index 000000000000..3cb6b50f5acb --- /dev/null +++ b/media-sound/mpd/mpd-0.20.4.ebuild @@ -0,0 +1,253 @@ +# 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="!=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 ) ) + 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, merged upstream +) + +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) \ + --with-systemduserunitdir=$(systemd_get_userunitdir) \ + ${mpdconf} +} + +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.20.6.ebuild b/media-sound/mpd/mpd-0.20.6.ebuild new file mode 100644 index 000000000000..a608f71a691c --- /dev/null +++ b/media-sound/mpd/mpd-0.20.6.ebuild @@ -0,0 +1,260 @@ +# 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 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 ~x86-fbsd ~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" + +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 ) +" + +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 ) + 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:= ) + 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 +) + +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 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.20.8.ebuild b/media-sound/mpd/mpd-0.20.8.ebuild new file mode 100644 index 000000000000..0b190a1feb8b --- /dev/null +++ b/media-sound/mpd/mpd-0.20.8.ebuild @@ -0,0 +1,260 @@ +# 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 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 ~x86-fbsd ~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" + +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 ) +" + +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 ) + 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:= ) + 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 +) + +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 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.20.9.ebuild b/media-sound/mpd/mpd-0.20.9.ebuild new file mode 100644 index 000000000000..0b190a1feb8b --- /dev/null +++ b/media-sound/mpd/mpd-0.20.9.ebuild @@ -0,0 +1,260 @@ +# 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 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 ~x86-fbsd ~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" + +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 ) +" + +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 ) + 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:= ) + 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 +) + +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 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 +} -- cgit v1.2.3