From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1418709-garchives=archives.gentoo.org@lists.gentoo.org>
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))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 0F5C4158003
	for <garchives@archives.gentoo.org>; Fri, 15 Jul 2022 16:59:39 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 321D7E0FD1;
	Fri, 15 Jul 2022 16:59:38 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(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 08994E0FD1
	for <gentoo-commits@lists.gentoo.org>; Fri, 15 Jul 2022 16:59:38 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(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 0695D341284
	for <gentoo-commits@lists.gentoo.org>; Fri, 15 Jul 2022 16:59:37 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 6696B1E
	for <gentoo-commits@lists.gentoo.org>; Fri, 15 Jul 2022 16:59:35 +0000 (UTC)
From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" <blueness@gentoo.org>
Message-ID: <1657904363.34e5225cac6664f30792e7d91bfd4f24a6b2a7ce.blueness@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-3.2.1.ebuild
X-VCS-Directories: net-libs/mbedtls/
X-VCS-Committer: blueness
X-VCS-Committer-Name: Anthony G. Basile
X-VCS-Revision: 34e5225cac6664f30792e7d91bfd4f24a6b2a7ce
X-VCS-Branch: master
Date: Fri, 15 Jul 2022 16:59:35 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: b10db087-9895-41b5-ad43-ae5e830e2b70
X-Archives-Hash: e9c2e284972fbb071e27ac431394aadb

commit:     34e5225cac6664f30792e7d91bfd4f24a6b2a7ce
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 15 16:59:23 2022 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Fri Jul 15 16:59:23 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34e5225c

net-libs/mbedtls: add version 3.2.1 for testing (masked)

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 net-libs/mbedtls/Manifest             |  1 +
 net-libs/mbedtls/mbedtls-3.2.1.ebuild | 96 +++++++++++++++++++++++++++++++++++
 2 files changed, 97 insertions(+)

diff --git a/net-libs/mbedtls/Manifest b/net-libs/mbedtls/Manifest
index ef065bf44337..f94990436608 100644
--- a/net-libs/mbedtls/Manifest
+++ b/net-libs/mbedtls/Manifest
@@ -2,3 +2,4 @@ DIST mbedtls-2.16.12.tar.gz 2702190 BLAKE2B 3cbe0bcfd0eca279d9b4b3816416b8e778f0
 DIST mbedtls-2.28.0.tar.gz 3712239 BLAKE2B 1141465bc5b73e7fd94bbd02c79290093fd075626be93aea839a54ebff81fb00917f0a4fe7911fee983a36147fa4922d258714a330b40b0da4764a3b2419df8b SHA512 2ddc161caeebe8bf1e8cf23c398f65ceff699eb6487a7bcaf6a665879aac5458e21e26b06370085cbdae6ce6b5394afece656aa6307bbb3f5b701bcb41f3dd64
 DIST mbedtls-2.28.1.tar.gz 3914438 BLAKE2B 85969895b50b63537438e0b67e1dec97a0ee4ac188c55ebcb109d5e0cc8f4a3f66f016b2ac5f920d7b10f094c9626029d19ab86be0cb5941224a7f3eed2dcc06 SHA512 cc75027ebbefb4ba1aecdc386cf6b60cceeceda79a474ff5ba67411e41aac9fc2c43c2fb0158be667f1b91e6c19082e17e4e61409acc1498b568f5efc7b00a2c
 DIST mbedtls-3.1.0.tar.gz 3766628 BLAKE2B a52e8fb9a3b88c1cf7cb0c8f5598f90a1c9ca05dbc399432293c3acb77aaf0a1b92a9792bda986b47e925736b21c83de1c891b21d45fd2dc8cb5d7d1b09168e7 SHA512 c374fafad89f8793ed1a302634a403b855317d9759377d4bade13c61857d0317a2fc144ab3a9aaee52901ff7a3c4b4b0e7e81ebe5510ab4d228103def01ae628
+DIST mbedtls-3.2.1.tar.gz 4097571 BLAKE2B 4f33172c9c7a3ffbad6600c41d9b574a79e512ec417c3ec90a04085cce393456e8502e94150094bc80a217c352c8148d67bdab1bf0cb311c8dc88d653475a003 SHA512 e7f1726d2cdae6c580d588b40c8a51b9e353786efdd2e50fd1c11c7f46a2b6fe2622cfe2ee5cf998ec762b5ebf8f4720cfc1a1ecaebc497489f9d6a263a83523

diff --git a/net-libs/mbedtls/mbedtls-3.2.1.ebuild b/net-libs/mbedtls/mbedtls-3.2.1.ebuild
new file mode 100644
index 000000000000..dea83674c2e2
--- /dev/null
+++ b/net-libs/mbedtls/mbedtls-3.2.1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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/12.18.4" # 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() {
+	# psa isn't ready yet, even in 3.0.0.
+	# bug #718390
+	local myctestargs=(
+		-E "(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
+}