Просмотр исходного кода

package/gnutls: add tpm2-tss optional dependency

tpm2-tss support is available since gnutls 3.7.3 using
--{with,without}-tpm2 configure option [1].

Since the option is not handled by gnutls package, tpm2-tss support
can be enabled if tpm2-tss package is build before gnutls package.

Likewise, tpm2-tss support can be enabled for the gnutls host variant
if tpm2-tss libraries are installed on the host.
Make sure to disable tpm2-tss support for the host-gnutls.

[1] https://lists.gnupg.org/pipermail/gnutls-help/2022-January/004736.html

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Romain Naour 1 год назад
Родитель
Сommit
caff4179a4
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      package/gnutls/gnutls.mk

+ 8 - 0
package/gnutls/gnutls.mk

@@ -57,6 +57,7 @@ HOST_GNUTLS_CONF_OPTS = \
 	--without-librt-prefix \
 	--without-libz-prefix \
 	--without-tpm \
+	--without-tpm2 \
 	--disable-openssl-compatibility \
 	--without-libbrotli \
 	--without-idn \
@@ -98,6 +99,13 @@ else
 GNUTLS_CONF_OPTS += --without-p11-kit
 endif
 
+ifeq ($(BR2_PACKAGE_TPM2_TSS),y)
+GNUTLS_CONF_OPTS += --with-tpm2
+GNUTLS_DEPENDENCIES += tpm2-tss
+else
+GNUTLS_CONF_OPTS += --without-tpm2
+endif
+
 ifeq ($(BR2_PACKAGE_ZLIB),y)
 GNUTLS_CONF_OPTS += --with-zlib
 GNUTLS_DEPENDENCIES += zlib