2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-23 02:30:16 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class GnuSed < Formula
|
2012-08-13 14:56:40 +00:00
|
|
|
homepage 'http://www.gnu.org/software/sed/'
|
2012-12-22 18:04:29 +00:00
|
|
|
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'
|
2009-09-23 02:30:16 +00:00
|
|
|
|
2012-08-13 14:56:40 +00:00
|
|
|
option 'default-names', "Do not prepend 'g' to the binary"
|
2010-11-15 20:40:52 +00:00
|
|
|
|
2009-09-23 02:30:16 +00:00
|
|
|
def install
|
2010-11-15 20:40:52 +00:00
|
|
|
args = ["--prefix=#{prefix}", "--disable-dependency-tracking"]
|
2012-08-13 14:56:40 +00:00
|
|
|
args << "--program-prefix=g" unless build.include? 'default-names'
|
2010-11-15 20:40:52 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2009-09-23 02:30:16 +00:00
|
|
|
system "make install"
|
2013-06-16 08:03:22 +00:00
|
|
|
|
|
|
|
(libexec/'gnubin').install_symlink bin/"gsed" =>"sed"
|
|
|
|
(libexec/'gnuman/man1').install_symlink man1/"gsed.1" => "sed.1"
|
2009-09-23 02:30:16 +00:00
|
|
|
end
|
2013-03-24 00:17:40 +00:00
|
|
|
|
|
|
|
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.
|
2013-06-16 08:03:22 +00:00
|
|
|
|
|
|
|
If you need to use these commands with their normal names, you
|
|
|
|
can add a "gnubin" directory to your PATH from your bashrc like:
|
|
|
|
|
|
|
|
PATH="#{opt_prefix}/libexec/gnubin:$PATH"
|
|
|
|
|
|
|
|
Additionally, you can access their man pages with normal names if you add
|
|
|
|
the "gnuman" directory to your MANPATH from your bashrc as well:
|
|
|
|
|
|
|
|
MANPATH="#{opt_prefix}/libexec/gnuman:$MANPATH"
|
|
|
|
|
2013-03-24 00:17:40 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
2009-09-23 02:30:16 +00:00
|
|
|
end
|