gettext: use options dsl

master
Adam Vandenberg 2012-08-09 21:58:02 -07:00
parent dbbd9755cb
commit 311c9cbd5e
1 changed files with 4 additions and 8 deletions

View File

@ -12,18 +12,14 @@ class Gettext < Formula
sha1 'c75fdb192f1b49c9e7e2039c66e24f60f26bc027' => :lion
end
def options
[
['--with-examples', 'Keep example files.'],
['--universal', 'Build universal binaries.']
]
end
option :universal
option 'with-examples', 'Keep example files'
def patches
# Patch to allow building with Xcode 4; safe for any compiler.
p = {:p0 => ['https://trac.macports.org/export/79617/trunk/dports/devel/gettext/files/stpncpy.patch']}
unless ARGV.include? '--with-examples'
unless build.include? 'with-examples'
# Use a MacPorts patch to disable building examples at all,
# rather than build them and remove them afterwards.
p[:p0] << 'https://trac.macports.org/export/79183/trunk/dports/devel/gettext/files/patch-gettext-tools-Makefile.in'
@ -34,7 +30,7 @@ class Gettext < Formula
def install
ENV.libxml2
ENV.universal_binary if ARGV.build_universal?
ENV.universal_binary if build.universal?
system "./configure", "--disable-dependency-tracking", "--disable-debug",
"--prefix=#{prefix}",