2014-05-16 10:41:47 +00:00
|
|
|
require "formula"
|
2009-06-05 11:57:50 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Flac < Formula
|
2014-11-27 04:21:22 +00:00
|
|
|
homepage "https://xiph.org/flac/"
|
2014-11-27 04:19:58 +00:00
|
|
|
url "http://downloads.xiph.org/releases/flac/flac-1.3.1.tar.xz"
|
|
|
|
sha1 "38e17439d11be26207e4af0ff50973815694b26f"
|
2014-05-16 10:41:47 +00:00
|
|
|
|
|
|
|
head do
|
2014-11-27 04:21:22 +00:00
|
|
|
url "https://git.xiph.org/flac.git"
|
2014-05-16 10:41:47 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
|
|
|
end
|
2010-07-20 01:11:29 +00:00
|
|
|
|
2014-02-22 19:14:36 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-11-27 04:31:39 +00:00
|
|
|
sha1 "fcb2c97ae1a204372210e89b49a12cd8f18a14c8" => :yosemite
|
|
|
|
sha1 "ba8cd91c32faddb537929fad6dee7ef363c30f3d" => :mavericks
|
|
|
|
sha1 "0e117a98f7a267b019d7dba31d5b65f5d57c530c" => :mountain_lion
|
2014-02-22 19:14:36 +00:00
|
|
|
end
|
|
|
|
|
2013-05-11 15:58:41 +00:00
|
|
|
option :universal
|
|
|
|
|
2014-05-16 10:41:47 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "libogg" => :optional
|
2013-10-25 05:57:09 +00:00
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
fails_with :llvm do
|
|
|
|
build 2326
|
|
|
|
cause "Undefined symbols when linking"
|
|
|
|
end
|
2011-02-14 18:57:55 +00:00
|
|
|
|
2011-03-21 21:24:22 +00:00
|
|
|
def install
|
2013-05-11 15:58:41 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
|
|
|
|
2014-05-16 10:41:47 +00:00
|
|
|
ENV.append "CFLAGS", "-std=gnu89"
|
|
|
|
|
|
|
|
system "./autogen.sh" if build.head?
|
2013-10-25 05:57:09 +00:00
|
|
|
|
2014-03-10 00:46:21 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--disable-debug
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--mandir=#{man}
|
|
|
|
--enable-sse
|
|
|
|
--enable-static
|
|
|
|
]
|
|
|
|
|
|
|
|
args << "--without-ogg" if build.without? "libogg"
|
|
|
|
|
|
|
|
system "./configure", *args
|
|
|
|
|
2014-08-08 09:04:27 +00:00
|
|
|
ENV["OBJ_FORMAT"] = "macho"
|
2013-05-11 15:58:41 +00:00
|
|
|
|
|
|
|
# adds universal flags to the generated libtool script
|
|
|
|
inreplace "libtool" do |s|
|
2013-08-02 03:40:42 +00:00
|
|
|
s.gsub! ":$verstring\"", ":$verstring -arch #{Hardware::CPU.arch_32_bit} -arch #{Hardware::CPU.arch_64_bit}\""
|
2013-05-11 15:58:41 +00:00
|
|
|
end
|
|
|
|
|
2014-08-08 09:04:27 +00:00
|
|
|
system "make", "install"
|
2009-06-05 11:57:50 +00:00
|
|
|
end
|
2011-02-14 18:57:55 +00:00
|
|
|
end
|