2010-02-12 19:16:26 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2012-02-15 06:33:51 +00:00
|
|
|
class Botan18 < Formula
|
|
|
|
homepage 'http://botan.randombit.net/'
|
|
|
|
url 'http://files.randombit.net/botan/v1.8/Botan-1.8.13.tbz'
|
|
|
|
md5 '26674282f146d187ba98c09a137368f5'
|
|
|
|
end
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Monotone < Formula
|
2011-03-28 15:02:46 +00:00
|
|
|
homepage 'http://monotone.ca/'
|
|
|
|
url 'http://www.monotone.ca/downloads/1.0/monotone-1.0.tar.bz2'
|
2011-03-30 23:33:27 +00:00
|
|
|
sha1 'aac556bb26d92910b74b65450a0be6c5045e2052'
|
2010-02-12 19:16:26 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2010-02-12 19:16:26 +00:00
|
|
|
depends_on 'gettext'
|
|
|
|
depends_on 'libidn'
|
|
|
|
depends_on 'lua'
|
|
|
|
depends_on 'pcre'
|
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
fails_with :llvm do
|
|
|
|
build 2334
|
|
|
|
cause "linker fails"
|
|
|
|
end
|
2010-12-21 03:42:41 +00:00
|
|
|
|
2011-03-21 21:24:22 +00:00
|
|
|
def install
|
2012-02-15 06:33:51 +00:00
|
|
|
botan18_prefix = libexec+'botan18'
|
|
|
|
|
|
|
|
Botan18.new.brew do
|
|
|
|
args = ["--prefix=#{botan18_prefix}"]
|
|
|
|
args << "--cpu=x86_64" if MacOS.prefer_64_bit?
|
|
|
|
system "./configure.py", *args
|
|
|
|
system "make", "CXX=#{ENV.cxx}", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
ENV['botan_CFLAGS'] = "-I#{botan18_prefix}/include"
|
|
|
|
ENV['botan_LIBS'] = "-L#{botan18_prefix}/lib -lbotan"
|
|
|
|
|
2010-12-21 03:42:41 +00:00
|
|
|
# Monotone only needs headers from Boost (it's templates all the way down!), so let's avoid
|
2011-03-30 23:33:27 +00:00
|
|
|
# building boost (which takes approximately forever) if it's not already installed.
|
|
|
|
# This is suggested in the Monotone installation instructions.
|
2010-12-21 03:42:41 +00:00
|
|
|
|
2012-05-02 18:56:50 +00:00
|
|
|
boost_prefix = buildpath/'boost'
|
2010-12-21 03:42:41 +00:00
|
|
|
boost = Formula.factory('boost')
|
2011-03-21 21:24:22 +00:00
|
|
|
unless boost.installed?
|
2012-05-02 18:56:50 +00:00
|
|
|
boost.brew do
|
|
|
|
boost_prefix.install Dir['*']
|
|
|
|
# Add header location to CPPFLAGS
|
|
|
|
ENV.append 'CPPFLAGS', "-I#{boost_prefix}"
|
|
|
|
end
|
2010-12-21 03:42:41 +00:00
|
|
|
end
|
2011-03-21 21:24:22 +00:00
|
|
|
|
2011-03-30 23:33:27 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
2011-03-21 21:24:22 +00:00
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make install"
|
2010-02-12 19:16:26 +00:00
|
|
|
end
|
|
|
|
end
|