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

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

audio/mpd added missing build dependency (boost)

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