aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/monotone.rb
blob: d187899798d1353cca058002beeb3edd41422069 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
require 'formula'

class Monotone < Formula
  url 'http://www.monotone.ca/downloads/0.99.1/monotone-0.99.1.tar.gz'
  homepage 'http://www.monotone.ca/'
  sha1 'e74ba571b358f6b76370f882d15ddbd1edd9f37e'

  depends_on 'pkg-config' => :build
  depends_on 'gettext'
  depends_on 'botan'
  depends_on 'libidn'
  depends_on 'lua'
  depends_on 'pcre'

  fails_with_llvm "linker fails"

  def install
    # 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')
    unless boost.installed?
      # a formula's stage method is private, so we cannot call boost.stage
      boost.brew do
        ENV.append "CXXFLAGS", "-I"+Dir.pwd
      end
    end

    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make install"
  end
end