summaryrefslogtreecommitdiff
path: root/dev-libs/botan
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-05-30 11:44:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-05-30 11:44:06 +0100
commitf516638b7fe9592837389826a6152a7e1b251c54 (patch)
tree8bfecb640b7b6403d7a3d662d923eed630033da7 /dev-libs/botan
parent1a61119f9f7b057830e2ce0563f913ec86f282ad (diff)
gentoo resync : 30.05.2020
Diffstat (limited to 'dev-libs/botan')
-rw-r--r--dev-libs/botan/Manifest2
-rw-r--r--dev-libs/botan/botan-2.14.0-r1.ebuild110
-rw-r--r--dev-libs/botan/files/botan-2.14.0-bindist-test-fix.patch91
3 files changed, 203 insertions, 0 deletions
diff --git a/dev-libs/botan/Manifest b/dev-libs/botan/Manifest
index 7e494187d757..af1a3d02b504 100644
--- a/dev-libs/botan/Manifest
+++ b/dev-libs/botan/Manifest
@@ -1,5 +1,6 @@
AUX botan-1.10.17-build.patch 874 BLAKE2B 94898dc7730c921ea4a545fdad5d5eeb91432ee7af503dd2fc8a59185c5406b659629ee5a0c4f73c2c090dfccf64757baea196fcca4f60379a2b2f04baf81ee6 SHA512 bccb615e832ef31381afd0996a06cfb4c37f29bd8d7691435d592f2ec88f525f3e9e19adf84c78ebd6f24f60e407e29ef99bdff11103ef1344250fe5251fca0a
AUX botan-1.10.17-libressl.patch 1344 BLAKE2B e465b852e17ce920022663a8ea25684b2340fff699eb4b89d97784ffbec9e395200ffb2b9aa2226448e199f51a176409ed086e909c4ae431ede21c66d3de334b SHA512 dee61a141a10572c4d4c111527bbca3bd77808a2642ddb9cb105785badc10babd0406b1634c62c355e5361b9281c989666851d0fb81b3e000b62570e429fd642
+AUX botan-2.14.0-bindist-test-fix.patch 3167 BLAKE2B bb94b4081469c8cfcfff5a187151eacbb5dc1be0bf0ce87ee434da40cefb8e898bae478940c3410c873b1f58c75cf915d7ebe2b90a713a0428db8842fac1be33 SHA512 c60bbe81a007b8f8a5cb197542ae3a2fc1c94c76f10d1ff6ca18576fee84106aca29c158b1c9a967f047c3ca9b527255772bd66ad859f9d49c6e94c86b61b71c
AUX botan-2.9.0-build.patch 1886 BLAKE2B 62f6b5f9c47ded4c460c6c6b3057cbbb95711b5b5db300523f45e25e6bc161277174ea4c461e872f24bfd23839510a7857c44733a333cb6054b7dc183faa3e2e SHA512 90948e75d5bb6f2620a92fe4aea37d05aaf25e98430b112651aa6ad635f19f8659658ae79d16e60e27ca61ec5da92d5dd1c234c4c9e2ae0fab44b92806bcafe0
DIST Botan-1.10.17.tgz 2706678 BLAKE2B bce65493c702381aaa747c2b935c545f85704b93bb6be4bf225048cc14812999291bbbe86786c2b00865489ec47d63128b12ef1020be8651be57fa1c84006a7c SHA512 a47cab3af113652247c8efc8b0f043eb62175eaa8554833d5fc3016ea94dbdd8aa722ab9b5226cc5f133afbcc088d54362111630eaa4594812c39925cc3c8649
DIST Botan-2.11.0.tar.xz 5765712 BLAKE2B 5602ef9485363b21f6f622f7370e486d834477730c2fc2f0bb9211db944d2b2a6a03d8ae14845cf871f648c76c77fd3e18804bd598f805a5754e3bfadb114d5d SHA512 a697a7f29788afc561cde35431e65e2f37e40fd45af89a6d060bf9988d28089905c6a1c005f9b23fb377547cd7a96a41f62c8d2f61a7f80d1ca1b9ccf857a2ce
@@ -7,6 +8,7 @@ DIST Botan-2.14.0.tar.xz 5958948 BLAKE2B 90e73945b22f6e4e8d6163bfb45eca153eb1495
DIST Botan-2.9.0.tgz 7216373 BLAKE2B 5ad2e15db871ccc3a32b29b7f54a02d69f251f0aca2ce656b557dbbb3814a793053a54905371b3414ad72952a64bece43e2383da91f205f68b0fe31be2f9439c SHA512 b88f3894a4a5b7b2fbff9be6eb0b774bf679a014bd2364811b7e63d4f323e22ca9ef916491afbc2cdf9db68727c1449fbeb6fd417e591560add0955517db3f65
EBUILD botan-1.10.17-r2.ebuild 4260 BLAKE2B a638b40227d5f8e4f4776407718ab20921930d1e0aebf73322097ea5e106c77c570f4b59890a044f965930cfc3c04900e359027793ea70835e98e6df1d5a0cc3 SHA512 8735649c85d603ceba417a7d2b5d61a3067c4e8493965d54d02c10fbf48e431846dcb3138a313fe00eea1a12fec7d84d8a43e7a7160b6ba54e9e7da1c940c093
EBUILD botan-2.11.0.ebuild 2458 BLAKE2B 9b222461452f52d637669263c552779697b12b8e843490e8257061148864cdc820f94dd1e3fba4445ecaad8318597a7b792a3d8f45b9525478646779dfd7457d SHA512 af7f1e9d8f65ef7b0fd6b09d1b239a43456382929e490600fb77eb28d5412ab5fac82e92c433017bf666d3e7ad3e4ba68f9a832191bae5d3d2c32e3977d941e1
+EBUILD botan-2.14.0-r1.ebuild 2709 BLAKE2B 1b9d62c590914deb61320a16d953f9ea7ee489ca25b9206d8eec8e86f9299196c370da912a955b0b6b1599c6359f5b40004561cb1a4e2ed0e359be7f7af4a0bd SHA512 f27eb2aa547602352fdb53618c14b75884cc4499dbca233475ce9be0c404638f6fce4e601efd87a5cf74e4fc23676113d7de32619994e305003cc4cfb9954755
EBUILD botan-2.14.0.ebuild 2459 BLAKE2B ec844c7d54d51204af44e4e55464a71b1c15670326a267d28a0c177314cf49eaab7ee43b7b64a4ef2af00d47f0809d3f1778f87c6a4d1a28a164fe9007320c2c SHA512 4e9df2af74bac749cf9a74a14286962e35a245912e248530221200fa5d07280ff45f71398863055373704eaabde6535dbcd8f61b343a8c522d7fa9856ece5054
EBUILD botan-2.9.0.ebuild 2520 BLAKE2B 05a0f8bdd64a4f1c5cdfbcaf2c25e2c104f6e2f2e530836f1c1b3bca690ab10e68acf6a8dda28bb74ad48f571472cb406c7bb46eddd0f6471b26a7b9376b4cc3 SHA512 fe4b4d40ddf86130ccfd96601f885447805475a0e66f1f2cfc1398b454269567feaa83480935a52398e72a76aea2b8d7b5284caca8092e77d0500eccdab4ff7c
MISC metadata.xml 492 BLAKE2B c8e3a6426a1aeaeb0695e8ea5217d6ff49210ea5d81d842daeaa433535f57a487d04b987d59a548ee44ab45b66c5da2f4d64e35a445848e476d415ffb0e88305 SHA512 80160b6d84260644b66622005766ac2725274109aca7d29814e5e544cbda51ba35ceb3162bed329aeeca2ebe9299af4c77fc3f32fef7b08bbc8e2889a4a6fb56
diff --git a/dev-libs/botan/botan-2.14.0-r1.ebuild b/dev-libs/botan/botan-2.14.0-r1.ebuild
new file mode 100644
index 000000000000..14416b0af355
--- /dev/null
+++ b/dev-libs/botan/botan-2.14.0-r1.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+MY_P="Botan-${PV}"
+inherit python-r1 toolchain-funcs
+
+DESCRIPTION="C++ crypto library"
+HOMEPAGE="https://botan.randombit.net/"
+SRC_URI="https://botan.randombit.net/releases/${MY_P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="2/$(ver_cut 1-2)" # soname version
+KEYWORDS="amd64 ~arm ~hppa ~ia64 ppc ppc64 ~sparc x86 ~ppc-macos"
+IUSE="bindist bzip2 boost doc libressl lzma python sqlite ssl static-libs zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+DEPEND="python? ( ${PYTHON_DEPS} )"
+RDEPEND="${DEPEND}
+ boost? ( >=dev-libs/boost-1.48:= )
+ bzip2? ( >=app-arch/bzip2-1.0.5:= )
+ lzma? ( app-arch/xz-utils:= )
+ sqlite? ( dev-db/sqlite:3= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[bindist=] )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ zlib? ( >=sys-libs/zlib-1.2.3:= )
+"
+BDEPEND="
+ dev-lang/python:*
+ doc? ( dev-python/sphinx )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-bindist-test-fix.patch"
+)
+
+src_configure() {
+ local disable_modules=()
+ use boost || disable_modules+=( "boost" )
+ use bindist && disable_modules+=( "ecdsa" )
+ elog "Disabling modules: ${disable_modules[@]}"
+
+ # Enable v9 instructions for sparc64
+ if [[ "${PROFILE_ARCH}" = "sparc64" ]]; then
+ CHOSTARCH="sparc32-v9"
+ else
+ CHOSTARCH="${CHOST%%-*}"
+ fi
+
+ local myos=
+ case ${CHOST} in
+ *-darwin*) myos=darwin ;;
+ *) myos=linux ;;
+ esac
+
+ case ${CHOST} in
+ hppa*) CHOSTARCH=parisc ;;
+ esac
+
+ local pythonvers=()
+ if use python; then
+ append() {
+ pythonvers+=( ${EPYTHON/python/} )
+ }
+ python_foreach_impl append
+ fi
+
+ # Don't install automatically, do it manually later in right place
+ # https://bugs.gentoo.org/723096
+ CXX="$(tc-getCXX)" AR="$(tc-getAR)" ./configure.py \
+ $(use_enable static-libs static-library) \
+ $(use_with boost) \
+ $(use_with bzip2) \
+ $(use_with doc documentation) \
+ $(use_with doc sphinx) \
+ $(use_with lzma) \
+ $(use_with sqlite sqlite3) \
+ $(use_with ssl openssl) \
+ $(use_with zlib) \
+ $(usex hppa --without-stack-protector '') \
+ --cc=gcc \
+ --cpu=${CHOSTARCH} \
+ --disable-modules=$(IFS=","; echo "${disable_modules[*]}" ) \
+ --docdir=share/doc \
+ --libdir=$(get_libdir) \
+ --os=${myos} \
+ --distribution-info="Gentoo ${PVR}" \
+ --prefix="${EPREFIX}/usr" \
+ --with-endian="$(tc-endian)" \
+ --with-python-version=$(IFS=","; echo "${pythonvers[*]}" ) \
+ --without-doxygen \
+ --no-install-python-module \
+ || die "configure.py failed"
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}" ./botan-test || die "Validation tests failed"
+}
+
+src_install() {
+ default
+ use python && python_foreach_impl python_domodule src/python/botan2.py
+}
diff --git a/dev-libs/botan/files/botan-2.14.0-bindist-test-fix.patch b/dev-libs/botan/files/botan-2.14.0-bindist-test-fix.patch
new file mode 100644
index 000000000000..35b17976dbd5
--- /dev/null
+++ b/dev-libs/botan/files/botan-2.14.0-bindist-test-fix.patch
@@ -0,0 +1,91 @@
+https://github.com/randombit/botan/commit/df73ee690c5795be586cd4df3e33253113a0dcdf
+https://github.com/randombit/botan/commit/d9d6d7a593da135d2046aeb8a9e05e967d90f538
+
+diff --git a/src/tests/test_pkcs11_high_level.cpp b/src/tests/test_pkcs11_high_level.cpp
+index 47a5bf5e56..07dc86ef21 100644
+--- a/src/tests/test_pkcs11_high_level.cpp
++++ b/src/tests/test_pkcs11_high_level.cpp
+@@ -909,6 +909,15 @@ BOTAN_REGISTER_TEST("pkcs11-rsa", PKCS11_RSA_Tests);
+
+ /***************************** PKCS11 ECDSA *****************************/
+
++#if defined(BOTAN_HAS_ECC_GROUP)
++std::vector<uint8_t> encode_ec_point_in_octet_str(const Botan::PointGFp& point)
++ {
++ std::vector<uint8_t> enc;
++ DER_Encoder(enc).encode(point.encode(PointGFp::UNCOMPRESSED), OCTET_STRING);
++ return enc;
++ }
++#endif
++
+ #if defined(BOTAN_HAS_ECDSA)
+
+ Test::Result test_ecdsa_privkey_import()
+@@ -976,13 +985,6 @@ Test::Result test_ecdsa_privkey_export()
+ return result;
+ }
+
+-std::vector<uint8_t> encode_ec_point_in_octet_str(const Botan::PointGFp& point)
+- {
+- std::vector<uint8_t> enc;
+- DER_Encoder(enc).encode(point.encode(PointGFp::UNCOMPRESSED), OCTET_STRING);
+- return enc;
+- }
+-
+ Test::Result test_ecdsa_pubkey_import()
+ {
+ Test::Result result("PKCS11 import ECDSA public key");
+diff --git a/src/tests/test_pkcs11_high_level.cpp b/src/tests/test_pkcs11_high_level.cpp
+index 07dc86ef21..c77e8ea42e 100644
+--- a/src/tests/test_pkcs11_high_level.cpp
++++ b/src/tests/test_pkcs11_high_level.cpp
+@@ -28,10 +28,14 @@
+ #include <botan/der_enc.h>
+ #endif
+
+-#if defined (BOTAN_HAS_PUBLIC_KEY_CRYPTO)
++#if defined(BOTAN_HAS_PUBLIC_KEY_CRYPTO)
+ #include <botan/pubkey.h>
+ #endif
+
++#if defined(BOTAN_HAS_ECC_GROUP)
++ #include <botan/ec_group.h>
++#endif
++
+ #if defined(BOTAN_HAS_RSA) && defined(BOTAN_HAS_PKCS11)
+ #include <botan/rsa.h>
+ #include <botan/p11_rsa.h>
+@@ -909,7 +913,7 @@ BOTAN_REGISTER_TEST("pkcs11-rsa", PKCS11_RSA_Tests);
+
+ /***************************** PKCS11 ECDSA *****************************/
+
+-#if defined(BOTAN_HAS_ECC_GROUP)
++#if defined(BOTAN_HAS_ECC_GROUP) && (defined(BOTAN_HAS_ECDSA) || defined(BOTAN_HAS_ECDH))
+ std::vector<uint8_t> encode_ec_point_in_octet_str(const Botan::PointGFp& point)
+ {
+ std::vector<uint8_t> enc;
+diff --git a/src/tests/unit_x509.cpp b/src/tests/unit_x509.cpp
+index eaae358420..d9b7858898 100644
+--- a/src/tests/unit_x509.cpp
++++ b/src/tests/unit_x509.cpp
+@@ -603,7 +603,7 @@ Test::Result test_verify_gost2012_cert()
+ {
+ Test::Result result("X509 GOST-2012 certificates");
+
+-#if defined(BOTAN_HAS_GOST_34_10_2012) && defined(BOTAN_HAS_STREEBOG)
++#if defined(BOTAN_HAS_GOST_34_10_2012) && defined(BOTAN_HAS_STREEBOG) && defined(BOTAN_HAS_EMSA1)
+ try
+ {
+ Botan::X509_Certificate root_cert(Test::data_file("x509/gost/gost_root.pem"));
+@@ -1600,6 +1600,11 @@ class X509_Cert_Unit_Tests final : public Test
+ continue;
+ #endif
+
++#if !defined(BOTAN_HAS_EMSA1)
++ if(algo != "RSA" && algo != "Ed25519")
++ continue;
++#endif
++
+ std::unique_ptr<Botan::Private_Key> key = make_a_private_key(algo);
+
+ if(key == nullptr)