diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2021-07-28 16:12:30 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2021-07-28 16:12:43 -0400 |
commit | cd461e6384ea6388d1999c5658940be3a8658b93 (patch) | |
tree | 429f7c618b3ceced55c072c2b24d8446abbd8276 /net-libs/mbedtls | |
parent | sys-libs/libsepol: Stabilize 3.2 x86, #797616 (diff) | |
download | gentoo-cd461e6384ea6388d1999c5658940be3a8658b93.tar.gz gentoo-cd461e6384ea6388d1999c5658940be3a8658b93.tar.bz2 gentoo-cd461e6384ea6388d1999c5658940be3a8658b93.zip |
net-libs/mbedtls: version bump to 2.16.11, 2.27.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 | 2 | ||||
-rw-r--r-- | net-libs/mbedtls/mbedtls-2.16.11.ebuild | 93 | ||||
-rw-r--r-- | net-libs/mbedtls/mbedtls-2.27.0.ebuild | 94 |
3 files changed, 189 insertions, 0 deletions
diff --git a/net-libs/mbedtls/Manifest b/net-libs/mbedtls/Manifest index b60d69f9d337..cc24b74a0f78 100644 --- a/net-libs/mbedtls/Manifest +++ b/net-libs/mbedtls/Manifest @@ -1,2 +1,4 @@ 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 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..418ab01d59a3 --- /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 +} diff --git a/net-libs/mbedtls/mbedtls-2.27.0.ebuild b/net-libs/mbedtls/mbedtls-2.27.0.ebuild new file mode 100644 index 000000000000..820cabaddf46 --- /dev/null +++ b/net-libs/mbedtls/mbedtls-2.27.0.ebuild @@ -0,0 +1,94 @@ +# 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 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)" + -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 +} |