aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorAdam Vandenberg2012-08-08 22:26:41 -0700
committerAdam Vandenberg2012-08-08 22:27:29 -0700
commit7794d6ebc4530123484213e01df35cddda0268fe (patch)
tree26222a9530429b03b75a86244482ca88eb0acbd9 /Library/Formula
parentbaef71eed6058d43d7fcd7a73b0d17cf2d14c55e (diff)
downloadhomebrew-7794d6ebc4530123484213e01df35cddda0268fe.tar.bz2
boost: use options dsl
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/boost.rb26
1 files changed, 11 insertions, 15 deletions
diff --git a/Library/Formula/boost.rb b/Library/Formula/boost.rb
index e5e906a0e..3d098b45b 100644
--- a/Library/Formula/boost.rb
+++ b/Library/Formula/boost.rb
@@ -20,7 +20,7 @@ end
class Boost < Formula
homepage 'http://www.boost.org'
url 'http://downloads.sourceforge.net/project/boost/boost/1.49.0/boost_1_49_0.tar.bz2'
- md5 '0d202cb811f934282dea64856a175698'
+ sha1 '26a52840e9d12f829e3008589abf0a925ce88524'
head 'http://svn.boost.org/svn/boost/trunk'
@@ -29,23 +29,19 @@ class Boost < Formula
sha1 '46945515d520009fbbc101e4ae19f28db1433752' => :snowleopard
end
+ option :universal
+ option 'with-mpi', 'Enable MPI support'
+ option 'without-python', 'Build without Python'
+ option 'with-icu', 'Build regexp engine with icu support'
+
depends_on UniversalPython.new if needs_universal_python?
- depends_on "icu4c" if ARGV.include? "--with-icu"
+ depends_on "icu4c" if build.include? "--with-icu"
fails_with :llvm do
build 2335
cause "Dropped arguments to functions when linking with boost"
end
- def options
- [
- ["--with-mpi", "Enable MPI support"],
- ["--universal", "Build universal binaries"],
- ["--without-python", "Build without Python"],
- ["--with-icu", "Build regexp engine with icu support"],
- ]
- end
-
def install
# Adjust the name the libs are installed under to include the path to the
# Homebrew lib directory so executables will work when installed to a
@@ -68,13 +64,13 @@ class Boost < Formula
# Force boost to compile using the appropriate GCC version
open("user-config.jam", "a") do |file|
file.write "using darwin : : #{ENV.cxx} ;\n"
- file.write "using mpi ;\n" if ARGV.include? '--with-mpi'
+ file.write "using mpi ;\n" if build.include? '--with-mpi'
end
# we specify libdir too because the script is apparently broken
bargs = ["--prefix=#{prefix}", "--libdir=#{lib}"]
- if ARGV.include? "--with-icu"
+ if build.include? "--with-icu"
icu4c_prefix = Formula.factory('icu4c').prefix
bargs << "--with-icu=#{icu4c_prefix}"
end
@@ -87,8 +83,8 @@ class Boost < Formula
"threading=multi",
"install"]
- args << "address-model=32_64" << "architecture=x86" << "pch=off" if ARGV.include? "--universal"
- args << "--without-python" if ARGV.include? "--without-python"
+ args << "address-model=32_64" << "architecture=x86" << "pch=off" if build.universal?
+ args << "--without-python" if build.include? "--without-python"
system "./bootstrap.sh", *bargs
system "./bjam", *args