aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJonathan Sailor2013-04-23 14:48:14 -0400
committerMike McQuaid2013-06-27 00:03:39 +0100
commitb48d5ec724cbf78a62657710a4f00ef3e47c6f72 (patch)
tree1da1241a6e5d53599d6d5c4ef3a85ac859d3702c /Library
parentd7ac21b068109d355eb88c2cbb37aaa2d11abb57 (diff)
downloadhomebrew-b48d5ec724cbf78a62657710a4f00ef3e47c6f72.tar.bz2
mpd: 0.17.4 and massive cleanup.
Add sqlite3 and libsamplerate as depends; they're small, and there's really no reason not to want them. Remove an unnecessary dep on mad (ffmpeg can do everything it can). Add :optional support for WavPack, JACK, and two-lame. Make the deps for streaming output (libshout, lame, flac) optional. Rename "--enable-soundcloud" to "--with-yajl" which, while less informative, correctly controls the dependency on yajl. Rename "--libwrap" to "--with-libwrap". Change its description to reflect how it behaves differently on OSX <10.7, 10.7; remove on 10.8, where it's useless. Rename "--lastfm" to "--enable-lastfm" to follow the options-start-with-verb conveition. Document all of the options changes/quirks in caveats. mpd moved from http://mpd.wikia.com/ to http://www.musicpd.org/ in April 2013. Closes #19368. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/mpd.rb101
1 files changed, 70 insertions, 31 deletions
diff --git a/Library/Formula/mpd.rb b/Library/Formula/mpd.rb
index 4490c78a2..e7159b183 100644
--- a/Library/Formula/mpd.rb
+++ b/Library/Formula/mpd.rb
@@ -1,33 +1,57 @@
require 'formula'
class Mpd < Formula
- homepage 'http://mpd.wikia.com'
- url 'http://sourceforge.net/projects/musicpd/files/mpd/0.17.3/mpd-0.17.3.tar.bz2'
- sha1 'f684d73a7517371a4461afdb2439f9533b51a49d'
+ homepage 'http://www.musicpd.org/'
+ url 'http://www.musicpd.org/download/mpd/0.17/mpd-0.17.4.tar.bz2'
+ sha1 'e3a16b5d784c3699b151e72cfa58d0ea54a49b13'
- head "git://git.musicpd.org/master/mpd.git"
+ head 'git://git.musicpd.org/master/mpd.git'
- option "lastfm", "Compile with experimental support for Last.fm radio"
- option "libwrap", "Enable support of TCP Wrappers (buggy on 10.7)"
- option "enable-soundcloud", "Enable support for soundcloud.com"
+ 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)'
+ option 'with-yajl', 'Build with yajl support (for playing from soundcloud)'
+ if MacOS.version < :lion
+ option 'with-libwrap', 'Build with libwrap (TCP Wrappers) support'
+ elsif MacOS.version == :lion
+ option 'with-libwrap', 'Build with libwrap (TCP Wrappers) support (buggy)'
+ end
depends_on 'pkg-config' => :build
depends_on 'glib'
depends_on 'libid3tag'
- depends_on 'ffmpeg'
- depends_on 'flac'
- depends_on 'libshout'
- depends_on 'mad'
- depends_on 'lame'
- depends_on 'fluid-synth'
- depends_on 'libshout'
- depends_on 'faad2'
- depends_on 'libmms' => :optional
- depends_on 'libzzip' => :optional
- depends_on 'yajl' if build.include? 'enable-soundcloud'
+ depends_on 'sqlite'
+ depends_on 'libsamplerate'
+
+ depends_on 'ffmpeg' # lots of codecs
+ # mpd also supports mad, mpg123, libsndfile, and audiofile, but those are
+ # redundant with ffmpeg
+ 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
def install
- system "./autogen.sh" if build.head?
+ if build.include? 'lastfm' or build.include? 'libwrap' \
+ or build.include? 'enable-soundcloud'
+ opoo 'You are using an option that has been replaced.'
+ opoo 'See this formula\'s caveats for details.'
+ end
+
+ if build.with? 'libwrap' and MacOS.version > :lion
+ opoo 'Ignoring --with-libwrap: TCP Wrappers were removed in OSX 10.8'
+ end
+
+ system './autogen.sh' if build.head?
args = %W[
--disable-debug
@@ -35,22 +59,37 @@ class Mpd < Formula
--prefix=#{prefix}
--enable-bzip2
--enable-ffmpeg
- --enable-flac
- --enable-shout
--enable-fluidsynth
- --enable-lame-encoder
- --with-faad=#{Formula.factory("faad2").opt_prefix}
]
- args << "--disable-curl" if MacOS.version == :leopard
- args << "--disable-soundcloud" unless build.include? "enable-soundcloud"
- args << "--enable-zzip" if build.with? "libzzip"
- args << "--enable-lastfm" if build.include? "lastfm"
- args << "--disable-libwrap" unless build.include? 'libwrap'
+ args << '--disable-mad'
+ args << '--disable-curl' if MacOS.version == :leopard
- system "./configure", *args
- system "make"
+ args << "--with-faad=#{Formula.factory('faad2').opt_prefix}"
+ args << '--enable-zzip' if build.with? 'libzzip'
+ args << '--enable-lastfm' if build.with? 'lastfm'
+ args << '--disable-libwrap' if build.without? 'libwrap'
+ args << '--disable-lame-encoder' if build.without? 'lame'
+ args << '--disable-soundcloud' if build.without? 'yajl'
+
+ system './configure', *args
+ system 'make'
ENV.j1 # Directories are created in parallel, so let's not do that
- system "make install"
+ system 'make install'
+ end
+
+ def caveats
+ <<-EOS
+ As of mpd-0.17.4, this formula no longer enables support for streaming
+ output by default. If you want streaming output, you must now specify
+ the --with-libshout, --with-lame, --with-twolame, and/or --with-flac
+ options explicitly. (Use '--with-libshout --with-lame --with-flac' for
+ the pre-0.17.4 behavior.)
+
+ As of mpd-0.17.4, this formula has renamed options as follows:
+ --lastfm -> --with-lastfm
+ --libwrap -> --with-libwrap (unsupported in OSX >= 10.8)
+ --enable-soundcloud -> --with-yajl
+ EOS
end
end