diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2021-07-28 16:20:26 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2021-07-28 16:20:26 -0400 |
commit | 1d97998d164959d6491eaeb3ac6671205a7728c7 (patch) | |
tree | 21ad3dbe120be54379456061a28d699d3bd310ed /net-libs/mbedtls | |
parent | net-libs/mbedtls: version bump to 2.16.11, 2.27.0 (diff) | |
download | gentoo-1d97998d164959d6491eaeb3ac6671205a7728c7.tar.gz gentoo-1d97998d164959d6491eaeb3ac6671205a7728c7.tar.bz2 gentoo-1d97998d164959d6491eaeb3ac6671205a7728c7.zip |
net-libs/mbedtls: new branch, bump to 3.0.0
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'net-libs/mbedtls')
-rw-r--r-- | net-libs/mbedtls/Manifest | 1 | ||||
-rw-r--r-- | net-libs/mbedtls/mbedtls-3.0.0.ebuild | 90 |
2 files changed, 91 insertions, 0 deletions
diff --git a/net-libs/mbedtls/Manifest b/net-libs/mbedtls/Manifest index cc24b74a0f78..c5c8cc5ec719 100644 --- a/net-libs/mbedtls/Manifest +++ b/net-libs/mbedtls/Manifest @@ -2,3 +2,4 @@ DIST mbedtls-2.16.10.tar.gz 2677333 BLAKE2B 5f94003547d5c4ba8daec8270b6e91fea1bb 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-3.0.0.ebuild b/net-libs/mbedtls/mbedtls-3.0.0.ebuild new file mode 100644 index 000000000000..d3447ef5c889 --- /dev/null +++ b/net-libs/mbedtls/mbedtls-3.0.0.ebuild @@ -0,0 +1,90 @@ +# 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/6.13.1" # ffmpeg subslot naming: SONAME tuple of {libmbedcrypto.so,libmbedtls.so,libmbedx509.so} +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="cpu_flags_x86_sse2 doc programs static-libs test threads" +RESTRICT="!test? ( test )" + +RDEPEND=" + programs? ( + dev-libs/openssl:0= + )" +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/mbedtls_config.h || die +} + +src_prepare() { + use cpu_flags_x86_sse2 && enable_mbedtls_option MBEDTLS_HAVE_SSE2 + 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) + -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)" + -DMBEDTLS_FATAL_WARNINGS=OFF # Don't use -Werror, #744946 + ) + + 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 +} |