inetutils: remove default-names option
This commit is contained in:
parent
4c89cca387
commit
184d559d6c
1 changed files with 23 additions and 29 deletions
|
@ -13,8 +13,6 @@ class Inetutils < Formula
|
|||
sha256 "08419e32bd90cdc6c6b4715e64b2facae634a3cd45ecc7e54da87cab7b112458" => :el_capitan
|
||||
end
|
||||
|
||||
option "with-default-names", "Do not prepend 'g' to the binary"
|
||||
|
||||
depends_on "libidn"
|
||||
|
||||
def noshadow
|
||||
|
@ -29,48 +27,44 @@ class Inetutils < Formula
|
|||
--disable-dependency-tracking
|
||||
--disable-silent-rules
|
||||
--prefix=#{prefix}
|
||||
--program-prefix=g
|
||||
--with-idn
|
||||
]
|
||||
args << "--program-prefix=g" if build.without? "default-names"
|
||||
|
||||
system "./configure", *args
|
||||
system "make", "install"
|
||||
|
||||
if build.without? "default-names"
|
||||
# Binaries not shadowing macOS utils symlinked without 'g' prefix
|
||||
noshadow.each do |cmd|
|
||||
bin.install_symlink "g#{cmd}" => cmd
|
||||
man1.install_symlink "g#{cmd}.1" => "#{cmd}.1"
|
||||
end
|
||||
# Binaries not shadowing macOS utils symlinked without 'g' prefix
|
||||
noshadow.each do |cmd|
|
||||
bin.install_symlink "g#{cmd}" => cmd
|
||||
man1.install_symlink "g#{cmd}.1" => "#{cmd}.1"
|
||||
end
|
||||
|
||||
# Symlink commands without 'g' prefix into libexec/gnubin and
|
||||
# man pages into libexec/gnuman
|
||||
bin.find.each do |path|
|
||||
next unless File.executable?(path) && !File.directory?(path)
|
||||
cmd = path.basename.to_s.sub(/^g/, "")
|
||||
(libexec/"gnubin").install_symlink bin/"g#{cmd}" => cmd
|
||||
(libexec/"gnuman"/"man1").install_symlink man1/"g#{cmd}" => cmd
|
||||
end
|
||||
# Symlink commands without 'g' prefix into libexec/gnubin and
|
||||
# man pages into libexec/gnuman
|
||||
bin.find.each do |path|
|
||||
next unless File.executable?(path) && !File.directory?(path)
|
||||
cmd = path.basename.to_s.sub(/^g/, "")
|
||||
(libexec/"gnubin").install_symlink bin/"g#{cmd}" => cmd
|
||||
(libexec/"gnuman"/"man1").install_symlink man1/"g#{cmd}" => cmd
|
||||
end
|
||||
end
|
||||
|
||||
def caveats
|
||||
if build.without? "default-names" then <<~EOS
|
||||
The following commands have been installed with the prefix 'g'.
|
||||
def caveats; <<~EOS
|
||||
The following commands have been installed with the prefix 'g'.
|
||||
|
||||
#{noshadow.sort.join("\n ")}
|
||||
#{noshadow.sort.join("\n ")}
|
||||
|
||||
If you really need to use these commands with their normal names, you
|
||||
can add a "gnubin" directory to your PATH from your bashrc like:
|
||||
If you really need to use these commands with their normal names, you
|
||||
can add a "gnubin" directory to your PATH from your bashrc like:
|
||||
|
||||
PATH="#{opt_libexec}/gnubin:$PATH"
|
||||
PATH="#{opt_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:
|
||||
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_libexec}/gnuman:$MANPATH"
|
||||
EOS
|
||||
end
|
||||
MANPATH="#{opt_libexec}/gnuman:$MANPATH"
|
||||
EOS
|
||||
end
|
||||
|
||||
test do
|
||||
|
|
Loading…
Reference in a new issue