git: 37dfbb1e3516 - main - security/botan3: add Botan 3.1.1 release (+)

From: Dima Panov <fluffy_at_FreeBSD.org>
Date: Tue, 08 Aug 2023 11:07:55 UTC
The branch main has been updated by fluffy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=37dfbb1e35162bd84348730049155811d9b5035f

commit 37dfbb1e35162bd84348730049155811d9b5035f
Author:     Dima Panov <fluffy@FreeBSD.org>
AuthorDate: 2023-08-08 11:02:38 +0000
Commit:     Dima Panov <fluffy@FreeBSD.org>
CommitDate: 2023-08-08 11:02:38 +0000

    security/botan3: add Botan 3.1.1 release (+)
    
    Introduce Botan 3.x branch as separated concurrent port to allow consumers
    migrate in their own progress due to API/ABI incompatibility between 2.x/3.x releases
    
    Release notes:  https://botan.randombit.net/news.html#version-3-0-0-2023-04-11
                    https://botan.randombit.net/news.html#version-3-1-0-2023-07-11
                    https://botan.randombit.net/news.html#version-3-1-1-2023-07-13
---
 security/Makefile         |   1 +
 security/botan3/Makefile  |  92 ++++++++++++++++++++++++
 security/botan3/distinfo  |   3 +
 security/botan3/pkg-descr |  12 ++++
 security/botan3/pkg-plist | 177 ++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 285 insertions(+)

diff --git a/security/Makefile b/security/Makefile
index 6dedaf06810f..78cd47d48092 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -56,6 +56,7 @@
     SUBDIR += bitwarden-cli
     SUBDIR += boringssl
     SUBDIR += botan2
+    SUBDIR += botan3
     SUBDIR += bruteblock
     SUBDIR += bsdsfv
     SUBDIR += bsmtrace
diff --git a/security/botan3/Makefile b/security/botan3/Makefile
new file mode 100644
index 000000000000..a3c9e71f7cea
--- /dev/null
+++ b/security/botan3/Makefile
@@ -0,0 +1,92 @@
+PORTNAME=	botan
+DISTVERSION=	3.1.1
+CATEGORIES=	security
+MASTER_SITES=	http://botan.randombit.net/releases/
+PKGNAMESUFFIX=	${_BOTANMAJOR}
+DISTNAME=	Botan-${PORTVERSION}
+
+MAINTAINER=	fluffy@FreeBSD.org
+COMMENT=	Portable, easy to use and efficient C++ crypto library
+WWW=		https://botan.randombit.net/
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/license.txt
+
+BROKEN_armv6=	include/arm_neon.h:28:2: error: "NEON support not enabled"
+
+LIB_DEPENDS=	libboost_filesystem.so:devel/boost-libs
+
+USES=		compiler:c++20-lang cpe gmake shebangfix tar:xz
+CPE_VENDOR=	${PORTNAME}_project
+USE_LDCONFIG=	yes
+
+SHEBANG_GLOB=	*.py
+
+HAS_CONFIGURE=		yes
+CONFIGURE_SCRIPT=	configure.py
+CONFIGURE_ARGS=		--cc=${CHOSEN_COMPILER_TYPE} \
+			--prefix=${PREFIX:Q} \
+			--with-boost \
+			--with-bzip2 \
+			--with-external-includedir=${LOCALBASE}/include \
+			--with-external-libdir=${LOCALBASE}/lib \
+			--with-lzma \
+			--with-zlib \
+			--program-suffix=${_BOTANMAJOR}
+LDFLAGS+=		-pthread
+
+DOCSDIR=	${LOCALBASE}/share/doc/${PORTNAME}-${PORTVERSION}
+
+_SOABIVER=	0
+_BOTANMAJOR=	${DISTVERSION:S/./ /g:[1]}
+_SHLIBVER=	${DISTVERSION:S/./ /g:[2]}
+_SHLIBVERPATCH=	${DISTVERSION:S/./ /g:[3]}
+PLIST_SUB=	SHLIBVER=${_SHLIBVER} \
+		SHLIBVERPATCH=${_SHLIBVERPATCH} \
+		SOABIVER=${_SOABIVER} \
+		BOTANMAJOR=${_BOTANMAJOR}
+PORTDOCS=	*
+
+OPTIONS_DEFINE=			DOCS MANPAGES PYTHON SQLITE3
+OPTIONS_DEFAULT=		MANPAGES
+OPTIONS_SUB=			yes
+
+MANPAGES_BUILD_DEPENDS=		${PYTHON_PKGNAMEPREFIX}sphinx>=0:textproc/py-sphinx@${PY_FLAVOR}
+MANPAGES_CONFIGURE_WITH=	sphinx
+
+PYTHON_USES=		python
+PYTHON_USES_OFF=	python:build
+PYTHON_CONFIGURE_ON=	--with-python-versions=${PYTHON_VER}
+PYTHON_CONFIGURE_OFF=	--no-install-python-module
+
+SQLITE3_USES=		sqlite
+SQLITE3_CONFIGURE_WITH=	sqlite3
+
+.include <bsd.port.options.mk>
+
+.if ${ARCH} == aarch64
+CONFIGURE_ARGS+=	--cc-abi="-march=armv8-a+crypto"
+.elif ${ARCH:Mpowerpc64*}
+CONFIGURE_ARGS+=	--cpu="ppc64"
+.endif
+
+.if ${ARCH} == i386 || ${ARCH} == amd64
+PLIST_SUB+=	HAS_RDRAND_RNG=""
+.else
+PLIST_SUB+=	HAS_RDRAND_RNG="@comment "
+.endif
+
+.if ${ARCH} == i386 || ${ARCH} == amd64 || ${ARCH:Mpowerpc64*}
+PLIST_SUB+=	HAS_PROCESSOR_RNG=""
+.else
+PLIST_SUB+=	HAS_PROCESSOR_RNG="@comment "
+.endif
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|^optimization_flags .*|optimization_flags "${CXXFLAGS}"|' \
+		${WRKSRC}/src/build-data/cc/clang.txt
+
+post-install:
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/botan${_BOTANMAJOR} ${STAGEDIR}${PREFIX}/lib/libbotan-${_BOTANMAJOR}.so.${_SOABIVER}.${_SHLIBVER}.${_SHLIBVERPATCH}
+
+.include <bsd.port.mk>
diff --git a/security/botan3/distinfo b/security/botan3/distinfo
new file mode 100644
index 000000000000..6526f02792f7
--- /dev/null
+++ b/security/botan3/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1691487669
+SHA256 (Botan-3.1.1.tar.xz) = 30c84fe919936a98fef5331f246c62aa2c0e4d2085b2d4511207f6a20afa3a6b
+SIZE (Botan-3.1.1.tar.xz) = 8800368
diff --git a/security/botan3/pkg-descr b/security/botan3/pkg-descr
new file mode 100644
index 000000000000..8016bb1d4668
--- /dev/null
+++ b/security/botan3/pkg-descr
@@ -0,0 +1,12 @@
+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.
+
+Botan is licensed under the same permissive terms as FreeBSD itself.
diff --git a/security/botan3/pkg-plist b/security/botan3/pkg-plist
new file mode 100644
index 000000000000..e032acf8d4f2
--- /dev/null
+++ b/security/botan3/pkg-plist
@@ -0,0 +1,177 @@
+bin/botan%%BOTANMAJOR%%
+include/botan-%%BOTANMAJOR%%/botan/aead.h
+include/botan-%%BOTANMAJOR%%/botan/argon2.h
+include/botan-%%BOTANMAJOR%%/botan/argon2fmt.h
+include/botan-%%BOTANMAJOR%%/botan/asio_async_ops.h
+include/botan-%%BOTANMAJOR%%/botan/asio_context.h
+include/botan-%%BOTANMAJOR%%/botan/asio_error.h
+include/botan-%%BOTANMAJOR%%/botan/asio_stream.h
+include/botan-%%BOTANMAJOR%%/botan/asn1_obj.h
+include/botan-%%BOTANMAJOR%%/botan/asn1_print.h
+include/botan-%%BOTANMAJOR%%/botan/assert.h
+include/botan-%%BOTANMAJOR%%/botan/auto_rng.h
+include/botan-%%BOTANMAJOR%%/botan/base32.h
+include/botan-%%BOTANMAJOR%%/botan/base58.h
+include/botan-%%BOTANMAJOR%%/botan/base64.h
+include/botan-%%BOTANMAJOR%%/botan/bcrypt.h
+include/botan-%%BOTANMAJOR%%/botan/bcrypt_pbkdf.h
+include/botan-%%BOTANMAJOR%%/botan/ber_dec.h
+include/botan-%%BOTANMAJOR%%/botan/bigint.h
+include/botan-%%BOTANMAJOR%%/botan/block_cipher.h
+include/botan-%%BOTANMAJOR%%/botan/buf_comp.h
+include/botan-%%BOTANMAJOR%%/botan/build.h
+include/botan-%%BOTANMAJOR%%/botan/bzip2.h
+include/botan-%%BOTANMAJOR%%/botan/certstor.h
+include/botan-%%BOTANMAJOR%%/botan/certstor_flatfile.h
+include/botan-%%BOTANMAJOR%%/botan/certstor_sql.h
+%%SQLITE3%%include/botan-%%BOTANMAJOR%%/botan/certstor_sqlite.h
+include/botan-%%BOTANMAJOR%%/botan/certstor_system.h
+include/botan-%%BOTANMAJOR%%/botan/chacha_rng.h
+include/botan-%%BOTANMAJOR%%/botan/cipher_mode.h
+include/botan-%%BOTANMAJOR%%/botan/compiler.h
+include/botan-%%BOTANMAJOR%%/botan/compression.h
+include/botan-%%BOTANMAJOR%%/botan/concepts.h
+include/botan-%%BOTANMAJOR%%/botan/credentials_manager.h
+include/botan-%%BOTANMAJOR%%/botan/cryptobox.h
+include/botan-%%BOTANMAJOR%%/botan/curve25519.h
+include/botan-%%BOTANMAJOR%%/botan/curve_gfp.h
+include/botan-%%BOTANMAJOR%%/botan/data_snk.h
+include/botan-%%BOTANMAJOR%%/botan/data_src.h
+include/botan-%%BOTANMAJOR%%/botan/database.h
+include/botan-%%BOTANMAJOR%%/botan/der_enc.h
+include/botan-%%BOTANMAJOR%%/botan/dh.h
+include/botan-%%BOTANMAJOR%%/botan/dilithium.h
+include/botan-%%BOTANMAJOR%%/botan/dl_group.h
+include/botan-%%BOTANMAJOR%%/botan/dlies.h
+include/botan-%%BOTANMAJOR%%/botan/dsa.h
+include/botan-%%BOTANMAJOR%%/botan/ec_group.h
+include/botan-%%BOTANMAJOR%%/botan/ec_point.h
+include/botan-%%BOTANMAJOR%%/botan/ecc_key.h
+include/botan-%%BOTANMAJOR%%/botan/ecdh.h
+include/botan-%%BOTANMAJOR%%/botan/ecdsa.h
+include/botan-%%BOTANMAJOR%%/botan/ecgdsa.h
+include/botan-%%BOTANMAJOR%%/botan/ecies.h
+include/botan-%%BOTANMAJOR%%/botan/eckcdsa.h
+include/botan-%%BOTANMAJOR%%/botan/ed25519.h
+include/botan-%%BOTANMAJOR%%/botan/elgamal.h
+include/botan-%%BOTANMAJOR%%/botan/entropy_src.h
+include/botan-%%BOTANMAJOR%%/botan/exceptn.h
+include/botan-%%BOTANMAJOR%%/botan/fd_unix.h
+include/botan-%%BOTANMAJOR%%/botan/ffi.h
+include/botan-%%BOTANMAJOR%%/botan/filter.h
+include/botan-%%BOTANMAJOR%%/botan/filters.h
+include/botan-%%BOTANMAJOR%%/botan/fpe_fe1.h
+include/botan-%%BOTANMAJOR%%/botan/gost_3410.h
+include/botan-%%BOTANMAJOR%%/botan/hash.h
+include/botan-%%BOTANMAJOR%%/botan/hex.h
+include/botan-%%BOTANMAJOR%%/botan/hmac_drbg.h
+include/botan-%%BOTANMAJOR%%/botan/kdf.h
+include/botan-%%BOTANMAJOR%%/botan/kyber.h
+include/botan-%%BOTANMAJOR%%/botan/lzma.h
+include/botan-%%BOTANMAJOR%%/botan/mac.h
+include/botan-%%BOTANMAJOR%%/botan/mceliece.h
+include/botan-%%BOTANMAJOR%%/botan/mem_ops.h
+include/botan-%%BOTANMAJOR%%/botan/mutex.h
+include/botan-%%BOTANMAJOR%%/botan/nist_keywrap.h
+include/botan-%%BOTANMAJOR%%/botan/numthry.h
+include/botan-%%BOTANMAJOR%%/botan/ocsp.h
+include/botan-%%BOTANMAJOR%%/botan/oids.h
+include/botan-%%BOTANMAJOR%%/botan/otp.h
+include/botan-%%BOTANMAJOR%%/botan/p11.h
+include/botan-%%BOTANMAJOR%%/botan/p11_ecc_key.h
+include/botan-%%BOTANMAJOR%%/botan/p11_ecdh.h
+include/botan-%%BOTANMAJOR%%/botan/p11_ecdsa.h
+include/botan-%%BOTANMAJOR%%/botan/p11_object.h
+include/botan-%%BOTANMAJOR%%/botan/p11_randomgenerator.h
+include/botan-%%BOTANMAJOR%%/botan/p11_rsa.h
+include/botan-%%BOTANMAJOR%%/botan/p11_types.h
+include/botan-%%BOTANMAJOR%%/botan/p11_x509.h
+include/botan-%%BOTANMAJOR%%/botan/passhash9.h
+include/botan-%%BOTANMAJOR%%/botan/pbkdf.h
+include/botan-%%BOTANMAJOR%%/botan/pbkdf2.h
+include/botan-%%BOTANMAJOR%%/botan/pem.h
+include/botan-%%BOTANMAJOR%%/botan/pgp_s2k.h
+include/botan-%%BOTANMAJOR%%/botan/pipe.h
+include/botan-%%BOTANMAJOR%%/botan/pk_algs.h
+include/botan-%%BOTANMAJOR%%/botan/pk_keys.h
+include/botan-%%BOTANMAJOR%%/botan/pk_ops_fwd.h
+include/botan-%%BOTANMAJOR%%/botan/pkcs10.h
+include/botan-%%BOTANMAJOR%%/botan/pkcs11.h
+include/botan-%%BOTANMAJOR%%/botan/pkcs11f.h
+include/botan-%%BOTANMAJOR%%/botan/pkcs11t.h
+include/botan-%%BOTANMAJOR%%/botan/pkcs8.h
+include/botan-%%BOTANMAJOR%%/botan/pkix_enums.h
+include/botan-%%BOTANMAJOR%%/botan/pkix_types.h
+%%HAS_PROCESSOR_RNG%%include/botan-%%BOTANMAJOR%%/botan/processor_rng.h
+include/botan-%%BOTANMAJOR%%/botan/psk_db.h
+include/botan-%%BOTANMAJOR%%/botan/pubkey.h
+include/botan-%%BOTANMAJOR%%/botan/pwdhash.h
+include/botan-%%BOTANMAJOR%%/botan/reducer.h
+include/botan-%%BOTANMAJOR%%/botan/rfc3394.h
+include/botan-%%BOTANMAJOR%%/botan/rfc4880.h
+include/botan-%%BOTANMAJOR%%/botan/rng.h
+include/botan-%%BOTANMAJOR%%/botan/roughtime.h
+include/botan-%%BOTANMAJOR%%/botan/rsa.h
+include/botan-%%BOTANMAJOR%%/botan/scrypt.h
+include/botan-%%BOTANMAJOR%%/botan/secmem.h
+include/botan-%%BOTANMAJOR%%/botan/sm2.h
+include/botan-%%BOTANMAJOR%%/botan/sodium.h
+include/botan-%%BOTANMAJOR%%/botan/sp_parameters.h
+include/botan-%%BOTANMAJOR%%/botan/sphincsplus.h
+%%SQLITE3%%include/botan-%%BOTANMAJOR%%/botan/sqlite3.h
+include/botan-%%BOTANMAJOR%%/botan/srp6.h
+include/botan-%%BOTANMAJOR%%/botan/stateful_rng.h
+include/botan-%%BOTANMAJOR%%/botan/stream_cipher.h
+include/botan-%%BOTANMAJOR%%/botan/strong_type.h
+include/botan-%%BOTANMAJOR%%/botan/sym_algo.h
+include/botan-%%BOTANMAJOR%%/botan/symkey.h
+include/botan-%%BOTANMAJOR%%/botan/system_rng.h
+include/botan-%%BOTANMAJOR%%/botan/tls.h
+include/botan-%%BOTANMAJOR%%/botan/tls_alert.h
+include/botan-%%BOTANMAJOR%%/botan/tls_algos.h
+include/botan-%%BOTANMAJOR%%/botan/tls_callbacks.h
+include/botan-%%BOTANMAJOR%%/botan/tls_channel.h
+include/botan-%%BOTANMAJOR%%/botan/tls_ciphersuite.h
+include/botan-%%BOTANMAJOR%%/botan/tls_client.h
+include/botan-%%BOTANMAJOR%%/botan/tls_exceptn.h
+include/botan-%%BOTANMAJOR%%/botan/tls_extensions.h
+include/botan-%%BOTANMAJOR%%/botan/tls_handshake_msg.h
+include/botan-%%BOTANMAJOR%%/botan/tls_magic.h
+include/botan-%%BOTANMAJOR%%/botan/tls_messages.h
+include/botan-%%BOTANMAJOR%%/botan/tls_policy.h
+include/botan-%%BOTANMAJOR%%/botan/tls_psk_identity_13.h
+include/botan-%%BOTANMAJOR%%/botan/tls_server.h
+include/botan-%%BOTANMAJOR%%/botan/tls_server_info.h
+include/botan-%%BOTANMAJOR%%/botan/tls_session.h
+include/botan-%%BOTANMAJOR%%/botan/tls_session_manager.h
+include/botan-%%BOTANMAJOR%%/botan/tls_session_manager_hybrid.h
+include/botan-%%BOTANMAJOR%%/botan/tls_session_manager_memory.h
+include/botan-%%BOTANMAJOR%%/botan/tls_session_manager_noop.h
+include/botan-%%BOTANMAJOR%%/botan/tls_session_manager_sql.h
+%%SQLITE3%%include/botan-%%BOTANMAJOR%%/botan/tls_session_manager_sqlite.h
+include/botan-%%BOTANMAJOR%%/botan/tls_session_manager_stateless.h
+include/botan-%%BOTANMAJOR%%/botan/tls_signature_scheme.h
+include/botan-%%BOTANMAJOR%%/botan/tls_version.h
+include/botan-%%BOTANMAJOR%%/botan/tss.h
+include/botan-%%BOTANMAJOR%%/botan/types.h
+include/botan-%%BOTANMAJOR%%/botan/uuid.h
+include/botan-%%BOTANMAJOR%%/botan/version.h
+include/botan-%%BOTANMAJOR%%/botan/x509_ca.h
+include/botan-%%BOTANMAJOR%%/botan/x509_crl.h
+include/botan-%%BOTANMAJOR%%/botan/x509_ext.h
+include/botan-%%BOTANMAJOR%%/botan/x509_key.h
+include/botan-%%BOTANMAJOR%%/botan/x509_obj.h
+include/botan-%%BOTANMAJOR%%/botan/x509cert.h
+include/botan-%%BOTANMAJOR%%/botan/x509path.h
+include/botan-%%BOTANMAJOR%%/botan/x509self.h
+include/botan-%%BOTANMAJOR%%/botan/xmss.h
+include/botan-%%BOTANMAJOR%%/botan/xmss_parameters.h
+include/botan-%%BOTANMAJOR%%/botan/zfec.h
+include/botan-%%BOTANMAJOR%%/botan/zlib.h
+lib/libbotan-%%BOTANMAJOR%%.a
+lib/libbotan-%%BOTANMAJOR%%.so
+lib/libbotan-%%BOTANMAJOR%%.so.%%SOABIVER%%
+lib/libbotan-%%BOTANMAJOR%%.so.%%SOABIVER%%.%%SHLIBVER%%.%%SHLIBVERPATCH%%
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/botan%%BOTANMAJOR%%.py
+libdata/pkgconfig/botan-%%BOTANMAJOR%%.pc
+%%MANPAGES%%share/man/man1/botan.1.gz