From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9F8AB1581EE for ; Tue, 08 Apr 2025 09:34:12 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 7213634313C for ; Tue, 08 Apr 2025 09:34:12 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 992031104B8; Tue, 08 Apr 2025 09:34:07 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 81BFB1104B8 for ; Tue, 08 Apr 2025 09:34:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 04172343108 for ; Tue, 08 Apr 2025 09:34:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5DF77159F for ; Tue, 08 Apr 2025 09:34:05 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1744104731.3f83d2daecdabce6ddbe39eaa26a1d4c6cb6c292.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/mpd/, media-sound/mpd/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-sound/mpd/Manifest media-sound/mpd/files/mpd-0.24.2.init media-sound/mpd/files/mpd.1-0.24.2 media-sound/mpd/files/mpd.conf.5-0.24.2 media-sound/mpd/metadata.xml media-sound/mpd/mpd-0.24.2.ebuild X-VCS-Directories: media-sound/mpd/ media-sound/mpd/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 3f83d2daecdabce6ddbe39eaa26a1d4c6cb6c292 X-VCS-Branch: master Date: Tue, 08 Apr 2025 09:34:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 641a9dbe-1756-4a8b-9b66-5542069c05cb X-Archives-Hash: 8a4401c3ce650c6f3913bf2034a0d002 commit: 3f83d2daecdabce6ddbe39eaa26a1d4c6cb6c292 Author: Nicolas PARLANT parhuet fr> AuthorDate: Mon Apr 7 15:36:59 2025 +0000 Commit: Sam James gentoo org> CommitDate: Tue Apr 8 09:32:11 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f83d2da media-sound/mpd: add 0.24.2 SRC_URI : use $(ver_cut 1-2) iuse : * rm cue, no dep * rm fifo, no dep * rm pipe, no dep * rm udisks (this is only dbus) * rm network (was httpd+shout, but this is two different plugins) * rm yajl, it's used only with qobuz/snapcast/soundcloud * add httpd * add shout * add tremor * upstream prefers mpg123 over mad, so +mpg123 REQUIRED_USE : * soundcloud don't require qobuz deps : * boost is not longer required * libogg is required only for opus/tremor/vorbis * for qobuz, select ffmpeg/libgcrypt with ffmpeg/!ffmpeg * media-libs/libsidplay is no longer supported (masked for ppc/ppc64) * twolame/lame are only required for httpd/shout/recorder documentation : * add sphinx-rtd-theme * set HTML_DOCS * use manpages from DISTFILES if !doc initscript : * use eerror and return 1 for failures * stop sed of mpd.conf after the first occurence of 'user' Closes: https://bugs.gentoo.org/939943 Closes: https://bugs.gentoo.org/944145 Signed-off-by: Nicolas PARLANT parhuet.fr> Signed-off-by: Sam James gentoo.org> media-sound/mpd/Manifest | 1 + media-sound/mpd/files/mpd-0.24.2.init | 64 ++++++ media-sound/mpd/files/mpd.1-0.24.2 | 105 ++++++++++ media-sound/mpd/files/mpd.conf.5-0.24.2 | 249 ++++++++++++++++++++++++ media-sound/mpd/metadata.xml | 3 + media-sound/mpd/mpd-0.24.2.ebuild | 331 ++++++++++++++++++++++++++++++++ 6 files changed, 753 insertions(+) diff --git a/media-sound/mpd/Manifest b/media-sound/mpd/Manifest index c53399afb32a..7583a43d43be 100644 --- a/media-sound/mpd/Manifest +++ b/media-sound/mpd/Manifest @@ -1,3 +1,4 @@ DIST mpd-0.23.15.16-fix-libfmt-11.1.0.patch.xz 7260 BLAKE2B 4321f48f8bf21011a1919517969ce7de6eaa5d6c051654ec96e57d01fe48f38341d7ecb206aec314bd33288b2a6a299d594328fa136b04547d6d0cb48de85f25 SHA512 a52443039a9f60c10d19e85ef1b4c8a762d6c6f135257d9a2c8f01c936f4007dd096e4bec354ffb756519794960f57d5b2a7882c8e9296d6e2f07f99e4267d20 DIST mpd-0.23.15.tar.xz 778384 BLAKE2B 78036078b850afab900b5d50e44ce83cbbf900369f5028d4177fdbfc4128dd3c35c59a773528a1fcfcc0179d0e579566b827fe87ef780a88082dc3b7f70cd5e7 SHA512 12329dbd0c1994c1bd95b88ce2a62a4c1d691b655e9e4fac7e9ef7066d0be3422b26fad3ea6ca144ba9b21add0a7c492c4f74fd2b68a1539bff2e0d2714db709 DIST mpd-0.23.16.tar.xz 778572 BLAKE2B 7e4e7dafdc60cac59b7b47898cdaf8332970dae9209f8dd408aee7f4ecf90909404ab12a263d06aae44124d795d0d1092425294034fc0728fc9b4ac973a75dd0 SHA512 1b7042cbe8543270b26c1a9e4f35d80d68e03682e4d1e039af8f52527753830972de2a763e5dfb7bde28f4c9d0308a397becd4a206d17e7a5b2fa97f48b69d20 +DIST mpd-0.24.2.tar.xz 1016792 BLAKE2B c2e04ba3f41b1aee202a94e28888a663a39fea75a6b37f310908e25cccad5c9bc036953c76f17423118a3539daad314e9047d76744aa590be40c596a2d42088b SHA512 5a4be67dd7473bf9fab429bd347fe4920866cc47b842543ae2949cb4672e343814d9fc681ad5fb76e4ffce6ed42023d102e0e383013022bdde5db9e14e233d92 diff --git a/media-sound/mpd/files/mpd-0.24.2.init b/media-sound/mpd/files/mpd-0.24.2.init new file mode 100644 index 000000000000..a172c804525c --- /dev/null +++ b/media-sound/mpd/files/mpd-0.24.2.init @@ -0,0 +1,64 @@ +#!/sbin/openrc-run +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +: CFGFILE=${CFGFILE:=/etc/mpd.conf} + +depend() { + need localmount + use net netmount 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;q} }' \ + ${CFGFILE} +} + +extra_started_commands='reload' +# Required by io_uring +rc_ulimit="-l 65535" +command=/usr/bin/mpd +command_args=${CFGFILE} +mpd_user="$(get_config user)" +mpd_group="$(get_config group)" +required_files=${CFGFILE} +pidfile=$(get_config pid_file) +description="Music Player Daemon" + +check_config() { + if [ -z "$(get_config pid_file)" ]; then + eerror "pid_file must be set in ${CFGFILE}!" + return 1 + fi + if [ -z "$(get_config user)" ]; then + eerror "user must be set in ${CFGFILE}!" + return 1 + fi + if [ -z "$(get_config group)" ]; then + eerror "group must be set in ${CFGFILE}!" + return 1 + fi +} + +start_pre() { + check_config || return 1 + + local pid_dir="$(dirname "${pidfile}")" + checkpath -d -m 700 -o "${mpd_user}:${mpd_group}" "${pid_dir}" + + local log_file="$(get_config log_file)" + if [ -n "${log_file}" ] && [ "${log_file}" != "syslog" ]; then + local log_dir="$(dirname "${log_file}")" + checkpath -d -m 755 -o "${mpd_user}:${mpd_group}" "${log_dir}" + fi +} + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + start-stop-daemon --pidfile ${pidfile} --signal HUP + eend $? +} diff --git a/media-sound/mpd/files/mpd.1-0.24.2 b/media-sound/mpd/files/mpd.1-0.24.2 new file mode 100644 index 000000000000..cd2980caeecc --- /dev/null +++ b/media-sound/mpd/files/mpd.1-0.24.2 @@ -0,0 +1,105 @@ +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "MPD" "1" "Apr 08, 2025" "0.24.2" "Music Player Daemon" +.SH NAME +mpd \- MPD documentation +.SH SYNOPSIS +.sp +\fBmpd\fP [options] [CONF_FILE] +.SH DESCRIPTION +.sp +MPD is a daemon for playing music. Music is played through the configured audio output(s) (which are generally local, but can be remote). The daemon stores info about all available music, and this info can be easily searched and retrieved. Player control, info retrieval, and playlist management can all be managed remotely. +.sp +MPD searches for a config file in \fB$XDG_CONFIG_HOME/mpd/mpd.conf\fP +then \fB~/.mpdconf\fP then \fB~/.mpd/mpd.conf\fP then \fB/etc/mpd.conf\fP or uses \fBCONF_FILE\fP\&. +.sp +Read more about MPD at \X'tty: link http://www.musicpd.org/'\fI\%http://www.musicpd.org/\fP\X'tty: link' +.SH OPTIONS +.INDENT 0.0 +.TP +.B \-\-help +Output a brief help message. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-kill +Kill the currently running mpd session. The pid_file parameter must be specified in the config file for this to work. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-no\-config +Don\(aqt read from the configuration file. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-no\-daemon +Don\(aqt detach from console. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-stderr +Print messages to stderr. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-systemd +Used on Linux only so MPD can reliably detect whether it was started as a systemd service. Users shouldn\(aqt use this switch on the command line. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-verbose +Verbose logging. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-version +Print version information. +.UNINDENT +.SH FILES +.INDENT 0.0 +.TP +.B \fB$XDG_CONFIG_HOME/mpd/mpd.conf\fP +User configuration file (usually \fB~/.config/mpd/mpd.conf\fP). +.TP +.B \fB/etc/mpd.conf\fP +Global configuration file. +.UNINDENT +.SH SEE ALSO +.sp +\fBmpd.conf(5)\fP, \fBmpc(1)\fP +.SH BUGS +.sp +If you find a bug, please report it at \X'tty: link https://github.com/MusicPlayerDaemon/MPD/issues/'\fI\%https://github.com/MusicPlayerDaemon/MPD/issues/\fP\X'tty: link' +.SH AUTHOR +Max Kellermann +.SH COPYRIGHT +2003-2025 The Music Player Daemon Project +.\" Generated by docutils manpage writer. +. diff --git a/media-sound/mpd/files/mpd.conf.5-0.24.2 b/media-sound/mpd/files/mpd.conf.5-0.24.2 new file mode 100644 index 000000000000..ea379c6a2b54 --- /dev/null +++ b/media-sound/mpd/files/mpd.conf.5-0.24.2 @@ -0,0 +1,249 @@ +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "MPD.CONF" "5" "Apr 08, 2025" "0.24.2" "Music Player Daemon" +.SH NAME +mpd.conf \- mpd.conf documentation +.SH DESCRIPTION +.sp +\fBmpd.conf\fP is the configuration file for \fBmpd(1)\fP\&. If +not specified on the command line, MPD first searches for it at +\fB$XDG_CONFIG_HOME/mpd/mpd.conf\fP then at \fB~/.mpdconf\fP then +at \fB~/.mpd/mpd.conf\fP and then in \fB/etc/mpd.conf\fP\&. +.sp +Each line in the configuration file contains a setting name and its value, e.g.: +.sp +\fBconnection_timeout \(dq5\(dq\fP +.sp +Lines starting with \fB#\fP are treated as comments and ignored. +.sp +For settings that specify a file system path, the tilde (\(aq~\(aq) is expanded to $HOME. +In addition, the following path expansions are supported: +.INDENT 0.0 +.IP \(bu 2 +\fI$HOME\fP +.IP \(bu 2 +\fI$XDG_CONFIG_HOME\fP +.IP \(bu 2 +\fI$XDG_MUSIC_DIR\fP +.IP \(bu 2 +\fI$XDG_CACHE_HOME\fP +.IP \(bu 2 +\fI$XDG_RUNTIME_DIR\fP +.UNINDENT +.sp +\fBmusic_directory \(dq~/Music\(dq\fP +.sp +\fBdb_file \(dq$XDG_CONFIG_HOME/mpd/database\(dq\fP +.sp +Some of the settings are grouped in blocks with curly braces, e.g. per\-plugin settings: +.INDENT 0.0 +.INDENT 3.5 +.sp +.EX +audio_output { + type \(dqalsa\(dq + name \(dqMy ALSA output\(dq + device \(dqiec958:CARD=Intel,DEV=0\(dq + mixer_control \(dqPCM\(dq +} +.EE +.UNINDENT +.UNINDENT +.sp +The \fBinclude\fP directive can be used to include settings from +another file; the given file name is relative to the current file: +.sp +\fBinclude \(dqother.conf\(dq\fP +.sp +You can use include_optional instead if you want the included file to be +optional; the directive will be ignored if the file does not exist: +.sp +\fBinclude_optional \(dqmay_not_exist.conf\(dq\fP +.sp +See \fBdocs/mpdconf.example\fP in the source tarball for an example +configuration file. +.sp +This manual is not complete, it lists only the most important options. +Please read the MPD user manual for a complete configuration guide: +\X'tty: link http://www.musicpd.org/doc/user/'\fI\%http://www.musicpd.org/doc/user/\fP\X'tty: link' +.SH OPTIONAL PARAMETERS +.INDENT 0.0 +.TP +.B db_file +This specifies where the db file will be stored. +.TP +.B log_file +This specifies where the log file should be located. The special value \(dqsyslog\(dq makes MPD use the local syslog daemon. +.TP +.B sticker_file +The location of the sticker database. This is a database which manages +dynamic information attached to songs. +.TP +.B pid_file +This specifies the file to save mpd\(aqs process ID in. +.TP +.B music_directory +This specifies the directory where music is located. If you do not configure +this, you can only play streams. +.TP +.B playlist_directory +This specifies the directory where saved playlists are stored. If +you do not configure this, you cannot save playlists. +.TP +.B state_file +This specifies if a state file is used and where it is located. The state of +mpd will be saved to this file when mpd is terminated by a TERM signal or by +the \fBkill\fP command. When mpd is restarted, it will read the state file and +restore the state of mpd (including the playlist). +.TP +.B restore_paused +Put MPD into pause mode instead of starting playback after startup. +.TP +.B user +This specifies the user that MPD will run as, if set. MPD should never run +as root, and you may use this option to make MPD change its user id after +initialization. Do not use this option if you start MPD as an unprivileged +user. +.TP +.B port +This specifies the port that mpd listens on. The default is 6600. +.TP +.B log_level +Suppress all messages below the given threshold. The following +log levels are available: +.INDENT 7.0 +.IP \(bu 2 +\fBerror\fP: errors +.IP \(bu 2 +\fBwarning\fP: warnings +.IP \(bu 2 +\fBnotice\fP: interesting informational messages +.IP \(bu 2 +\fBinfo\fP: unimportant informational messages +.IP \(bu 2 +\fBverbose\fP: debug messages (for developers and for +troubleshooting) +.UNINDENT +.sp +The default is \fBnotice\fP\&. +.TP +.B follow_outside_symlinks +Control if MPD will follow symbolic links pointing outside the music dir. You +must recreate the database after changing this option. The default is \(dqyes\(dq. +.TP +.B follow_inside_symlinks +Control if MPD will follow symbolic links pointing inside the music dir, +potentially adding duplicates to the database. You must recreate the +database after changing this option. The default is \(dqyes\(dq. +.TP +.B zeroconf_enabled +If yes, and MPD has been compiled with support for Avahi or Bonjour, service +information will be published with Zeroconf. The default is yes. +.TP +.B zeroconf_name +If Zeroconf is enabled, this is the service name to publish. This name should +be unique to your local network, but name collisions will be properly dealt +with. The default is \(dqMusic Player @ %h\(dq, where %h will be replaced with the +hostname of the machine running MPD. +.TP +.B audio_output +See DESCRIPTION and the various \fBAUDIO OUTPUT PARAMETERS\fP sections for the +format of this parameter. Multiple audio_output sections may be specified. If +no audio_output section is specified, then MPD will scan for a usable audio +output. +.TP +.B filesystem_charset +This specifies the character set used for the filesystem. A list of supported +character sets can be obtained by running \(dqiconv \-l\(dq. The default is +determined from the locale when the db was originally created. +.TP +.B save_absolute_paths_in_playlists +This specifies whether relative or absolute paths for song filenames are used +when saving playlists. The default is \(dqno\(dq. +.TP +.B auto_update +This specifies the whether to support automatic update of music database +when files are changed in music_directory. The default is to disable +autoupdate of database. +.TP +.B auto_update_depth +Limit the depth of the directories being watched, 0 means only watch the +music directory itself. There is no limit by default. +.UNINDENT +.SH REQUIRED AUDIO OUTPUT PARAMETERS +.INDENT 0.0 +.TP +.B type +This specifies the audio output type. See the list of supported outputs in +\fBmpd \-\-version\fP for possible values. +.TP +.B name +This specifies a unique name for the audio output. +.UNINDENT +.SH OPTIONAL AUDIO OUTPUT PARAMETERS +.INDENT 0.0 +.TP +.B format +This specifies the sample rate, bits per sample, and number of channels of +audio that is sent to the audio output device. See documentation for the +\fBaudio_output_format\fP parameter for more details. The default is to use +whatever audio format is passed to the audio output. Any of the three +attributes may be an asterisk to specify that this attribute should not be +enforced +.TP +.B replay_gain_handler +Specifies how replay gain is applied. The default is \(dqsoftware\(dq, which uses +an internal software volume control. \(dqmixer\(dq uses the configured (hardware) +mixer control. \(dqnone\(dq disables replay gain on this audio output. +.TP +.B mixer_type +Specifies which mixer should be used for this audio output: the hardware +mixer (available for ALSA, OSS and PulseAudio), the software mixer or no +mixer (\(dqnone\(dq). By default, the hardware mixer is used for devices which +support it, and none for the others. +.UNINDENT +.SH FILES +.INDENT 0.0 +.TP +.B \fB$XDG_CONFIG_HOME/mpd/mpd.conf\fP +User configuration file (usually \fB~/.config/mpd/mpd.conf\fP). +.TP +.B \fB/etc/mpd.conf\fP +Global configuration file. +.UNINDENT +.SH SEE ALSO +.sp +\fBmpd(1)\fP, \fBmpc(1)\fP +.SH AUTHOR +Max Kellermann +.SH COPYRIGHT +2003-2025 The Music Player Daemon Project +.\" Generated by docutils manpage writer. +. diff --git a/media-sound/mpd/metadata.xml b/media-sound/mpd/metadata.xml index 8253dae1fb75..8d41cefe55dd 100644 --- a/media-sound/mpd/metadata.xml +++ b/media-sound/mpd/metadata.xml @@ -19,6 +19,7 @@ Support writing audio to a FIFO Enables Fluidsynth MIDI software synthesis (discouraged) Enables support for media-libs/game-music-emu for playing various video game music formats. + Enable built-in stream server Support for ID3 tags Use the Linux kernel inotify subsystem to notice changes to mpd music library Support for MP3 streaming via Icecast2 @@ -32,11 +33,13 @@ PipeWire support Build plugin to access qobuz Enables output plugin for recording radio streams + Enable ShoutCast/IceCast plugin using media-libs/libshout Use the signalfd function in MPD's event loop Snapcast audio plugin Enable support for the media-sound/sndio backend Build plugin to access soundcloud Enable support for systemd socket activation + Enable support for media-libs/tremor, a fixed-point version of the Ogg Vorbis decoder Support twolame MPEG-2 encoding Enable using music from a WebDAV share Enable MIDI support via wildmidi diff --git a/media-sound/mpd/mpd-0.24.2.ebuild b/media-sound/mpd/mpd-0.24.2.ebuild new file mode 100644 index 000000000000..29fc6d7d9630 --- /dev/null +++ b/media-sound/mpd/mpd-0.24.2.ebuild @@ -0,0 +1,331 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic linux-info meson systemd xdg + +DESCRIPTION="The Music Player Daemon (mpd)" +HOMEPAGE="https://www.musicpd.org https://github.com/MusicPlayerDaemon/MPD" +SRC_URI="https://www.musicpd.org/download/${PN}/$(ver_cut 1-2)/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" +IUSE="+alsa ao +audiofile bzip2 cdio chromaprint +curl doc +dbus + +eventfd expat faad +ffmpeg flac fluidsynth gme httpd +icu +id3tag +inotify + +io-uring jack lame libmpdclient libsamplerate libsoxr +mad mikmod mms + modplug +mpg123 musepack nfs openal openmpt opus oss pipewire pulseaudio qobuz + recorder samba selinux shout sid signalfd snapcast sndfile sndio soundcloud sqlite + systemd test tremor twolame upnp vorbis wavpack webdav wildmidi + zeroconf zip zlib" + +OUTPUT_PLUGINS="alsa ao jack httpd openal oss pipewire pulseaudio shout snapcast sndio recorder" +DECODER_PLUGINS="audiofile faad ffmpeg flac fluidsynth mad mikmod + modplug mpg123 musepack opus openmpt flac sid tremor vorbis wavpack wildmidi" +ENCODER_PLUGINS="audiofile flac lame twolame vorbis" + +REQUIRED_USE=" + || ( ${OUTPUT_PLUGINS} ) + || ( ${DECODER_PLUGINS} ) + ?? ( tremor vorbis ) + httpd? ( || ( ${ENCODER_PLUGINS} ) ) + recorder? ( || ( ${ENCODER_PLUGINS} ) ) + shout? ( || ( ${ENCODER_PLUGINS} ) ) + qobuz? ( curl ) + soundcloud? ( curl ) + upnp? ( curl expat ) + webdav? ( curl expat ) +" + +RESTRICT="!test? ( test )" + +COMMON_ENCODERS=" + lame? ( media-sound/lame ) + twolame? ( media-sound/twolame ) +" +RDEPEND=" + acct-user/mpd + dev-libs/libfmt:= + dev-libs/libpcre2:= + alsa? ( + media-libs/alsa-lib + media-sound/alsa-utils + ) + ao? ( media-libs/libao[alsa?,pulseaudio?] ) + audiofile? ( media-libs/audiofile:= ) + bzip2? ( app-arch/bzip2 ) + cdio? ( + dev-libs/libcdio:= + dev-libs/libcdio-paranoia:= + ) + chromaprint? ( media-libs/chromaprint:= ) + curl? ( net-misc/curl ) + dbus? ( sys-apps/dbus ) + doc? ( + dev-python/sphinx + dev-python/sphinx-rtd-theme + ) + expat? ( dev-libs/expat ) + faad? ( media-libs/faad2 ) + ffmpeg? ( media-video/ffmpeg:= ) + flac? ( media-libs/flac:= ) + fluidsynth? ( media-sound/fluidsynth:= ) + gme? ( media-libs/game-music-emu ) + httpd? ( ${COMMON_ENCODERS} ) + icu? ( + dev-libs/icu:= + virtual/libiconv + ) + id3tag? ( media-libs/libid3tag:= ) + io-uring? ( sys-libs/liburing:= ) + jack? ( virtual/jack ) + libmpdclient? ( media-libs/libmpdclient ) + libsamplerate? ( media-libs/libsamplerate ) + libsoxr? ( media-libs/soxr ) + mad? ( media-libs/libmad ) + mikmod? ( media-libs/libmikmod ) + mms? ( media-libs/libmms ) + modplug? ( media-libs/libmodplug ) + mpg123? ( media-sound/mpg123-base ) + musepack? ( media-sound/musepack-tools ) + nfs? ( net-fs/libnfs:= ) + openal? ( media-libs/openal ) + openmpt? ( media-libs/libopenmpt ) + opus? ( + media-libs/libogg + media-libs/opus + ) + pulseaudio? ( media-libs/libpulse ) + pipewire? ( media-video/pipewire:= ) + qobuz? ( + dev-libs/yajl:= + !ffmpeg? ( dev-libs/libgcrypt:= ) + ffmpeg? ( media-video/ffmpeg ) + ) + recorder? ( ${COMMON_ENCODERS} ) + samba? ( net-fs/samba:= ) + selinux? ( sec-policy/selinux-mpd ) + shout? ( + ${COMMON_ENCODERS} + media-libs/libshout + ) + sid? ( media-libs/libsidplayfp:= ) + snapcast? ( + dev-libs/yajl:= + media-sound/snapcast + ) + sndfile? ( media-libs/libsndfile ) + sndio? ( media-sound/sndio:= ) + soundcloud? ( dev-libs/yajl:= ) + sqlite? ( dev-db/sqlite:3 ) + systemd? ( sys-apps/systemd:= ) + tremor? ( + media-libs/libogg + media-libs/tremor + ) + upnp? ( net-libs/libupnp:= ) + vorbis? ( + media-libs/libogg + media-libs/libvorbis + ) + wavpack? ( media-sound/wavpack ) + wildmidi? ( media-sound/wildmidi ) + zeroconf? ( net-dns/avahi[dbus] ) + zip? ( dev-libs/zziplib:= ) + zlib? ( sys-libs/zlib:= ) +" +DEPEND=" + ${RDEPEND} + test? ( dev-cpp/gtest ) +" +BDEPEND="virtual/pkgconfig" + +pkg_setup() { + if use eventfd; then + CONFIG_CHECK+=" ~EVENTFD" + ERROR_EVENTFD="${P} requires eventfd in-kernel support." + fi + + if use signalfd; then + CONFIG_CHECK+=" ~SIGNALFD" + ERROR_SIGNALFD="${P} requires signalfd in-kernel support." + fi + + if use inotify; then + CONFIG_CHECK+=" ~INOTIFY_USER" + ERROR_INOTIFY_USER="${P} requires inotify in-kernel support." + fi + + if use io-uring; then + CONFIG_CHECK+=" ~IO_URING" + ERROR_IO_URING="${P} requires io-uring in-kernel support." + fi + + if use eventfd || use signalfd || use inotify || use io-uring; then + linux-info_pkg_setup + fi +} + +src_configure() { + local emesonargs=( + # media-libs/adplug is not packaged anymore + -Dadplug=disabled + $(meson_feature alsa) + $(meson_feature ao) + $(meson_feature audiofile) + $(meson_feature bzip2) + $(meson_feature cdio cdio_paranoia) + $(meson_feature chromaprint) + -Dcue=true + $(meson_feature curl) + $(meson_feature dbus) + $(meson_use eventfd) + $(meson_feature expat) + $(meson_feature faad) + $(meson_feature ffmpeg) + -Dfifo=true + $(meson_feature flac) + $(meson_feature fluidsynth) + $(meson_feature gme) + $(meson_use httpd ) + $(meson_feature icu) + $(meson_feature id3tag) + $(meson_use inotify) + -Dipv6=enabled + $(meson_feature cdio iso9660) + $(meson_feature io-uring io_uring) + $(meson_feature jack) + $(meson_feature libmpdclient) + $(meson_feature libsamplerate) + $(meson_feature mad) + $(meson_feature mikmod) + $(meson_feature mms) + $(meson_feature modplug) + $(meson_feature musepack mpcdec) + $(meson_feature mpg123) + $(meson_feature nfs) + $(meson_feature openal) + $(meson_feature openmpt) + $(meson_feature opus) + $(meson_feature oss) + -Dpipe=true + $(meson_feature pipewire) + $(meson_feature pulseaudio pulse) + $(meson_feature qobuz) + $(meson_use recorder) + $(meson_feature shout) + $(meson_use signalfd) + $(meson_feature samba smbclient) + $(meson_use snapcast) + $(meson_feature sid sidplay) + $(meson_feature sndfile) + $(meson_feature sndio) + $(meson_feature soundcloud) + $(meson_feature libsoxr soxr) + $(meson_feature sqlite) + $(meson_feature systemd) + $(meson_use test) + $(meson_feature dbus udisks) + -Dupnp=$(usex upnp pupnp disabled) + $(meson_feature tremor) + $(meson_feature vorbis) + $(meson_feature wavpack) + $(meson_feature wildmidi) + $(meson_feature webdav) + -Dzeroconf=$(usex zeroconf avahi disabled) + $(meson_feature zlib) + $(meson_feature zip zzip) + + --libdir="/usr/$(get_libdir)" + $(meson_feature doc documentation) + -Dsolaris_output=disabled + + -Ddatabase=true + -Ddaemon=true + -Ddsd=true + -Dtcp=true + + -Dsystemd_system_unit_dir="$(systemd_get_systemunitdir)" + -Dsystemd_user_unit_dir="$(systemd_get_userunitdir)" + + $(meson_feature icu iconv) + ) + + if use samba || use upnp; then + emesonargs+=( -Dneighbor=true ) + fi + + append-lfs-flags + + # set useflag for encoders + if use httpd || use shout || use recorder; then + emesonargs+=( + # not in tree + -Dshine=disabled + $(meson_feature lame) + $(meson_feature twolame) + $(meson_feature vorbis vorbisenc) + $(meson_use audiofile wave_encoder) + ) + else + # avoid links even w/o encoder + emesonargs+=( + -Dlame=disabled + -Dtwolame=disabled + ) + fi + + # yajl links only with these plugins enabled + if use qobuz || use snapcast || use soundcloud; then + emesonargs+=( + -Dyajl=enabled + ) + fi + + meson_src_configure +} + +src_install() { + if use doc; then + local HTML_DOCS=( "${BUILD_DIR}"/doc/html/. ) + else + newman "${FILESDIR}"/${PN}.1-${PV} ${PN}.1 + newman "${FILESDIR}"/${PN}.conf.5-${PV} ${PN}.conf.5 + fi + + meson_src_install + + insinto /etc + newins doc/mpdconf.example mpd.conf + + # When running MPD as system service, better switch to the user we provide + sed -i \ + -e 's:^#user.*$:user "mpd":' \ + -e 's:^#group.*$:group "audio":' \ + "${ED}/etc/mpd.conf" || die + + if ! use systemd; then + # Extra options for running MPD under OpenRC + # (options that should not be set when using systemd) + sed -i \ + -e 's:^#log_file.*$:log_file "/var/log/mpd/mpd.log":' \ + -e 's:^#pid_file.*$:pid_file "/run/mpd/mpd.pid":' \ + "${ED}/etc/mpd.conf" || die + fi + + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}-0.23.15.logrotate" "${PN}" + + newinitd "${FILESDIR}/${PN}-0.24.2.init" "${PN}" + + keepdir /var/lib/mpd + keepdir /var/lib/mpd/music + keepdir /var/lib/mpd/playlists + keepdir /var/log/mpd + + rm -r "${ED}"/usr/share/doc/mpd || die + + fowners mpd:audio -R /var/lib/mpd + fowners mpd:audio -R /var/log/mpd +}