aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2009-12-04 10:37:09 +0000
committerMax Howell2009-12-04 14:16:04 +0000
commitc400a9f6caa79b39c9c6f92532ffede558d3333a (patch)
treebd0ec62b73e4fb11e286462d76f96102655efff6
parenta25563eccade1b70a6ccd5d99cca2df75baca0f2 (diff)
downloadhomebrew-c400a9f6caa79b39c9c6f92532ffede558d3333a.tar.bz2
Fix mpg123 on Snow Leopard
Also correctly applies optimisations based on chip and that.
-rw-r--r--Library/Formula/mpg123.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/Library/Formula/mpg123.rb b/Library/Formula/mpg123.rb
index c3d74d996..6d2bdae90 100644
--- a/Library/Formula/mpg123.rb
+++ b/Library/Formula/mpg123.rb
@@ -13,19 +13,21 @@ class Mpg123 <Formula
def install
args = ["--disable-debug", "--disable-dependency-tracking",
"--with-optimization=4",
- "--with-cpu=sse_alone",
"--prefix=#{prefix}",
"--with-audio=coreaudio",
"--with-default-audio=coreaudio"]
- # This option causes compilation failure on 10.5 nehalem MacPro.
- # args << "--with-cpu=x86-64" if Hardware.is_64_bit?
+ if Hardware.is_64_bit?
+ # adamv got compile failure for these conditions
+ args << "--with-cpu=x86-64" unless MACOS_VERSION == 10.5 and Hardware.intel_family == :nehalem
+ else
+ # there are no Intel Mac computers without SSE
+ args << "--with-cpu=sse_alone"
+ end
system "./configure", *args
- # ./configure incorrectly detects 10.5 as 10.4
- # Cut that crap out.
-
+ # ./configure incorrectly detects 10.5 as 10.4. Cut that crap out.
['', 'src/', 'src/output/', 'src/libmpg123/'].each do |path|
inreplace "#{path}Makefile", # CFLAGS
"-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk", ""