commit:     e7e6f8fcfaf24a904171160d9be9f3426c630c25
Author:     Christopher Byrne <salah.coronya <AT> gmail <DOT> com>
AuthorDate: Tue Jan 31 16:12:00 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Wed Feb  1 07:40:48 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7e6f8fc

app-crypt/tpm2-tss: add 4.0.1

Bug: https://bugs.gentoo.org/891519
Signed-off-by: Christopher Byrne <salah.coronya <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29358
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-crypt/tpm2-tss/Manifest              |  1 +
 app-crypt/tpm2-tss/tpm2-tss-4.0.1.ebuild | 93 ++++++++++++++++++++++++++++++++
 2 files changed, 94 insertions(+)

diff --git a/app-crypt/tpm2-tss/Manifest b/app-crypt/tpm2-tss/Manifest
index e89e30c7cc98..b76f835b2de8 100644
--- a/app-crypt/tpm2-tss/Manifest
+++ b/app-crypt/tpm2-tss/Manifest
@@ -2,3 +2,4 @@ DIST tpm2-tss-3.2.0.tar.gz 1629211 BLAKE2B 
a89aa4d89a50bdfb5a9652874d30e2138747b
 DIST tpm2-tss-3.2.1.tar.gz 1638566 BLAKE2B 
bdf5eeca1e7269a639cefd8b4a38e16c5b7c08518411a22718dcd14bc9fe3b621eee77cdd98f9ece0f6d9a52319bce5e0a502ff9a6e4ba6716341bd01f5967a9
 SHA512 
dbe5e29349d78621fcd608d9c75fa58f5e6462264b9654ca85af9f9faafebe1107d9f735a1b6ad4956a089b0dd96cbda3f46364cabd846f9fb29a419b074c78f
 DIST tpm2-tss-3.2.2.tar.gz 1638857 BLAKE2B 
164c54b7c43a3379a9aae86fd39788a0906030bc2df9a96d7264635b0e281088f46f470d28098e194e77067f1c4412a8f1ef30d7877eb2410aeefee2d3639409
 SHA512 
efa71d04de907f74cf0e451a55124cb6fa804fddc2530ecc728a76030e0ae1e8597048c81cd4316397318f273e95754cf85745fc49966208b60babd398989aa6
 DIST tpm2-tss-4.0.0.tar.gz 1787084 BLAKE2B 
9b9d466eab77ae71ec916c911f9e1321013fe49594e103610fcb03492a2f20e811a2faddc2237519b710a1931226d5664581cd671d2318319a92e16bcb5ccfb4
 SHA512 
1058aa74e2358bfb60a17b85291dc642d40b49bb076453810c5b2b0c37c72671c319d783c879f719ccbe7aaeb5f464e0144c6ee12d28242b477be5d579cb3f9c
+DIST tpm2-tss-4.0.1.tar.gz 1787139 BLAKE2B 
627cdefeff6c64148f9da1425922a0a7a72debcee4930ffab208a3b9b66127c2d4f923e3e105bfd45410cdb13c19cb40cc15a720e9a05dd32ff622dabf5fcc32
 SHA512 
ed6ddc52cb0e8c1082a4bb001e1225eb9905fd2380da88db5fd69ff5b5d9d43a93eb67b634e49d53eb5d586832da3aef2c4c7e5f18d51bb730481f8913319d7d

diff --git a/app-crypt/tpm2-tss/tpm2-tss-4.0.1.ebuild 
b/app-crypt/tpm2-tss/tpm2-tss-4.0.1.ebuild
new file mode 100644
index 000000000000..ba650e60ee44
--- /dev/null
+++ b/app-crypt/tpm2-tss/tpm2-tss-4.0.1.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic linux-info multilib-minimal tmpfiles udev
+
+DESCRIPTION="TCG Trusted Platform Module 2.0 Software Stack"
+HOMEPAGE="https://github.com/tpm2-software/tpm2-tss";
+SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz";
+
+LICENSE="BSD-2"
+SLOT="0/4"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="doc +fapi +openssl mbedtls +policy static-libs test"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="^^ ( mbedtls openssl )
+               fapi? ( openssl !mbedtls )
+               policy? ( openssl !mbedtls )"
+
+RDEPEND="acct-group/tss
+       acct-user/tss
+       fapi? ( dev-libs/json-c:=[${MULTILIB_USEDEP}]
+               >=net-misc/curl-7.80.0[${MULTILIB_USEDEP}] )
+       mbedtls? ( net-libs/mbedtls:=[${MULTILIB_USEDEP}] )
+       openssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] )"
+
+DEPEND="${RDEPEND}
+       test? ( app-crypt/swtpm
+               dev-libs/uthash
+               dev-util/cmocka
+               fapi? ( >=net-misc/curl-7.80.0 ) )"
+BDEPEND="sys-apps/acl
+       virtual/pkgconfig
+       doc? ( app-doc/doxygen )"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-4.0.0-Dont-install-files-into-run.patch"
+       )
+
+pkg_setup() {
+       local CONFIG_CHECK=" \
+               ~TCG_TPM
+       "
+       linux-info_pkg_setup
+       kernel_is ge 4 12 0 || ewarn "At least kernel 4.12.0 is required"
+}
+
+src_prepare() {
+       eautoreconf
+       default
+}
+
+multilib_src_configure() {
+       # tests fail with LTO enabbled. See bug 865275 and 865279
+       filter-lto
+
+       ECONF_SOURCE=${S} econf \
+               --localstatedir=/var \
+               $(multilib_native_use_enable doc doxygen-doc) \
+               $(use_enable fapi) \
+               $(use_enable policy) \
+               $(use_enable static-libs static) \
+               $(multilib_native_use_enable test unit) \
+               $(multilib_native_use_enable test integration) \
+               $(multilib_native_use_enable test self-generated-certificate) \
+               --disable-tcti-libtpms \
+               --disable-defaultflags \
+               --disable-weakcrypto \
+               --with-crypto="$(usex mbedtls mbed ossl)" \
+               --with-runstatedir=/run \
+               --with-udevrulesdir="$(get_udevdir)/rules.d" \
+               --with-udevrulesprefix=60- \
+               --without-sysusersdir \
+               --with-tmpfilesdir="/usr/lib/tmpfiles.d"
+}
+
+multilib_src_install() {
+       default
+       keepdir /var/lib/tpm2-tss/system/keystore
+       find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+       tmpfiles_process tpm2-tss-fapi.conf
+       udev_reload
+}
+
+pkg_postrm() {
+       udev_reload
+}

Reply via email to