Skip to content

Commit 5cd3813

Browse files
committed
security/botan2: import botan-2.19.1
Reimported from security/botan-devel. Botan is a crypto library written in C++. It provides a variety of cryptographic algorithms, including common ones such as AES, MD5, SHA, HMAC, RSA, Diffie-Hellman, DSA, and ECDSA, as well as many others that are more obscure or specialized. It also offers X.509v3 certificates and CRLs, and PKCS #10 certificate requests. A message processing system that uses a filter/pipeline metaphor allows for many common cryptographic tasks to be completed with just a few lines of code. Assembly optimizations for common CPUs, including x86, x86-64, and PowerPC, offers further speedups for critical tasks such as SHA-1 hashing and multiple precision integer operations. This package contains major version 2 of the library. The version contains a much improved TLS infrastructure. It also depends on C++11.
1 parent feed148 commit 5cd3813

8 files changed

Lines changed: 555 additions & 0 deletions

File tree

security/botan2/DESCR

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Botan is a crypto library written in C++. It provides a variety of
2+
cryptographic algorithms, including common ones such as AES, MD5, SHA,
3+
HMAC, RSA, Diffie-Hellman, DSA, and ECDSA, as well as many others that
4+
are more obscure or specialized. It also offers X.509v3 certificates
5+
and CRLs, and PKCS #10 certificate requests. A message processing
6+
system that uses a filter/pipeline metaphor allows for many common
7+
cryptographic tasks to be completed with just a few lines of code.
8+
Assembly optimizations for common CPUs, including x86, x86-64, and
9+
PowerPC, offers further speedups for critical tasks such as SHA-1
10+
hashing and multiple precision integer operations.
11+
12+
This package contains major version 2 of the library.
13+
14+
The version contains a much improved TLS infrastructure. It also
15+
depends on C++11.

security/botan2/Makefile

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# $NetBSD: Makefile,v 1.1 2022/04/01 08:01:11 wiz Exp $
2+
3+
DISTNAME= Botan-2.19.1
4+
PKGNAME= ${DISTNAME:tl}
5+
CATEGORIES= security
6+
MASTER_SITES= https://botan.randombit.net/releases/
7+
EXTRACT_SUFX= .tar.xz
8+
9+
MAINTAINER= joerg@NetBSD.org
10+
HOMEPAGE= https://botan.randombit.net/
11+
COMMENT= Portable, easy to use, and efficient C++ crypto library (v2)
12+
LICENSE= 2-clause-bsd
13+
14+
HAS_CONFIGURE= yes
15+
USE_LANGUAGES= c++
16+
17+
PYTHON_FOR_BUILD_ONLY= yes
18+
19+
CONFIG_SHELL= ${PYTHONBIN}
20+
CONFIGURE_SCRIPT= ./configure.py
21+
CONFIGURE_ARGS+= --prefix=${PREFIX} --with-zlib --with-boost
22+
CONFIGURE_ARGS+= --docdir=share/doc
23+
CONFIGURE_ARGS+= --without-sphinx
24+
25+
REPLACE_PYTHON+= *.py src/scripts/*.py
26+
27+
.include "../../mk/compiler.mk"
28+
.if !empty(PKGSRC_COMPILER:Mclang)
29+
CONFIGURE_ARGS+= --cc-bin=${CXX} --cc=clang
30+
.else
31+
CONFIGURE_ARGS+= --cc=gcc
32+
.endif
33+
34+
PLIST_VARS+= x86
35+
.if ${MACHINE_ARCH} == "x86_64"
36+
PLIST.x86= yes
37+
CONFIGURE_ARGS+= --cpu=amd64
38+
.elif ${MACHINE_ARCH} == "i386"
39+
PLIST.x86= yes
40+
CONFIGURE_ARGS+= --cpu=i386
41+
.elif ${MACHINE_ARCH} == "powerpc"
42+
CONFIGURE_ARGS+= --cpu=ppc
43+
.elif ${MACHINE_ARCH} == "powerpc64"
44+
CONFIGURE_ARGS+= --cpu=ppc64
45+
.elif !empty(MACHINE_ARCH:Maarch64*)
46+
CONFIGURE_ARGS+= --cpu=arm64
47+
.elif !empty(MACHINE_ARCH:Mearm*)
48+
CONFIGURE_ARGS+= --cpu=arm32
49+
.endif
50+
51+
MAKE_FLAGS+= LIB_OPT=${CXXFLAGS:Q}
52+
53+
USE_TOOLS+= gmake
54+
55+
PY_PATCHPLIST= yes
56+
57+
LDFLAGS.SunOS+= -lnsl -lsocket
58+
59+
TEST_TARGET= tests
60+
61+
post-test:
62+
cd ${WRKSRC} && ./botan-test
63+
64+
.include "../../devel/zlib/buildlink3.mk"
65+
.include "../../devel/boost-libs/buildlink3.mk"
66+
.include "../../lang/python/application.mk"
67+
.include "../../lang/python/extension.mk"
68+
.include "../../mk/bsd.pkg.mk"

0 commit comments

Comments
 (0)