diff options
| author | Camillo Lugaresi | 2010-12-21 04:42:41 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2011-02-02 21:23:15 +0000 |
| commit | 23d0a48765e47f2ab0109f70a2d91f8d60e34157 (patch) | |
| tree | bf9a318f5d4f9ab272a9a96c6ce8e4ae72601d4f | |
| parent | a8e51ba09445404db7ae7f717841197b3888e4a5 (diff) | |
| download | homebrew-23d0a48765e47f2ab0109f70a2d91f8d60e34157.tar.bz2 | |
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 <mike@mikemcquaid.com>
| -rw-r--r-- | Library/Formula/monotone.rb | 30 |
1 files 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 <Formula - url 'http://www.monotone.ca/downloads/0.48.1/monotone-0.48.1.tar.gz' + url 'http://www.monotone.ca/downloads/0.99.1/monotone-0.99.1.tar.gz' homepage 'http://www.monotone.ca/' - md5 'b5fa9e3b02ca3dcaf58fb7a2519ef956' + sha1 'e74ba571b358f6b76370f882d15ddbd1edd9f37e' depends_on 'pkg-config' => :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 |
