gnu-indent: use options DSL

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
master
Jack Nagel 2012-08-13 09:56:30 -05:00
parent 7904cfb702
commit 15adf5664f
1 changed files with 5 additions and 7 deletions

View File

@ -1,23 +1,21 @@
require 'formula'
class GnuIndent < Formula
homepage 'http://www.gnu.org/software/indent/'
url 'http://ftpmirror.gnu.org/indent/indent-2.2.10.tar.gz'
mirror 'http://ftp.gnu.org/gnu/indent/indent-2.2.10.tar.gz'
homepage 'http://www.gnu.org/software/indent/'
md5 'be35ea62705733859fbf8caf816d8959'
sha1 '20fa8a7a4af6670c3254c8b87020291c3db37ed1'
depends_on "gettext"
depends_on 'gettext'
def options
[['--default-names', "Do not prepend 'g' to the binary (will override system indent)"]]
end
option 'default-names', "Do not prepend 'g' to the binary"
def install
args = ["--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--mandir=#{man}"]
args << "--program-prefix=g" unless ARGV.include? '--default-names'
args << "--program-prefix=g" unless build.include? 'default-names'
system "./configure", *args
system "touch man/malloc.h"