commit:     b92af99a821dfd7d7da173538d4ebabbb7a7b5fe
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 21 15:37:56 2025 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Nov 21 15:37:56 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b92af99a

dev-util/librnp: add 0.18.1

Bug: https://bugs.gentoo.org/966299
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-util/librnp/Manifest             |  1 +
 dev-util/librnp/librnp-0.18.1.ebuild | 90 ++++++++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+)

diff --git a/dev-util/librnp/Manifest b/dev-util/librnp/Manifest
index af251723907e..fefe5c503ca4 100644
--- a/dev-util/librnp/Manifest
+++ b/dev-util/librnp/Manifest
@@ -1,2 +1,3 @@
 DIST librnp-0.17.1.tar.gz 3515288 BLAKE2B 
279cd5c669b469112066c4754a9a5a5c9fbe3ba225be4f85bc507aad9f29cfa166f90cb3dfe83ea8e29964fdfbbf926438fb36bb345da494ed7f70586fa8d7b6
 SHA512 
0224f79e4dd4b72ddd9c191218327da5485ed1d81321cc3a167cfeea68c00e47cec9151a4177e65e5560039345db3a52e41a093adfdf833f57e867bc559494a5
 DIST librnp-0.18.0.tar.gz 4292768 BLAKE2B 
db4c3c7f4313e71e3cbcc42727f9de498a472c895476553e4cca9ce4de92129b9c0a1f46583b741b916c492bc0107697636a05451d60738764b0dcc388bbd88e
 SHA512 
f85deda69bfa29e6cfae648e5687f55399cef5aa39b88d5164b545f6fa4ff885186ed2a893eae6171c5df729e34a6836fa350699f0d27f06d7236f915d82fe87
+DIST librnp-0.18.1.tar.gz 4294624 BLAKE2B 
c892b62dd6cc84349d71f7c5180e98eda52d3d581450485cb6c1b192064cc7ddd891d2d492f00dbd162ed01f4d6631c12b766c23f1cb2d80de57c27375652ec2
 SHA512 
4bb7a4082c43025b48a880adcb846967a30e07874d6824e02d705b1da1a9046d7ca3b367ee072c63d62c4db8d43f5d98606311c8e0695e93a2c2bbd0f38aabd2

diff --git a/dev-util/librnp/librnp-0.18.1.ebuild 
b/dev-util/librnp/librnp-0.18.1.ebuild
new file mode 100644
index 000000000000..2dbd10f4fb0b
--- /dev/null
+++ b/dev-util/librnp/librnp-0.18.1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 2022-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake multiprocessing
+
+DESCRIPTION="High performance C++ OpenPGP library"
+HOMEPAGE="https://www.rnpgp.org/ https://github.com/rnpgp/rnp";
+SRC_URI="https://github.com/rnpgp/rnp/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/${P/*lib/}"
+
+LICENSE="Apache-2.0 BSD BSD-2"
+SLOT="0/0.18.0"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~x86"
+
+IUSE="+botan man test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="app-arch/bzip2
+       dev-libs/json-c:=
+       >=dev-libs/sexpp-0.8.7
+       virtual/zlib:=
+       botan? ( dev-libs/botan:3= )
+       !botan? ( >=dev-libs/openssl-1.1.1:= )"
+DEPEND="${RDEPEND}
+       test? ( dev-cpp/gtest )"
+BDEPEND="man? ( dev-ruby/asciidoctor )"
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_TESTING=$(usex test on off)
+
+               -DCRYPTO_BACKEND=$(usex botan botan3 openssl)
+
+               -DDOWNLOAD_GTEST=off
+
+               -DENABLE_COVERAGE=off
+               -DENABLE_DOC=$(usex man on off)
+               -DENABLE_FUZZERS=off
+               -DENABLE_SANITIZERS=off
+
+               -DSYSTEM_LIBSEXPP=on
+       )
+
+       if use botan; then
+               local mycmakeargs+=(
+                       -DENABLE_AEAD=on
+                       -DENABLE_BLOWFISH=on
+                       -DENABLE_BRAINPOOL=on
+                       -DENABLE_CAST5=on
+                       -DENABLE_CRYPTO_REFRESH=on
+                       -DENABLE_IDEA=on
+                       -DENABLE_PQC=on
+                       -DENABLE_RIPEMD160=on
+                       -DENABLE_SM2=on
+                       -DENABLE_TWOFISH=on
+               )
+
+       # OpenSSL support is still not as complete as botan.
+       # https://github.com/rnpgp/rnp/issues/1877 SM2,
+       # https://github.com/openssl/openssl/issues/2046 TWOFISH (won't be 
implemented).
+       # CRYPTO_REFRESH is experimental in 0.18.0 and PQC requires botan.
+       else
+               local mycmakeargs+=(
+                       -DENABLE_AEAD=on
+                       -DENABLE_BLOWFISH=on
+                       -DENABLE_BRAINPOOL=on
+                       -DENABLE_CAST5=on
+                       -DENABLE_CRYPTO_REFRESH=off
+                       -DENABLE_IDEA=on
+                       -DENABLE_PQC=off
+                       -DENABLE_RIPEMD160=on
+                       -DENABLE_SM2=off
+                       -DENABLE_TWOFISH=off
+               )
+       fi
+
+       cmake_src_configure
+}
+
+src_test() {
+       cd "${BUILD_DIR}"/src/tests || die
+       ctest -j$(makeopts_jobs) -R .* --output-on-failure || die
+}
+
+src_install() {
+       cmake_src_install
+       find "${D}" -name '*.a' -delete || die
+}

Reply via email to