audiofile: head added

Closes Homebrew/homebrew#35514.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Baptiste Fontaine 2015-01-03 17:29:23 +01:00 committed by Jack Nagel
parent 04bd77011c
commit 6764f67bea

View file

@ -1,27 +1,39 @@
require 'formula'
class Audiofile < Formula
homepage 'http://www.68k.org/~michael/audiofile/'
url 'http://audiofile.68k.org/audiofile-0.3.6.tar.gz'
sha1 '3aba3ef724b1b5f88cfc20ab9f8ce098e6c35a0e'
homepage "http://www.68k.org/~michael/audiofile/"
url "http://audiofile.68k.org/audiofile-0.3.6.tar.gz"
sha1 "3aba3ef724b1b5f88cfc20ab9f8ce098e6c35a0e"
option 'with-lcov', 'Enable Code Coverage support using lcov'
option 'with-check', 'Run the test suite during install ~30sec'
head do
url "https://github.com/mpruett/audiofile.git"
depends_on "asciidoc" => :build
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
depends_on 'lcov' => :optional
option "with-lcov", "Enable Code Coverage support using lcov"
option "with-check", "Run the test suite during install ~30sec"
depends_on "lcov" => :optional
def install
if build.head?
inreplace "autogen.sh", "libtool", "glibtool"
ENV["XML_CATALOG_FILES"] = "#{HOMEBREW_PREFIX}/etc/xml/catalog"
end
configure = build.head? ? "./autogen.sh" : "./configure"
args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
args << '--enable-coverage' if build.with? 'lcov'
system "./configure", *args
args << "--enable-coverage" if build.with? "lcov"
system configure, *args
system "make"
system "make check" if build.with? 'check'
system "make install"
system "make", "check" if build.with? "check"
system "make", "install"
end
test do
inn = '/System/Library/Sounds/Glass.aiff'
out = 'Glass.wav'
inn = "/System/Library/Sounds/Glass.aiff"
out = "Glass.wav"
conv_bin = "#{bin}/sfconvert"
info_bin = "#{bin}/sfinfo"
@ -39,7 +51,7 @@ class Audiofile < Formula
return
end
system conv_bin, inn, out, 'format', 'wave'
system info_bin, '--short', '--reporterror', out
system conv_bin, inn, out, "format", "wave"
system info_bin, "--short", "--reporterror", out
end
end