commit:     ded55f1b692c28ae442e9c9ff69bdb5a64aa33ac
Author:     Salah Coronya <salah.coronya <AT> gmail <DOT> com>
AuthorDate: Wed May 27 01:26:31 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Jun 24 14:29:18 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ded55f1b

app-crypt/tpm2-tools: Bump to 4.2.1

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Salah Coronya <salah.coronya <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-crypt/tpm2-tools/Manifest                      |  1 +
 .../files/tpm2-tools-4.2.1-libressl.patch          | 26 +++++++++++++++++
 app-crypt/tpm2-tools/tpm2-tools-4.2.1.ebuild       | 34 ++++++++++++++++++++++
 3 files changed, 61 insertions(+)

diff --git a/app-crypt/tpm2-tools/Manifest b/app-crypt/tpm2-tools/Manifest
index eb3869a2746..038baa1317b 100644
--- a/app-crypt/tpm2-tools/Manifest
+++ b/app-crypt/tpm2-tools/Manifest
@@ -1 +1,2 @@
+DIST tpm2-tools-4.2.1.tar.gz 879294 BLAKE2B 
7619f72f0fe39360f111822b4ec7a0bb90156f295977115c4612efac33059dd786abfa5d5f46a8fcc134fce11d099b03cb7f9ee01aa3addf5a3bb2455e1eb2d4
 SHA512 
4da103e70880d72a9aa402dea39ea439a0657729af22f08ac7275022c475ab46cb3dd6123d6846669d9b7f8f9af7b3e3df7c3b1d33cd0149b649b7941c84c339
 DIST tpm2-tools-4.2.tar.gz 889062 BLAKE2B 
434b88e90f953785e57a9e9f18d717c8b6632206dabfc7478ae866e245eadf032ec4f26bb9597d04ea887bc23a8096d7e6fc2748b0e96806cb2989fd7edf9071
 SHA512 
7aaf549dd77307e5ad93d4b34737d684c8a7384996143124f10b188f5e99860940902cee83538e6957997859420dd430d6d27979b223beae515aab94ac8fb235

diff --git a/app-crypt/tpm2-tools/files/tpm2-tools-4.2.1-libressl.patch 
b/app-crypt/tpm2-tools/files/tpm2-tools-4.2.1-libressl.patch
new file mode 100644
index 00000000000..2f39db3283c
--- /dev/null
+++ b/app-crypt/tpm2-tools/files/tpm2-tools-4.2.1-libressl.patch
@@ -0,0 +1,26 @@
+From a1ac2ee0c6592e6f730458c03a2abd1532c66046 Mon Sep 17 00:00:00 2001
+From: Salah Coronya <[email protected]>
+Date: Sun, 12 Jan 2020 19:17:48 -0600
+Subject: [PATCH] lib/tpm2_openssl.c: Fix build for libressl
+
+Signed-off-by: Salah Coronya <[email protected]>
+---
+ lib/tpm2_openssl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/tpm2_openssl.c b/lib/tpm2_openssl.c
+index 505dd7a0..fd3861d9 100644
+--- a/lib/tpm2_openssl.c
++++ b/lib/tpm2_openssl.c
+@@ -14,7 +14,7 @@
+ #include "tpm2_openssl.h"
+ 
+ /* compatibility function for OpenSSL versions < 1.1.0 */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ static int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen) {
+     int r;
+     int topad;
+-- 
+2.24.1
+

diff --git a/app-crypt/tpm2-tools/tpm2-tools-4.2.1.ebuild 
b/app-crypt/tpm2-tools/tpm2-tools-4.2.1.ebuild
new file mode 100644
index 00000000000..f791854a95a
--- /dev/null
+++ b/app-crypt/tpm2-tools/tpm2-tools-4.2.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Tools for the TPM 2.0 TSS"
+HOMEPAGE="https://github.com/tpm2-software/tpm2-tools";
+SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz";
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+fapi libressl"
+
+# Integration test are now run as part of the testing suite, which will fail
+# because none of the supported TPM emulators are in Portage. In a future
+# version of tpm2-tools, swtpm will be supported and the tests can be run.
+RESTRICT="test"
+
+RDEPEND="net-misc/curl:=
+       fapi? ( >=app-crypt/tpm2-tss-2.4.0:=[fapi?] )
+       !libressl? ( dev-libs/openssl:0= )
+       libressl? ( dev-libs/libressl:0= )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+PATCHES=(
+       "${FILESDIR}/${P}-libressl.patch"
+)
+
+src_configure() {
+       econf \
+               $(use_enable fapi) \
+               $(use_enable !libressl hardening)
+}

Reply via email to