1 |
commit: 775dd5b1a1f7ebee22d1f0fb935f2c50cc1a7b6b |
2 |
Author: Rasmus Thomsen <rasmus.thomsen <AT> live <DOT> de> |
3 |
AuthorDate: Wed Mar 29 16:46:39 2017 +0000 |
4 |
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
5 |
CommitDate: Wed Mar 29 16:52:55 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=775dd5b1 |
7 |
|
8 |
media-sound/mpd: add ebuild with musl fixes |
9 |
|
10 |
media-sound/mpd/Manifest | 8 + |
11 |
media-sound/mpd/files/fix-mpd-stacksize.patch | 19 ++ |
12 |
media-sound/mpd/files/mpd-0.18.conf.patch | 78 ++++++++ |
13 |
media-sound/mpd/files/mpd-0.9.15-systemd.patch | 106 ++++++++++ |
14 |
media-sound/mpd/files/mpd.logrotate | 7 + |
15 |
media-sound/mpd/files/mpd2.init | 36 ++++ |
16 |
media-sound/mpd/metadata.xml | 41 ++++ |
17 |
media-sound/mpd/mpd-0.19.19.ebuild | 257 +++++++++++++++++++++++++ |
18 |
8 files changed, 552 insertions(+) |
19 |
|
20 |
diff --git a/media-sound/mpd/Manifest b/media-sound/mpd/Manifest |
21 |
new file mode 100644 |
22 |
index 0000000..be5136d |
23 |
--- /dev/null |
24 |
+++ b/media-sound/mpd/Manifest |
25 |
@@ -0,0 +1,8 @@ |
26 |
+AUX fix-mpd-stacksize.patch 598 SHA256 7ae663ecc08498e1d822349cf580eb738f43218308ae0b75efe128276f8ab98a SHA512 f425c20e18207a406f84a6a664f02625fca9d42977b1289f4ba8595406b26f6aa73b4f1cb5a1115858cb75fa7844f42d7174adba3f6af1af216c44901a1ccaa0 WHIRLPOOL 5858b739aee09b6d63a40edb0873c318cd1ad68327936147aafb419b50efd5a971b58aeea5396cbd40d4991842411e35cb594e048a6da7c409816929455341f0 |
27 |
+AUX mpd-0.18.conf.patch 2969 SHA256 a8eb3e339513d6284f6be0a63f9676e44d768fc77d40ebe9f3073dd3171f0fae SHA512 4b646bc5d8fe4c76421f4cb0dbc7894cf9118492662ea1127f90c48f84760a1167988692c2b63f49182afcd46c578de7203356bbf9dd47787f9129f7c3dbf4a5 WHIRLPOOL 58f4a56426f66cd3337aafbfd6612bfc850fa022d13a150ff7f923e48f5d225c376ff751dab0ac5c6753320c060f04fc53a88e64b5ae3238499d3ce563df7654 |
28 |
+AUX mpd-0.9.15-systemd.patch 3056 SHA256 6acef4297941a7d146897465f2dcc9b88e4b3a632e50167177e8105249522c4a SHA512 c9f8b909121f6f3b08ca4bf37ae744aa1468a306e8671681babac228aa5d4b528d094214e2596a862d0b685d01a448b6fd6b8170d6990e10f387f1e498c9dd3b WHIRLPOOL dd1290608de22ad342cc879a7ea316932c4233875d434aa49ee82c7b4e602c3a3bfc5a3c63b71b30338fa9109f4a8d8cb2a276b0b0797b8ef0f4f646bcae0d9a |
29 |
+AUX mpd.logrotate 199 SHA256 e1cbf1c8c77e32789c4dc55bb7761d17c5708a5cb9b9753a7517c15de98696cb SHA512 c55ef8f0e691ef0b358e5dc81a206328de4ccef449959fd7e6f9e95e07cbbee7446639278ebe6f4517063c9a6169e07bca0109958dc722a2caea1503693410ae WHIRLPOOL 85737af75673b8bb7492373bcc02d21205400b2db67340128dffe9fc7a41e98150562730bb8d2b7d94c9dc91dd11dc15c554db75af782b57634dd056a36339ce |
30 |
+AUX mpd2.init 727 SHA256 6ca354f8b8c4b0e8595f7dbda1058fd471a6b538469ea10e7caf8e7f263f621a SHA512 be2b52b3b69dcfb34e7753dce908c4f3c5b2d2e768c9177dbf06d72be487ccb2f2b58c292c0e19c5c6faf83bcabd1acb8fc6f1214b2de030b005b7759566892a WHIRLPOOL c1cb941224c1e7c23fdc722b898f416a4625bf05e9c1cf4d38e8f06ca3b9c45babb37a8cc516bab5185b5206e2839cf67e0334f37a820367d8178d638770621f |
31 |
+DIST mpd-0.19.19.tar.xz 707356 SHA256 bc856cda4136403446d53d11576f86990b61d1fe4668f6008e9eae47450d4e1d SHA512 949bfab2aa5dffb4089ce2023accc934648091d36768f8e4c75f62b4038e21db1e2ef3bb07a0f1cf6a91d0532cac8e7146be948d84dc4d7cdc5b252b7d815b64 WHIRLPOOL 1b2c68d998a26de41bca25cbeab0c6478406c831ac4322162d2c258622224137a1a2dcd88b690ee1869c7f2652201fd534ee773a6e51f6e61bdb5926783f4d75 |
32 |
+EBUILD mpd-0.19.19.ebuild 7686 SHA256 c0228c78aa6d20a9dbd23fce8a0e7e7c23d2cb4cee49042ff396ea0ca5db3b37 SHA512 fb3273f53bf83312070adec629009f4f41b85239edf184c68b174f5091f494de9a030f3438c69bb0fda3bc9c116f5956426b1d758415323744cfb3a2d916708b WHIRLPOOL 9d7af469fc41720db991a0ad28ecf78156f66d422364be03579b8485a9855c166494934cf9d7e022b1be112d47aa09a6a8a5b549c72ba4f01fb7ad7df15ca4de |
33 |
+MISC metadata.xml 2249 SHA256 1b97f04a2698651751529dae3dd5ea97adf287745210844efc755538862524dd SHA512 f17f2e7c9be709ef89cfa429738ebe50962a9f16ce54fe30561be7dc43e02b6f927c4fec83fa4358450fff269970487d5796f59c99d6166a2961e54419f0daa0 WHIRLPOOL b54d4533213f5cb1d7f1fd03143a50f8c15c02e6aa0deeddc1f139a5898a0a7530bca910d404ea17e7b7ad66859d0bfeb5f939f004e2e9c58bdd8f4495138ebb |
34 |
|
35 |
diff --git a/media-sound/mpd/files/fix-mpd-stacksize.patch b/media-sound/mpd/files/fix-mpd-stacksize.patch |
36 |
new file mode 100644 |
37 |
index 0000000..26d6f78 |
38 |
--- /dev/null |
39 |
+++ b/media-sound/mpd/files/fix-mpd-stacksize.patch |
40 |
@@ -0,0 +1,19 @@ |
41 |
+diff --git a/src/thread/Thread.cxx b/src/thread/Thread.cxx |
42 |
+index 2932d47..fd1f3ce 100644 |
43 |
+--- a/src/thread/Thread.cxx |
44 |
++++ b/src/thread/Thread.cxx |
45 |
+@@ -43,8 +43,12 @@ Thread::Start(void (*_f)(void *ctx), void *_ctx, Error &error) |
46 |
+ #ifndef NDEBUG |
47 |
+ creating = true; |
48 |
+ #endif |
49 |
+- |
50 |
+- int e = pthread_create(&handle, nullptr, ThreadProc, this); |
51 |
++ pthread_attr_t attr, *attrptr = nullptr; |
52 |
++ if ((pthread_attr_init(&attr) == 0) |
53 |
++ && (pthread_attr_setstacksize(&attr, 1024*1024) == 0)) { |
54 |
++ attrptr = &attr; |
55 |
++ } |
56 |
++ int e = pthread_create(&handle, attrptr, ThreadProc, this); |
57 |
+ |
58 |
+ if (e != 0) { |
59 |
+ #ifndef NDEBUG |
60 |
|
61 |
diff --git a/media-sound/mpd/files/mpd-0.18.conf.patch b/media-sound/mpd/files/mpd-0.18.conf.patch |
62 |
new file mode 100644 |
63 |
index 0000000..d71056f |
64 |
--- /dev/null |
65 |
+++ b/media-sound/mpd/files/mpd-0.18.conf.patch |
66 |
@@ -0,0 +1,78 @@ |
67 |
+diff --git a/doc/mpdconf.dist b/doc/mpdconf.dist |
68 |
+index 470a5c9..9f595a6 100644 |
69 |
+--- a/doc/mpdconf.dist |
70 |
++++ b/doc/mpdconf.dist |
71 |
+@@ -10,14 +10,14 @@ |
72 |
+ # be disabled and audio files will only be accepted over ipc socket (using |
73 |
+ # file:// protocol) or streaming files over an accepted protocol. |
74 |
+ # |
75 |
+-#music_directory "~/music" |
76 |
++music_directory "/var/lib/mpd/music" |
77 |
+ # |
78 |
+ # This setting sets the MPD internal playlist directory. The purpose of this |
79 |
+ # directory is storage for playlists created by MPD. The server will use |
80 |
+ # playlist files not created by the server but only if they are in the MPD |
81 |
+ # format. This setting defaults to playlist saving being disabled. |
82 |
+ # |
83 |
+-#playlist_directory "~/.mpd/playlists" |
84 |
++playlist_directory "/var/lib/mpd/playlists" |
85 |
+ # |
86 |
+ # This setting sets the location of the MPD database. This file is used to |
87 |
+ # load the database at server start up and store the database while the |
88 |
+@@ -25,7 +25,7 @@ |
89 |
+ # MPD to accept files over ipc socket (using file:// protocol) or streaming |
90 |
+ # files over an accepted protocol. |
91 |
+ # |
92 |
+-#db_file "~/.mpd/database" |
93 |
++db_file "/var/lib/mpd/database" |
94 |
+ # |
95 |
+ # These settings are the locations for the daemon log files for the daemon. |
96 |
+ # These logs are great for troubleshooting, depending on your log_level |
97 |
+@@ -34,20 +34,20 @@ |
98 |
+ # The special value "syslog" makes MPD use the local syslog daemon. This |
99 |
+ # setting defaults to logging to syslog, otherwise logging is disabled. |
100 |
+ # |
101 |
+-#log_file "~/.mpd/log" |
102 |
++log_file "/var/lib/mpd/log" |
103 |
+ # |
104 |
+ # This setting sets the location of the file which stores the process ID |
105 |
+-# for use of mpd --kill and some init scripts. This setting is disabled by |
106 |
+-# default and the pid file will not be stored. |
107 |
++# for use of mpd --kill and some init scripts. This setting is required when |
108 |
++# using the Gentoo init script. |
109 |
+ # |
110 |
+-#pid_file "~/.mpd/pid" |
111 |
++pid_file "/var/lib/mpd/pid" |
112 |
+ # |
113 |
+ # This setting sets the location of the file which contains information about |
114 |
+ # most variables to get MPD back into the same general shape it was in before |
115 |
+ # it was brought down. This setting is disabled by default and the server |
116 |
+ # state will be reset on server start up. |
117 |
+ # |
118 |
+-#state_file "~/.mpd/state" |
119 |
++state_file "/var/lib/mpd/state" |
120 |
+ # |
121 |
+ # The location of the sticker database. This is a database which |
122 |
+ # manages dynamic information attached to songs. |
123 |
+@@ -64,7 +64,7 @@ |
124 |
+ # initialization. This setting is disabled by default and MPD is run as the |
125 |
+ # current user. |
126 |
+ # |
127 |
+-#user "nobody" |
128 |
++user "mpd" |
129 |
+ # |
130 |
+ # This setting specifies the group that MPD will run as. If not specified |
131 |
+ # primary group of user specified with "user" setting will be used (if set). |
132 |
+@@ -78,10 +78,10 @@ |
133 |
+ # This setting can deny access to control of the daemon. |
134 |
+ # |
135 |
+ # For network |
136 |
+-#bind_to_address "any" |
137 |
++bind_to_address "localhost" |
138 |
+ # |
139 |
+ # And for Unix Socket |
140 |
+-#bind_to_address "~/.mpd/socket" |
141 |
++bind_to_address "/var/lib/mpd/socket" |
142 |
+ # |
143 |
+ # This setting is the TCP port that is desired for the daemon to get assigned |
144 |
+ # to. |
145 |
|
146 |
diff --git a/media-sound/mpd/files/mpd-0.9.15-systemd.patch b/media-sound/mpd/files/mpd-0.9.15-systemd.patch |
147 |
new file mode 100644 |
148 |
index 0000000..cd03ebe |
149 |
--- /dev/null |
150 |
+++ b/media-sound/mpd/files/mpd-0.9.15-systemd.patch |
151 |
@@ -0,0 +1,106 @@ |
152 |
+Description: transition to libsystemd from deprecated libsystemd-daemon |
153 |
+ systemd 209 merged the various libsystemd-* libraries into a single |
154 |
+ libsystemd.so, so we check for that instead and rename the configure |
155 |
+ option, define, etc accordingly. |
156 |
+Author: Florian Schlichting <fsfs@××××××.org> |
157 |
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779762 |
158 |
+Forwarded: not-needed (solved in a less invasive and backward-compatible way upstream) |
159 |
+ |
160 |
+--- a/configure.ac |
161 |
++++ b/configure.ac |
162 |
+@@ -572,10 +572,10 @@ |
163 |
+ MPD_DEPENDS([enable_sqlite], [enable_glib], |
164 |
+ [Cannot use --enable-sqlite with --disable-glib]) |
165 |
+ |
166 |
+-AC_ARG_ENABLE(systemd-daemon, |
167 |
+- AS_HELP_STRING([--enable-systemd-daemon], |
168 |
+- [use the systemd daemon library (default=auto)]),, |
169 |
+- [enable_systemd_daemon=$linux_auto]) |
170 |
++AC_ARG_ENABLE(systemd, |
171 |
++ AS_HELP_STRING([--enable-systemd], |
172 |
++ [use the systemd library (default=auto)]),, |
173 |
++ [enable_systemd=$linux_auto]) |
174 |
+ |
175 |
+ AC_ARG_ENABLE(tcp, |
176 |
+ AS_HELP_STRING([--disable-tcp], |
177 |
+@@ -762,11 +762,11 @@ |
178 |
+ AC_MSG_ERROR([No client interfaces configured!]) |
179 |
+ fi |
180 |
+ |
181 |
+-MPD_AUTO_PKG(systemd_daemon, SYSTEMD_DAEMON, libsystemd-daemon, |
182 |
+- [systemd activation], [libsystemd-daemon not found]) |
183 |
+-AM_CONDITIONAL(ENABLE_SYSTEMD_DAEMON, test x$enable_systemd_daemon = xyes) |
184 |
+-if test x$enable_systemd_daemon = xyes; then |
185 |
+- AC_DEFINE([ENABLE_SYSTEMD_DAEMON], 1, [Define to use the systemd daemon library]) |
186 |
++MPD_AUTO_PKG(systemd, SYSTEMD, libsystemd, |
187 |
++ [systemd activation], [libsystemd not found]) |
188 |
++AM_CONDITIONAL(ENABLE_SYSTEMD, test x$enable_systemd = xyes) |
189 |
++if test x$enable_systemd = xyes; then |
190 |
++ AC_DEFINE([ENABLE_SYSTEMD], 1, [Define to use the systemd library]) |
191 |
+ fi |
192 |
+ |
193 |
+ dnl --------------------------------------------------------------------------- |
194 |
+--- a/Makefile.am |
195 |
++++ b/Makefile.am |
196 |
+@@ -58,7 +58,7 @@ |
197 |
+ $(ICU_LDADD) \ |
198 |
+ libutil.a \ |
199 |
+ $(FS_LIBS) \ |
200 |
+- $(SYSTEMD_DAEMON_LIBS) \ |
201 |
++ $(SYSTEMD_LIBS) \ |
202 |
+ $(GLIB_LIBS) |
203 |
+ |
204 |
+ src_mpd_SOURCES = \ |
205 |
+--- a/config.h.in |
206 |
++++ b/config.h.in |
207 |
+@@ -75,8 +75,8 @@ |
208 |
+ /* Define to enable sqlite database support */ |
209 |
+ #undef ENABLE_SQLITE |
210 |
+ |
211 |
+-/* Define to use the systemd daemon library */ |
212 |
+-#undef ENABLE_SYSTEMD_DAEMON |
213 |
++/* Define to use the systemd library */ |
214 |
++#undef ENABLE_SYSTEMD |
215 |
+ |
216 |
+ /* Define to enable the TwoLAME encoder plugin */ |
217 |
+ #undef ENABLE_TWOLAME_ENCODER |
218 |
+--- a/src/Listen.cxx |
219 |
++++ b/src/Listen.cxx |
220 |
+@@ -32,7 +32,7 @@ |
221 |
+ #include <string.h> |
222 |
+ #include <assert.h> |
223 |
+ |
224 |
+-#ifdef ENABLE_SYSTEMD_DAEMON |
225 |
++#ifdef ENABLE_SYSTEMD |
226 |
+ #include <systemd/sd-daemon.h> |
227 |
+ #endif |
228 |
+ |
229 |
+@@ -77,7 +77,7 @@ |
230 |
+ } |
231 |
+ } |
232 |
+ |
233 |
+-#ifdef ENABLE_SYSTEMD_DAEMON |
234 |
++#ifdef ENABLE_SYSTEMD |
235 |
+ |
236 |
+ static bool |
237 |
+ listen_systemd_activation(Error &error_r) |
238 |
+@@ -109,7 +109,7 @@ |
239 |
+ |
240 |
+ listen_socket = new ClientListener(loop, partition); |
241 |
+ |
242 |
+-#ifdef ENABLE_SYSTEMD_DAEMON |
243 |
++#ifdef ENABLE_SYSTEMD |
244 |
+ if (listen_systemd_activation(error)) |
245 |
+ return true; |
246 |
+ |
247 |
+--- a/doc/user.xml |
248 |
++++ b/doc/user.xml |
249 |
+@@ -110,7 +110,7 @@ |
250 |
+ libupnp-dev \ |
251 |
+ libavahi-client-dev \ |
252 |
+ libsqlite3-dev \ |
253 |
+- libsystemd-daemon-dev libwrap0-dev \ |
254 |
++ libsystemd-dev libwrap0-dev \ |
255 |
+ libcppunit-dev xmlto \ |
256 |
+ libboost-dev \ |
257 |
+ libglib2.0-dev libicu-dev |
258 |
|
259 |
diff --git a/media-sound/mpd/files/mpd.logrotate b/media-sound/mpd/files/mpd.logrotate |
260 |
new file mode 100644 |
261 |
index 0000000..c913c1f |
262 |
--- /dev/null |
263 |
+++ b/media-sound/mpd/files/mpd.logrotate |
264 |
@@ -0,0 +1,7 @@ |
265 |
+/var/lib/mpd/log { |
266 |
+ missingok |
267 |
+ postrotate |
268 |
+ [ -f /var/run/mpd.pid ] && cat /var/run/mpd.pid | xargs /bin/kill -HUP |
269 |
+ [ -f /var/lib/mpd/pid ] && cat /var/lib/mpd/pid | xargs /bin/kill -HUP |
270 |
+ endscript |
271 |
+} |
272 |
|
273 |
diff --git a/media-sound/mpd/files/mpd2.init b/media-sound/mpd/files/mpd2.init |
274 |
new file mode 100644 |
275 |
index 0000000..ae5a2cc |
276 |
--- /dev/null |
277 |
+++ b/media-sound/mpd/files/mpd2.init |
278 |
@@ -0,0 +1,36 @@ |
279 |
+#!/sbin/openrc-run |
280 |
+# Copyright 1999-2016 Gentoo Foundation |
281 |
+# Distributed under the terms of the GNU General Public License v2 |
282 |
+ |
283 |
+depend() { |
284 |
+ need localmount |
285 |
+ use net netmount nfsmount alsasound esound pulseaudio |
286 |
+} |
287 |
+ |
288 |
+checkconfig() { |
289 |
+ if ! [ -f /etc/mpd.conf ]; then |
290 |
+ eerror "Configuration file /etc/mpd.conf does not exist." |
291 |
+ return 1 |
292 |
+ fi |
293 |
+ |
294 |
+ if ! grep -q '^\s*pid_file' /etc/mpd.conf; then |
295 |
+ eerror "Invalid configuration: pid_file needs to be set." |
296 |
+ return 1 |
297 |
+ fi |
298 |
+ |
299 |
+ return 0 |
300 |
+} |
301 |
+ |
302 |
+start() { |
303 |
+ checkconfig || return 1 |
304 |
+ |
305 |
+ ebegin "Starting Music Player Daemon" |
306 |
+ start-stop-daemon --start --quiet --exec /usr/bin/mpd -- /etc/mpd.conf 2>/dev/null |
307 |
+ eend $? |
308 |
+} |
309 |
+ |
310 |
+stop() { |
311 |
+ ebegin "Stopping Music Player Daemon" |
312 |
+ /usr/bin/mpd --kill |
313 |
+ eend $? |
314 |
+} |
315 |
|
316 |
diff --git a/media-sound/mpd/metadata.xml b/media-sound/mpd/metadata.xml |
317 |
new file mode 100644 |
318 |
index 0000000..dc07436 |
319 |
--- /dev/null |
320 |
+++ b/media-sound/mpd/metadata.xml |
321 |
@@ -0,0 +1,41 @@ |
322 |
+<?xml version="1.0" encoding="UTF-8"?> |
323 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
324 |
+<pkgmetadata> |
325 |
+ <maintainer type="person"> |
326 |
+ <email>hwoarang@g.o</email> |
327 |
+ <name>Markos Chandras</name> |
328 |
+ </maintainer> |
329 |
+ <maintainer type="project"> |
330 |
+ <email>sound@g.o</email> |
331 |
+ <name>Gentoo Sound project</name> |
332 |
+ </maintainer> |
333 |
+ <use> |
334 |
+ <flag name="adplug">Enable the AdPlug decoder plugin</flag> |
335 |
+ <flag name="cdio">Use libcdio for ISO9660 parsing support</flag> |
336 |
+ <flag name="curl">Support for web stream listening</flag> |
337 |
+ <flag name="eventfd">Use the eventfd function in MPD's event loop</flag> |
338 |
+ <flag name="faad">Use external faad library for AAC decoding</flag> |
339 |
+ <flag name="fifo">Support writing audio to a FIFO</flag> |
340 |
+ <flag name="fluidsynth">Enables Fluidsynth MIDI software synthesis (discouraged)</flag> |
341 |
+ <flag name="glib">Enable GLib usage</flag> |
342 |
+ <flag name="gme">Enables support for <pkg>media-libs/game-music-emu</pkg> for playing various video game music formats.</flag> |
343 |
+ <flag name="id3tag">Support for ID3 tags</flag> |
344 |
+ <flag name="inotify">Use the Linux kernel inotify subsystem to notice changes to mpd music library</flag> |
345 |
+ <flag name="lame">Support for MP3 streaming via Icecast2</flag> |
346 |
+ <flag name="libmpdclient">Enable support for remote mpd databases</flag> |
347 |
+ <flag name="libsoxr">Enable the libsoxr resampler</flag> |
348 |
+ <flag name="mpg123">Enable support for mp3 decoding over media-sound/mpg123</flag> |
349 |
+ <flag name="network">Enables network streaming support</flag> |
350 |
+ <flag name="nfs">Enable support for the Network File System</flag> |
351 |
+ <flag name="opus">Enable Opus codec support</flag> |
352 |
+ <flag name="pipe">Support writing audio to a pipe</flag> |
353 |
+ <flag name="recorder">Enables output plugin for recording radio streams</flag> |
354 |
+ <flag name="sid">Build with SID (Commodore 64 Audio) support</flag> |
355 |
+ <flag name="signalfd">Use the signalfd function in MPD's event loop</flag> |
356 |
+ <flag name="soundcloud">Build plugin to access soundcloud</flag> |
357 |
+ <flag name="systemd">Enable support for systemd socket activation</flag> |
358 |
+ <flag name="twolame">Support twolame MPEG-2 encoding</flag> |
359 |
+ <flag name="wildmidi">Enable MIDI support via wildmidi</flag> |
360 |
+ <flag name="zip">Support for ZIP files</flag> |
361 |
+ </use> |
362 |
+</pkgmetadata> |
363 |
|
364 |
diff --git a/media-sound/mpd/mpd-0.19.19.ebuild b/media-sound/mpd/mpd-0.19.19.ebuild |
365 |
new file mode 100644 |
366 |
index 0000000..d582e37 |
367 |
--- /dev/null |
368 |
+++ b/media-sound/mpd/mpd-0.19.19.ebuild |
369 |
@@ -0,0 +1,257 @@ |
370 |
+# Copyright 1999-2017 Gentoo Foundation |
371 |
+# Distributed under the terms of the GNU General Public License v2 |
372 |
+ |
373 |
+EAPI=6 |
374 |
+ |
375 |
+inherit autotools eutils flag-o-matic linux-info multilib systemd user |
376 |
+ |
377 |
+DESCRIPTION="The Music Player Daemon (mpd)" |
378 |
+HOMEPAGE="https://www.musicpd.org" |
379 |
+SRC_URI="https://www.musicpd.org/download/${PN}/${PV%.*}/${P}.tar.xz" |
380 |
+ |
381 |
+LICENSE="GPL-2" |
382 |
+SLOT="0" |
383 |
+KEYWORDS="alpha amd64 arm hppa ppc ppc64 ~sh x86 ~x86-fbsd ~x64-macos" |
384 |
+IUSE="adplug +alsa ao audiofile bzip2 cdio +curl debug +eventfd expat faad |
385 |
+ +fifo +ffmpeg flac fluidsynth +glib gme +icu +id3tag +inotify +ipv6 jack |
386 |
+ lame mms libav libmpdclient libsamplerate libsoxr +mad mikmod modplug |
387 |
+ mpg123 musepack +network nfs ogg openal opus oss pipe pulseaudio recorder |
388 |
+ samba selinux sid +signalfd sndfile soundcloud sqlite systemd tcpd twolame |
389 |
+ unicode upnp vorbis wavpack wildmidi zeroconf zip zlib" |
390 |
+ |
391 |
+OUTPUT_PLUGINS="alsa ao fifo jack network openal oss pipe pulseaudio recorder" |
392 |
+DECODER_PLUGINS="adplug audiofile faad ffmpeg flac fluidsynth mad mikmod |
393 |
+ modplug mpg123 musepack ogg flac sid vorbis wavpack wildmidi" |
394 |
+ENCODER_PLUGINS="audiofile flac lame twolame vorbis" |
395 |
+ |
396 |
+REQUIRED_USE="|| ( ${OUTPUT_PLUGINS} ) |
397 |
+ || ( ${DECODER_PLUGINS} ) |
398 |
+ ao? ( glib ) |
399 |
+ gme? ( glib ) |
400 |
+ jack? ( glib ) |
401 |
+ network? ( || ( ${ENCODER_PLUGINS} ) |
402 |
+ glib ) |
403 |
+ recorder? ( || ( ${ENCODER_PLUGINS} ) ) |
404 |
+ sid? ( glib ) |
405 |
+ soundcloud? ( glib ) |
406 |
+ sqlite? ( glib ) |
407 |
+ opus? ( ogg ) |
408 |
+ upnp? ( expat ) |
409 |
+ vorbis? ( glib ) |
410 |
+ wavpack? ( glib )" |
411 |
+ |
412 |
+CDEPEND="!<sys-cluster/mpich2-1.4_rc2 |
413 |
+ adplug? ( media-libs/adplug ) |
414 |
+ alsa? ( media-sound/alsa-utils |
415 |
+ media-libs/alsa-lib ) |
416 |
+ ao? ( media-libs/libao[alsa?,pulseaudio?] ) |
417 |
+ audiofile? ( media-libs/audiofile ) |
418 |
+ bzip2? ( app-arch/bzip2 ) |
419 |
+ cdio? ( dev-libs/libcdio-paranoia ) |
420 |
+ curl? ( net-misc/curl ) |
421 |
+ expat? ( dev-libs/expat ) |
422 |
+ faad? ( media-libs/faad2 ) |
423 |
+ ffmpeg? ( |
424 |
+ libav? ( media-video/libav:0= ) |
425 |
+ !libav? ( media-video/ffmpeg:0= ) |
426 |
+ ) |
427 |
+ flac? ( media-libs/flac[ogg?] ) |
428 |
+ fluidsynth? ( media-sound/fluidsynth ) |
429 |
+ glib? ( dev-libs/glib:2 ) |
430 |
+ gme? ( >=media-libs/game-music-emu-0.6.0_pre20120802 ) |
431 |
+ icu? ( dev-libs/icu:= ) |
432 |
+ id3tag? ( media-libs/libid3tag ) |
433 |
+ jack? ( media-sound/jack-audio-connection-kit ) |
434 |
+ lame? ( network? ( media-sound/lame ) ) |
435 |
+ libmpdclient? ( media-libs/libmpdclient ) |
436 |
+ libsamplerate? ( media-libs/libsamplerate ) |
437 |
+ mad? ( media-libs/libmad ) |
438 |
+ mikmod? ( media-libs/libmikmod:0 ) |
439 |
+ mms? ( media-libs/libmms ) |
440 |
+ modplug? ( media-libs/libmodplug ) |
441 |
+ mpg123? ( >=media-sound/mpg123-1.12.2 ) |
442 |
+ musepack? ( media-sound/musepack-tools ) |
443 |
+ network? ( >=media-libs/libshout-2 |
444 |
+ !lame? ( !vorbis? ( media-libs/libvorbis ) ) ) |
445 |
+ nfs? ( net-fs/libnfs ) |
446 |
+ ogg? ( media-libs/libogg ) |
447 |
+ openal? ( media-libs/openal ) |
448 |
+ opus? ( media-libs/opus ) |
449 |
+ pulseaudio? ( media-sound/pulseaudio ) |
450 |
+ samba? ( || ( <net-fs/samba-4.0.25[smbclient] >=net-fs/samba-4.0.25 ) ) |
451 |
+ sid? ( || ( media-libs/libsidplay:2 media-libs/libsidplayfp ) ) |
452 |
+ sndfile? ( media-libs/libsndfile ) |
453 |
+ soundcloud? ( >=dev-libs/yajl-2 ) |
454 |
+ libsoxr? ( media-libs/soxr ) |
455 |
+ sqlite? ( dev-db/sqlite:3 ) |
456 |
+ systemd? ( sys-apps/systemd ) |
457 |
+ tcpd? ( sys-apps/tcp-wrappers ) |
458 |
+ twolame? ( media-sound/twolame ) |
459 |
+ upnp? ( net-libs/libupnp ) |
460 |
+ vorbis? ( media-libs/libvorbis ) |
461 |
+ wavpack? ( media-sound/wavpack ) |
462 |
+ wildmidi? ( media-sound/wildmidi ) |
463 |
+ zeroconf? ( net-dns/avahi[dbus] ) |
464 |
+ zip? ( dev-libs/zziplib ) |
465 |
+ zlib? ( sys-libs/zlib )" |
466 |
+DEPEND="${CDEPEND} |
467 |
+ dev-libs/boost |
468 |
+ virtual/pkgconfig" |
469 |
+RDEPEND="${CDEPEND} |
470 |
+ selinux? ( sec-policy/selinux-mpd ) |
471 |
+" |
472 |
+ |
473 |
+PATCHES=( |
474 |
+ "${FILESDIR}"/${PN}-0.18.conf.patch |
475 |
+ "${FILESDIR}"/${PN}-0.9.15-systemd.patch # bug 584742 |
476 |
+ "${FILESDIR}"/fix-mpd-stacksize.patch |
477 |
+) |
478 |
+ |
479 |
+pkg_setup() { |
480 |
+ use network || ewarn "Icecast and Shoutcast streaming needs networking." |
481 |
+ use fluidsynth && ewarn "Using fluidsynth is discouraged by upstream." |
482 |
+ |
483 |
+ enewuser mpd "" "" "/var/lib/mpd" audio |
484 |
+ |
485 |
+ if use eventfd; then |
486 |
+ CONFIG_CHECK+=" ~EVENTFD" |
487 |
+ ERROR_EVENTFD="${P} requires eventfd in-kernel support." |
488 |
+ fi |
489 |
+ if use signalfd; then |
490 |
+ CONFIG_CHECK+=" ~SIGNALFD" |
491 |
+ ERROR_SIGNALFD="${P} requires signalfd in-kernel support." |
492 |
+ fi |
493 |
+ if use inotify; then |
494 |
+ CONFIG_CHECK+=" ~INOTIFY_USER" |
495 |
+ ERROR_INOTIFY_USER="${P} requires inotify in-kernel support." |
496 |
+ fi |
497 |
+ if use eventfd || use signalfd || use inotify; then |
498 |
+ linux-info_pkg_setup |
499 |
+ fi |
500 |
+ |
501 |
+ elog "If you will be starting mpd via /etc/init.d/mpd, please make |
502 |
+ sure that MPD's pid_file is _set_." |
503 |
+} |
504 |
+ |
505 |
+src_prepare() { |
506 |
+ cp -f doc/mpdconf.example doc/mpdconf.dist || die "cp failed" |
507 |
+ default |
508 |
+ eautoreconf |
509 |
+} |
510 |
+ |
511 |
+src_configure() { |
512 |
+ local mpdconf="--enable-database --disable-roar --disable-documentation |
513 |
+ --enable-dsd --enable-largefile --disable-osx --disable-shine-encoder |
514 |
+ --disable-solaris-output --enable-tcp --enable-un --disable-werror |
515 |
+ --docdir=${EPREFIX}/usr/share/doc/${PF}" |
516 |
+ |
517 |
+ if use network; then |
518 |
+ mpdconf+=" --enable-shout $(use_enable vorbis vorbis-encoder) |
519 |
+ --enable-httpd-output $(use_enable lame lame-encoder) |
520 |
+ $(use_enable twolame twolame-encoder) |
521 |
+ $(use_enable audiofile wave-encoder)" |
522 |
+ else |
523 |
+ mpdconf+=" --disable-shout --disable-vorbis-encoder |
524 |
+ --disable-httpd-output --disable-lame-encoder |
525 |
+ --disable-twolame-encoder --disable-wave-encoder" |
526 |
+ fi |
527 |
+ |
528 |
+ if use samba || use upnp; then |
529 |
+ mpdconf+=" --enable-neighbor-plugins" |
530 |
+ fi |
531 |
+ |
532 |
+ append-lfs-flags |
533 |
+ append-ldflags "-L/usr/$(get_libdir)/sidplay/builders" |
534 |
+ |
535 |
+ econf \ |
536 |
+ $(use_enable eventfd) \ |
537 |
+ $(use_enable signalfd) \ |
538 |
+ $(use_enable libmpdclient) \ |
539 |
+ $(use_enable expat) \ |
540 |
+ $(use_enable upnp) \ |
541 |
+ $(use_enable adplug) \ |
542 |
+ $(use_enable alsa) \ |
543 |
+ $(use_enable ao) \ |
544 |
+ $(use_enable audiofile) \ |
545 |
+ $(use_enable zlib) \ |
546 |
+ $(use_enable bzip2) \ |
547 |
+ $(use_enable cdio cdio-paranoia) \ |
548 |
+ $(use_enable curl) \ |
549 |
+ $(use_enable samba smbclient) \ |
550 |
+ $(use_enable nfs) \ |
551 |
+ $(use_enable debug) \ |
552 |
+ $(use_enable ffmpeg) \ |
553 |
+ $(use_enable fifo) \ |
554 |
+ $(use_enable flac) \ |
555 |
+ $(use_enable fluidsynth) \ |
556 |
+ $(use_enable gme) \ |
557 |
+ $(use_enable id3tag id3) \ |
558 |
+ $(use_enable inotify) \ |
559 |
+ $(use_enable ipv6) \ |
560 |
+ $(use_enable cdio iso9660) \ |
561 |
+ $(use_enable jack) \ |
562 |
+ $(use_enable soundcloud) \ |
563 |
+ $(use_enable tcpd libwrap) \ |
564 |
+ $(use_enable libsamplerate lsr) \ |
565 |
+ $(use_enable libsoxr soxr) \ |
566 |
+ $(use_enable mad) \ |
567 |
+ $(use_enable mikmod) \ |
568 |
+ $(use_enable mms) \ |
569 |
+ $(use_enable modplug) \ |
570 |
+ $(use_enable musepack mpc) \ |
571 |
+ $(use_enable mpg123) \ |
572 |
+ $(use_enable openal) \ |
573 |
+ $(use_enable opus) \ |
574 |
+ $(use_enable oss) \ |
575 |
+ $(use_enable pipe pipe-output) \ |
576 |
+ $(use_enable pulseaudio pulse) \ |
577 |
+ $(use_enable recorder recorder-output) \ |
578 |
+ $(use_enable sid sidplay) \ |
579 |
+ $(use_enable sndfile sndfile) \ |
580 |
+ $(use_enable sqlite) \ |
581 |
+ $(use_enable systemd) \ |
582 |
+ $(use_enable vorbis) \ |
583 |
+ $(use_enable wavpack) \ |
584 |
+ $(use_enable wildmidi) \ |
585 |
+ $(use_enable zip zzip) \ |
586 |
+ $(use_enable icu) \ |
587 |
+ $(use_enable glib) \ |
588 |
+ $(use_enable faad aac) \ |
589 |
+ $(use_with zeroconf zeroconf avahi) \ |
590 |
+ --with-systemdsystemunitdir=$(systemd_get_systemunitdir) \ |
591 |
+ ${mpdconf} |
592 |
+} |
593 |
+ |
594 |
+src_install() { |
595 |
+ emake DESTDIR="${D}" install |
596 |
+ |
597 |
+ insinto /etc |
598 |
+ newins doc/mpdconf.dist mpd.conf |
599 |
+ |
600 |
+ newinitd "${FILESDIR}"/${PN}2.init ${PN} |
601 |
+ |
602 |
+ systemd_newuserunit systemd/${PN}.service ${PN}.service |
603 |
+ sed -i '/WantedBy=/c WantedBy=default.target' \ |
604 |
+ "${ED}"/usr/lib/systemd/user/mpd.service || die "sed failed" |
605 |
+ |
606 |
+ if use unicode; then |
607 |
+ sed -i -e 's:^#filesystem_charset.*$:filesystem_charset "UTF-8":' \ |
608 |
+ "${ED}"/etc/mpd.conf || die "sed failed" |
609 |
+ fi |
610 |
+ |
611 |
+ insinto /etc/logrotate.d |
612 |
+ newins "${FILESDIR}"/${PN}.logrotate ${PN} |
613 |
+ |
614 |
+ use prefix || diropts -m0755 -o mpd -g audio |
615 |
+ dodir /var/lib/mpd |
616 |
+ keepdir /var/lib/mpd |
617 |
+ dodir /var/lib/mpd/music |
618 |
+ keepdir /var/lib/mpd/music |
619 |
+ dodir /var/lib/mpd/playlists |
620 |
+ keepdir /var/lib/mpd/playlists |
621 |
+} |
622 |
+ |
623 |
+pkg_postinst() { |
624 |
+ # also change the homedir if the user has existed before |
625 |
+ usermod -d "/var/lib/mpd" mpd |
626 |
+} |