pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/audio/musicpd
Module Name: pkgsrc
Committed By: nia
Date: Wed Dec 4 11:00:23 UTC 2019
Modified Files:
pkgsrc/audio/musicpd: Makefile distinfo
pkgsrc/audio/musicpd/files: mpd.conf
Added Files:
pkgsrc/audio/musicpd: INSTALL
pkgsrc/audio/musicpd/patches:
patch-src_output_plugins_SolarisOutputPlugin.cxx
Log Message:
musicpd: Modernise config file.
- automatically run as unprivileged user.
- set up directories in /var/lib/mpd.
- allow 'solaris' audio output to be used on NetBSD.
Bump PKGREVISION
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/musicpd/INSTALL
cvs rdiff -u -r1.202 -r1.203 pkgsrc/audio/musicpd/Makefile
cvs rdiff -u -r1.105 -r1.106 pkgsrc/audio/musicpd/distinfo
cvs rdiff -u -r1.8 -r1.9 pkgsrc/audio/musicpd/files/mpd.conf
cvs rdiff -u -r0 -r1.1 \
pkgsrc/audio/musicpd/patches/patch-src_output_plugins_SolarisOutputPlugin.cxx
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/audio/musicpd/Makefile
diff -u pkgsrc/audio/musicpd/Makefile:1.202 pkgsrc/audio/musicpd/Makefile:1.203
--- pkgsrc/audio/musicpd/Makefile:1.202 Sat Nov 23 08:45:45 2019
+++ pkgsrc/audio/musicpd/Makefile Wed Dec 4 11:00:23 2019
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.202 2019/11/23 08:45:45 mef Exp $
+# $NetBSD: Makefile,v 1.203 2019/12/04 11:00:23 nia Exp $
DISTNAME= mpd-0.21.16
PKGNAME= ${DISTNAME:S/mpd/musicpd/}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= audio
MASTER_SITES= https://www.musicpd.org/download/mpd/0.21/
EXTRACT_SUFX= .tar.xz
@@ -16,6 +16,10 @@ CONFLICTS= mpd-[0-9]*
USE_TOOLS+= pkg-config
USE_LANGUAGES= c99 c++14
+
+# c++14
+GCC_REQD+= 6
+
MESON_ARGS+= -Ddocumentation=true
# worrying libraries with limited maintainance:
@@ -31,27 +35,62 @@ MESON_ARGS+= -Dnfs=disabled
MESON_ARGS+= -Diso9660=disabled
MESON_ARGS+= -Dsndio=disabled
-# c++14
-GCC_REQD+= 6
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "NetBSD" || ${OPSYS} == "SunOS"
+MESON_ARGS+= -Dsolaris_output=enabled
+.endif
+
+MPD_USER?= mpd
+MPD_GROUP?= mpd
+PKG_GROUPS= ${MPD_GROUP}
+PKG_USERS= ${MPD_USER}:${MPD_GROUP}
+PKG_GROUPS_VARS= MPD_USER
+PKG_USERS_VARS= MPD_GROUP
.include "../../mk/oss.buildlink3.mk"
-LDFLAGS+= ${LIBOSSAUDIO}
-FILES_SUBST+= DEVOSSAUDIO=${DEVOSSAUDIO}
+.if ${OSS_TYPE} == "none"
+MESON_ARGS+= -Doss=disabled
+.else
+MESON_ARGS+= -Doss=enabled
+LDFLAGS+= ${LIBOSSAUDIO}
+SUBST_CLASSES+= oss
+SUBST_STAGE.oss= pre-configure
+SUBST_MESSAGE.oss= Correcting the path to the OSS device.
+SUBST_FILES.oss+= src/output/plugins/OssOutputPlugin.cxx
+SUBST_SED.oss+= -e "s,/dev/sound/dsp,${DEVOSSAUDIO},g"
+.endif
EGDIR= ${PREFIX}/share/examples/mpd
CONF_FILES= ${EGDIR}/mpd.conf ${PKG_SYSCONFDIR}/mpd.conf
RCD_SCRIPTS= mpd
+FILES_SUBST+= MPD_USER=${MPD_USER:Q}
+FILES_SUBST+= MPD_GROUP=${MPD_GROUP:Q}
+FILES_SUBST+= VARBASE=${VARBASE}
+
+BUILD_DEFS+= VARBASE
+
+OWN_DIRS_PERMS+= ${VARBASE}/lib/mpd \
+ ${MPD_USER} ${MPD_GROUP} 0755
+
+OWN_DIRS_PERMS+= ${VARBASE}/lib/mpd/music \
+ ${MPD_USER} ${MPD_GROUP} 0755
+
+OWN_DIRS_PERMS+= ${VARBASE}/lib/mpd/playlists \
+ ${MPD_USER} ${MPD_GROUP} 0755
+
CPPFLAGS.SunOS+= -std=gnu99 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__
.include "options.mk"
-SUBST_CLASSES+= paths
-SUBST_STAGE.paths= pre-configure
-SUBST_FILES.paths= mpd.conf
-SUBST_MESSAGE.paths= Fixing path to sound device in example config.
-SUBST_VARS.paths+= DEVOSSAUDIO
+SUBST_CLASSES+= conf
+SUBST_STAGE.conf= pre-configure
+SUBST_FILES.conf= ${WRKSRC}/mpd.conf
+SUBST_MESSAGE.conf= Setting variables in the configuration file.
+SUBST_VARS.conf+= VARBASE
+SUBST_VARS.conf+= MPD_USER
SUBST_CLASSES+= sphinx
SUBST_STAGE.sphinx= pre-configure
Index: pkgsrc/audio/musicpd/distinfo
diff -u pkgsrc/audio/musicpd/distinfo:1.105 pkgsrc/audio/musicpd/distinfo:1.106
--- pkgsrc/audio/musicpd/distinfo:1.105 Thu Oct 24 21:23:13 2019
+++ pkgsrc/audio/musicpd/distinfo Wed Dec 4 11:00:23 2019
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.105 2019/10/24 21:23:13 nia Exp $
+$NetBSD: distinfo,v 1.106 2019/12/04 11:00:23 nia Exp $
SHA1 (mpd-0.21.16.tar.xz) = 389023117eba5963a03222289f20f007b2afd3c0
RMD160 (mpd-0.21.16.tar.xz) = 457ef719afd9296c94321501fc10d5e44e2eae71
SHA512 (mpd-0.21.16.tar.xz) = bb7587acd03d675ae3127ab4e196d549170551ac643e5134baa2bccaf8d7c9bba6c9a9edec9bcb61a2ec3a6ce26f4d77190323ef0329033d0cd8c1f8964be05c
Size (mpd-0.21.16.tar.xz) = 673732 bytes
SHA1 (patch-src_net_IPv6Address.hxx) = c9e9a5676451e6834fcef359266d37fc15f079e6
+SHA1 (patch-src_output_plugins_SolarisOutputPlugin.cxx) = 1bf5284c52446100f6c01ac94d6e82a0685ab13a
Index: pkgsrc/audio/musicpd/files/mpd.conf
diff -u pkgsrc/audio/musicpd/files/mpd.conf:1.8 pkgsrc/audio/musicpd/files/mpd.conf:1.9
--- pkgsrc/audio/musicpd/files/mpd.conf:1.8 Mon Jul 15 13:47:14 2019
+++ pkgsrc/audio/musicpd/files/mpd.conf Wed Dec 4 11:00:23 2019
@@ -1,39 +1,41 @@
-# $NetBSD: mpd.conf,v 1.8 2019/07/15 13:47:14 nia Exp $
+# $NetBSD: mpd.conf,v 1.9 2019/12/04 11:00:23 nia Exp $
# required
-music_directory "/mp3"
-playlist_directory "/mp3"
-log_file "/var/log/mpd.log"
+music_directory "@VARBASE@/lib/mpd/music"
+playlist_directory "@VARBASE@/lib/mpd/playlists"
+
+log_file "@VARBASE@/log/mpd.log"
+# log_level can be "default", "secure", "verbose"
+log_level "default"
# optional
port "6600"
+bind_to_address "any"
max_connections "5"
-max_command_list_size "2048"
-max_output_buffer_size "2048"
-connection_timeout "60"
-db_file "/mp3/.mpddb"
-state_file "/mp3/.mpdstate"
-save_absolute_paths_in_playlists "no"
+state_file "@VARBASE@/lib/mpd/.mpdstate"
-max_playlist_length "4096"
-bind_to_address "any"
+database {
+ plugin "simple"
+ path "@VARBASE@/lib/mpd/db"
+}
audio_output {
- type "oss"
- name "LibAO-OSS"
- device "@DEVOSSAUDIO@"
+ type "ao"
+ name "ao"
+ driver "default"
}
-mixer_type "software"
-# mixer_control defaults to the master volume control. uncomment the
-# following line to have mpd's volume control modify the "PCM"
-# volume instead:
-# mixer_control "Pcm"
+# Also usable on NetBSD.
+#audio_output {
+# type "solaris"
+# name "sun1"
+# device "/dev/audio"
+#}
-#user "mp3"
+user "@MPD_USER@"
+
+mixer_type "software"
-# log_level can be "default", "secure", "verbose"
-log_level "default"
#password "password@read,add,control,admin"
#default_permissions "read,add,control,admin"
-#filesystem_charset "UTF-8"
+filesystem_charset "UTF-8"
Added files:
Index: pkgsrc/audio/musicpd/INSTALL
diff -u /dev/null pkgsrc/audio/musicpd/INSTALL:1.1
--- /dev/null Wed Dec 4 11:00:23 2019
+++ pkgsrc/audio/musicpd/INSTALL Wed Dec 4 11:00:23 2019
@@ -0,0 +1,10 @@
+# $NetBSD: INSTALL,v 1.1 2019/12/04 11:00:23 nia Exp $
+
+case ${STAGE} in
+POST-INSTALL)
+ ${TOUCH} @VARBASE@/lib/mpd/db
+ ${CHOWN} @MPD_USER@:@MPD_GROUP@ @VARBASE@/lib/mpd/db
+ ${TOUCH} @VARBASE@/lib/mpd/.mpdstate
+ ${CHOWN} @MPD_USER@:@MPD_GROUP@ @VARBASE@/lib/mpd/.mpdstate
+ ;;
+esac
Index: pkgsrc/audio/musicpd/patches/patch-src_output_plugins_SolarisOutputPlugin.cxx
diff -u /dev/null pkgsrc/audio/musicpd/patches/patch-src_output_plugins_SolarisOutputPlugin.cxx:1.1
--- /dev/null Wed Dec 4 11:00:23 2019
+++ pkgsrc/audio/musicpd/patches/patch-src_output_plugins_SolarisOutputPlugin.cxx Wed Dec 4 11:00:23 2019
@@ -0,0 +1,45 @@
+$NetBSD: patch-src_output_plugins_SolarisOutputPlugin.cxx,v 1.1 2019/12/04 11:00:23 nia Exp $
+
+Allow this plugin to be also used on NetBSD.
+
+--- src/output/plugins/SolarisOutputPlugin.cxx.orig 2019-10-16 09:58:36.000000000 +0000
++++ src/output/plugins/SolarisOutputPlugin.cxx
+@@ -22,22 +22,23 @@
+ #include "system/FileDescriptor.hxx"
+ #include "system/Error.hxx"
+
++#include <sys/ioctl.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <errno.h>
+
+-#ifdef __sun
++#if defined(__sun)
+ #include <sys/audio.h>
+ #include <sys/stropts.h>
++#elif defined(__NetBSD__)
++#include <sys/audioio.h>
+ #else
+
+ /* some fake declarations that allow build this plugin on systems
+ other than Solaris, just to see if it compiles */
+
+-#include <sys/ioctl.h>
+-
+ #ifndef I_FLUSH
+ #define I_FLUSH 0
+ #endif
+@@ -147,7 +148,11 @@ SolarisOutput::Play(const void *chunk, s
+ void
+ SolarisOutput::Cancel() noexcept
+ {
++#if defined(AUDIO_FLUSH)
++ ioctl(fd.Get(), AUDIO_FLUSH);
++#elif defined(I_FLUSH)
+ ioctl(fd.Get(), I_FLUSH);
++#endif
+ }
+
+ const struct AudioOutputPlugin solaris_output_plugin = {
Home |
Main Index |
Thread Index |
Old Index