From 118cbd5cc77b09ad81f1fa099d75d2436a3b2b00 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 30 Sep 2018 19:39:08 +0100 Subject: dev-libs/botan : import from gentoo, revert their latest EAPI 7 fuck-up --- dev-libs/botan/Manifest | 1 + dev-libs/botan/botan-1.10.17-r1.ebuild | 158 ++++++++++++++++++++++ dev-libs/botan/files/botan-1.10.17-build.patch | 25 ++++ dev-libs/botan/files/botan-1.10.17-libressl.patch | 40 ++++++ 4 files changed, 224 insertions(+) create mode 100644 dev-libs/botan/Manifest create mode 100644 dev-libs/botan/botan-1.10.17-r1.ebuild create mode 100644 dev-libs/botan/files/botan-1.10.17-build.patch create mode 100644 dev-libs/botan/files/botan-1.10.17-libressl.patch (limited to 'dev-libs') diff --git a/dev-libs/botan/Manifest b/dev-libs/botan/Manifest new file mode 100644 index 00000000..e72377c7 --- /dev/null +++ b/dev-libs/botan/Manifest @@ -0,0 +1 @@ +DIST Botan-1.10.17.tgz 2706678 BLAKE2B bce65493c702381aaa747c2b935c545f85704b93bb6be4bf225048cc14812999291bbbe86786c2b00865489ec47d63128b12ef1020be8651be57fa1c84006a7c SHA512 a47cab3af113652247c8efc8b0f043eb62175eaa8554833d5fc3016ea94dbdd8aa722ab9b5226cc5f133afbcc088d54362111630eaa4594812c39925cc3c8649 diff --git a/dev-libs/botan/botan-1.10.17-r1.ebuild b/dev-libs/botan/botan-1.10.17-r1.ebuild new file mode 100644 index 00000000..76f17bc1 --- /dev/null +++ b/dev-libs/botan/botan-1.10.17-r1.ebuild @@ -0,0 +1,158 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +inherit multilib python-r1 toolchain-funcs + +MY_PN="Botan" +MY_P="${MY_PN}-${PV}" +DESCRIPTION="A C++ crypto library" +HOMEPAGE="https://botan.randombit.net/" +SRC_URI="https://botan.randombit.net/releases/${MY_P}.tgz" + +KEYWORDS="amd64 ~arm hppa ~ia64 ppc ppc64 ~sparc x86 ~ppc-macos" +SLOT="0" +LICENSE="BSD" +IUSE="bindist doc python bzip2 gmp libressl ssl static-libs threads zlib" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +S="${WORKDIR}/${MY_P}" + +RDEPEND="bzip2? ( >=app-arch/bzip2-1.0.5 ) + zlib? ( >=sys-libs/zlib-1.2.3 ) + python? ( ${PYTHON_DEPS} >=dev-libs/boost-1.48[python,${PYTHON_USEDEP}] ) + gmp? ( >=dev-libs/gmp-4.2.2:* ) + ssl? ( + !libressl? ( /dev/null + insinto /usr/share/doc/${PF}/html + doins -r [a-z]* _static + popd > /dev/null + fi +} diff --git a/dev-libs/botan/files/botan-1.10.17-build.patch b/dev-libs/botan/files/botan-1.10.17-build.patch new file mode 100644 index 00000000..43877972 --- /dev/null +++ b/dev-libs/botan/files/botan-1.10.17-build.patch @@ -0,0 +1,25 @@ +From c7963d28d03e5f65f4021a5b764dc4bff9417eda Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev +Date: Wed, 4 Oct 2017 01:50:33 +0300 +Subject: [PATCH] gost_3411: use correct type for build to pass + +--- + src/hash/gost_3411/gost_3411.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hash/gost_3411/gost_3411.cpp b/src/hash/gost_3411/gost_3411.cpp +index 97aa399..7ca22dc 100644 +--- a/src/hash/gost_3411/gost_3411.cpp ++++ b/src/hash/gost_3411/gost_3411.cpp +@@ -91,7 +91,7 @@ void GOST_34_11::compress_n(const byte input[], size_t blocks) + // P transformation + for(size_t k = 0; k != 4; ++k) + { +- const uint64_t UVk = U[k] ^ V[k]; ++ const u64bit UVk = U[k] ^ V[k]; + for(size_t l = 0; l != 8; ++l) + key[4*l+k] = get_byte(l, UVk); + } +-- +2.13.6 + diff --git a/dev-libs/botan/files/botan-1.10.17-libressl.patch b/dev-libs/botan/files/botan-1.10.17-libressl.patch new file mode 100644 index 00000000..5913bfd3 --- /dev/null +++ b/dev-libs/botan/files/botan-1.10.17-libressl.patch @@ -0,0 +1,40 @@ +From e61a5f56fb404db3655909be4ce23c3a816cbb60 Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev +Date: Wed, 4 Oct 2017 22:16:31 +0300 +Subject: [PATCH] openssl: support libressl + +Signed-off-by: Alon Bar-Lev +--- + src/engine/openssl/ossl_bc.cpp | 2 +- + src/engine/openssl/ossl_md.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/engine/openssl/ossl_bc.cpp b/src/engine/openssl/ossl_bc.cpp +index 74660c7b5..cb184c202 100644 +--- a/src/engine/openssl/ossl_bc.cpp ++++ b/src/engine/openssl/ossl_bc.cpp +@@ -8,7 +8,7 @@ + #include + #include + +-#if OPENSSL_VERSION_NUMBER >= 0x10100000 ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) + #error "OpenSSL 1.1 API not supported in Botan 1.10, upgrade to 2.x" + #endif + +diff --git a/src/engine/openssl/ossl_md.cpp b/src/engine/openssl/ossl_md.cpp +index 2fcb2b0e5..9c43d616e 100644 +--- a/src/engine/openssl/ossl_md.cpp ++++ b/src/engine/openssl/ossl_md.cpp +@@ -8,7 +8,7 @@ + #include + #include + +-#if OPENSSL_VERSION_NUMBER >= 0x10100000 ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) + #error "OpenSSL 1.1 API not supported in Botan 1.10, upgrade to 2.x" + #endif + +-- +2.13.6 + -- cgit v1.2.3