git: 2c95ca1f3eb4 - main - security/cryptopp-modern: New port: C++ class library of cryptographic algorithms and schemes

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Thu, 18 Jun 2026 20:21:50 UTC
The branch main has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2c95ca1f3eb49baf97aa85745312c4e7902f000f

commit 2c95ca1f3eb49baf97aa85745312c4e7902f000f
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2026-06-15 21:41:14 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2026-06-18 20:20:44 +0000

    security/cryptopp-modern: New port: C++ class library of cryptographic algorithms and schemes
    
    - Add CONFLICTS_INSTALL to security/cryptopp
    
    Actively maintained fork of Crypto++ library which features multiple
    algorithms and schemes such as:
    ChaCha20-Poly1305, AES, Camellia, Blowfish, Threefish, Triple-DES, block
    mode chipers, BLAKE2s, BLAKE3, GMAC, HMAC, SHA*, RSA, DSA, DH, ed25519,
    x25519, Argon2, ML-KEM ML-DSA to name a few.
    
    It acts as a drop-in API/ABI compatible replacement for the original
    Crypto++ library
    
    WWW:            https://github.com/cryptopp-modern/cryptopp-modern
    Reviewed by:    diizzy
---
 security/Makefile                                  |   1 +
 security/cryptopp-modern/Makefile                  |  21 +++
 security/cryptopp-modern/distinfo                  |   3 +
 .../cryptopp-modern/files/patch-CMakeLists.txt     |  20 ++
 security/cryptopp-modern/pkg-descr                 |   8 +
 security/cryptopp-modern/pkg-plist                 | 204 +++++++++++++++++++++
 security/cryptopp/Makefile                         |   3 +
 7 files changed, 260 insertions(+)

diff --git a/security/Makefile b/security/Makefile
index 8111844c5a20..b5d7c9e2f9f4 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -122,6 +122,7 @@
     SUBDIR += crowdsec-firewall-bouncer
     SUBDIR += cryptlib
     SUBDIR += cryptopp
+    SUBDIR += cryptopp-modern
     SUBDIR += ct-submit
     SUBDIR += cvechecker
     SUBDIR += cvm
diff --git a/security/cryptopp-modern/Makefile b/security/cryptopp-modern/Makefile
new file mode 100644
index 000000000000..0e2b70fb79fd
--- /dev/null
+++ b/security/cryptopp-modern/Makefile
@@ -0,0 +1,21 @@
+PORTNAME=	cryptopp-modern
+DISTVERSION=	2026.6.0
+CATEGORIES=	security
+MASTER_SITES=	https://github.com/cryptopp-modern/${PORTNAME}/releases/download/${DISTVERSION}/
+
+MAINTAINER=	eduardo@FreeBSD.org
+COMMENT=	C++ class library of cryptographic algorithms and schemes
+WWW=		https://github.com/cryptopp-modern/cryptopp-modern
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		cmake:testing dos2unix pathfix zip
+
+CMAKE_OFF=	CRYPTOPP_BUILD_TESTING
+
+CMAKE_TESTING_ON=	CRYPTOPP_BUILD_TESTING
+
+CONFLICTS_INSTALL=	cryptopp
+
+.include <bsd.port.mk>
diff --git a/security/cryptopp-modern/distinfo b/security/cryptopp-modern/distinfo
new file mode 100644
index 000000000000..7804407f56cb
--- /dev/null
+++ b/security/cryptopp-modern/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1781555519
+SHA256 (cryptopp-modern-2026.6.0.zip) = 1295eea5905880fde1bf9a847b3cbe3f6914ed6de5210ea24eb4fc22efa2a058
+SIZE (cryptopp-modern-2026.6.0.zip) = 10848749
diff --git a/security/cryptopp-modern/files/patch-CMakeLists.txt b/security/cryptopp-modern/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..3e2bcdda81d8
--- /dev/null
+++ b/security/cryptopp-modern/files/patch-CMakeLists.txt
@@ -0,0 +1,20 @@
+--- CMakeLists.txt.orig	2026-06-15 21:06:43 UTC
++++ CMakeLists.txt
+@@ -1563,7 +1563,7 @@ if(CRYPTOPP_INSTALL)
+ 
+     install(
+         EXPORT ${TARGETS_EXPORT_NAME}
+-        DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/cryptopp-modern"
++        DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/cryptopp-modern"
+         NAMESPACE cryptopp::
+         FILE cryptopp-modern-${type}-targets.cmake
+         COMPONENT ${dev}
+@@ -1574,7 +1574,7 @@ if(CRYPTOPP_INSTALL)
+         FILES
+             ${CMAKE_CURRENT_SOURCE_DIR}/cmake/cryptopp-modernConfig.cmake
+             ${CMAKE_CURRENT_BINARY_DIR}/cryptopp-modernConfigVersion.cmake
+-        DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cmake/cryptopp-modern
++        DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cryptopp-modern
+         COMPONENT ${dev}
+     )
+     install(
diff --git a/security/cryptopp-modern/pkg-descr b/security/cryptopp-modern/pkg-descr
new file mode 100644
index 000000000000..9e29dfd6dc08
--- /dev/null
+++ b/security/cryptopp-modern/pkg-descr
@@ -0,0 +1,8 @@
+Actively maintained fork of Crypto++ library which features multiple
+algorithms and schemes such as:
+ChaCha20-Poly1305, AES, Camellia, Blowfish, Threefish, Triple-DES, block
+mode chipers, BLAKE2s, BLAKE3, GMAC, HMAC, SHA*, RSA, DSA, DH, ed25519,
+x25519, Argon2, ML-KEM ML-DSA to name a few.
+
+It acts as a drop-in API/ABI compatible replacement for the original
+Crypto++ library
diff --git a/security/cryptopp-modern/pkg-plist b/security/cryptopp-modern/pkg-plist
new file mode 100644
index 000000000000..6e29e334c7bf
--- /dev/null
+++ b/security/cryptopp-modern/pkg-plist
@@ -0,0 +1,204 @@
+include/cryptopp/3way.h
+include/cryptopp/adler32.h
+include/cryptopp/adv_simd.h
+include/cryptopp/aes.h
+include/cryptopp/aes_armv4.h
+include/cryptopp/aes_ctr_hmac.h
+include/cryptopp/algebra.h
+include/cryptopp/algparam.h
+include/cryptopp/allocate.h
+include/cryptopp/arc4.h
+include/cryptopp/argnames.h
+include/cryptopp/argon2.h
+include/cryptopp/aria.h
+include/cryptopp/arm_simd.h
+include/cryptopp/asn.h
+include/cryptopp/authenc.h
+include/cryptopp/base32.h
+include/cryptopp/base64.h
+include/cryptopp/basecode.h
+include/cryptopp/blake2.h
+include/cryptopp/blake3.h
+include/cryptopp/blowfish.h
+include/cryptopp/blumshub.h
+include/cryptopp/camellia.h
+include/cryptopp/cast.h
+include/cryptopp/cbcmac.h
+include/cryptopp/ccm.h
+include/cryptopp/chacha.h
+include/cryptopp/chachapoly.h
+include/cryptopp/cham.h
+include/cryptopp/channels.h
+include/cryptopp/cmac.h
+include/cryptopp/config.h
+include/cryptopp/config_align.h
+include/cryptopp/config_asm.h
+include/cryptopp/config_cpu.h
+include/cryptopp/config_cxx.h
+include/cryptopp/config_dll.h
+include/cryptopp/config_int.h
+include/cryptopp/config_misc.h
+include/cryptopp/config_ns.h
+include/cryptopp/config_os.h
+include/cryptopp/config_ver.h
+include/cryptopp/cpu.h
+include/cryptopp/crc.h
+include/cryptopp/cryptlib.h
+include/cryptopp/darn.h
+include/cryptopp/default.h
+include/cryptopp/des.h
+include/cryptopp/dh.h
+include/cryptopp/dh2.h
+include/cryptopp/dll.h
+include/cryptopp/dmac.h
+include/cryptopp/donna.h
+include/cryptopp/donna_32.h
+include/cryptopp/donna_64.h
+include/cryptopp/donna_sse.h
+include/cryptopp/drbg.h
+include/cryptopp/dsa.h
+include/cryptopp/eax.h
+include/cryptopp/ec2n.h
+include/cryptopp/eccrypto.h
+include/cryptopp/ecp.h
+include/cryptopp/ecpoint.h
+include/cryptopp/elgamal.h
+include/cryptopp/emsa2.h
+include/cryptopp/eprecomp.h
+include/cryptopp/esign.h
+include/cryptopp/fhmqv.h
+include/cryptopp/files.h
+include/cryptopp/filters.h
+include/cryptopp/fips140.h
+include/cryptopp/fltrimpl.h
+include/cryptopp/gcm.h
+include/cryptopp/gf256.h
+include/cryptopp/gf2_32.h
+include/cryptopp/gf2n.h
+include/cryptopp/gfpcrypt.h
+include/cryptopp/gost.h
+include/cryptopp/gzip.h
+include/cryptopp/hashfwd.h
+include/cryptopp/hc128.h
+include/cryptopp/hc256.h
+include/cryptopp/hex.h
+include/cryptopp/hight.h
+include/cryptopp/hkdf.h
+include/cryptopp/hmac.h
+include/cryptopp/hmqv.h
+include/cryptopp/hrtimer.h
+include/cryptopp/hss.h
+include/cryptopp/ida.h
+include/cryptopp/idea.h
+include/cryptopp/integer.h
+include/cryptopp/iterhash.h
+include/cryptopp/kalyna.h
+include/cryptopp/keccak.h
+include/cryptopp/lea.h
+include/cryptopp/lms.h
+include/cryptopp/lsh.h
+include/cryptopp/lubyrack.h
+include/cryptopp/luc.h
+include/cryptopp/mars.h
+include/cryptopp/md2.h
+include/cryptopp/md4.h
+include/cryptopp/md5.h
+include/cryptopp/mdc.h
+include/cryptopp/mersenne.h
+include/cryptopp/misc.h
+include/cryptopp/mldsa.h
+include/cryptopp/mlkem.h
+include/cryptopp/modarith.h
+include/cryptopp/modes.h
+include/cryptopp/modexppc.h
+include/cryptopp/mqueue.h
+include/cryptopp/mqv.h
+include/cryptopp/naclite.h
+include/cryptopp/nbtheory.h
+include/cryptopp/nr.h
+include/cryptopp/oaep.h
+include/cryptopp/oids.h
+include/cryptopp/osrng.h
+include/cryptopp/ossig.h
+include/cryptopp/padlkrng.h
+include/cryptopp/panama.h
+include/cryptopp/pch.h
+include/cryptopp/pkcspad.h
+include/cryptopp/poly1305.h
+include/cryptopp/polynomi.h
+include/cryptopp/ppc_simd.h
+include/cryptopp/pssr.h
+include/cryptopp/pubkey.h
+include/cryptopp/pwdbased.h
+include/cryptopp/queue.h
+include/cryptopp/rabbit.h
+include/cryptopp/rabin.h
+include/cryptopp/randpool.h
+include/cryptopp/rc2.h
+include/cryptopp/rc5.h
+include/cryptopp/rc6.h
+include/cryptopp/rdrand.h
+include/cryptopp/rijndael.h
+include/cryptopp/ripemd.h
+include/cryptopp/rng.h
+include/cryptopp/rsa.h
+include/cryptopp/rw.h
+include/cryptopp/safer.h
+include/cryptopp/salsa.h
+include/cryptopp/scrypt.h
+include/cryptopp/seal.h
+include/cryptopp/secblock.h
+include/cryptopp/secblockfwd.h
+include/cryptopp/seckey.h
+include/cryptopp/seed.h
+include/cryptopp/serpent.h
+include/cryptopp/serpentp.h
+include/cryptopp/sha.h
+include/cryptopp/sha1_armv4.h
+include/cryptopp/sha256_armv4.h
+include/cryptopp/sha3.h
+include/cryptopp/sha512_armv4.h
+include/cryptopp/shacal2.h
+include/cryptopp/shake.h
+include/cryptopp/shark.h
+include/cryptopp/simeck.h
+include/cryptopp/simon.h
+include/cryptopp/simple.h
+include/cryptopp/siphash.h
+include/cryptopp/skipjack.h
+include/cryptopp/slhdsa.h
+include/cryptopp/sm3.h
+include/cryptopp/sm4.h
+include/cryptopp/smartptr.h
+include/cryptopp/sosemanuk.h
+include/cryptopp/speck.h
+include/cryptopp/square.h
+include/cryptopp/stateful.h
+include/cryptopp/stdcpp.h
+include/cryptopp/strciphr.h
+include/cryptopp/tea.h
+include/cryptopp/threefish.h
+include/cryptopp/tiger.h
+include/cryptopp/trap.h
+include/cryptopp/trunhash.h
+include/cryptopp/ttmac.h
+include/cryptopp/tweetnacl.h
+include/cryptopp/twofish.h
+include/cryptopp/vmac.h
+include/cryptopp/wake.h
+include/cryptopp/whrlpool.h
+include/cryptopp/words.h
+include/cryptopp/xed25519.h
+include/cryptopp/xtr.h
+include/cryptopp/xtrcrypt.h
+include/cryptopp/xts.h
+include/cryptopp/xwing.h
+include/cryptopp/zdeflate.h
+include/cryptopp/zinflate.h
+include/cryptopp/zlib.h
+lib/cmake/cryptopp-modern/cryptopp-modern-static-targets-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/cryptopp-modern/cryptopp-modern-static-targets.cmake
+lib/cmake/cryptopp-modern/cryptopp-modernConfig.cmake
+lib/cmake/cryptopp-modern/cryptopp-modernConfigVersion.cmake
+lib/libcryptopp.a
+libdata/pkgconfig/cryptopp-modern.pc
diff --git a/security/cryptopp/Makefile b/security/cryptopp/Makefile
index 86bdd0e75dbf..0ddabe638d75 100644
--- a/security/cryptopp/Makefile
+++ b/security/cryptopp/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	cryptopp
 PORTVERSION=	8.9.0
+PORTREVISION=	1
 CATEGORIES=	security
 MASTER_SITES=	https://github.com/weidai11/${PORTNAME}/releases/download/CRYPTOPP_${PORTVERSION:S/./_/g}/
 DISTNAME=	cryptopp${PORTVERSION:S/.//g}
@@ -53,6 +54,8 @@ TOOLS_MAKE_ENV=		CRYPTOPP_DATA_DIR=${DATADIR}/
 TOOLS_ALL_TARGET=	cryptest.exe
 TOOLS_TEST_TARGET_OFF=	test
 
+CONFLICTS_INSTALL=	cryptopp-modern
+
 .include <bsd.port.options.mk>
 
 .if !${PORT_OPTIONS:MSIMD}