2010-02-12 19:14:45 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Botan < Formula
|
2010-02-12 19:14:45 +00:00
|
|
|
homepage 'http://botan.randombit.net/'
|
2013-02-20 00:18:23 +00:00
|
|
|
url 'http://botan.randombit.net/files/Botan-1.10.4.tbz'
|
|
|
|
sha1 'a000b6d052cd6f5328bcae360f4e11e9b60708f4'
|
2010-02-12 19:14:45 +00:00
|
|
|
|
2012-08-09 05:28:15 +00:00
|
|
|
option 'enable-debug', 'Enable debug build of Botan'
|
2012-02-15 05:25:01 +00:00
|
|
|
|
2010-02-12 19:14:45 +00:00
|
|
|
def install
|
2011-09-02 20:44:15 +00:00
|
|
|
args = ["--prefix=#{prefix}"]
|
|
|
|
args << "--cpu=x86_64" if MacOS.prefer_64_bit?
|
2012-08-09 15:51:54 +00:00
|
|
|
args << "--enable-debug" if build.include? "enable-debug"
|
2012-06-25 10:41:47 +00:00
|
|
|
# The --cc option needs "clang" or "gcc" and not the full path.
|
|
|
|
args << "--cc=#{ENV.compiler.to_s}"
|
2011-09-02 20:44:15 +00:00
|
|
|
|
|
|
|
system "./configure.py", *args
|
2012-06-25 10:41:47 +00:00
|
|
|
# "-soname" can lead to issues like https://github.com/mxcl/homebrew/issues/11972
|
|
|
|
inreplace "Makefile", "-Wl,-soname", "-dynamiclib -install_name "
|
|
|
|
# A hack to force them use our CFLAGS. MACH_OPT is empty in the Makefile
|
|
|
|
# but used for each call to cc/ld.
|
|
|
|
system "make", "install", "MACH_OPT=#{ENV.cflags}"
|
2010-02-12 19:14:45 +00:00
|
|
|
end
|
|
|
|
end
|