diff options
Diffstat (limited to 'dev-util/librnp')
-rw-r--r-- | dev-util/librnp/Manifest | 4 | ||||
-rw-r--r-- | dev-util/librnp/librnp-0.16.1.ebuild | 76 | ||||
-rw-r--r-- | dev-util/librnp/metadata.xml | 3 |
3 files changed, 82 insertions, 1 deletions
diff --git a/dev-util/librnp/Manifest b/dev-util/librnp/Manifest index d19fa4767506..ac808c03e6fe 100644 --- a/dev-util/librnp/Manifest +++ b/dev-util/librnp/Manifest @@ -1,3 +1,5 @@ DIST librnp-0.16.0.tar.gz 2755417 BLAKE2B bdd06b1bd20ae816b54be19fa844767e9978eb387487db85db2dcd699da1d1b426455565a6c0508bf3782e07317d3bf6ae3613ebe6f8721f80849cb985e7850f SHA512 3d1ba077f85b08ca308d0ebc6499b3a2f32db38f0fd3abbfa7c38277d4552d2bcb7b2e7d07b7fa3222130af347b73d853136974ec289d6de3e97c1e18e407b36 +DIST librnp-0.16.1.tar.gz 2897069 BLAKE2B 0ce261a5f1229ab1567d4726b8d75eaf3fa72774ef66280bd587f28282371cde9691de24de329f8209f99c76dc6cf01e7c711e1bd3fd47b8b145762936a1b655 SHA512 948d8c1342c34ec850605b79b490d6da3094b4fb1f8435f4c928473c15a0df364f2ad56091f4b746afc98119d85137cf7b341c72054ccac79ab236f13cca48f4 EBUILD librnp-0.16.0.ebuild 1021 BLAKE2B 9e608b9c201584ec17ccef7d08f16901d35464628778e7b4bb021ebfcfe9791a4ab838259e4c9a1709fd01849546a36134a70918dcbe4fa21c0daaffcf629bb4 SHA512 ff997a44da8262838135052fbc8b67f90a7d3262ddec9a8728377289dda33ca2b88e881dd67a1b260ca0faf1ca38cd36128b06f8db6ebd430b26e03f7c9cb400 -MISC metadata.xml 339 BLAKE2B 435d74e705e406e63a6349676c46f3a9ce2fb6b3952bd36d31372cadf163ab1f61ba7bfb4de16e4586695783cf9bd3cbd29b67bfe236c6e1fb52e1e2edab14cc SHA512 5431a0d99435dd7001c179159cb728e2b0af71c0c3df23856e1cbc794af2b0808b046de6ead30a8679cace52f67667f5ab634f9ffb04efedf4f24a247eb4f211 +EBUILD librnp-0.16.1.ebuild 1747 BLAKE2B 09dd5d19778e51b1b66bc2ed5b6bcb2fc0a2fbac93283ea90f883cca8e5af26e138a5d4bfa8fd7421d58f9f980e53367bc6d2a7e9398fca25eeb6c37902d2790 SHA512 79f346bc6a991503d0791e12fce50f8e98ea604e14e9e5df3edb7b0317429cdb575c5bdd1328bcf7c9c356b18d032842704de848682d738d476e18cc1a74c43b +MISC metadata.xml 430 BLAKE2B 739d6cddc56f385ad2b1679f6b3d9ba567ce77ec536894ca3861ad7ad127fd60c395db49b31d89963df12c03d8cf69fc6f083f5d3361b790079952c1e76ccf03 SHA512 ad7b3e6332741e1f2eae9e158d5ca767f5985a8f5c86eb5f21b7ee0214b9c7fdd2e90beddf1a9287218edf35aff39bd7ff1a4f1d15eb10552ab664738f8d1959 diff --git a/dev-util/librnp/librnp-0.16.1.ebuild b/dev-util/librnp/librnp-0.16.1.ebuild new file mode 100644 index 000000000000..b6ba813ff651 --- /dev/null +++ b/dev-util/librnp/librnp-0.16.1.ebuild @@ -0,0 +1,76 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +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" + +LICENSE="Apache-2.0 BSD BSD-2" +SLOT="0/0.16.1" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +IUSE="+botan man test" + +RDEPEND="app-arch/bzip2 + dev-libs/json-c:= + sys-libs/zlib + botan? ( dev-libs/botan:2= ) + !botan? ( >=dev-libs/openssl-1.1.1:= )" +DEPEND="${RDEPEND} + test? ( dev-cpp/gtest )" +BDEPEND="man? ( dev-ruby/asciidoctor )" + +RESTRICT="!test? ( test )" +S="${WORKDIR}/${P/*lib/}" + +src_configure() { + local mycmakeargs=( + -DBUILD_TESTING=$(usex test on off) + + -DCRYPTO_BACKEND=$(usex botan botan openssl) + + -DDOWNLOAD_GTEST=off + -DDOWNLOAD_RUBYRNP=off + + -DENABLE_COVERAGE=off + -DENABLE_DOC=$(usex man on off) + -DENABLE_FUZZERS=off + -DENABLE_SANITIZERS=off + ) + + if use botan; then + local mycmakeargs+=( + -DENABLE_AEAD=on + -DENABLE_BRAINPOOL=on + -DENABLE_SM2=on + -DENABLE_TWOFISH=on + ) + + # OpenSSL support is still not as complete as botan. + # https://github.com/rnpgp/rnp/issues/1642 AEAD, + # https://github.com/rnpgp/rnp/issues/1902 BRAINPOOL, + # https://github.com/rnpgp/rnp/issues/1877 SM2, + # https://github.com/openssl/openssl/issues/2046 TWOFISH. + else + local mycmakeargs+=( + -DENABLE_AEAD=off + -DENABLE_BRAINPOOL=off + -DENABLE_SM2=off + -DENABLE_TWOFISH=off + ) + fi + + # Broken in 0.16.1. + # https://github.com/rnpgp/rnp/issues/1901 + local mycmakeargs+=( -DENABLE_IDEA=off ) + + cmake_src_configure +} + +src_test() { + cd "${BUILD_DIR}" || die + ctest -j"${MAKEOPTS}" -R .* --output-on-failure || die +} diff --git a/dev-util/librnp/metadata.xml b/dev-util/librnp/metadata.xml index 086e8d1f3ea1..1e8aefe95c28 100644 --- a/dev-util/librnp/metadata.xml +++ b/dev-util/librnp/metadata.xml @@ -5,6 +5,9 @@ <email>mozilla@gentoo.org</email> <name>Gentoo Mozilla Team</name> </maintainer> + <use> + <flag name="botan">Use Botan crypto backend instead of OpenSSL</flag> + </use> <upstream> <remote-id type="github">rnpgp/rnp</remote-id> </upstream> |