Use cellar paths in tests

This lets `brew test` work when these are keg-only, etc. Also fix a
couple of typos and style things.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
master
Jack Nagel 2012-02-27 14:08:58 -06:00
parent 03d22cc400
commit c1fd9b501e
3 changed files with 9 additions and 14 deletions

View File

@ -6,22 +6,22 @@ class Autoconf < Formula
mirror 'http://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.gz'
md5 'c3b5247592ce694f7097873aa07d66fe'
if MacOS.xcode_version.to_f < 4.3 or File.file? "/usr/bin/autoconf"
keg_only "Xcode (up to and including 4.2) provides (a rather old) Autoconf."
end
def patches
# force autoreconf to look for and use our glibtoolize
DATA
end
if MacOS.xcode_version.to_f < 4.3 or File.file? "/usr/bin/autoconf"
keg_only "Xcode (up to and including 4.2) provides (a rather old) Autoconf."
end
def install
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make install"
end
def test
system "#{HOMEBREW_PREFIX}/bin/autoconf --version"
system "#{bin}/autoconf --version"
end
end

View File

@ -24,11 +24,6 @@ class Automake < Formula
end
def test
# This test will fail and we won't accept that! It's enough to just
# replace "false" with the main program this formula installs, but
# it'd be nice if you were more thorough. Test the test with
# `brew test automake`. Remove this comment before submitting
# your pull request!
system "#{HOMEBREW_PREFIX}/bin/automake --version"
system "#{bin}/automake --version"
end
end

View File

@ -9,8 +9,8 @@ class Libtool < Formula
mirror 'http://ftp.gnu.org/gnu/libtool/libtool-2.4.tar.gz'
md5 'b32b04148ecdd7344abc6fe8bd1bb021'
if MacOS.xcode_version.to_f < 4.3 or File.file? "/usr/bin/libtoolize"
keg_only "Xcode (up to and including 4.2) provides (a rather old) Autoconf."
if MacOS.xcode_version.to_f < 4.3 or File.file? "/usr/bin/glibtoolize"
keg_only "Xcode (up to and including 4.2) provides (a rather old) Libtool."
end
def install
@ -27,6 +27,6 @@ class Libtool < Formula
end
def test
system "#{HOMEBREW_PREFIX}/bin/glibtoolize --version"
system "#{bin}/glibtoolize --version"
end
end