aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/gnu-which.rb
diff options
context:
space:
mode:
authorDominyk Tiller2014-11-13 03:29:12 +0000
committerMike McQuaid2014-11-13 08:35:16 +0000
commit7b2f2f4f2d10ea366b9dc13dd3d16b34259bb10b (patch)
tree46639e5935481342637caa8fb2700dbd542fa194 /Library/Formula/gnu-which.rb
parentc746a42cc36d8d24c0cb332efc7b72fa8493c89d (diff)
downloadhomebrew-7b2f2f4f2d10ea366b9dc13dd3d16b34259bb10b.tar.bz2
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 <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula/gnu-which.rb')
-rw-r--r--Library/Formula/gnu-which.rb23
1 files changed, 15 insertions, 8 deletions
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