2011-03-10 05:11:03 +00:00
|
|
|
class Botan < Formula
|
2014-10-17 21:36:39 +00:00
|
|
|
homepage "http://botan.randombit.net/"
|
2015-02-04 20:26:18 +00:00
|
|
|
url "http://botan.randombit.net/releases/Botan-1.10.9.tgz"
|
|
|
|
sha1 "e1c8e97b214b23931f7dc8aba44306fbeca9055c"
|
2010-02-12 19:14:45 +00:00
|
|
|
|
2014-10-19 11:42:59 +00:00
|
|
|
bottle do
|
2015-02-04 20:59:36 +00:00
|
|
|
sha1 "3f9096cdf4156db3af972765fe9b8bb58a7b7261" => :yosemite
|
|
|
|
sha1 "d2f2f165eccbd6db984b83149a1f1df1b66dadbb" => :mavericks
|
|
|
|
sha1 "26196739a9584d6b3a129e32d3a2358484d6d8ed" => :mountain_lion
|
2014-10-19 11:42:59 +00:00
|
|
|
end
|
|
|
|
|
2015-02-04 20:26:18 +00:00
|
|
|
option "with-debug", "Enable debug build of Botan"
|
|
|
|
|
|
|
|
deprecated_option "enable-debug" => "with-debug"
|
2014-10-17 21:36:39 +00:00
|
|
|
|
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "openssl"
|
2012-02-15 05:25:01 +00:00
|
|
|
|
2014-02-16 03:06:52 +00:00
|
|
|
# upstream ticket: https://bugs.randombit.net/show_bug.cgi?id=267
|
2014-03-18 03:44:54 +00:00
|
|
|
patch :DATA
|
2014-02-16 03:06:52 +00:00
|
|
|
|
2010-02-12 19:14:45 +00:00
|
|
|
def install
|
2013-11-05 05:17:18 +00:00
|
|
|
args = %W[
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--docdir=#{share}/doc
|
|
|
|
--cpu=#{MacOS.preferred_arch}
|
|
|
|
--cc=#{ENV.compiler}
|
|
|
|
--os=darwin
|
|
|
|
--with-openssl
|
|
|
|
--with-zlib
|
|
|
|
--with-bzip2
|
|
|
|
]
|
|
|
|
|
2015-02-04 20:26:18 +00:00
|
|
|
args << "--enable-debug" if build.with? "debug"
|
2011-09-02 20:44:15 +00:00
|
|
|
|
|
|
|
system "./configure.py", *args
|
2012-06-25 10:41:47 +00:00
|
|
|
# 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
|
2015-02-04 20:26:18 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
assert_match /lcrypto/, shell_output("#{bin}/botan-config-1.10 --libs")
|
|
|
|
end
|
2010-02-12 19:14:45 +00:00
|
|
|
end
|
2014-02-16 03:06:52 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
--- a/src/build-data/makefile/unix_shr.in
|
|
|
|
+++ b/src/build-data/makefile/unix_shr.in
|
|
|
|
@@ -57,8 +57,8 @@
|
|
|
|
LIBNAME = %{lib_prefix}libbotan
|
|
|
|
STATIC_LIB = $(LIBNAME)-$(SERIES).a
|
|
|
|
|
|
|
|
-SONAME = $(LIBNAME)-$(SERIES).%{so_suffix}.%{so_abi_rev}
|
|
|
|
-SHARED_LIB = $(SONAME).%{version_patch}
|
|
|
|
+SONAME = $(LIBNAME)-$(SERIES).%{so_abi_rev}.%{so_suffix}
|
|
|
|
+SHARED_LIB = $(LIBNAME)-$(SERIES).%{so_abi_rev}.%{version_patch}.%{so_suffix}
|
|
|
|
|
|
|
|
SYMLINK = $(LIBNAME)-$(SERIES).%{so_suffix}
|