summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alonbl@gentoo.org>2019-05-31 02:33:26 +0300
committerAlon Bar-Lev <alonbl@gentoo.org>2019-05-31 02:46:20 +0300
commit44ea3f2cf84291bb935da145f17515678b59cec5 (patch)
treecb34d52248ccaf894194c1a909954634ed01ae93 /app-crypt
parentapp-crypt/tpm2-totp: initial add (diff)
downloadgentoo-44ea3f2cf84291bb935da145f17515678b59cec5.tar.gz
gentoo-44ea3f2cf84291bb935da145f17515678b59cec5.tar.bz2
gentoo-44ea3f2cf84291bb935da145f17515678b59cec5.zip
app-crypt/tpm2-tss-engine: initial add
Signed-off-by: Alon Bar-Lev <alonbl@gentoo.org> Package-Manager: Portage-2.3.66, Repoman-2.3.11
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/tpm2-tss-engine/Manifest1
-rw-r--r--app-crypt/tpm2-tss-engine/files/tpm2-tss-engine-1.0.0-build.patch70
-rw-r--r--app-crypt/tpm2-tss-engine/metadata.xml11
-rw-r--r--app-crypt/tpm2-tss-engine/tpm2-tss-engine-1.0.0.ebuild38
4 files changed, 120 insertions, 0 deletions
diff --git a/app-crypt/tpm2-tss-engine/Manifest b/app-crypt/tpm2-tss-engine/Manifest
new file mode 100644
index 000000000000..97d8452f2e52
--- /dev/null
+++ b/app-crypt/tpm2-tss-engine/Manifest
@@ -0,0 +1 @@
+DIST tpm2-tss-engine-1.0.0.tar.gz 382277 BLAKE2B 6580eb83f4e9391a12df2fb9cb86ace385a9e29004a64f6ca9378d9b8f60572a7761f4f486e1010d435487fed28858737d2bb71b08e400e9551a7b83c198bbe7 SHA512 b06722c82c9cefd5184125b26fb46bd7b20d62631c21c51a028348833c4786b41ff64f2c1cb7d53f749a6cf35b8fae02ae02285fc43d1d044e2d2b6e2e7048a3
diff --git a/app-crypt/tpm2-tss-engine/files/tpm2-tss-engine-1.0.0-build.patch b/app-crypt/tpm2-tss-engine/files/tpm2-tss-engine-1.0.0-build.patch
new file mode 100644
index 000000000000..aa2b2e4e4fd3
--- /dev/null
+++ b/app-crypt/tpm2-tss-engine/files/tpm2-tss-engine-1.0.0-build.patch
@@ -0,0 +1,70 @@
+From 92aee12fbd246461a22925dd054c4d6394c4fdf5 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Fri, 31 May 2019 02:30:37 +0300
+Subject: [PATCH] build: add --disable-defaultflags
+
+Align with tpm2-tss to allow downstream to provide flags.
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ configure.ac | 42 +++++++++++++++++++++++++-----------------
+ 1 file changed, 25 insertions(+), 17 deletions(-)
+
+https://github.com/tpm2-software/tpm2-tss-engine/pull/117
+
+diff --git a/configure.ac b/configure.ac
+index f3a399c..f59cfaf 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -80,23 +80,31 @@ AS_IF([test "x$enable_tctienvvar" = xyes], [AC_DEFINE([ENABLE_TCTIENVVAR], [1])]
+
+ AC_CONFIG_FILES([Makefile])
+
+-AX_ADD_COMPILER_FLAG([-std=c99])
+-AX_ADD_COMPILER_FLAG([-Wall])
+-AX_ADD_COMPILER_FLAG([-Wextra])
+-AX_ADD_COMPILER_FLAG([-Wformat-security])
+-AX_ADD_COMPILER_FLAG([-Werror])
+-AX_ADD_COMPILER_FLAG([-fstack-protector-all])
+-AX_ADD_COMPILER_FLAG([-fpic])
+-AX_ADD_COMPILER_FLAG([-fPIC])
+-
+-# work around GCC bug #53119
+-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119
+-AX_ADD_COMPILER_FLAG([-Wno-missing-braces])
+-
+-AX_ADD_LINK_FLAG([-Wl,--no-undefined])
+-AX_ADD_LINK_FLAG([-Wl,-z,noexecstack])
+-AX_ADD_LINK_FLAG([-Wl,-z,now])
+-AX_ADD_LINK_FLAG([-Wl,-z,relro])
++AC_ARG_ENABLE([defaultflags],
++ [AS_HELP_STRING([--disable-defaultflags],
++ [Disable default preprocessor, compiler, and linker flags.])],
++ [enable_defaultflags=$enableval],
++ [enable_defaultflags=yes])
++AS_IF([test "x$enable_defaultflags" = "xyes"],
++ [
++ AX_ADD_COMPILER_FLAG([-std=c99])
++ AX_ADD_COMPILER_FLAG([-Wall])
++ AX_ADD_COMPILER_FLAG([-Wextra])
++ AX_ADD_COMPILER_FLAG([-Wformat-security])
++ AX_ADD_COMPILER_FLAG([-Werror])
++ AX_ADD_COMPILER_FLAG([-fstack-protector-all])
++ AX_ADD_COMPILER_FLAG([-fpic])
++ AX_ADD_COMPILER_FLAG([-fPIC])
++
++ # work around GCC bug #53119
++ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119
++ AX_ADD_COMPILER_FLAG([-Wno-missing-braces])
++
++ AX_ADD_LINK_FLAG([-Wl,--no-undefined])
++ AX_ADD_LINK_FLAG([-Wl,-z,noexecstack])
++ AX_ADD_LINK_FLAG([-Wl,-z,now])
++ AX_ADD_LINK_FLAG([-Wl,-z,relro])
++ ])
+
+ AX_CODE_COVERAGE
+ m4_ifdef([_AX_CODE_COVERAGE_RULES],
+--
+2.21.0
+
diff --git a/app-crypt/tpm2-tss-engine/metadata.xml b/app-crypt/tpm2-tss-engine/metadata.xml
new file mode 100644
index 000000000000..7931bebd0b34
--- /dev/null
+++ b/app-crypt/tpm2-tss-engine/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>crypto@gentoo.org</email>
+ <name>Crypto</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">tpm2-software/tpm2-tss-engine</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-crypt/tpm2-tss-engine/tpm2-tss-engine-1.0.0.ebuild b/app-crypt/tpm2-tss-engine/tpm2-tss-engine-1.0.0.ebuild
new file mode 100644
index 000000000000..6e1976c3cf4f
--- /dev/null
+++ b/app-crypt/tpm2-tss-engine/tpm2-tss-engine-1.0.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="OpenSSL Engine for TPM2 devices"
+HOMEPAGE="https://github.com/tpm2-software/tpm2-tools"
+SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="libressl test"
+
+RDEPEND=">=app-crypt/tpm2-tss-2.0:=
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )"
+DEPEND="${RDEPEND}
+ test? ( dev-util/cmocka )"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${P}-build.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable test unit) \
+ --disable-defaultflags \
+ --disable-static
+}