source: trunk/dports/audio/mpd/Portfile @ 138211

Last change on this file since 138211 was 138211, checked in by rmstonecipher@…, 4 years ago

audio/mpd upgraded version from 0.19.9 to 0.19.10

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.8 KB
Line 
1# -*- 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
2# $Id: Portfile 138211 2015-07-02 13:51:44Z rmstonecipher@macports.org $
3
4PortSystem          1.0
5PortGroup           compiler_blacklist_versions 1.0
6
7name                mpd
8version             0.19.10
9set branch          [join [lrange [split ${version} .] 0 1] .]
10categories          audio
11maintainers         rmstonecipher openmaintainer
12description         Music Player Daemon
13long_description    Music Player Daemon (MPD) allows remote access for playing music \
14    (MP3, Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing \
15    playlists. MPD is designed for integrating a computer into a stereo \
16    system that provides control for music playback over a local network. \
17    It also makes a great desktop music player, especially if you are a \
18    console junkie, like frontend options, or restart X often.
19homepage            http://www.musicpd.org/
20platforms           darwin
21master_sites        http://www.musicpd.org/download/${name}/${branch}/
22license             GPL-2+ LGPL-2.1
23use_xz              yes
24checksums           rmd160  0cdde355667547b236471d9c75f2c3925f56df81 \
25                    sha256  c386eb3d22f98dc993b5ae3c272f969aa7763713483c6800040ebf1791b15851
26depends_build \
27    port:pkgconfig \
28    port:boost
29depends_lib \
30    port:audiofile \
31    port:cdparanoia \
32    port:curl \
33    port:faad2 \
34    port:flac \
35    path:lib/pkgconfig/glib-2.0.pc:glib2 \
36    port:libcue \
37    port:libiconv \
38    port:libid3tag \
39    port:libogg \
40    port:libvorbis \
41    port:zlib \
42    port:libao
43
44configure.args \
45    --mandir=${prefix}/share/man \
46    --disable-ffmpeg \
47    --disable-jack \
48    --enable-ao \
49    --disable-mpc
50configure.cflags-append -I${prefix}/include
51
52variant mpcdec description {Support for musepack via libmpcdec} {
53    depends_lib-append  port:libmpcdec
54    configure.args-delete --disable-mpc
55}
56variant ffmpeg description {Support for myriad formats via ffmpeg} {
57    depends_lib-append  path:lib/libavcodec.dylib:ffmpeg
58    configure.args-delete --disable-ffmpeg
59}
60variant mod description {Support for several formats of tracker/sequencer files via libmikmod} {
61    depends_lib-append    port:libmikmod
62    configure.args-append --enable-mod
63}
64variant modplug description {Support for several formats of tracker/sequencer files via libmodplug} {
65    depends_lib-append    port:libmodplug
66    configure.args-append --enable-modplug
67}
68variant mpg123 conflicts mad description {Use mpg123 rather than mad as mp3 deconding library} {
69    depends_lib-append    port:mpg123
70    configure.args-append --enable-mpg123 --disable-mad
71}
72variant mad conflicts mpg123 description (Use mad rather than mpg123 as mp3 decoding library} {
73    depends_lib-append      port:libmad
74    configure.args-append   --enable-mad --disable-mpg123
75}
76if {![variant_isset mpg123]} {
77    default_variants    +mad
78}
79
80# Doesn't work with old GCC. Also blacklist old Clang, since it uses
81# LLVM-GCC to compile C++.
82compiler.blacklist  gcc-3.3 {*gcc-4.[0-5]} {clang < 425.0.24}
83
84if {${os.platform} eq "darwin" && ${os.major} > 8} {
85    set mpduser       _mpd
86} else {
87    set mpduser       mpd
88}
89# Create new user for mpd:
90add_users ${mpduser} group=${mpduser} realname=Music\ Player\ Daemon
91
92startupitem.create  yes
93startupitem.start   "${prefix}/bin/mpd --no-daemon ${prefix}/etc/mpd.conf"
94startupitem.stop    "${prefix}/bin/mpd --kill"
95destroot.keepdirs   ${destroot}${prefix}/var/lib/mpd/music \
96    ${destroot}${prefix}/var/lib/mpd/playlists \
97    ${destroot}${prefix}/var/log/mpd
98post-destroot {
99    # ensure ${prefix}/var/[lib/mpd/[music,playlists],log/mpd] exist
100    xinstall -m 755 -o ${mpduser} -g ${mpduser} -d \
101    ${destroot}${prefix}/var/lib/mpd \
102    ${destroot}${prefix}/var/lib/mpd/music \
103    ${destroot}${prefix}/var/lib/mpd/playlists \
104    ${destroot}${prefix}/var/log/mpd
105
106    xinstall -m 644 ${filespath}/mpd.conf ${destroot}${prefix}/etc/mpd.conf.default
107    reinplace "s|%%PREFIX%%|${prefix}|g" \
108        ${destroot}${prefix}/etc/mpd.conf.default
109    reinplace "s|%%MPDUSER%%|${mpduser}|g" \
110        ${destroot}${prefix}/etc/mpd.conf.default
111}
112post-activate {
113    if {![file exists ${prefix}/etc/mpd.conf]} {
114        copy ${prefix}/etc/mpd.conf.default ${prefix}/etc/mpd.conf
115    }
116}
117
118notes "A basic configuration file has been created for you.
119To add music to mpd's database, create symbolic links in
120${prefix}/var/lib/mpd/music using 'ln -s'.  For advanced
121configuration, run \"man mpd.conf\" or refer to
122${prefix}/share/doc/mpd/mpdconf.example for an example configuration file.
123
124You may get \"Problems shmget'ing\" message when launching mpd.
125In this case, you can increase the values of kern.sysv.shmmax and
126kern.sysv.shmall in /etc/rc."
127
128
129livecheck.url       http://www.musicpd.org/download/${name}/${branch}/
130livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)"
Note: See TracBrowser for help on using the repository browser.