From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2DFFE158451 for ; Sun, 14 Jan 2024 04:05:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 591EAE29F8; Sun, 14 Jan 2024 04:05:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3701DE29F8 for ; Sun, 14 Jan 2024 04:05:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3F9493431DA for ; Sun, 14 Jan 2024 04:05:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 868B714B1 for ; Sun, 14 Jan 2024 04:05:40 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1705204872.4767bcca480ea1ecfaa1fe58841d0989b3640e7e.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/mbedtls/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/mbedtls/Manifest net-libs/mbedtls/mbedtls-2.28.6.ebuild net-libs/mbedtls/metadata.xml X-VCS-Directories: net-libs/mbedtls/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 4767bcca480ea1ecfaa1fe58841d0989b3640e7e X-VCS-Branch: master Date: Sun, 14 Jan 2024 04:05:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1ec91135-5f0f-4133-bd72-67e9db3c12a0 X-Archives-Hash: 1a4c70ab2ff1ba0036ba67db96f22562 commit: 4767bcca480ea1ecfaa1fe58841d0989b3640e7e Author: Azamat H. Hackimov gmail com> AuthorDate: Sun Jan 7 13:55:41 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sun Jan 14 04:01:12 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4767bcca net-libs/mbedtls: add 2.28.6 New dual licensing (Apache-2.0 or GPL-2+), add python as BDEPEND (required for some pre-compile checks test data generation), minor fixes to project spelling (it's "Mbed TLS", not "mbed TLS"). Closes: https://bugs.gentoo.org/740718 Signed-off-by: Azamat H. Hackimov gmail.com> Signed-off-by: Sam James gentoo.org> net-libs/mbedtls/Manifest | 1 + net-libs/mbedtls/mbedtls-2.28.6.ebuild | 108 +++++++++++++++++++++++++++++++++ net-libs/mbedtls/metadata.xml | 4 +- 3 files changed, 111 insertions(+), 2 deletions(-) diff --git a/net-libs/mbedtls/Manifest b/net-libs/mbedtls/Manifest index 01050714e9cc..e55681924ac4 100644 --- a/net-libs/mbedtls/Manifest +++ b/net-libs/mbedtls/Manifest @@ -1,2 +1,3 @@ DIST mbedtls-2.28.5.tar.gz 4005000 BLAKE2B 755287e1a1e0be5d193a8a184a9ae3ab2b6c216235657f7f2e422fe06226cd4c7d11811bcb53519018137e7ed838b241704c955872e28f133bb17a5f42222acb SHA512 339911d244b4e6e4d77b344c796f018d9ad4c56249530b8a56e0dc305ddf30bc709dca96a19c5a06710e92d167ef22893e9e17e20837e9daee0d0be00a8ccae9 +DIST mbedtls-2.28.6.tar.gz 3988909 BLAKE2B d4991fce07ab5120340a7ea6b5eae6888e9568e6d93bb41e1a4b4cc6f7868489ad3542aef346dffc39212d543e3b2d08e7409c078d37a2f7d512e4afa7ca5b60 SHA512 1ce2cfe55b569c6332a462447f69ec1e349e23410afeda88f5f55037493cf145e1031f9a7c8fe080f346cfae98802a13258891376684e7491d171101cb302754 DIST mbedtls-3.5.0.tar.gz 5614026 BLAKE2B 958825f59bb7f269c81042da66a1cd1d12ac799b599613582da591d455dc159aa344370bae8c0436e33c293bd69b1ae9266d2788a0bacd58f0ae8247bafb7f3d SHA512 87b58f698bb740aecb639155ac1248674d2b15ee7fa0eb01136f8fe476ddce0069589a13d532f38ee6db8285abed25570d2bcf55148c2324d8277048a93aacdd diff --git a/net-libs/mbedtls/mbedtls-2.28.6.ebuild b/net-libs/mbedtls/mbedtls-2.28.6.ebuild new file mode 100644 index 000000000000..e1829c6a942f --- /dev/null +++ b/net-libs/mbedtls/mbedtls-2.28.6.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake multilib-minimal python-any-r1 + +DESCRIPTION="Cryptographic library for embedded systems" +HOMEPAGE="https://www.trustedfirmware.org/projects/mbed-tls/" +SRC_URI="https://github.com/Mbed-TLS/mbedtls/archive/${P}.tar.gz" +S="${WORKDIR}"/${PN}-${P} + +LICENSE="|| ( Apache-2.0 GPL-2+ )" +SLOT="0/7.14.1" # ffmpeg subslot naming: SONAME tuple of {libmbedcrypto.so,libmbedtls.so,libmbedx509.so} +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="cmac cpu_flags_x86_sse2 doc havege programs static-libs test threads zlib" +RESTRICT="!test? ( test )" + +RDEPEND=" + zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + ${PYTHON_DEPS} + doc? ( + app-text/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 cmac && enable_mbedtls_option MBEDTLS_CMAC_C + 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_TESTING=$(usex test) + -DENABLE_ZLIB_SUPPORT=$(usex zlib) + -DINSTALL_MBEDTLS_HEADERS=ON + -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)" + -DLINK_WITH_PTHREAD=$(usex threads) + -DMBEDTLS_FATAL_WARNINGS=OFF # Don't use -Werror, #744946 + -DUSE_SHARED_MBEDTLS_LIBRARY=ON + -DUSE_STATIC_MBEDTLS_LIBRARY=$(usex static-libs) + ) + + cmake_src_configure +} + +multilib_src_compile() { + cmake_src_compile + use doc && multilib_is_native_abi && emake -C "${S}" apidoc +} + +multilib_src_test() { + # Multiple failures in PSA test suite, bug #718390 + CMAKE_SKIP_TESTS=( + psa_crypto + psa_its-suite + ) + + 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/metadata.xml b/net-libs/mbedtls/metadata.xml index b9ac7a476e4e..1b3db4f9f537 100644 --- a/net-libs/mbedtls/metadata.xml +++ b/net-libs/mbedtls/metadata.xml @@ -10,7 +10,7 @@ Proxy Maintainers - The aim of the mbed TLS project is to provide a quality, open-source + The aim of the Mbed TLS project is to provide a quality, open-source cryptographic library written in C and targeted at embedded systems. @@ -21,7 +21,7 @@ Warning: the HAVEGE random generator is not suitable for virtualized environments - Build PolarSSL programs + Build Mbed TLS programs Mbed-TLS/mbedtls