summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolić <jsmolic@gentoo.org>2021-09-20 11:45:12 +0200
committerJakov Smolić <jsmolic@gentoo.org>2021-09-20 12:27:11 +0200
commit1556859d9360eb5b0d1d12a57c7ccdb4c7baaa05 (patch)
tree92b748b5f3cb9a897a92f30e63817317b9c4a258 /net-libs/mbedtls
parentsys-kernel/git-sources: Version bump (diff)
downloadgentoo-1556859d9360eb5b0d1d12a57c7ccdb4c7baaa05.tar.gz
gentoo-1556859d9360eb5b0d1d12a57c7ccdb4c7baaa05.tar.bz2
gentoo-1556859d9360eb5b0d1d12a57c7ccdb4c7baaa05.zip
net-libs/mbedtls: Revert "Remove old"
- 2.16 branch is LTS so let's keep it in the tree, and 2.16.{10, 11} already contain backported patches for gcc-11, and 2.16.10 has a pending CVE bug open and will be removed from the tree either way This reverts commit 93f6e77da684f70ea10256e40f88cab0d45573d9. Acked-by: Andreas K. Hüttel <dilfridge@gentoo.org> Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>
Diffstat (limited to 'net-libs/mbedtls')
-rw-r--r--net-libs/mbedtls/Manifest2
-rw-r--r--net-libs/mbedtls/mbedtls-2.16.10.ebuild93
-rw-r--r--net-libs/mbedtls/mbedtls-2.16.11.ebuild93
3 files changed, 188 insertions, 0 deletions
diff --git a/net-libs/mbedtls/Manifest b/net-libs/mbedtls/Manifest
index fe9a5c4b33f4..c5c8cc5ec719 100644
--- a/net-libs/mbedtls/Manifest
+++ b/net-libs/mbedtls/Manifest
@@ -1,3 +1,5 @@
+DIST mbedtls-2.16.10.tar.gz 2677333 BLAKE2B 5f94003547d5c4ba8daec8270b6e91fea1bbcc94aa7a7417018ec57b8807fbdbd057640fda24cf65171bf7dd872eb091d21e7508df28b57ddfc512736f9c6482 SHA512 13837316b04fab6bebacdd283f437b5f246df0785c866cf3d94019d040ab0edf417e0b409653f5abf98a4944345eb088010658c9de10f9e96a5624d33741898a
+DIST mbedtls-2.16.11.tar.gz 2692209 BLAKE2B 9d7bccfc0d1bc5a038b6dcb866722a27362c229a5f1b515396aabbb53e77cfe36525446fb2557c817772810f24335a51c9a5c45bcfa866d8a07ff4e96498dbde SHA512 b35de49ce596b549b5e85b6affdf2cf1360fb8b0d4e551636a91a4923b1cb212dce7880d575d40c73d5682afe8bb893312d803798ce8f807842a2aab8e2ba2ee
DIST mbedtls-2.26.0.tar.gz 4080986 BLAKE2B 549f00db4bfbba4a88de0ff76f32140d7421ad3ab58e3cdf08ec40e0a3da5dcc7a1bcb6eb1ce491ebb544dcd15eb6bc634f04e6ab0f773dc89fa44b6843542ad SHA512 959f6dd0759bfd8dcc497a0527b8b9e9975adb9fee01461e6bcc37475cf9e4eae597687e05e077dfe51d0542c81bc3b90e6d9a692353dca331e020e02d642196
DIST mbedtls-2.27.0.tar.gz 4212185 BLAKE2B 31840e5a518643495f319cac8e0c876bdca5dbdee6524d30cace3538d5fb5ba7847dd653f61f775f5c3c384ac0533afdbf6172b3e523db515eceecc29fadd2da SHA512 9503ef75f08d2574e0800b2e3b6f030461cbd97c74863a20e5688ced7558b0b6f87cbe33cbd003e69c825d0321393fe9b00b0be190ab408138414b99d5102994
DIST mbedtls-3.0.0.tar.gz 4163127 BLAKE2B 5d94124a251dbcc38de614319f93c6f0346de516fd944c765ab3e60d46fba8fbbdba7a6f9e00f5f0550137301b4de98795851df788e367c4fcf03abb981d3c63 SHA512 be11878d82fc93d0847718514f4887c68d7b186c54682316c4a01082583a917b81f9760bb708aab72bf37148581a8dbc9f7048faf745cd2e1cd7e5bf8c48abad
diff --git a/net-libs/mbedtls/mbedtls-2.16.10.ebuild b/net-libs/mbedtls/mbedtls-2.16.10.ebuild
new file mode 100644
index 000000000000..ce4c7c2ec070
--- /dev/null
+++ b/net-libs/mbedtls/mbedtls-2.16.10.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake multilib-minimal
+
+DESCRIPTION="Cryptographic library for embedded systems"
+HOMEPAGE="https://tls.mbed.org/"
+SRC_URI="https://github.com/ARMmbed/mbedtls/archive/${P}.tar.gz"
+S=${WORKDIR}/${PN}-${P}
+
+LICENSE="Apache-2.0"
+SLOT="0/3.12.0" # ffmpeg subslot naming: SONAME tuple of {libmbedcrypto.so,libmbedtls.so,libmbedx509.so}
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sparc x86"
+IUSE="cpu_flags_x86_sse2 doc havege programs static-libs test threads zlib"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ programs? (
+ dev-libs/openssl:0=
+ )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen media-gfx/graphviz )
+ test? ( dev-lang/perl )"
+
+enable_mbedtls_option() {
+ local myopt="$@"
+ # check that config.h syntax is the same at version bump
+ sed -i \
+ -e "s://#define ${myopt}:#define ${myopt}:" \
+ include/mbedtls/config.h || die
+}
+
+src_prepare() {
+ use cpu_flags_x86_sse2 && enable_mbedtls_option MBEDTLS_HAVE_SSE2
+ use zlib && enable_mbedtls_option MBEDTLS_ZLIB_SUPPORT
+ use havege && enable_mbedtls_option MBEDTLS_HAVEGE_C
+ use threads && enable_mbedtls_option MBEDTLS_THREADING_C
+ use threads && enable_mbedtls_option MBEDTLS_THREADING_PTHREAD
+
+ cmake_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DENABLE_PROGRAMS=$(multilib_native_usex programs)
+ -DENABLE_ZLIB_SUPPORT=$(usex zlib)
+ -DUSE_STATIC_MBEDTLS_LIBRARY=$(usex static-libs)
+ -DENABLE_TESTING=$(usex test)
+ -DUSE_SHARED_MBEDTLS_LIBRARY=ON
+ -DINSTALL_MBEDTLS_HEADERS=ON
+ -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
+ )
+
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_src_compile
+ use doc && multilib_is_native_abi && cd "${S}" && emake apidoc
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${BUILD_DIR}/library" \
+ cmake_src_test
+}
+
+multilib_src_install() {
+ cmake_src_install
+}
+
+multilib_src_install_all() {
+ use doc && HTML_DOCS=( apidoc )
+
+ einstalldocs
+
+ if use programs ; then
+ # avoid file collisions with sys-apps/coreutils
+ local p e
+ for p in "${ED}"/usr/bin/* ; do
+ if [[ -x "${p}" && ! -d "${p}" ]] ; then
+ mv "${p}" "${ED}"/usr/bin/mbedtls_${p##*/} || die
+ fi
+ done
+ for e in aes hash pkey ssl test ; do
+ docinto "${e}"
+ dodoc programs/"${e}"/*.c
+ dodoc programs/"${e}"/*.txt
+ done
+ fi
+}
diff --git a/net-libs/mbedtls/mbedtls-2.16.11.ebuild b/net-libs/mbedtls/mbedtls-2.16.11.ebuild
new file mode 100644
index 000000000000..3aaf46463bbe
--- /dev/null
+++ b/net-libs/mbedtls/mbedtls-2.16.11.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake multilib-minimal
+
+DESCRIPTION="Cryptographic library for embedded systems"
+HOMEPAGE="https://tls.mbed.org/"
+SRC_URI="https://github.com/ARMmbed/mbedtls/archive/${P}.tar.gz"
+S=${WORKDIR}/${PN}-${P}
+
+LICENSE="Apache-2.0"
+SLOT="0/3.12.0" # ffmpeg subslot naming: SONAME tuple of {libmbedcrypto.so,libmbedtls.so,libmbedx509.so}
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
+IUSE="cpu_flags_x86_sse2 doc havege programs static-libs test threads zlib"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ programs? (
+ dev-libs/openssl:0=
+ )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen media-gfx/graphviz )
+ test? ( dev-lang/perl )"
+
+enable_mbedtls_option() {
+ local myopt="$@"
+ # check that config.h syntax is the same at version bump
+ sed -i \
+ -e "s://#define ${myopt}:#define ${myopt}:" \
+ include/mbedtls/config.h || die
+}
+
+src_prepare() {
+ use cpu_flags_x86_sse2 && enable_mbedtls_option MBEDTLS_HAVE_SSE2
+ use zlib && enable_mbedtls_option MBEDTLS_ZLIB_SUPPORT
+ use havege && enable_mbedtls_option MBEDTLS_HAVEGE_C
+ use threads && enable_mbedtls_option MBEDTLS_THREADING_C
+ use threads && enable_mbedtls_option MBEDTLS_THREADING_PTHREAD
+
+ cmake_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DENABLE_PROGRAMS=$(multilib_native_usex programs)
+ -DENABLE_ZLIB_SUPPORT=$(usex zlib)
+ -DUSE_STATIC_MBEDTLS_LIBRARY=$(usex static-libs)
+ -DENABLE_TESTING=$(usex test)
+ -DUSE_SHARED_MBEDTLS_LIBRARY=ON
+ -DINSTALL_MBEDTLS_HEADERS=ON
+ -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)"
+ )
+
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_src_compile
+ use doc && multilib_is_native_abi && cd "${S}" && emake apidoc
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${BUILD_DIR}/library" \
+ cmake_src_test
+}
+
+multilib_src_install() {
+ cmake_src_install
+}
+
+multilib_src_install_all() {
+ use doc && HTML_DOCS=( apidoc )
+
+ einstalldocs
+
+ if use programs ; then
+ # avoid file collisions with sys-apps/coreutils
+ local p e
+ for p in "${ED}"/usr/bin/* ; do
+ if [[ -x "${p}" && ! -d "${p}" ]] ; then
+ mv "${p}" "${ED}"/usr/bin/mbedtls_${p##*/} || die
+ fi
+ done
+ for e in aes hash pkey ssl test ; do
+ docinto "${e}"
+ dodoc programs/"${e}"/*.c
+ dodoc programs/"${e}"/*.txt
+ done
+ fi
+}