Skip to content

Commit

Permalink
security/botan3: import botan3-3.0.0
Browse files Browse the repository at this point in the history
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 3 of the library.
  • Loading branch information
0-wiz-0 committed Jun 26, 2023
1 parent ebd580b commit 4ed7e58
Show file tree
Hide file tree
Showing 6 changed files with 364 additions and 0 deletions.
12 changes: 12 additions & 0 deletions security/botan3/DESCR
Original file line number Diff line number Diff line change
@@ -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.

This package contains major version 3 of the library.
74 changes: 74 additions & 0 deletions security/botan3/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# $NetBSD: Makefile,v 1.1 2023/06/26 11:40:39 wiz Exp $

DISTNAME= Botan-3.0.0
PKGNAME= ${DISTNAME:S/Botan/botan3/}
CATEGORIES= security
MASTER_SITES= https://botan.randombit.net/releases/
EXTRACT_SUFX= .tar.xz

MAINTAINER= [email protected]
HOMEPAGE= https://botan.randombit.net/
COMMENT= Portable, easy to use, and efficient C++ crypto library (v3)
LICENSE= 2-clause-bsd

DEPENDS+= mozilla-rootcerts-[0-9]*:../../security/mozilla-rootcerts

HAS_CONFIGURE= yes
USE_LANGUAGES= c++
USE_TOOLS+= gmake
# actually, 11, but that version is not in pkgsrc
# GCC_REQD+= 11
GCC_REQD+= 12

PYTHON_FOR_BUILD_ONLY= yes

CONFIG_SHELL= ${PYTHONBIN}
CONFIGURE_SCRIPT= ./configure.py
CONFIGURE_ARGS+= --prefix=${PREFIX}
CONFIGURE_ARGS+= --with-boost
CONFIGURE_ARGS+= --with-bzip2
CONFIGURE_ARGS+= --with-lzma
CONFIGURE_ARGS+= --with-sqlite3
CONFIGURE_ARGS+= --with-zlib
CONFIGURE_ARGS+= --docdir=share/doc
CONFIGURE_ARGS+= --without-sphinx
CONFIGURE_ARGS+= --program-suffix=3
CONFIGURE_ARGS+= --system-cert-bundle=${PREFIX}/share/mozilla-rootcerts/cacert.pem
CONFIGURE_ARGS+= --no-install-python-module

PKGCONFIG_OVERRIDE= src/build-data/botan.pc.in

.include "../../mk/compiler.mk"
.if !empty(PKGSRC_COMPILER:Mclang)
CONFIGURE_ARGS+= --cc-bin=${CXX} --cc=clang
.else
CONFIGURE_ARGS+= --cc=gcc
.endif

.if ${MACHINE_ARCH} == "x86_64"
CONFIGURE_ARGS+= --cpu=amd64
.elif ${MACHINE_ARCH} == "i386"
CONFIGURE_ARGS+= --cpu=i386
.elif ${MACHINE_ARCH} == "powerpc"
CONFIGURE_ARGS+= --cpu=ppc
.elif ${MACHINE_ARCH} == "powerpc64"
CONFIGURE_ARGS+= --cpu=ppc64
.elif ${MACHINE_ARCH:Maarch64*}
CONFIGURE_ARGS+= --cpu=arm64
.elif ${MACHINE_ARCH:Mearm*}
CONFIGURE_ARGS+= --cpu=arm32
.endif

MAKE_FLAGS+= LIB_OPT=${CXXFLAGS:Q}

LDFLAGS.SunOS+= -lnsl -lsocket

TEST_TARGET= check

.include "../../archivers/bzip2/buildlink3.mk"
.include "../../archivers/xz/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../devel/boost-libs/buildlink3.mk"
.include "../../databases/sqlite3/buildlink3.mk"
.include "../../lang/python/tool.mk"
.include "../../mk/bsd.pkg.mk"
243 changes: 243 additions & 0 deletions security/botan3/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
@comment $NetBSD: PLIST,v 1.1 2023/06/26 11:40:39 wiz Exp $
bin/botan3
include/botan-3/botan/aead.h
include/botan-3/botan/argon2.h
include/botan-3/botan/argon2fmt.h
include/botan-3/botan/asio_async_ops.h
include/botan-3/botan/asio_context.h
include/botan-3/botan/asio_error.h
include/botan-3/botan/asio_stream.h
include/botan-3/botan/asn1_obj.h
include/botan-3/botan/asn1_print.h
include/botan-3/botan/assert.h
include/botan-3/botan/auto_rng.h
include/botan-3/botan/base32.h
include/botan-3/botan/base58.h
include/botan-3/botan/base64.h
include/botan-3/botan/bcrypt.h
include/botan-3/botan/bcrypt_pbkdf.h
include/botan-3/botan/ber_dec.h
include/botan-3/botan/bigint.h
include/botan-3/botan/block_cipher.h
include/botan-3/botan/buf_comp.h
include/botan-3/botan/build.h
include/botan-3/botan/bzip2.h
include/botan-3/botan/certstor.h
include/botan-3/botan/certstor_flatfile.h
include/botan-3/botan/certstor_sql.h
include/botan-3/botan/certstor_sqlite.h
include/botan-3/botan/certstor_system.h
include/botan-3/botan/chacha_rng.h
include/botan-3/botan/cipher_mode.h
include/botan-3/botan/compiler.h
include/botan-3/botan/compression.h
include/botan-3/botan/concepts.h
include/botan-3/botan/credentials_manager.h
include/botan-3/botan/cryptobox.h
include/botan-3/botan/curve25519.h
include/botan-3/botan/curve_gfp.h
include/botan-3/botan/data_snk.h
include/botan-3/botan/data_src.h
include/botan-3/botan/database.h
include/botan-3/botan/der_enc.h
include/botan-3/botan/dh.h
include/botan-3/botan/dilithium.h
include/botan-3/botan/dl_group.h
include/botan-3/botan/dlies.h
include/botan-3/botan/dsa.h
include/botan-3/botan/ec_group.h
include/botan-3/botan/ec_point.h
include/botan-3/botan/ecc_key.h
include/botan-3/botan/ecdh.h
include/botan-3/botan/ecdsa.h
include/botan-3/botan/ecgdsa.h
include/botan-3/botan/ecies.h
include/botan-3/botan/eckcdsa.h
include/botan-3/botan/ed25519.h
include/botan-3/botan/elgamal.h
include/botan-3/botan/entropy_src.h
include/botan-3/botan/exceptn.h
include/botan-3/botan/fd_unix.h
include/botan-3/botan/ffi.h
include/botan-3/botan/filter.h
include/botan-3/botan/filters.h
include/botan-3/botan/fpe_fe1.h
include/botan-3/botan/gost_3410.h
include/botan-3/botan/hash.h
include/botan-3/botan/hex.h
include/botan-3/botan/hmac_drbg.h
include/botan-3/botan/kdf.h
include/botan-3/botan/kyber.h
include/botan-3/botan/lzma.h
include/botan-3/botan/mac.h
include/botan-3/botan/mceliece.h
include/botan-3/botan/mem_ops.h
include/botan-3/botan/mutex.h
include/botan-3/botan/nist_keywrap.h
include/botan-3/botan/numthry.h
include/botan-3/botan/ocsp.h
include/botan-3/botan/oids.h
include/botan-3/botan/otp.h
include/botan-3/botan/p11.h
include/botan-3/botan/p11_ecc_key.h
include/botan-3/botan/p11_ecdh.h
include/botan-3/botan/p11_ecdsa.h
include/botan-3/botan/p11_object.h
include/botan-3/botan/p11_randomgenerator.h
include/botan-3/botan/p11_rsa.h
include/botan-3/botan/p11_types.h
include/botan-3/botan/p11_x509.h
include/botan-3/botan/passhash9.h
include/botan-3/botan/pbkdf.h
include/botan-3/botan/pbkdf2.h
include/botan-3/botan/pem.h
include/botan-3/botan/pgp_s2k.h
include/botan-3/botan/pipe.h
include/botan-3/botan/pk_algs.h
include/botan-3/botan/pk_keys.h
include/botan-3/botan/pk_ops_fwd.h
include/botan-3/botan/pkcs10.h
include/botan-3/botan/pkcs11.h
include/botan-3/botan/pkcs11f.h
include/botan-3/botan/pkcs11t.h
include/botan-3/botan/pkcs8.h
include/botan-3/botan/pkix_enums.h
include/botan-3/botan/pkix_types.h
include/botan-3/botan/processor_rng.h
include/botan-3/botan/psk_db.h
include/botan-3/botan/pubkey.h
include/botan-3/botan/pwdhash.h
include/botan-3/botan/reducer.h
include/botan-3/botan/rfc3394.h
include/botan-3/botan/rfc4880.h
include/botan-3/botan/rng.h
include/botan-3/botan/roughtime.h
include/botan-3/botan/rsa.h
include/botan-3/botan/scrypt.h
include/botan-3/botan/secmem.h
include/botan-3/botan/sm2.h
include/botan-3/botan/sodium.h
include/botan-3/botan/sqlite3.h
include/botan-3/botan/srp6.h
include/botan-3/botan/stateful_rng.h
include/botan-3/botan/stream_cipher.h
include/botan-3/botan/strong_type.h
include/botan-3/botan/sym_algo.h
include/botan-3/botan/symkey.h
include/botan-3/botan/system_rng.h
include/botan-3/botan/tls.h
include/botan-3/botan/tls_alert.h
include/botan-3/botan/tls_algos.h
include/botan-3/botan/tls_callbacks.h
include/botan-3/botan/tls_channel.h
include/botan-3/botan/tls_ciphersuite.h
include/botan-3/botan/tls_client.h
include/botan-3/botan/tls_exceptn.h
include/botan-3/botan/tls_extensions.h
include/botan-3/botan/tls_handshake_msg.h
include/botan-3/botan/tls_magic.h
include/botan-3/botan/tls_messages.h
include/botan-3/botan/tls_policy.h
include/botan-3/botan/tls_server.h
include/botan-3/botan/tls_server_info.h
include/botan-3/botan/tls_session.h
include/botan-3/botan/tls_session_manager.h
include/botan-3/botan/tls_session_manager_hybrid.h
include/botan-3/botan/tls_session_manager_memory.h
include/botan-3/botan/tls_session_manager_noop.h
include/botan-3/botan/tls_session_manager_sql.h
include/botan-3/botan/tls_session_manager_sqlite.h
include/botan-3/botan/tls_session_manager_stateless.h
include/botan-3/botan/tls_signature_scheme.h
include/botan-3/botan/tls_ticket_13.h
include/botan-3/botan/tls_version.h
include/botan-3/botan/tss.h
include/botan-3/botan/types.h
include/botan-3/botan/uuid.h
include/botan-3/botan/version.h
include/botan-3/botan/x509_ca.h
include/botan-3/botan/x509_crl.h
include/botan-3/botan/x509_ext.h
include/botan-3/botan/x509_key.h
include/botan-3/botan/x509_obj.h
include/botan-3/botan/x509cert.h
include/botan-3/botan/x509path.h
include/botan-3/botan/x509self.h
include/botan-3/botan/xmss.h
include/botan-3/botan/xmss_parameters.h
include/botan-3/botan/zfec.h
include/botan-3/botan/zlib.h
lib/libbotan-3.a
lib/libbotan-3.so
lib/libbotan-3.so.0
lib/libbotan-3.so.0.0.0
lib/pkgconfig/botan-3.pc
share/doc/${PKGNAME}/authors.txt
share/doc/${PKGNAME}/handbook/abi.rst
share/doc/${PKGNAME}/handbook/api_ref/bigint.rst
share/doc/${PKGNAME}/handbook/api_ref/block_cipher.rst
share/doc/${PKGNAME}/handbook/api_ref/cipher_modes.rst
share/doc/${PKGNAME}/handbook/api_ref/compression.rst
share/doc/${PKGNAME}/handbook/api_ref/contents.rst
share/doc/${PKGNAME}/handbook/api_ref/credentials_manager.rst
share/doc/${PKGNAME}/handbook/api_ref/cryptobox.rst
share/doc/${PKGNAME}/handbook/api_ref/ecc.rst
share/doc/${PKGNAME}/handbook/api_ref/env_vars.rst
share/doc/${PKGNAME}/handbook/api_ref/ffi.rst
share/doc/${PKGNAME}/handbook/api_ref/filters.rst
share/doc/${PKGNAME}/handbook/api_ref/footguns.rst
share/doc/${PKGNAME}/handbook/api_ref/fpe.rst
share/doc/${PKGNAME}/handbook/api_ref/hash.rst
share/doc/${PKGNAME}/handbook/api_ref/kdf.rst
share/doc/${PKGNAME}/handbook/api_ref/keywrap.rst
share/doc/${PKGNAME}/handbook/api_ref/message_auth_codes.rst
share/doc/${PKGNAME}/handbook/api_ref/otp.rst
share/doc/${PKGNAME}/handbook/api_ref/passhash.rst
share/doc/${PKGNAME}/handbook/api_ref/pbkdf.rst
share/doc/${PKGNAME}/handbook/api_ref/pkcs11.rst
share/doc/${PKGNAME}/handbook/api_ref/psk_db.rst
share/doc/${PKGNAME}/handbook/api_ref/pubkey.rst
share/doc/${PKGNAME}/handbook/api_ref/python.rst
share/doc/${PKGNAME}/handbook/api_ref/rng.rst
share/doc/${PKGNAME}/handbook/api_ref/roughtime.rst
share/doc/${PKGNAME}/handbook/api_ref/secmem.rst
share/doc/${PKGNAME}/handbook/api_ref/srp.rst
share/doc/${PKGNAME}/handbook/api_ref/stream_ciphers.rst
share/doc/${PKGNAME}/handbook/api_ref/tls.rst
share/doc/${PKGNAME}/handbook/api_ref/tpm.rst
share/doc/${PKGNAME}/handbook/api_ref/tss.rst
share/doc/${PKGNAME}/handbook/api_ref/versions.rst
share/doc/${PKGNAME}/handbook/api_ref/x509.rst
share/doc/${PKGNAME}/handbook/api_ref/zfec.rst
share/doc/${PKGNAME}/handbook/authors.txt
share/doc/${PKGNAME}/handbook/building.rst
share/doc/${PKGNAME}/handbook/cli.rst
share/doc/${PKGNAME}/handbook/contents.rst
share/doc/${PKGNAME}/handbook/credits.rst
share/doc/${PKGNAME}/handbook/deprecated.rst
share/doc/${PKGNAME}/handbook/dev_ref/configure.rst
share/doc/${PKGNAME}/handbook/dev_ref/contents.rst
share/doc/${PKGNAME}/handbook/dev_ref/continuous_integration.rst
share/doc/${PKGNAME}/handbook/dev_ref/contributing.rst
share/doc/${PKGNAME}/handbook/dev_ref/fuzzing.rst
share/doc/${PKGNAME}/handbook/dev_ref/mistakes.rst
share/doc/${PKGNAME}/handbook/dev_ref/oids.rst
share/doc/${PKGNAME}/handbook/dev_ref/os.rst
share/doc/${PKGNAME}/handbook/dev_ref/reading_list.rst
share/doc/${PKGNAME}/handbook/dev_ref/release_process.rst
share/doc/${PKGNAME}/handbook/dev_ref/test_framework.rst
share/doc/${PKGNAME}/handbook/dev_ref/todo.rst
share/doc/${PKGNAME}/handbook/goals.rst
share/doc/${PKGNAME}/handbook/index.rst
share/doc/${PKGNAME}/handbook/migration_guide.rst
share/doc/${PKGNAME}/handbook/old_news.rst
share/doc/${PKGNAME}/handbook/packaging.rst
share/doc/${PKGNAME}/handbook/pgpkey.txt
share/doc/${PKGNAME}/handbook/roadmap.rst
share/doc/${PKGNAME}/handbook/security.rst
share/doc/${PKGNAME}/handbook/sem_ver.rst
share/doc/${PKGNAME}/handbook/side_channels.rst
share/doc/${PKGNAME}/handbook/support.rst
share/doc/${PKGNAME}/license.txt
share/doc/${PKGNAME}/news.txt
share/doc/${PKGNAME}/pgpkey.txt
14 changes: 14 additions & 0 deletions security/botan3/buildlink3.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# $NetBSD: buildlink3.mk,v 1.1 2023/06/26 11:40:39 wiz Exp $

BUILDLINK_TREE+= botan3

.if !defined(BOTAN3_BUILDLINK3_MK)
BOTAN3_BUILDLINK3_MK:=

BUILDLINK_API_DEPENDS.botan3+= botan3>=3.0.0
BUILDLINK_PKGSRCDIR.botan3?= ../../security/botan3

.include "../../devel/boost-libs/buildlink3.mk"
.endif # BOTAN3_BUILDLINK3_MK

BUILDLINK_TREE+= -botan3
6 changes: 6 additions & 0 deletions security/botan3/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$NetBSD: distinfo,v 1.1 2023/06/26 11:40:39 wiz Exp $

BLAKE2s (Botan-3.0.0.tar.xz) = b4a52f569e17cc033c1e96faceeb85c49f8a91c3ac60c20d8e441be083aede66
SHA512 (Botan-3.0.0.tar.xz) = d67ac0f9d67f6869b7a35d4a7c5e96ffcc619f7e44ead36b4cd0906f3d925d12181566aace03ac719ef54d819ae1158febc0b25839beed5f92eade06d510b594
Size (Botan-3.0.0.tar.xz) = 8752380 bytes
SHA1 (patch-src_scripts_install.py) = c8ac2a6315e0e53a0292447e8e6b967572de9d24
15 changes: 15 additions & 0 deletions security/botan3/patches/patch-src_scripts_install.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$NetBSD: patch-src_scripts_install.py,v 1.1 2023/06/26 11:40:39 wiz Exp $

* install docs into share/doc/${PKGNAME}

--- src/scripts/install.py.orig 2022-01-29 07:12:00.830197062 +0000
+++ src/scripts/install.py
@@ -214,7 +214,7 @@ def main(args):

if cfg['with_documentation']:
target_doc_dir = os.path.join(prefix, cfg['docdir'],
- 'botan-%d.%d.%d' % (ver_major, ver_minor, ver_patch))
+ 'botan%s-%d.%d.%d' % (cfg['program_suffix'] ,ver_major, ver_minor, ver_patch))

shutil.rmtree(prepend_destdir(target_doc_dir), True)
shutil.copytree(cfg['doc_output_dir'], prepend_destdir(target_doc_dir))

0 comments on commit 4ed7e58

Please sign in to comment.