Skip to content

Commit

Permalink
mpg123 1.14.1
Browse files Browse the repository at this point in the history
* Upgrade mpg123 to 1.14.0.
* Remove skip clean. Use --with-module-suffix=.so instead.
* Remove --with-audio list. It builds coreaudio, openal, dummy.
* Remove LDFLAGS inreplace that added read-only-relocs,suppress.

Mpg123 builds output modules using the .so suffix by default.
So let it load them with that name. Tested by playing mp3s.
Also let it build the modules it wants to build. Someone
may desire that functionality. The read-only-relocs inreplace
was removed because that is not valid on x86_64. It generates
warnings.  @mxcl asked in a comment why it was there.
It may be needed for 32bit SL or Leopard.  There was nothing
in the history or past issues that explained adding that.
The `--with-cpu` flags are still needed.
This compiles on Lion with clang and llvm from XCode-4.3.2.

Closes Homebrew#12149.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information
nibbles 2bits authored and jacknagel committed May 9, 2012
1 parent 77bc491 commit e3591f2
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions mpg123.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@

class Mpg123 < Formula
homepage 'http://www.mpg123.de/'
url 'http://downloads.sourceforge.net/project/mpg123/mpg123/1.13.7/mpg123-1.13.7.tar.bz2'
sha1 '33b71c932b87004f3c8fed527b1f9a4b5f4337b2'

# mpg123 can't find its plugins if there are no la files
def skip_clean? path
path.extname == '.la'
end
url 'http://downloads.sourceforge.net/project/mpg123/mpg123/1.14.1/mpg123-1.14.1.tar.bz2'
mirror 'http://www.mpg123.de/download/mpg123-1.14.1.tar.bz2'
sha1 'db1004f3318ce239e2972ae623563fe6e831e331'

def install
args = ["--disable-debug", "--disable-dependency-tracking",
"--with-optimization=4",
"--prefix=#{prefix}",
"--with-audio=coreaudio",
"--with-default-audio=coreaudio"]
'--with-default-audio=coreaudio',
'--with-module-suffix=.so']

if MacOS.prefer_64_bit?
args << "--with-cpu=x86-64"
Expand All @@ -24,14 +19,6 @@ def install
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

0 comments on commit e3591f2

Please sign in to comment.