# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup compiler_blacklist_versions 1.0 PortGroup meson 1.0 PortGroup legacysupport 1.1 PortGroup boost 1.0 name mpd version 0.23.8 revision 7 checksums rmd160 45cc623a1029b010197a0233fe5ebb5f6e5fc5c4 \ sha256 86bb569bf3b519821f36f6bb5564e484e85d2564411b34b200fe2cd3a04e78cf \ size 773280 categories audio license GPL-2+ LGPL-2.1 maintainers nomaintainer description Music Player Daemon long_description Music Player Daemon (MPD) allows remote access for playing music \ (MP3, Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing \ playlists. MPD is designed for integrating a computer into a stereo \ system that provides control for music playback over a local network. \ It also makes a great desktop music player, especially if you are a \ console junkie, like frontend options, or restart X often. homepage https://www.musicpd.org/ set branch [join [lrange [split ${version} .] 0 1] .] master_sites https://www.musicpd.org/download/${name}/${branch}/ use_xz yes set python_branch 3.10 set python_version [string map {. {}} ${python_branch}] # TODO: Migrate to later version, once upstream supports set port_libfmt libfmt8 depends_build-append \ path:bin/pkg-config:pkgconfig \ port:py${python_version}-sphinx # this port only uses boost headers during build # and does not link with any boost libraries # no need to rebuild due to boost library ABI changes #boost.version 1.71 boost.depends_type build depends_lib \ port:audiofile \ port:bzip2 \ port:curl \ port:faad2 \ port:flac \ path:lib/pkgconfig/glib-2.0.pc:glib2 \ path:lib/pkgconfig/icu-uc.pc:icu \ port:libao \ port:libcdio-paranoia \ port:${port_libfmt} \ port:libiconv \ port:libid3tag \ port:libogg \ port:libopus \ port:libvorbis \ port:libzzip \ port:pcre2 \ port:wavpack \ port:zlib configure.args \ --mandir ${prefix}/share/man \ -Ddocumentation=enabled \ -Dlibmpdclient=disabled \ -Dwebdav=disabled \ -Dbzip2=enabled \ -Dcue=true \ -Dcdio_paranoia=enabled \ -Dcurl=enabled \ -Dmms=disabled \ -Dnfs=disabled \ -Dsmbclient=disabled \ -Dqobuz=disabled \ -Dsoundcloud=disabled \ -Did3tag=enabled \ -Dchromaprint=disabled \ -Dadplug=disabled \ -Daudiofile=enabled \ -Dfaad=enabled \ -Dffmpeg=disabled \ -Dflac=enabled \ -Dfluidsynth=disabled \ -Dgme=disabled \ -Dmad=disabled \ -Dmikmod=disabled \ -Dmodplug=disabled \ -Dmpcdec=disabled \ -Dmpg123=disabled \ -Dopus=enabled \ -Dsidplay=disabled \ -Dsndfile=disabled \ -Dtremor=disabled \ -Dvorbis=enabled \ -Dwavpack=enabled \ -Dwildmidi=disabled \ -Dvorbisenc=enabled \ -Dlame=disabled \ -Dtwolame=disabled \ -Dshine=disabled \ -Dwave_encoder=true \ -Dlibsamplerate=disabled \ -Dsoxr=disabled \ -Dalsa=disabled \ -Dao=enabled \ -Dfifo=true \ -Dhttpd=true \ -Djack=disabled \ -Dopenal=disabled \ -Doss=disabled \ -Dpipe=true \ -Dpulse=disabled \ -Drecorder=false \ -Dshout=disabled \ -Dsndio=disabled \ -Dsolaris_output=disabled \ -Ddbus=disabled \ -Dexpat=disabled \ -Dicu=enabled \ -Diconv=enabled \ -Dpcre=enabled \ -Dsqlite=disabled \ -Dyajl=disabled \ -Dzeroconf=bonjour \ -Dzlib=enabled \ -Dzzip=enabled \ -Dupnp=disabled configure.cflags-append -I${prefix}/include # Wrap the macOS12 functions, may be added into legacy-support see PR49 if {${os.major} < 21} { configure.cflags-prepend -isystem ${filespath}/wrappers configure.cxxflags-prepend -isystem ${filespath}/wrappers configure.objcflags-prepend -isystem ${filespath}/wrappers configure.objcxxflags-prepend -isystem ${filespath}/wrappers } variant ffmpeg description {Support for myriad formats (including ALAC) via FFmpeg} { depends_lib-append path:lib/libavcodec.dylib:ffmpeg configure.args-replace -Dffmpeg=disabled -Dffmpeg=enabled } variant stickers description {Support for stickers database} { depends_lib-append port:sqlite3 configure.args-replace -Dsqlite=disabled -Dsqlite=enabled } variant libmpdclient description {Support for libmpdclient proxy database} { depends_lib-append port:libmpdclient configure.args-replace -Dlibmpdclient=disabled -Dlibmpdclient=enabled } variant lame description {Support for MP3 encoding via lame} { depends_lib-append port:lame configure.args-replace -Dlame=disabled -Dlame=enabled } variant twolame description {Support for MP3 encoding via twolame} { depends_lib-append port:twolame configure.args-replace -Dtwolame=disabled -Dtwolame=enabled } variant mpcdec description {Support for Musepack via libmpcdec} { depends_lib-append port:libmpcdec configure.args-replace --Dmpcdec=disabled Dmpcdec=enabled } variant mod description {Support for several formats of tracker/sequencer files via libmikmod} { depends_lib-append port:libmikmod configure.args-append -Dmikmod=enabled } variant modplug description {Support for several formats of tracker/sequencer files via libmodplug} { depends_lib-append port:libmodplug configure.args-append -Dmodplug=enabled } variant fluidsynth description {Support for FluidSynth MIDI} { depends_lib-append port:fluidsynth configure.args-append -Dfluidsynth=enabled } variant jack description {Support for JACK output} { depends_lib-append port:jack configure.args-replace -Djack=disabled -Djack=enabled } variant shout description {Support for ShoutCast or IceCast streaming via libshout2} { depends_lib-append port:libshout2 configure.args-replace -Dshout=disabled -Dshout=enabled } variant sidplay description {Support for C64 SID support via SIDPLAY} { depends_lib-append port:SIDPLAY configure.args-replace -Dsidplay=disabled -Dsidplay=enabled } variant chromaprint description {Support for ChromaPrint / AcoustID via chromaprint} { depends_lib-append port:chromaprint configure.args-replace -Dchromaprint=disabled -Dchromaprint=enabled } variant mpg123 conflicts mad description {Use mpg123 rather than mad as mp3 deconding library} { depends_lib-append port:mpg123 configure.args-replace -Dmpg123=disabled -Dmpg123=enabled } variant mad conflicts mpg123 description {Use mad rather than mpg123 as mp3 decoding library} { depends_lib-append port:libmad configure.args-replace -Dmad=disabled -Dmad=enabled } variant webdav description {Support WebDAV storage} { depends_lib-append port:curl port:expat configure.args-replace -Dexpat=disabled -Dexpat=enabled configure.args-replace -Dwebdav=disabled -Dwebdav=enabled } variant upnp description {Support UPnP database} { depends_lib-append port:libupnp configure.args-replace -Dupnp=disabled -Dupnp=enabled } variant mms description {Support MMS input via libmms} { depends_lib-append port:libmms configure.args-replace -Dmms=disabled -Dmms=enabled } variant avahi description {Support zeroconf via avahi} { depends_lib-append port:avahi configure.args-replace -Dzeroconf=bonjour -Dzeroconf=avahi } configure.env-append \ PATH=${frameworks_dir}/Python.framework/Versions/${python_branch}/bin:$env(PATH) \ PKG_CONFIG_PATH=${prefix}/lib/${port_libfmt}/pkgconfig build.env-append {*}${configure.env} destroot.env-append {*}${configure.env} compiler.cxx_standard 2017 compiler.blacklist-append {clang < 1200} if {${os.platform} eq "darwin" && ${os.major} > 8} { set mpduser _mpd } else { set mpduser mpd } add_users ${mpduser} group=${mpduser} realname=Music\ Player\ Daemon startupitem.create yes startupitem.start "${prefix}/bin/mpd --no-daemon ${prefix}/etc/mpd.conf" startupitem.stop "${prefix}/bin/mpd --kill" destroot.keepdirs ${destroot}${prefix}/var/lib/mpd/music \ ${destroot}${prefix}/var/lib/mpd/playlists \ ${destroot}${prefix}/var/log/mpd post-destroot { xinstall -m 0755 -o ${mpduser} -g ${mpduser} -d \ ${destroot}${prefix}/var/lib/mpd \ ${destroot}${prefix}/var/lib/mpd/music \ ${destroot}${prefix}/var/lib/mpd/playlists \ ${destroot}${prefix}/var/log/mpd xinstall -m 0644 ${filespath}/mpd.conf ${destroot}${prefix}/etc/mpd.conf.default reinplace "s|%%PREFIX%%|${prefix}|g" \ ${destroot}${prefix}/etc/mpd.conf.default reinplace "s|%%MPDUSER%%|${mpduser}|g" \ ${destroot}${prefix}/etc/mpd.conf.default } post-activate { # Lift resource limits reinplace \ "s|^ProgramArguments|ProcessTypeInteractive\\ &|" \ ${prefix}/etc/${startupitem.location}/org.macports.${name}/org.macports.${name}.plist if {![file exists ${prefix}/etc/mpd.conf]} { copy ${prefix}/etc/mpd.conf.default ${prefix}/etc/mpd.conf } } if {![variant_isset mpg123]} { default_variants +mad } notes "A basic configuration file has been created for you. To add music to mpd's database, create symbolic links in ${prefix}/var/lib/mpd/music using 'ln -s'. For advanced configuration, run \"man mpd.conf\" or refer to ${prefix}/share/doc/mpd/mpdconf.example for an example configuration file. You may get \"Problems shmget'ing\" message when launching mpd. In this case, you can increase the values of kern.sysv.shmmax and kern.sysv.shmall in /etc/rc. If you experience laggy playback, try increasing buffer_time in libao options." livecheck.type regex livecheck.url ${homepage} livecheck.regex {\mMPD (\d+(?:\.\d+)*) released}