From aec95f5d31e5e85246f4532a882d8fc4213e4465 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 23 Feb 2022 01:16:13 +0000 Subject: app-crypt/tpm2-tss: add safeguard for bad .pc file version Bug: https://bugs.gentoo.org/833887 Bug: https://bugs.gentoo.org/833907 Bug: https://bugs.gentoo.org/833884 Bug: https://bugs.gentoo.org/833388 Signed-off-by: Sam James --- app-crypt/tpm2-tss/tpm2-tss-3.2.0-r1.ebuild | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app-crypt') diff --git a/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r1.ebuild b/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r1.ebuild index 4f8e544d9a79..bc7284c68a56 100644 --- a/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r1.ebuild +++ b/app-crypt/tpm2-tss/tpm2-tss-3.2.0-r1.ebuild @@ -49,9 +49,12 @@ pkg_setup() { src_prepare() { default + + # See bug #833887 (and similar); eautoreconf means .pc file gets wrong version. sed -i \ "s/m4_esyscmd_s(\[git describe --tags --always --dirty\])/${PV}/" \ "configure.ac" || die + eautoreconf } @@ -77,6 +80,12 @@ src_configure() { src_install() { default + + if [[ ${PV} != $(sed -n -e 's/^Version: //p' "${ED}/usr/$(get_libdir)/pkgconfig/tss2-sys.pc" || die) ]] ; then + # Safeguard for bug #833887 + die "pkg-config file version doesn't match ${PV}! Please report a bug!" + fi + find "${D}" -name '*.la' -delete || die } -- cgit v1.2.3-65-gdbad