From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1161811-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 38FC3138350
	for <garchives@archives.gentoo.org>; Tue, 14 Apr 2020 16:40:46 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 29BB5E076B;
	Tue, 14 Apr 2020 16:40:45 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id F057FE076B
	for <gentoo-commits@lists.gentoo.org>; Tue, 14 Apr 2020 16:40:44 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 5750034F2ED
	for <gentoo-commits@lists.gentoo.org>; Tue, 14 Apr 2020 16:40:43 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id B06FC1D2
	for <gentoo-commits@lists.gentoo.org>; Tue, 14 Apr 2020 16:40:40 +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: <1586882435.cc5aa44d71769f28910c9467f75dd6772baf197b.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-2.20.0.ebuild
X-VCS-Directories: net-libs/mbedtls/
X-VCS-Committer: blueness
X-VCS-Committer-Name: Anthony G. Basile
X-VCS-Revision: cc5aa44d71769f28910c9467f75dd6772baf197b
X-VCS-Branch: master
Date: Tue, 14 Apr 2020 16:40:40 +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: 1f6cc827-04ab-49d9-9ce9-a24370abef91
X-Archives-Hash: 0a7ba46cd1d85b6d9f7a94de4b8aa974

commit:     cc5aa44d71769f28910c9467f75dd6772baf197b
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 14 16:40:18 2020 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Apr 14 16:40:35 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc5aa44d

net-libs/mbedtls: version bump to 2.20.0

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

 net-libs/mbedtls/Manifest              |   2 +
 net-libs/mbedtls/mbedtls-2.20.0.ebuild | 105 +++++++++++++++++++++++++++++++++
 2 files changed, 107 insertions(+)

diff --git a/net-libs/mbedtls/Manifest b/net-libs/mbedtls/Manifest
index 751724ca85e..48427c4290a 100644
--- a/net-libs/mbedtls/Manifest
+++ b/net-libs/mbedtls/Manifest
@@ -1,5 +1,7 @@
 DIST mbedcrypto-2.0.0.tar.gz 3001813 BLAKE2B 35a01b7cb11a94cb5ef333f5939945b40ecd0da482959980931e389ac5aec3c1c1b2f40970bbde4587454aee5957dce220593bfc31943ec3deddfa70d2386a25 SHA512 3a8fa6b7160065ef175139ba9cb4c8599be11f9d0df5fd60f9f96c425400a0a40eaa31d571ce61d4a00e3b10c1e2b81756c1ad31df6fc32777f40ade7806948a
+DIST mbedcrypto-3.1.0.tar.gz 3055269 BLAKE2B 50089999c8c5c768f266894c4d0f45ce596acf3295ddd2f851be52486eef8bd9d5a12a9a5beacef9527c5bba36de90550a707c1adebd65cc853f4a55419e0bd0 SHA512 718d4193feeae9e598d068e959b6f6781d68512e59edfadbde9adb7356063a13fd3d6d9d88f94488ce6bc56faae2b55c001411df12420923a528316eaa422837
 DIST mbedtls-2.16.5.tar.gz 2601418 BLAKE2B 1c69531c518817ea4ad354588916453b74c82b9e2927119f4de18080a72595b21b1800e6757203ec3fc9e7eddd8667a2c91e689c053d0d351c588330c9d9b897 SHA512 a0416d8492f826154f3570f739d043ffcc3355d6db289be3ac606cd80ed1795f6b4bb8db6a13cbadd9354d9aca4de1635490621e5e6bf202c320fb3047854ec6
 DIST mbedtls-2.16.6.tar.gz 2603563 BLAKE2B a4011bb2b7e3eca554cded05c4650fc16b48d86ae1ac7fefe29df6b29e38c1e76c880f082be83759b4dddd96f831a1238c2df41671bd9794b028402b3dd63f60 SHA512 a4c2e70c0cc6b1f1571a9f2ec27ede2620eb1937361599cab0e05b807068397d25695d5cd23931fd0f4cc051de6367c2b6c77f3507ed8b33cd492589c51eebac
 DIST mbedtls-2.17.0.tar.gz 2738368 BLAKE2B efcf2a6c84a85afdca0205bd9e8bcf039074c5e6f40e0814f835cf26c2d13dce87bd140aa0b803eea6a683e31b79680a3ea8ba72417e7ec26f206e0b027b014a SHA512 6ab52d116cb9f755871f2fd196ec1b352dbbe59f2ecedeb5551237e4e672da77205ef0c2f80ec746ba1fd94cab1995ab1729c8adb0f29d10f3c74a67f5327493
 DIST mbedtls-2.19.1.tar.gz 1165843 BLAKE2B c8e6764b493a6ca011e74d7b297d5ae5140d7bdf17c1cfd5b9d37913d615ad3c5a6dbf71d44cbf14c938646e51bbf04cd63cc1657eb3775addb2dee3ee94c587 SHA512 07ec1cdf98e51ed35bb2940e485d7d8422e9fd440d2077d5cd4c80781d73848228386fe9064773ef8bb1a02c1bc060185b9c8310349d695926bd2c9b7cf6582b
+DIST mbedtls-2.20.0.tar.gz 1177878 BLAKE2B c6ab398d77d5e3f2549ccf0dd7c6db386adaa12f996729f02022aff68fcfdc6059d5e40cdc2587b8882800cfeb7fe7ebd4959a28639816f016bfb8085d8dbcb7 SHA512 1d9766aade2d4343b0acd8ab3a815990f99a260cdf9a16c3357e64ec7aac18f5f9059aeba266bd9f55aede1de1344dba28632449b39bc75d46767fe882e4a1a0

diff --git a/net-libs/mbedtls/mbedtls-2.20.0.ebuild b/net-libs/mbedtls/mbedtls-2.20.0.ebuild
new file mode 100644
index 00000000000..682e5c5f961
--- /dev/null
+++ b/net-libs/mbedtls/mbedtls-2.20.0.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils multilib-minimal
+
+DESCRIPTION="Cryptographic library for embedded systems"
+HOMEPAGE="https://tls.mbed.org/"
+CRYPTO_SUBMODULE="mbedcrypto-3.1.0"
+SRC_URI="https://github.com/ARMmbed/mbedtls/archive/${P}.tar.gz
+	https://github.com/ARMmbed/mbed-crypto/archive/${CRYPTO_SUBMODULE}.tar.gz"
+S=${WORKDIR}/${PN}-${P}
+
+LICENSE="Apache-2.0"
+SLOT="0/13" # slot for libmbedtls.so
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="cpu_flags_x86_sse2 doc havege libressl programs -static-libs test threads zlib"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	programs? (
+		!libressl? ( dev-libs/openssl:0= )
+		libressl? ( dev-libs/libressl: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
+}
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-dont-overwrite-headers.patch
+	"${FILESDIR}"/${PN}-un-pebcak-705038-wrong-file.patch
+)
+
+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
+
+	# pretend to be git submodule
+	rmdir "${S}"/crypto
+	mv "${WORKDIR}"/mbed-crypto-${CRYPTO_SUBMODULE} "${S}"/crypto
+
+	cmake-utils_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="/usr/$(get_libdir)"
+	)
+
+	cmake-utils_src_configure
+}
+
+multilib_src_compile() {
+	cmake-utils_src_compile
+	use doc && multilib_is_native_abi && emake apidoc
+}
+
+multilib_src_test() {
+	LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${BUILD_DIR}/library" \
+		cmake-utils_src_test
+}
+
+multilib_src_install() {
+	cmake-utils_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
+}