From 23d0a48765e47f2ab0109f70a2d91f8d60e34157 Mon Sep 17 00:00:00 2001 From: Camillo Lugaresi Date: Tue, 21 Dec 2010 04:42:41 +0100 Subject: updated monotone to 0.99.1 Boost is no longer listed as a dependency: since Monotone only needs the headers, it is downloaded but not built, which greatly reduces the time and disk space used to install monotone. If Boost is already installed, the installed copy is used. Closes #3675. Signed-off-by: Mike McQuaid --- Library/Formula/monotone.rb | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/Library/Formula/monotone.rb b/Library/Formula/monotone.rb index 93947d9c3..97655d573 100644 --- a/Library/Formula/monotone.rb +++ b/Library/Formula/monotone.rb @@ -1,21 +1,41 @@ require 'formula' class Monotone :build depends_on 'gettext' depends_on 'botan' - depends_on 'boost' depends_on 'libidn' depends_on 'lua' depends_on 'pcre' def install fails_with_llvm "linker fails" - system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" - system "make install" + + def install_body + system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" + system "make install" + end + + # Monotone only needs headers from Boost (it's templates all the way down!), so let's avoid + # building boost (which takes approximately forever) if it's not already installed. This is + # suggested in the Monotone installation instructions. + + boost = Formula.factory('boost') + if boost.installed? + install_body + else + monotone_dir = Dir.pwd + # a formula's stage method is private, so we cannot call boost.stage + boost.brew do + boost_dir = Dir.pwd + ENV.append "CXXFLAGS", "-I"+boost_dir + Dir.chdir monotone_dir + install_body + end + end end end -- cgit v1.2.3