2010-01-07 16:23:10 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-26 15:49:34 +00:00
|
|
|
class Mpd < Formula
|
2014-02-26 05:05:57 +00:00
|
|
|
homepage "http://www.musicpd.org/"
|
2014-11-11 05:30:45 +00:00
|
|
|
|
|
|
|
stable do
|
2015-02-07 01:43:00 +00:00
|
|
|
url "http://www.musicpd.org/download/mpd/0.19/mpd-0.19.9.tar.xz"
|
|
|
|
sha1 "6683bee5f132eda318c5a61ec14b2df8d9164d60"
|
2014-11-11 05:30:45 +00:00
|
|
|
end
|
2014-02-26 05:05:57 +00:00
|
|
|
|
2014-07-31 13:26:17 +00:00
|
|
|
bottle do
|
2015-02-07 02:57:09 +00:00
|
|
|
sha1 "dded981259ff9d3529b311f8fd48f3713a4e5811" => :yosemite
|
|
|
|
sha1 "8b2252c6fb581ed97ea95d16b953b1a64d0c6f02" => :mavericks
|
|
|
|
sha1 "2a3c681188f7db786f61b053aa0813549838718a" => :mountain_lion
|
2014-07-31 13:26:17 +00:00
|
|
|
end
|
|
|
|
|
2014-03-13 23:13:06 +00:00
|
|
|
head do
|
|
|
|
url "git://git.musicpd.org/master/mpd.git"
|
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
end
|
2014-02-26 05:05:57 +00:00
|
|
|
|
|
|
|
option "with-wavpack", "Build with wavpack support (for .wv files)"
|
|
|
|
option "with-lastfm", "Build with last-fm support (for experimental Last.fm radio)"
|
|
|
|
option "with-lame", "Build with lame support (for MP3 encoding when streaming)"
|
|
|
|
option "with-two-lame", "Build with two-lame support (for MP2 encoding when streaming)"
|
|
|
|
option "with-flac", "Build with flac support (for Flac encoding when streaming)"
|
2014-11-14 20:35:08 +00:00
|
|
|
option "with-libvorbis", "Build with vorbis support (for Ogg encoding)"
|
2014-02-26 05:05:57 +00:00
|
|
|
option "with-yajl", "Build with yajl support (for playing from soundcloud)"
|
2014-08-02 11:20:18 +00:00
|
|
|
option "with-opus", "Build with opus support (for Opus encoding and decoding)"
|
2014-01-15 14:06:57 +00:00
|
|
|
|
2014-11-14 20:35:08 +00:00
|
|
|
deprecated_option "with-vorbis" => "with-libvorbis"
|
|
|
|
|
2014-02-26 05:05:57 +00:00
|
|
|
depends_on "pkg-config" => :build
|
2014-10-22 22:36:31 +00:00
|
|
|
depends_on "boost" => :build
|
2014-02-26 05:05:57 +00:00
|
|
|
depends_on "glib"
|
|
|
|
depends_on "libid3tag"
|
|
|
|
depends_on "sqlite"
|
|
|
|
depends_on "libsamplerate"
|
2014-10-22 22:36:31 +00:00
|
|
|
depends_on "icu4c"
|
2013-04-23 18:48:14 +00:00
|
|
|
|
2014-04-12 17:37:39 +00:00
|
|
|
needs :cxx11
|
|
|
|
|
2014-01-15 14:06:57 +00:00
|
|
|
depends_on "libmpdclient"
|
2014-02-26 05:05:57 +00:00
|
|
|
depends_on "ffmpeg" # lots of codecs
|
2013-04-23 18:48:14 +00:00
|
|
|
# mpd also supports mad, mpg123, libsndfile, and audiofile, but those are
|
|
|
|
# redundant with ffmpeg
|
2014-02-26 05:05:57 +00:00
|
|
|
depends_on "fluid-synth" # MIDI
|
|
|
|
depends_on "faad2" # MP4/AAC
|
|
|
|
depends_on "wavpack" => :optional # WavPack
|
|
|
|
depends_on "libshout" => :optional # Streaming (also pulls in Vorbis encoding)
|
|
|
|
depends_on "lame" => :optional # MP3 encoding
|
|
|
|
depends_on "two-lame" => :optional # MP2 encoding
|
|
|
|
depends_on "flac" => :optional # Flac encoding
|
|
|
|
depends_on "jack" => :optional # Output to JACK
|
|
|
|
depends_on "libmms" => :optional # MMS input
|
|
|
|
depends_on "libzzip" => :optional # Reading from within ZIPs
|
|
|
|
depends_on "yajl" => :optional # JSON library for SoundCloud
|
2014-08-02 11:20:18 +00:00
|
|
|
depends_on "opus" => :optional # Opus support
|
2014-11-14 20:35:08 +00:00
|
|
|
depends_on "libvorbis" => :optional
|
2013-07-10 15:16:33 +00:00
|
|
|
|
2010-01-07 16:23:10 +00:00
|
|
|
def install
|
2014-04-14 20:35:02 +00:00
|
|
|
# mpd specifies -std=gnu++0x, but clang appears to try to build
|
|
|
|
# that against libstdc++ anyway, which won't work.
|
|
|
|
# The build is fine with G++.
|
|
|
|
ENV.libcxx
|
|
|
|
|
2014-02-26 05:05:57 +00:00
|
|
|
system "./autogen.sh" if build.head?
|
2012-03-21 09:07:28 +00:00
|
|
|
|
2013-03-28 20:12:36 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-debug
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--enable-bzip2
|
|
|
|
--enable-ffmpeg
|
|
|
|
--enable-fluidsynth
|
2014-01-15 14:06:57 +00:00
|
|
|
--enable-osx
|
2014-10-23 07:34:38 +00:00
|
|
|
--disable-libwrap
|
2013-03-28 20:12:36 +00:00
|
|
|
]
|
2013-02-25 00:51:22 +00:00
|
|
|
|
2014-02-26 05:05:57 +00:00
|
|
|
args << "--disable-mad"
|
|
|
|
args << "--disable-curl" if MacOS.version <= :leopard
|
|
|
|
|
|
|
|
args << "--enable-zzip" if build.with? "libzzip"
|
|
|
|
args << "--enable-lastfm" if build.with? "lastfm"
|
|
|
|
args << "--disable-lame-encoder" if build.without? "lame"
|
|
|
|
args << "--disable-soundcloud" if build.without? "yajl"
|
2014-11-14 20:35:08 +00:00
|
|
|
args << "--enable-vorbis-encoder" if build.with? "libvorbis"
|
2014-02-26 05:05:57 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
|
|
|
system "make"
|
2014-11-05 01:37:01 +00:00
|
|
|
ENV.j1 # Directories are created in parallel, so let's not do that
|
2014-02-26 05:05:57 +00:00
|
|
|
system "make install"
|
2013-04-23 18:48:14 +00:00
|
|
|
end
|
|
|
|
|
2014-08-20 03:13:18 +00:00
|
|
|
plist_options :manual => "mpd"
|
|
|
|
|
|
|
|
def plist; <<-EOS.undent
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
|
|
<plist version="1.0">
|
|
|
|
<dict>
|
|
|
|
<key>Label</key>
|
|
|
|
<string>#{plist_name}</string>
|
|
|
|
<key>WorkingDirectory</key>
|
|
|
|
<string>#{HOMEBREW_PREFIX}</string>
|
|
|
|
<key>ProgramArguments</key>
|
|
|
|
<array>
|
|
|
|
<string>#{opt_bin}/mpd</string>
|
|
|
|
<string>--no-daemon</string>
|
|
|
|
</array>
|
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
<key>KeepAlive</key>
|
|
|
|
<true/>
|
|
|
|
</dict>
|
|
|
|
</plist>
|
|
|
|
EOS
|
|
|
|
end
|
2010-01-07 16:23:10 +00:00
|
|
|
end
|