2011-03-10 05:11:03 +00:00
|
|
|
class Botan < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Cryptographic algorithms and formats library in C++"
|
2014-10-17 21:36:39 +00:00
|
|
|
homepage "http://botan.randombit.net/"
|
2015-08-07 19:59:08 +00:00
|
|
|
|
|
|
|
stable do
|
|
|
|
url "http://botan.randombit.net/releases/Botan-1.10.10.tgz"
|
|
|
|
sha256 "6b67b14746410461fe4a8ce6a625e7eef789243454fe30eab7329d5984be4163"
|
|
|
|
# upstream ticket: https://bugs.randombit.net/show_bug.cgi?id=267
|
|
|
|
patch :DATA
|
|
|
|
end
|
2010-02-12 19:14:45 +00:00
|
|
|
|
2014-10-19 11:42:59 +00:00
|
|
|
bottle do
|
2015-08-08 17:29:53 +00:00
|
|
|
cellar :any
|
2015-10-29 21:58:32 +00:00
|
|
|
revision 1
|
|
|
|
sha256 "3d9ac88803bf21b0b05873d7ed3a9bec621f2d3f2a173df627c9f1cf9ea1c34c" => :el_capitan
|
|
|
|
sha256 "7773f8464a8a9f07f3f8f0e7038a0ef9d5b991d96d5664db950f3c3f6f307c3b" => :yosemite
|
|
|
|
sha256 "635c7292d3c14242563d0cb6cd585a5de91fb0b23af8737121d9131778740c0e" => :mavericks
|
2014-10-19 11:42:59 +00:00
|
|
|
end
|
|
|
|
|
2015-08-07 19:59:08 +00:00
|
|
|
devel do
|
2015-11-04 21:00:21 +00:00
|
|
|
url "http://botan.randombit.net/releases/Botan-1.11.24.tgz"
|
|
|
|
sha256 "9e01b170c4ad46f2765aa58ccc67bcb1417ec489f4e420a909be87972c1577dd"
|
2015-08-07 19:59:08 +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
|
|
|
|
2015-08-07 19:59:08 +00:00
|
|
|
needs :cxx11 if build.devel?
|
2014-02-16 03:06:52 +00:00
|
|
|
|
2010-02-12 19:14:45 +00:00
|
|
|
def install
|
2015-08-07 19:59:08 +00:00
|
|
|
ENV.cxx11 if build.devel?
|
|
|
|
|
2013-11-05 05:17:18 +00:00
|
|
|
args = %W[
|
|
|
|
--prefix=#{prefix}
|
2014-11-16 13:41:15 +00:00
|
|
|
--docdir=share/doc
|
2013-11-05 05:17:18 +00:00
|
|
|
--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
|
2015-08-07 19:59:08 +00:00
|
|
|
# stable version doesn't have `botan` executable
|
|
|
|
if !File.exist? bin/"botan"
|
|
|
|
assert_match "lcrypto", shell_output("#{bin}/botan-config-1.10 --libs")
|
|
|
|
else
|
|
|
|
system bin/"botan", "keygen"
|
|
|
|
File.exist? "public.pem"
|
|
|
|
File.exist? "private.pem"
|
|
|
|
end
|
2015-02-04 20:26:18 +00:00
|
|
|
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}
|