1 |
commit: 44ea3f2cf84291bb935da145f17515678b59cec5 |
2 |
Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 30 23:33:26 2019 +0000 |
4 |
Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 30 23:46:20 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44ea3f2c |
7 |
|
8 |
app-crypt/tpm2-tss-engine: initial add |
9 |
|
10 |
Signed-off-by: Alon Bar-Lev <alonbl <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.66, Repoman-2.3.11 |
12 |
|
13 |
app-crypt/tpm2-tss-engine/Manifest | 1 + |
14 |
.../files/tpm2-tss-engine-1.0.0-build.patch | 70 ++++++++++++++++++++++ |
15 |
app-crypt/tpm2-tss-engine/metadata.xml | 11 ++++ |
16 |
.../tpm2-tss-engine/tpm2-tss-engine-1.0.0.ebuild | 38 ++++++++++++ |
17 |
4 files changed, 120 insertions(+) |
18 |
|
19 |
diff --git a/app-crypt/tpm2-tss-engine/Manifest b/app-crypt/tpm2-tss-engine/Manifest |
20 |
new file mode 100644 |
21 |
index 00000000000..97d8452f2e5 |
22 |
--- /dev/null |
23 |
+++ b/app-crypt/tpm2-tss-engine/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST tpm2-tss-engine-1.0.0.tar.gz 382277 BLAKE2B 6580eb83f4e9391a12df2fb9cb86ace385a9e29004a64f6ca9378d9b8f60572a7761f4f486e1010d435487fed28858737d2bb71b08e400e9551a7b83c198bbe7 SHA512 b06722c82c9cefd5184125b26fb46bd7b20d62631c21c51a028348833c4786b41ff64f2c1cb7d53f749a6cf35b8fae02ae02285fc43d1d044e2d2b6e2e7048a3 |
26 |
|
27 |
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 |
28 |
new file mode 100644 |
29 |
index 00000000000..aa2b2e4e4fd |
30 |
--- /dev/null |
31 |
+++ b/app-crypt/tpm2-tss-engine/files/tpm2-tss-engine-1.0.0-build.patch |
32 |
@@ -0,0 +1,70 @@ |
33 |
+From 92aee12fbd246461a22925dd054c4d6394c4fdf5 Mon Sep 17 00:00:00 2001 |
34 |
+From: Alon Bar-Lev <alon.barlev@×××××.com> |
35 |
+Date: Fri, 31 May 2019 02:30:37 +0300 |
36 |
+Subject: [PATCH] build: add --disable-defaultflags |
37 |
+ |
38 |
+Align with tpm2-tss to allow downstream to provide flags. |
39 |
+ |
40 |
+Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com> |
41 |
+--- |
42 |
+ configure.ac | 42 +++++++++++++++++++++++++----------------- |
43 |
+ 1 file changed, 25 insertions(+), 17 deletions(-) |
44 |
+ |
45 |
+https://github.com/tpm2-software/tpm2-tss-engine/pull/117 |
46 |
+ |
47 |
+diff --git a/configure.ac b/configure.ac |
48 |
+index f3a399c..f59cfaf 100644 |
49 |
+--- a/configure.ac |
50 |
++++ b/configure.ac |
51 |
+@@ -80,23 +80,31 @@ AS_IF([test "x$enable_tctienvvar" = xyes], [AC_DEFINE([ENABLE_TCTIENVVAR], [1])] |
52 |
+ |
53 |
+ AC_CONFIG_FILES([Makefile]) |
54 |
+ |
55 |
+-AX_ADD_COMPILER_FLAG([-std=c99]) |
56 |
+-AX_ADD_COMPILER_FLAG([-Wall]) |
57 |
+-AX_ADD_COMPILER_FLAG([-Wextra]) |
58 |
+-AX_ADD_COMPILER_FLAG([-Wformat-security]) |
59 |
+-AX_ADD_COMPILER_FLAG([-Werror]) |
60 |
+-AX_ADD_COMPILER_FLAG([-fstack-protector-all]) |
61 |
+-AX_ADD_COMPILER_FLAG([-fpic]) |
62 |
+-AX_ADD_COMPILER_FLAG([-fPIC]) |
63 |
+- |
64 |
+-# work around GCC bug #53119 |
65 |
+-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119 |
66 |
+-AX_ADD_COMPILER_FLAG([-Wno-missing-braces]) |
67 |
+- |
68 |
+-AX_ADD_LINK_FLAG([-Wl,--no-undefined]) |
69 |
+-AX_ADD_LINK_FLAG([-Wl,-z,noexecstack]) |
70 |
+-AX_ADD_LINK_FLAG([-Wl,-z,now]) |
71 |
+-AX_ADD_LINK_FLAG([-Wl,-z,relro]) |
72 |
++AC_ARG_ENABLE([defaultflags], |
73 |
++ [AS_HELP_STRING([--disable-defaultflags], |
74 |
++ [Disable default preprocessor, compiler, and linker flags.])], |
75 |
++ [enable_defaultflags=$enableval], |
76 |
++ [enable_defaultflags=yes]) |
77 |
++AS_IF([test "x$enable_defaultflags" = "xyes"], |
78 |
++ [ |
79 |
++ AX_ADD_COMPILER_FLAG([-std=c99]) |
80 |
++ AX_ADD_COMPILER_FLAG([-Wall]) |
81 |
++ AX_ADD_COMPILER_FLAG([-Wextra]) |
82 |
++ AX_ADD_COMPILER_FLAG([-Wformat-security]) |
83 |
++ AX_ADD_COMPILER_FLAG([-Werror]) |
84 |
++ AX_ADD_COMPILER_FLAG([-fstack-protector-all]) |
85 |
++ AX_ADD_COMPILER_FLAG([-fpic]) |
86 |
++ AX_ADD_COMPILER_FLAG([-fPIC]) |
87 |
++ |
88 |
++ # work around GCC bug #53119 |
89 |
++ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119 |
90 |
++ AX_ADD_COMPILER_FLAG([-Wno-missing-braces]) |
91 |
++ |
92 |
++ AX_ADD_LINK_FLAG([-Wl,--no-undefined]) |
93 |
++ AX_ADD_LINK_FLAG([-Wl,-z,noexecstack]) |
94 |
++ AX_ADD_LINK_FLAG([-Wl,-z,now]) |
95 |
++ AX_ADD_LINK_FLAG([-Wl,-z,relro]) |
96 |
++ ]) |
97 |
+ |
98 |
+ AX_CODE_COVERAGE |
99 |
+ m4_ifdef([_AX_CODE_COVERAGE_RULES], |
100 |
+-- |
101 |
+2.21.0 |
102 |
+ |
103 |
|
104 |
diff --git a/app-crypt/tpm2-tss-engine/metadata.xml b/app-crypt/tpm2-tss-engine/metadata.xml |
105 |
new file mode 100644 |
106 |
index 00000000000..7931bebd0b3 |
107 |
--- /dev/null |
108 |
+++ b/app-crypt/tpm2-tss-engine/metadata.xml |
109 |
@@ -0,0 +1,11 @@ |
110 |
+<?xml version="1.0" encoding="UTF-8"?> |
111 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
112 |
+<pkgmetadata> |
113 |
+ <maintainer type="project"> |
114 |
+ <email>crypto@g.o</email> |
115 |
+ <name>Crypto</name> |
116 |
+ </maintainer> |
117 |
+ <upstream> |
118 |
+ <remote-id type="github">tpm2-software/tpm2-tss-engine</remote-id> |
119 |
+ </upstream> |
120 |
+</pkgmetadata> |
121 |
|
122 |
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 |
123 |
new file mode 100644 |
124 |
index 00000000000..6e1976c3cf4 |
125 |
--- /dev/null |
126 |
+++ b/app-crypt/tpm2-tss-engine/tpm2-tss-engine-1.0.0.ebuild |
127 |
@@ -0,0 +1,38 @@ |
128 |
+# Copyright 1999-2019 Gentoo Authors |
129 |
+# Distributed under the terms of the GNU General Public License v2 |
130 |
+ |
131 |
+EAPI=7 |
132 |
+ |
133 |
+inherit autotools |
134 |
+ |
135 |
+DESCRIPTION="OpenSSL Engine for TPM2 devices" |
136 |
+HOMEPAGE="https://github.com/tpm2-software/tpm2-tools" |
137 |
+SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/v${PV}/${P}.tar.gz" |
138 |
+ |
139 |
+LICENSE="BSD" |
140 |
+SLOT="0" |
141 |
+KEYWORDS="~amd64" |
142 |
+IUSE="libressl test" |
143 |
+ |
144 |
+RDEPEND=">=app-crypt/tpm2-tss-2.0:= |
145 |
+ !libressl? ( dev-libs/openssl:0= ) |
146 |
+ libressl? ( dev-libs/libressl:0= )" |
147 |
+DEPEND="${RDEPEND} |
148 |
+ test? ( dev-util/cmocka )" |
149 |
+BDEPEND="virtual/pkgconfig" |
150 |
+ |
151 |
+PATCHES=( |
152 |
+ "${FILESDIR}/${P}-build.patch" |
153 |
+) |
154 |
+ |
155 |
+src_prepare() { |
156 |
+ default |
157 |
+ eautoreconf |
158 |
+} |
159 |
+ |
160 |
+src_configure() { |
161 |
+ econf \ |
162 |
+ $(use_enable test unit) \ |
163 |
+ --disable-defaultflags \ |
164 |
+ --disable-static |
165 |
+} |