aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Christenson2014-05-16 04:41:47 -0600
committerAdam Vandenberg2014-05-16 07:22:19 -0700
commit021c44490a1624c6010041ecda5cf2396f3e8331 (patch)
tree7e7170459725125024b41f988c53b22ab9153501
parentbf32a06b3819e11969fc6a6123a3742ae65036d3 (diff)
downloadhomebrew-021c44490a1624c6010041ecda5cf2396f3e8331.tar.bz2
flac: add HEAD and enable assembly optimizations
-rw-r--r--Library/Formula/flac.rb34
1 files changed, 20 insertions, 14 deletions
diff --git a/Library/Formula/flac.rb b/Library/Formula/flac.rb
index 1b4a0ff43..762900b29 100644
--- a/Library/Formula/flac.rb
+++ b/Library/Formula/flac.rb
@@ -1,9 +1,16 @@
-require 'formula'
+require "formula"
class Flac < Formula
- homepage 'http://xiph.org/flac/'
- url 'http://downloads.xiph.org/releases/flac/flac-1.3.0.tar.xz'
- sha1 'a136e5748f8fb1e6c524c75000a765fc63bb7b1b'
+ homepage "http://xiph.org/flac/"
+ url "http://downloads.xiph.org/releases/flac/flac-1.3.0.tar.xz"
+ sha1 "a136e5748f8fb1e6c524c75000a765fc63bb7b1b"
+
+ head do
+ url "git://git.xiph.org/flac.git"
+ depends_on "autoconf" => :build
+ depends_on "automake" => :build
+ depends_on "libtool" => :build
+ end
bottle do
cellar :any
@@ -14,9 +21,9 @@ class Flac < Formula
option :universal
- depends_on 'pkg-config' => :build
- depends_on 'lame'
- depends_on 'libogg' => :optional
+ depends_on "pkg-config" => :build
+ depends_on "lame"
+ depends_on "libogg" => :optional
fails_with :llvm do
build 2326
@@ -26,15 +33,15 @@ class Flac < Formula
def install
ENV.universal_binary if build.universal?
- ENV.append 'CFLAGS', '-std=gnu89'
+ ENV.append "CFLAGS", "-std=gnu89"
+
+ system "./autogen.sh" if build.head?
- # sadly the asm optimisations won't compile since Leopard
args = %W[
--disable-dependency-tracking
--disable-debug
--prefix=#{prefix}
--mandir=#{man}
- --disable-asm-optimizations
--enable-sse
--enable-static
]
@@ -43,7 +50,7 @@ class Flac < Formula
system "./configure", *args
- ENV['OBJ_FORMAT']='macho'
+ ENV["OBJ_FORMAT"]="macho"
# adds universal flags to the generated libtool script
inreplace "libtool" do |s|
@@ -51,14 +58,13 @@ class Flac < Formula
end
system "make install"
- (bin/'flac2mp3').write DATA.read
+ (bin/"flac2mp3").write DATA.read
end
end
__END__
#!/usr/bin/env ruby
-# http://gist.github.com/gists/2998853/
-# Forked from http://gist.github.com/gists/124242
+# https://github.com/rmndk/flac2mp3
filename, quality = ARGV[0], ARGV[1]
abort "Usage: flac2mp3 FLACFILE [V2|V1|V0|320]\nDefault (and recommended) quality is V0." if filename.nil?