aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/monotone.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/monotone.rb')
-rw-r--r--Library/Formula/monotone.rb30
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