2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-08-07 14:16:18 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Mpg123 < Formula
|
2009-11-16 18:41:22 +00:00
|
|
|
homepage 'http://www.mpg123.de/'
|
2012-03-26 08:05:28 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/mpg123/mpg123/1.13.7/mpg123-1.13.7.tar.bz2'
|
|
|
|
sha1 '33b71c932b87004f3c8fed527b1f9a4b5f4337b2'
|
2009-08-07 14:16:18 +00:00
|
|
|
|
2012-03-15 22:08:29 +00:00
|
|
|
# mpg123 can't find its plugins if there are no la files
|
2009-08-07 14:16:18 +00:00
|
|
|
def skip_clean? path
|
|
|
|
path.extname == '.la'
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2009-11-16 18:41:22 +00:00
|
|
|
args = ["--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--with-optimization=4",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--with-audio=coreaudio",
|
|
|
|
"--with-default-audio=coreaudio"]
|
2009-10-04 17:49:29 +00:00
|
|
|
|
2011-03-18 17:30:47 +00:00
|
|
|
if MacOS.prefer_64_bit?
|
2010-05-01 17:07:54 +00:00
|
|
|
args << "--with-cpu=x86-64"
|
2009-12-04 10:37:09 +00:00
|
|
|
else
|
|
|
|
args << "--with-cpu=sse_alone"
|
|
|
|
end
|
2009-10-04 17:49:29 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2010-02-19 19:19:01 +00:00
|
|
|
['.', 'src', 'src/output', 'src/libmpg123'].each do |path|
|
|
|
|
inreplace "#{path}/Makefile" do |s|
|
2012-03-08 16:19:14 +00:00
|
|
|
# why do we do this?
|
2010-02-19 19:19:01 +00:00
|
|
|
s.change_make_var! "LDFLAGS", "-Wl,-read_only_relocs,suppress"
|
|
|
|
end
|
2009-11-16 18:41:22 +00:00
|
|
|
end
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2009-08-07 14:16:18 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2009-11-05 11:10:28 +00:00
|
|
|
end
|