This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
mpd: overhaul deps, options, bump to 0.17.4 #19368
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,80 @@ | ||
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" | ||
|
||
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" | ||
|
||
# | ||
# Options. | ||
# Many of these correspond to :optional dependencies below (and are included | ||
# to give those options more informative descriptions.) Such options are | ||
# listed in the same section and order as below. | ||
# | ||
|
||
# Input | ||
option 'with-wavpack', "Build with support for WavPack (.wv) files" | ||
option "enable-lastfm", "Compile with experimental support for Last.fm radio" | ||
|
||
# Streaming output encoding | ||
option 'with-lame', "Build with lame support (for mp3 encoding when streaming)" | ||
option 'with-two-lame', "Build with TwoLAME support (for mp2 encoding when streaming)" | ||
option 'with-flac', "Build with flac support (for flac encoding when streaming)" | ||
|
||
# Misc. | ||
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 | ||
|
||
|
||
# | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't need this block comment. |
||
# Dependencies. | ||
# Note that while :optional dependencies generate an option automatically, | ||
# some are specified explicitly above to give them more informative | ||
# descriptions. | ||
# | ||
|
||
# Basic dependencies | ||
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' | ||
|
||
# Input decoding | ||
depends_on 'ffmpeg' # lots | ||
depends_on 'fluid-synth' # MIDI | ||
depends_on 'faad2' # MP4/AAC | ||
depends_on 'wavpack' => :optional # WavPack | ||
# mpd also supports mad, mpg123, libsndfile, and audiofile, but those are | ||
# redundant with ffmpeg | ||
|
||
# Streaming output encoding | ||
depends_on 'libshout' => :optional # N. B. pulls in Vorbis encoder | ||
depends_on 'lame' => :optional # mp3 encoding | ||
depends_on 'two-lame' => :optional # mp2 encoding | ||
depends_on 'flac' => :optional # flac encoding | ||
|
||
# Misc. | ||
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 | ||
|
||
|
||
# | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't need this block comment. |
||
# Build rules. | ||
# | ||
|
||
def install | ||
options_check | ||
|
||
system "./autogen.sh" if build.head? | ||
|
||
args = %W[ | ||
|
@@ -35,22 +83,68 @@ def install | |
--prefix=#{prefix} | ||
--enable-bzip2 | ||
--enable-ffmpeg | ||
--enable-flac | ||
--enable-shout | ||
--enable-fluidsynth | ||
--enable-lame-encoder | ||
--with-faad=#{Formula.factory("faad2").opt_prefix} | ||
] | ||
|
||
# Disable buggy or experimental things | ||
args << "--disable-curl" if MacOS.version == :leopard | ||
args << "--disable-soundcloud" unless build.include? "enable-soundcloud" | ||
|
||
# Things ./configure defaults to off that we might want turned on | ||
args << "--enable-zzip" if build.with? "libzzip" | ||
args << "--enable-lastfm" if build.include? "lastfm" | ||
args << "--disable-libwrap" unless build.include? 'libwrap' | ||
args << "--enable-lastfm" if build.include? "enable-lastfm" | ||
args << "--with-faad=#{Formula.factory("faad2").opt_prefix}" | ||
|
||
# Things ./configure defaults to on that we might want turned off | ||
args << "--disable-libwrap" unless build.with? 'libwrap' | ||
# It finds these in some circumstances even if we don't want it to. If that | ||
# happens, we'll build/link against them, which isn't the end of the world, | ||
# but it's easy to prevent: | ||
args << "--disable-mad" | ||
args << "--disable-lame-encoder" unless build.with?("lame") | ||
# YAJL is similar, except if ./configure autodetects it, the build will | ||
# actually fail! | ||
args << "--disable-soundcloud" unless build.with?("yajl") | ||
|
||
system "./configure", *args | ||
system "make" | ||
ENV.j1 # Directories are created in parallel, so let's not do that | ||
system "make install" | ||
end | ||
|
||
|
||
# | ||
# Checks and messages. | ||
# | ||
|
||
def options_check | ||
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 brew's caveats for details." | ||
end | ||
if build.include? 'with-libwrap' and MacOS.version > :lion | ||
opoo "Ignoring --with-libwrap: TCP Wrappers was removed in OSX 10.8" | ||
end | ||
end | ||
|
||
def caveats | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Caveats go under |
||
<<-EOS | ||
As of mpd-0.17.4, this brew 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 brew has renamed options as follows: | ||
|
||
Old name New name | ||
=================== =============== | ||
--lastfm -> --enable-lastfm | ||
--libwrap -> --with-libwrap (unsupported in OSX >= 10.8) | ||
--enable-soundcloud -> --with-yajl | ||
|
||
If you use lastfm, libwrap, or soundcloud, please adjust your options | ||
accordingly. | ||
EOS | ||
end | ||
end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need this block comment.