New formula: getopt
The GNU version of getopt, required for tools like xmlto. Signed-off-by: Adam Vandenberg <flangy@gmail.com> * Renamed formula to "gnu-getopt" since it shadows the BSD getopt * Made keg-only for same reason as above
This commit is contained in:
parent
b49d1d15e2
commit
9d000d5f51
1 changed files with 22 additions and 0 deletions
22
Formula/gnu-getopt.rb
Normal file
22
Formula/gnu-getopt.rb
Normal file
|
@ -0,0 +1,22 @@
|
|||
require 'formula'
|
||||
|
||||
class GnuGetopt <Formula
|
||||
url 'http://software.frodo.looijaard.name/getopt/files/getopt-1.1.4.tar.gz'
|
||||
md5 '02188ca68da27c4175d6e9f3da732101'
|
||||
homepage 'http://software.frodo.looijaard.name/getopt/'
|
||||
|
||||
depends_on 'gettext'
|
||||
|
||||
def keg_only?
|
||||
:provided_by_osx
|
||||
end
|
||||
|
||||
def install
|
||||
inreplace 'Makefile' do |s|
|
||||
gettext = Formula.factory 'gettext'
|
||||
s.change_make_var! "CPPFLAGS", "\\1 -I#{gettext.include}"
|
||||
s.change_make_var! "LDFLAGS", "\\1 -L#{gettext.lib} -lintl"
|
||||
end
|
||||
system "make", "prefix=#{prefix}", "mandir=#{man}", "install"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue