Gentoo Archives: gentoo-commits

From: Viorel Munteanu <ceamac@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tss/
Date: Wed, 01 Feb 2023 07:57:06
Message-Id: 1675237248.b2c7c69e86142a68f371333a500207d1fd48c799.ceamac@gentoo
1 commit: b2c7c69e86142a68f371333a500207d1fd48c799
2 Author: Christopher Byrne <salah.coronya <AT> gmail <DOT> com>
3 AuthorDate: Tue Jan 31 16:08:19 2023 +0000
4 Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 1 07:40:48 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2c7c69e
7
8 app-crypt/tpm2-tss: add 3.2.2
9
10 Bug: https://bugs.gentoo.org/891519
11 Signed-off-by: Christopher Byrne <salah.coronya <AT> gmail.com>
12 Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>
13
14 app-crypt/tpm2-tss/Manifest | 1 +
15 app-crypt/tpm2-tss/tpm2-tss-3.2.2.ebuild | 90 ++++++++++++++++++++++++++++++++
16 2 files changed, 91 insertions(+)
17
18 diff --git a/app-crypt/tpm2-tss/Manifest b/app-crypt/tpm2-tss/Manifest
19 index 4058c153abbc..e89e30c7cc98 100644
20 --- a/app-crypt/tpm2-tss/Manifest
21 +++ b/app-crypt/tpm2-tss/Manifest
22 @@ -1,3 +1,4 @@
23 DIST tpm2-tss-3.2.0.tar.gz 1629211 BLAKE2B a89aa4d89a50bdfb5a9652874d30e2138747bd022049f2be2d0b56e296329d0c41254033ec3a062dbd64fde54a62e952f54446c551e5788231827cd53fae045a SHA512 cabb411f074dfa94919ba914849aac77a0ac2f50622e28a1406cf575369148774748e0e2b7a7c566ec83561a96d4b883bac5a3b1763f4cf48668a0c5d68c0a23
24 DIST tpm2-tss-3.2.1.tar.gz 1638566 BLAKE2B bdf5eeca1e7269a639cefd8b4a38e16c5b7c08518411a22718dcd14bc9fe3b621eee77cdd98f9ece0f6d9a52319bce5e0a502ff9a6e4ba6716341bd01f5967a9 SHA512 dbe5e29349d78621fcd608d9c75fa58f5e6462264b9654ca85af9f9faafebe1107d9f735a1b6ad4956a089b0dd96cbda3f46364cabd846f9fb29a419b074c78f
25 +DIST tpm2-tss-3.2.2.tar.gz 1638857 BLAKE2B 164c54b7c43a3379a9aae86fd39788a0906030bc2df9a96d7264635b0e281088f46f470d28098e194e77067f1c4412a8f1ef30d7877eb2410aeefee2d3639409 SHA512 efa71d04de907f74cf0e451a55124cb6fa804fddc2530ecc728a76030e0ae1e8597048c81cd4316397318f273e95754cf85745fc49966208b60babd398989aa6
26 DIST tpm2-tss-4.0.0.tar.gz 1787084 BLAKE2B 9b9d466eab77ae71ec916c911f9e1321013fe49594e103610fcb03492a2f20e811a2faddc2237519b710a1931226d5664581cd671d2318319a92e16bcb5ccfb4 SHA512 1058aa74e2358bfb60a17b85291dc642d40b49bb076453810c5b2b0c37c72671c319d783c879f719ccbe7aaeb5f464e0144c6ee12d28242b477be5d579cb3f9c
27
28 diff --git a/app-crypt/tpm2-tss/tpm2-tss-3.2.2.ebuild b/app-crypt/tpm2-tss/tpm2-tss-3.2.2.ebuild
29 new file mode 100644
30 index 000000000000..33334e45dca8
31 --- /dev/null
32 +++ b/app-crypt/tpm2-tss/tpm2-tss-3.2.2.ebuild
33 @@ -0,0 +1,90 @@
34 +# Copyright 1999-2023 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +inherit autotools flag-o-matic linux-info multilib-minimal tmpfiles udev
40 +
41 +DESCRIPTION="TCG Trusted Platform Module 2.0 Software Stack"
42 +HOMEPAGE="https://github.com/tpm2-software/tpm2-tss"
43 +SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz"
44 +
45 +LICENSE="BSD-2"
46 +SLOT="0/3"
47 +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
48 +IUSE="doc +fapi +openssl mbedtls static-libs test"
49 +
50 +RESTRICT="!test? ( test )"
51 +
52 +REQUIRED_USE="^^ ( mbedtls openssl )
53 + fapi? ( openssl !mbedtls )"
54 +
55 +RDEPEND="acct-group/tss
56 + acct-user/tss
57 + fapi? ( dev-libs/json-c:=[${MULTILIB_USEDEP}]
58 + >=net-misc/curl-7.80.0[${MULTILIB_USEDEP}] )
59 + mbedtls? ( net-libs/mbedtls:=[${MULTILIB_USEDEP}] )
60 + openssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )"
61 +
62 +DEPEND="${RDEPEND}
63 + test? ( app-crypt/swtpm
64 + dev-libs/uthash
65 + dev-util/cmocka
66 + fapi? ( >=net-misc/curl-7.80.0 ) )"
67 +BDEPEND="sys-apps/acl
68 + virtual/pkgconfig
69 + doc? ( app-doc/doxygen )"
70 +
71 +PATCHES=(
72 + "${FILESDIR}/${PN}-3.2.1-Dont-run-systemd-sysusers-in-Makefile.patch"
73 +)
74 +
75 +pkg_setup() {
76 + local CONFIG_CHECK=" \
77 + ~TCG_TPM
78 + "
79 + linux-info_pkg_setup
80 + kernel_is ge 4 12 0 || ewarn "At least kernel 4.12.0 is required"
81 +}
82 +
83 +src_prepare() {
84 + eautoreconf
85 + default
86 +}
87 +
88 +multilib_src_configure() {
89 + # tests fail with LTO enabbled. See bug 865275 and 865279
90 + filter-lto
91 +
92 + ECONF_SOURCE=${S} econf \
93 + --localstatedir=/var \
94 + $(multilib_native_use_enable doc doxygen-doc) \
95 + $(use_enable fapi) \
96 + $(use_enable static-libs static) \
97 + $(multilib_native_use_enable test unit) \
98 + $(multilib_native_use_enable test integration) \
99 + $(multilib_native_use_enable test self-generated-certificate) \
100 + --disable-tcti-libtpms \
101 + --disable-defaultflags \
102 + --disable-weakcrypto \
103 + --with-crypto="$(usex mbedtls mbed ossl)" \
104 + --with-runstatedir=/run \
105 + --with-udevrulesdir="$(get_udevdir)/rules.d" \
106 + --with-udevrulesprefix=60- \
107 + --with-sysusersdir="/usr/lib/sysusers.d" \
108 + --with-tmpfilesdir="/usr/lib/tmpfiles.d"
109 +}
110 +
111 +multilib_src_install() {
112 + default
113 + find "${D}" -name '*.la' -delete || die
114 +}
115 +
116 +pkg_postinst() {
117 + tmpfiles_process tpm2-tss-fapi.conf
118 + udev_reload
119 +}
120 +
121 +pkg_postrm() {
122 + udev_reload
123 +}