aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominyk Tiller2014-11-13 04:03:02 +0000
committerMike McQuaid2014-11-13 08:38:41 +0000
commitfcdff1b6854511550e5f55e637b10bbd7c876c25 (patch)
treeb154d6f499f0b794bceb9633182adeaa2fd6ef2f
parent883598bdf853e09b745ee5168fb2813724615c6a (diff)
downloadhomebrew-fcdff1b6854511550e5f55e637b10bbd7c876c25.tar.bz2
gnu-sed: option depreciation
Depreciates default-names in favour of with-default-names, adds a test. Closes #34148. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rw-r--r--Library/Formula/gnu-sed.rb29
1 files changed, 17 insertions, 12 deletions
diff --git a/Library/Formula/gnu-sed.rb b/Library/Formula/gnu-sed.rb
index 55fad70bf..8ab5b5161 100644
--- a/Library/Formula/gnu-sed.rb
+++ b/Library/Formula/gnu-sed.rb
@@ -1,10 +1,10 @@
-require 'formula'
+require "formula"
class GnuSed < Formula
- homepage 'http://www.gnu.org/software/sed/'
- url 'http://ftpmirror.gnu.org/sed/sed-4.2.2.tar.bz2'
- mirror 'http://ftp.gnu.org/gnu/sed/sed-4.2.2.tar.bz2'
- sha1 'f17ab6b1a7bcb2ad4ed125ef78948092d070de8f'
+ homepage "https://www.gnu.org/software/sed/"
+ url "http://ftpmirror.gnu.org/sed/sed-4.2.2.tar.bz2"
+ mirror "https://ftp.gnu.org/gnu/sed/sed-4.2.2.tar.bz2"
+ sha1 "f17ab6b1a7bcb2ad4ed125ef78948092d070de8f"
bottle do
cellar :any
@@ -14,22 +14,24 @@ class GnuSed < Formula
sha1 "4dff2a21df4148c95abc04e87544bef1c452951f" => :mountain_lion
end
- 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"
- (libexec/'gnubin').install_symlink bin/"gsed" =>"sed"
- (libexec/'gnuman/man1').install_symlink man1/"gsed.1" => "sed.1"
+ (libexec/"gnubin").install_symlink bin/"gsed" =>"sed"
+ (libexec/"gnuman/man1").install_symlink man1/"gsed.1" => "sed.1"
end
def caveats; <<-EOS.undent
- The command has been installed with the prefix 'g'.
- If you do not want the prefix, install using the 'default-names' option.
+ The command has been installed with the prefix "g".
+ If you do not want the prefix, install using the "with-default-names" option.
If you need to use these commands with their normal names, you
can add a "gnubin" directory to your PATH from your bashrc like:
@@ -44,4 +46,7 @@ class GnuSed < Formula
EOS
end
+ test do
+ system "#{bin}/gsed", "--version"
+ end
end