From 7b2f2f4f2d10ea366b9dc13dd3d16b34259bb10b Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Thu, 13 Nov 2014 03:29:12 +0000 Subject: gnu-which: option depreciation Depreciates the now defunct default-names option, moves the Homepage because the current one is dead, and adds a test. Closes #34146. Signed-off-by: Mike McQuaid --- Library/Formula/gnu-which.rb | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/gnu-which.rb b/Library/Formula/gnu-which.rb index a472687f8..37ffae3b6 100644 --- a/Library/Formula/gnu-which.rb +++ b/Library/Formula/gnu-which.rb @@ -1,18 +1,25 @@ -require 'formula' +require "formula" class GnuWhich < Formula - homepage 'http://carlo17.home.xs4all.nl/which/' - url 'http://ftpmirror.gnu.org/which/which-2.20.tar.gz' - mirror 'http://ftp.gnu.org/gnu/which/which-2.20.tar.gz' - sha1 '3bcd6d87aa5231917ba7123319eedcae90cfa0fd' + # Previous homepage is dead. Have linked to the GNU Projects page for now. + homepage "https://savannah.gnu.org/projects/which/" + url "http://ftpmirror.gnu.org/which/which-2.20.tar.gz" + mirror "https://ftp.gnu.org/gnu/which/which-2.20.tar.gz" + sha1 "3bcd6d87aa5231917ba7123319eedcae90cfa0fd" - option 'default-names', "Do not prepend 'g' to the binary" + deprecated_option "default-names" => "with-default-names" + + option "with-default-names", "Do not prepend 'g' to the binary" def install args = ["--prefix=#{prefix}", "--disable-dependency-tracking"] - args << "--program-prefix=g" unless build.include? 'default-names' + args << "--program-prefix=g" if build.without? "default-names" system "./configure", *args - system "make install" + system "make", "install" + end + + test do + system "#{bin}/gwhich", "gcc" end end -- cgit v1.2.3