diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/flac.rb | 34 |
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? |
