Created
January 23, 2021 06:02
-
-
Save rnkn/9d0596c68fa590feef64ce037fefffa8 to your computer and use it in GitHub Desktop.
mpd 0.22.3 MacPorts Portfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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.0 | |
name mpd | |
# note - versions 0.21.x and beyond require meson, and will require considerable | |
# rearrangement of the Portfile to support setting options in variants | |
# also, the audio output system changes to requiring 10.8+ | |
version 0.22.3 | |
set branch [join [lrange [split ${version} .] 0 1] .] | |
categories audio | |
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/ | |
platforms darwin | |
master_sites https://www.musicpd.org/download/${name}/${branch}/ | |
license GPL-2+ LGPL-2.1 | |
use_xz yes | |
checksums rmd160 ff696172405f6baad8dc0592ff6098326a617982 \ | |
sha256 338012037b5e67730529187c555a54cc567a85b15a7e8ddb3a807b1971566ccf \ | |
size 726356 | |
depends_build-append \ | |
port:pkgconfig | |
# 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 | |
depends_build-append \ | |
port:boost | |
depends_lib \ | |
path:lib/pkgconfig/glib-2.0.pc:glib2 \ | |
port:libcue \ | |
port:libao | |
configure.args \ | |
--mandir ${prefix}/share/man \ | |
-Ddocumentation=enabled \ | |
-Dlibmpdclient=disabled \ | |
-Dwebdav=disabled \ | |
-Dcue=true \ | |
-Dcdio_paranoia=disabled \ | |
-Dcurl=disabled \ | |
-Dmms=disabled \ | |
-Dnfs=disabled \ | |
-Dsmbclient=disabled \ | |
-Dqobuz=disabled \ | |
-Dsoundcloud=disabled \ | |
-Dtidal=disabled \ | |
-Did3tag=disabled \ | |
-Dchromaprint=disabled \ | |
-Dadplug=disabled \ | |
-Daudiofile=disabled \ | |
-Dfaad=disabled \ | |
-Dffmpeg=disabled \ | |
-Dflac=disabled \ | |
-Dfluidsynth=disabled \ | |
-Dgme=disabled \ | |
-Dmad=disabled \ | |
-Dmikmod=disabled \ | |
-Dmodplug=disabled \ | |
-Dmpcdec=disabled \ | |
-Dmpg123=disabled \ | |
-Dopus=disabled \ | |
-Dsidplay=disabled \ | |
-Dsndfile=disabled \ | |
-Dtremor=disabled \ | |
-Dvorbis=disabled \ | |
-Dwavpack=disabled \ | |
-Dwildmidi=disabled \ | |
-Dvorbisenc=disabled \ | |
-Dlame=disabled \ | |
-Dtwolame=disabled \ | |
-Dshine=disabled \ | |
-Dwave_encoder=false \ | |
-Dlibsamplerate=disabled \ | |
-Dsoxr=disabled \ | |
-Dalsa=disabled \ | |
-Dao=enabled \ | |
-Dfifo=false \ | |
-Dhttpd=false \ | |
-Djack=disabled \ | |
-Dopenal=disabled \ | |
-Doss=disabled \ | |
-Dpipe=false \ | |
-Dpulse=disabled \ | |
-Drecorder=false \ | |
-Dshout=disabled \ | |
-Dsndio=disabled \ | |
-Dsolaris_output=disabled \ | |
-Ddbus=disabled \ | |
-Dexpat=disabled \ | |
-Dicu=disabled \ | |
-Diconv=disabled \ | |
-Dpcre=disabled \ | |
-Dsqlite=disabled \ | |
-Dyajl=disabled \ | |
-Dzlib=disabled \ | |
-Dzeroconf=disabled | |
configure.cflags-append -I${prefix}/include | |
variant htmlmanual description {Install HTML manual} { | |
depends_build-append port:py38-sphinx | |
configure.args-replace -Dhtml_manual=disabled -Dhtml_manual=enabled | |
} | |
variant faad description {Support for AAC format via faad2} { | |
depends_lib-append port:faad2 | |
configure.args-replace -Dfaad=disabled -Dfaad=enabled | |
} | |
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 flac description {Support for FLAC format} { | |
depends_lib-append port:flac | |
configure.args-replace -Dflac=disabled -Dflac=enabled | |
} | |
variant pcre description {Support for regular expressions via pcre2} { | |
depends_lib-append port:pcre2 | |
configure.args-replace -Dpcre=disabled -Dpcre=enabled | |
} | |
variant stickers description {Support for stickers database} { | |
depends_lib-append port:sqlite3 port:zlib | |
configure.args-replace -Dsqlite=disabled -Dsqlite=enabled | |
configure.args-replace -Dzlib=disabled -Dzlib=enabled | |
} | |
variant ogg description {Support for Ogg Vorbis (encoding/decoding)} { | |
depends_lib-append port:libogg port:libvorbis | |
configure.args-replace -Dvorbis=disabled -Dvorbis=enabled | |
configure.args-replace -Dvorbisenc=disabled -Dvorbisenc=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 CD description {Support for CD-ROM access via libcdio-paranoia} { | |
depends_lib-append port:libcdio-paranoia | |
configure.args-replace -Dcdio_paranoia=disabled -Dcdio_paranoia=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 opus description {Support for Opus format} { | |
depends_lib-append port:libopus | |
configure.args-append -Dopus=enabled | |
} | |
variant wavpack description {Support for WavPack format} { | |
depends_lib-append port:wavpack | |
configure.args-replace -Dwavpack=disabled -Dwavpack=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 -D-mpg123=disabled -Dmad=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 | |
} | |
# if {![variant_isset mpg123]} { | |
# default_variants +mad | |
# } | |
# requires support for C++17. | |
compiler.cxx_standard 2017 | |
if {${os.platform} eq "darwin" && ${os.major} > 8} { | |
set mpduser _mpd | |
} else { | |
set mpduser mpd | |
} | |
# Create new user for 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 { | |
# ensure ${prefix}/var/[lib/mpd/[music,playlists],log/mpd] exist | |
xinstall -m 755 -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 644 ${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 { | |
if {![file exists ${prefix}/etc/mpd.conf]} { | |
copy ${prefix}/etc/mpd.conf.default ${prefix}/etc/mpd.conf | |
} | |
} | |
default_variants +mad +flac +faad +pcre | |
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." | |
livecheck.type regex | |
livecheck.url ${homepage} | |
livecheck.regex "MPD (\\d+(?:\\.\\d+)*) released" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment