Permalink
Browse files

gmp: use options DSL

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information...
1 parent b826def commit d1cbb00904caf648532fdca2e857c295aa73b6b9 @jacknagel jacknagel committed Aug 13, 2012
Showing with 4 additions and 8 deletions.
  1. +4 −8 Library/Formula/gmp.rb
@@ -6,12 +6,8 @@ class Gmp < Formula
mirror 'http://ftp.gnu.org/gnu/gmp/gmp-5.0.5.tar.bz2'
sha256 '1f588aaccc41bb9aed946f9fe38521c26d8b290d003c5df807f65690f2aadec9'
- def options
- [
- ["--32-bit", "Build 32-bit only."],
- ["--skip-check", "Do not run 'make check' to verify libraries."]
- ]
- end
+ option '32-bit'
+ option 'skip-check', 'Do not run `make check`'
def install
# Reports of problems using gcc 4.0 on Leopard
@@ -25,7 +21,7 @@ def install
# Build 32-bit where appropriate, and help configure find 64-bit CPUs
# see: http://gmplib.org/macos.html
- if MacOS.prefer_64_bit? and not ARGV.build_32_bit?
+ if MacOS.prefer_64_bit? and not build.build_32_bit?
ENV.m64
args << "--build=x86_64-apple-darwin"
else
@@ -37,7 +33,7 @@ def install
system "make"
ENV.j1 # Doesn't install in parallel on 8-core Mac Pro
# Upstream implores users to always run the test suite
- system "make check" unless ARGV.include? "--skip-check"
+ system "make check" unless build.include? "skip-check"
system "make install"
end
end

0 comments on commit d1cbb00

Please sign in to comment.