From cf6a2ac783291c1bcb6e76fda75fb90d284052db Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Thu, 9 Aug 2012 21:58:02 -0700 Subject: gettext: use options dsl --- Library/Formula/gettext.rb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/gettext.rb b/Library/Formula/gettext.rb index 3411b79dc..a922a87fa 100644 --- a/Library/Formula/gettext.rb +++ b/Library/Formula/gettext.rb @@ -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}", -- cgit v1.2.3