Update for mpd. Please test. Changelog: https://svn.musicpd.org/mpd/tags/release-0.12.1/ChangeLog
Important: the audio output has changed and is configurable now. Your old config most likely will not work. Take a look at the example config file that comes with the package. I would like to hear if anybody uses the shout[cast] flavor/has plans to do so. The previous mpd version used oss emulation. Now mpd claims to support sun audio output. However i couldn't get it to work (tried 30 seconds). But hey, libao is much cooler ;) It supports sun audio but you also can connect libao to esd or artsd. Then mpd will play along nicely with system sounds from gnome/kde, mplayer,... Of course this needs manual configuration of libao and doesn't work out of the box, but it's not complicated. Tobias
Index: Makefile =================================================================== RCS file: /cvs/ports/audio/mpd/Makefile,v retrieving revision 1.3 diff -u -u -r1.3 Makefile --- Makefile 1 Aug 2006 10:50:19 -0000 1.3 +++ Makefile 27 Oct 2006 17:08:27 -0000 @@ -1,9 +1,9 @@ # $OpenBSD: Makefile,v 1.3 2006/08/01 10:50:19 espie Exp $ COMMENT= "music player daemon" +COMMENT-shout= "music player daemon with shout-/icecast" -DISTNAME= mpd-0.11.5 -PKGNAME= ${DISTNAME}p0 +DISTNAME= mpd-0.12.1 CATEGORIES= audio HOMEPAGE= http://www.musicpd.org/ @@ -16,26 +16,48 @@ PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -WANTLIB= c m pthread z ossaudio +WANTLIB= c m pthread z -MASTER_SITES= http://mercury.chem.pitt.edu/~shank/ +MASTER_SITES= http://www.musicpd.org/uploads/files/ MODULES= converters/libiconv -LIB_DEPENDS= vorbis.>=5,vorbisfile.>=4::audio/libvorbis \ - audiofile::devel/libaudiofile \ - ao.>=3::audio/libao \ - faad::audio/faad \ +LIB_DEPENDS= OggFLAC.>=3,FLAC.>=7::audio/flac \ + vorbis.>=5,vorbisfile.>=4::audio/libvorbis \ + mpcdec.>=1::audio/libmpcdec \ id3tag.>=3::audio/libid3tag \ + audiofile.>=0::devel/libaudiofile \ + mikmod.>=2::audio/libmikmod \ mad.>=2::audio/libmad \ ogg.>=5::audio/libogg \ - FLAC.>=7::audio/flac \ - mikmod.>=2::audio/libmikmod - + faad.>=0::audio/faad \ + ao.>=3::audio/libao + USE_LIBTOOL= Yes +FLAVORS= shout +FLAVOR?= + CONFIGURE_STYLE= gnu -CONFIGURE_ARGS+= --disable-alsa --with-libFLAC=${LOCALBASE} +CONFIGURE_ARGS+= --disable-dependency-tracking \ + --disable-oss \ + --disable-alsa \ + --disable-pulse \ + --disable-sun \ + --enable-ao \ + --enable-mod \ + --with-id3tag=${LOCALBASE} \ + --with-iconv=${LOCALBASE} \ + --disable-libOggFLACtest # test misses -logg + +.if ${FLAVOR:L:Mshout} +LIB_DEPENDS+= shout.>=5::net/libshout \ + speex.>=4::audio/speex \ + vorbisenc.>=2::audio/libvorbis \ + theora.>=2::multimedia/libtheora +.else +CONFIGURE_ARGS+= --disable-shout +.endif post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mpd Index: distinfo =================================================================== RCS file: /cvs/ports/audio/mpd/distinfo,v retrieving revision 1.1.1.1 diff -u -u -r1.1.1.1 distinfo --- distinfo 13 May 2006 09:52:49 -0000 1.1.1.1 +++ distinfo 27 Oct 2006 17:08:27 -0000 @@ -1,4 +1,4 @@ -MD5 (mpd-0.11.5.tar.gz) = 1a9a1a9d31f00a43838b3752024f7ebe -RMD160 (mpd-0.11.5.tar.gz) = 4a7dd3473110aa1f860fbd7a760da7fdfe2a9ebf -SHA1 (mpd-0.11.5.tar.gz) = 5661008b3eb799f8d76949a37bc439917dbbb68a -SIZE (mpd-0.11.5.tar.gz) = 1127523 +MD5 (mpd-0.12.1.tar.gz) = dc005c64791874b7864f0c28d474534f +RMD160 (mpd-0.12.1.tar.gz) = 7991972d05eb20b4fad1a3ec2427c5254211e7d0 +SHA1 (mpd-0.12.1.tar.gz) = ad208085e173f98c1a109803099f9ba59bc2bc76 +SIZE (mpd-0.12.1.tar.gz) = 533315 Index: patches/patch-configure =================================================================== RCS file: patches/patch-configure diff -N patches/patch-configure --- patches/patch-configure 14 Jun 2006 12:37:52 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,133 +0,0 @@ -$OpenBSD: patch-configure,v 1.2 2006/06/14 12:37:52 bernd Exp $ ---- configure.orig Tue Nov 2 05:39:55 2004 -+++ configure Fri May 26 17:47:58 2006 -@@ -494,7 +494,7 @@ x_libraries=NONE - # and all the variables that are supposed to be based on exec_prefix - # by default will actually change. - # Use braces instead of parens because sh, perl, etc. also accept them. --bindir='${exec_prefix}/bin' -+bindir='${exec_prefix}/sbin' - sbindir='${exec_prefix}/sbin' - libexecdir='${exec_prefix}/libexec' - datadir='${prefix}/share' -@@ -19274,7 +19274,7 @@ fi - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 - echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} - fi -- if test -z `grep -e 'shared_ext.*shrext' $ofile`; then -+ if test -z "`grep -e 'shared_ext.*shrext' $ofile`"; then - # Make sure $shared_ext gets set to $shrext - if sed -e 's/shared_ext/shrext/g' "$ofile" > "${ofile}T"; then - mv "${ofile}T" "$ofile" -@@ -19357,7 +19357,7 @@ MPD_CFLAGS="" - if test x$CC = xgcc; then - MPD_CFLAGS="-Wall" - fi --MPD_LIBS="" -+MPD_LIBS="-lossaudio" - - # Check whether --enable-audio or --disable-audio was given. - if test "${enable_audio+set}" = set; then -@@ -22426,8 +22426,8 @@ _ACEOF - fi - - if test "${ac_cv_header_sys_soundcard_h+set}" = set; then -- echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5 --echo $ECHO_N "checking for sys/soundcard.h... $ECHO_C" >&6 -+ echo "$as_me:$LINENO: checking for soundcard.h" >&5 -+echo $ECHO_N "checking for soundcard.h... $ECHO_C" >&6 - if test "${ac_cv_header_sys_soundcard_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - fi -@@ -22435,8 +22435,8 @@ echo "$as_me:$LINENO: result: $ac_cv_hea - echo "${ECHO_T}$ac_cv_header_sys_soundcard_h" >&6 - else - # Is the header compilable? --echo "$as_me:$LINENO: checking sys/soundcard.h usability" >&5 --echo $ECHO_N "checking sys/soundcard.h usability... $ECHO_C" >&6 -+echo "$as_me:$LINENO: checking soundcard.h usability" >&5 -+echo $ECHO_N "checking soundcard.h usability... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -22444,7 +22444,7 @@ cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - $ac_includes_default --#include <sys/soundcard.h> -+#include <soundcard.h> - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -@@ -22480,15 +22480,15 @@ echo "$as_me:$LINENO: result: $ac_header - echo "${ECHO_T}$ac_header_compiler" >&6 - - # Is the header present? --echo "$as_me:$LINENO: checking sys/soundcard.h presence" >&5 --echo $ECHO_N "checking sys/soundcard.h presence... $ECHO_C" >&6 -+echo "$as_me:$LINENO: checking soundcard.h presence" >&5 -+echo $ECHO_N "checking soundcard.h presence... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#include <sys/soundcard.h> -+#include <soundcard.h> - _ACEOF - if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 -@@ -22522,25 +22522,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6 - # So? What about this header? - case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) -- { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 --echo "$as_me: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the compiler's result" >&5 --echo "$as_me: WARNING: sys/soundcard.h: proceeding with the compiler's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+echo "$as_me: WARNING: soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { echo "$as_me:$LINENO: WARNING: soundcard.h: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: soundcard.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) -- { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: present but cannot be compiled" >&5 --echo "$as_me: WARNING: sys/soundcard.h: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: sys/soundcard.h: check for missing prerequisite headers?" >&2;} -- { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: see the Autoconf documentation" >&5 --echo "$as_me: WARNING: sys/soundcard.h: see the Autoconf documentation" >&2;} -- { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 --echo "$as_me: WARNING: sys/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} -- { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&2;} -- { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: in the future, the compiler will take precedence" >&5 --echo "$as_me: WARNING: sys/soundcard.h: in the future, the compiler will take precedence" >&2;} -+ { echo "$as_me:$LINENO: WARNING: soundcard.h: present but cannot be compiled" >&5 -+echo "$as_me: WARNING: soundcard.h: present but cannot be compiled" >&2;} -+ { echo "$as_me:$LINENO: WARNING: soundcard.h: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: soundcard.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: soundcard.h: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: soundcard.h: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { echo "$as_me:$LINENO: WARNING: soundcard.h: proceeding with the preprocessor's result" >&5 -+echo "$as_me: WARNING: soundcard.h: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: soundcard.h: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: soundcard.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX - ## ------------------------------------------ ## -@@ -22551,8 +22551,8 @@ _ASBOX - sed "s/^/$as_me: WARNING: /" >&2 - ;; - esac --echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5 --echo $ECHO_N "checking for sys/soundcard.h... $ECHO_C" >&6 -+echo "$as_me:$LINENO: checking for soundcard.h" >&5 -+echo $ECHO_N "checking for soundcard.h... $ECHO_C" >&6 - if test "${ac_cv_header_sys_soundcard_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else Index: patches/patch-src_volume_c =================================================================== RCS file: patches/patch-src_volume_c diff -N patches/patch-src_volume_c --- patches/patch-src_volume_c 14 Jun 2006 12:37:52 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,21 +0,0 @@ -$OpenBSD: patch-src_volume_c,v 1.2 2006/06/14 12:37:52 bernd Exp $ ---- src/volume.c.orig Tue Nov 2 05:03:22 2004 -+++ src/volume.c Tue Jun 13 17:26:31 2006 -@@ -30,7 +30,7 @@ - #include <fcntl.h> - #include <errno.h> - #ifndef NO_OSS_MIXER --#include <sys/soundcard.h> -+#include <soundcard.h> - #endif - #ifdef HAVE_ALSA - #include <alsa/asoundlib.h> -@@ -67,7 +67,7 @@ int volume_alsaSet = -1; - int prepOssMixer(char * device) { - int devmask = 0; - -- if((volume_ossFd = open(device,O_RDONLY))<0) { -+ if((volume_ossFd = open(device,O_RDWR))<0) { - WARNING("unable to open oss mixer \"%s\"\n",device); - return -1; - } Index: pkg/MESSAGE =================================================================== RCS file: /cvs/ports/audio/mpd/pkg/MESSAGE,v retrieving revision 1.2 diff -u -u -r1.2 MESSAGE --- pkg/MESSAGE 14 Jun 2006 12:37:52 -0000 1.2 +++ pkg/MESSAGE 27 Oct 2006 17:08:27 -0000 @@ -1,12 +1,7 @@ -A sample configuration file has been installed to ${SYSCONFDIR}/mpd.conf -and MPD is configured to listen on localhost only. +A sample configuration file has been installed to ${SYSCONFDIR}/mpd.conf. +MPD is configured to listen on localhost only. To start MPD at boot time, +add the following to ${SYSCONFDIR}/rc.local: -Make sure that music_directory points to a valid directory, -otherwise MPD won't start. - -If you wish to have MPD started automatically at boot time, -simply add the follow lines to /etc/rc.local: - -if [ -x ${PREFIX}/sbin/mpd ]; then - echo -n ' mpd'; ${PREFIX}/sbin/mpd +if [ -x ${PREFIX}/bin/mpd ]; then + echo -n ' mpd'; ${PREFIX}/bin/mpd fi Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/audio/mpd/pkg/PLIST,v retrieving revision 1.2 diff -u -u -r1.2 PLIST --- pkg/PLIST 14 Jun 2006 12:37:52 -0000 1.2 +++ pkg/PLIST 27 Oct 2006 17:08:27 -0000 @@ -1,12 +1,14 @@ @comment $OpenBSD: PLIST,v 1.2 2006/06/14 12:37:52 bernd Exp $ @newgroup _mpd:560 @newuser _mpd:560:560:daemon:Music Player Daemon:/var/empty:/sbin/nologin +bin/mpd @man man/man1/mpd.1 -sbin/mpd [EMAIL PROTECTED] man/man5/mpd.conf.5 share/doc/mpd/ share/doc/mpd/COMMANDS share/doc/mpd/README share/doc/mpd/UPGRADING [EMAIL PROTECTED] share/doc/mpd/mpdconf.example share/examples/mpd/ share/examples/mpd/mpd.conf @sample ${SYSCONFDIR}/mpd.conf @@ -17,5 +19,4 @@ @sample /var/spool/mpd/ @sample /var/spool/mpd/playlists/ @extraunexec rm -rf /var/log/mpd/* [EMAIL PROTECTED] rm -rf /var/spool/mpd/* [EMAIL PROTECTED] rm -rf /var/spool/mpd/playlists/* [EMAIL PROTECTED] find /var/spool/mpd \! -name playlists -mindepth 1 -exec rm -rf "{}" \;
--- doc/mpdconf.example.orig Wed Oct 11 01:56:54 2006 +++ doc/mpdconf.example Sun Oct 15 03:39:34 2006 @@ -2,11 +2,11 @@ # See the mpd.conf man page for a more detailed description of each parameter. ######################## REQUIRED PATHS ######################## -music_directory "~/music" -playlist_directory "~/.mpd/playlists" -db_file "~/.mpd/mpd.db" -log_file "~/.mpd/mpd.log" -error_file "~/.mpd/mpd.error" +music_directory "/please_configure_your_music_directory" +playlist_directory "/var/spool/mpd/playlists" +db_file "/var/spool/mpd/mpd.db" +log_file "/var/log/mpd/mpd.log" +error_file "/var/log/mpd/mpd.error" ################################################################ @@ -21,7 +21,7 @@ # current song, playing/paused, etc.) at exit. This will be # used to restore the session the next time it is run. # -#state_file "~/.mpd/mpdstate" +state_file "/var/spool/mpd/mpdstate" # ################################################################ @@ -33,11 +33,11 @@ # started by. If left unspecified, MPD will not drop root # privileges at all (not recommended). # -#user "nobody" +user "_mpd" # # The address and port to listen on. # -#bind_to_address "any" +bind_to_address "localhost" #port "6600" # # Controls the amount of information that is logged. Can be @@ -93,6 +93,12 @@ # device "/dev/dsp" # optional # format "44100:16:2" # optional #} + +audio_output { + type "ao" + name "Libao Audio Device" +} + # # An example of a shout output (for streaming to Icecast): #