From bd6af1944ccbf81a3d43df39ecc45e874493b87f Mon Sep 17 00:00:00 2001 From: Salah Coronya Date: Thu, 24 Sep 2020 13:40:32 -0500 Subject: [PATCH] app-crypt/tpm2-pkcs11: Remove -WError, fix clang compile Closes: https://bugs.gentoo.org/744439 Closes: https://bugs.gentoo.org/744457 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Salah Coronya Closes: https://github.com/gentoo/gentoo/pull/17653 Signed-off-by: Joonas Niilola --- .../files/tpm2-pkcs11-1.3.2-Remove-WError.patch | 12 ++++++++++++ app-crypt/tpm2-pkcs11/tpm2-pkcs11-1.3.2.ebuild | 13 ++++++++++++- app-crypt/tpm2-pkcs11/tpm2-pkcs11-1.4.0.ebuild | 11 ++++++++++- 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 app-crypt/tpm2-pkcs11/files/tpm2-pkcs11-1.3.2-Remove-WError.patch diff --git a/app-crypt/tpm2-pkcs11/files/tpm2-pkcs11-1.3.2-Remove-WError.patch b/app-crypt/tpm2-pkcs11/files/tpm2-pkcs11-1.3.2-Remove-WError.patch new file mode 100644 index 0000000000000..7aae19c7c71fe --- /dev/null +++ b/app-crypt/tpm2-pkcs11/files/tpm2-pkcs11-1.3.2-Remove-WError.patch @@ -0,0 +1,12 @@ +diff --git a/configure.ac b/configure.ac +index 3088817..d789ce9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -460,7 +460,6 @@ AS_IF([test x"$enable_hardening" != xno], [ + + add_hardened_c_flag([-Wall]) + add_hardened_c_flag([-Wextra]) +- add_hardened_c_flag([-Werror]) + + add_hardened_c_flag([-Wformat]) + add_hardened_c_flag([-Wformat-security]) diff --git a/app-crypt/tpm2-pkcs11/tpm2-pkcs11-1.3.2.ebuild b/app-crypt/tpm2-pkcs11/tpm2-pkcs11-1.3.2.ebuild index eacca8899f543..6e609d4e5f462 100644 --- a/app-crypt/tpm2-pkcs11/tpm2-pkcs11-1.3.2.ebuild +++ b/app-crypt/tpm2-pkcs11/tpm2-pkcs11-1.3.2.ebuild @@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{7,8} ) DISTUTILS_USE_SETUPTOOLS=rdepend PYTHON_REQ_USE="sqlite" -inherit distutils-r1 +inherit autotools distutils-r1 DESCRIPTION="A PKCS#11 interface for TPM2 hardware" HOMEPAGE="https://tpm2-software.github.io/" @@ -35,7 +35,18 @@ DEPEND="${RDEPEND}" BDEPEND="sys-devel/autoconf-archive virtual/pkgconfig" +PATCHES=( + "$FILESDIR/${PN}-1.3.2-Remove-WError.patch" + ) + +src_prepare() { + default + eautoreconf +} + src_configure() { +# we need the default version of src_configure, not the one exported +# by distutils-r1 default } diff --git a/app-crypt/tpm2-pkcs11/tpm2-pkcs11-1.4.0.ebuild b/app-crypt/tpm2-pkcs11/tpm2-pkcs11-1.4.0.ebuild index be28c64da7ec5..b413d95cb6a4b 100644 --- a/app-crypt/tpm2-pkcs11/tpm2-pkcs11-1.4.0.ebuild +++ b/app-crypt/tpm2-pkcs11/tpm2-pkcs11-1.4.0.ebuild @@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{7,8} ) DISTUTILS_USE_SETUPTOOLS=rdepend PYTHON_REQ_USE="sqlite" -inherit distutils-r1 +inherit autotools distutils-r1 DESCRIPTION="A PKCS#11 interface for TPM2 hardware" HOMEPAGE="https://tpm2-software.github.io/" @@ -38,6 +38,15 @@ DEPEND="${RDEPEND}" BDEPEND="sys-devel/autoconf-archive virtual/pkgconfig" +PATCHES=( + "$FILESDIR/${PN}-1.3.2-Remove-WError.patch" + ) + +src_prepare() { + default + eautoreconf +} + src_configure() { econf \ $(use_enable fapi)