homebrew-core/Formula/mpg123.rb
MHC12 107961afeb mpg123 1.13.6
Closes Homebrew/homebrew#10968.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-03-15 18:30:23 -07:00

37 lines
979 B
Ruby

require 'formula'
class Mpg123 < Formula
homepage 'http://www.mpg123.de/'
url 'http://downloads.sourceforge.net/project/mpg123/mpg123/1.13.6/mpg123-1.13.6.tar.bz2'
sha1 '61ae9edb105d4051858fe636fb2e54bd275cdfd9'
# mpg123 can't find its plugins if there are no la files
def skip_clean? path
path.extname == '.la'
end
def install
args = ["--disable-debug", "--disable-dependency-tracking",
"--with-optimization=4",
"--prefix=#{prefix}",
"--with-audio=coreaudio",
"--with-default-audio=coreaudio"]
if MacOS.prefer_64_bit?
args << "--with-cpu=x86-64"
else
args << "--with-cpu=sse_alone"
end
system "./configure", *args
['.', 'src', 'src/output', 'src/libmpg123'].each do |path|
inreplace "#{path}/Makefile" do |s|
# why do we do this?
s.change_make_var! "LDFLAGS", "-Wl,-read_only_relocs,suppress"
end
end
system "make install"
end
end