diff mbox series

[4/5] package/gnutls: add optional dependency on brotli, zlib, zstd

Message ID 20220512160116.2011627-4-arnout@mind.be
State Accepted
Headers show
Series [1/5] package/gnutls: disable library search in /usr/lib | expand

Commit Message

Arnout Vandecappelle May 12, 2022, 4:01 p.m. UTC
Version 3.7.4 added compression options with brotli, zlib and zstd.
These are automatically discovered, which makes their inclusion depend
on the build order. Therefore, explicitly enable/disable them.

Note that the configure help text says "--without-brotli" and
"--without-zstd", but the options are actually --without-libbrotli and
--without-libzstd. --without-zlib is correct in the help text.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
NOT for stable since 3.7.3 didn't have these yet.
---
 package/gnutls/gnutls.mk | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

Comments

Yann E. MORIN May 12, 2022, 8:54 p.m. UTC | #1
Arnout, All,

On 2022-05-12 18:01 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly:
> Version 3.7.4 added compression options with brotli, zlib and zstd.
> These are automatically discovered, which makes their inclusion depend
> on the build order. Therefore, explicitly enable/disable them.
> 
> Note that the configure help text says "--without-brotli" and
> "--without-zstd", but the options are actually --without-libbrotli and
> --without-libzstd. --without-zlib is correct in the help text.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
> NOT for stable since 3.7.3 didn't have these yet.
> ---
>  package/gnutls/gnutls.mk | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/package/gnutls/gnutls.mk b/package/gnutls/gnutls.mk
> index 1d997781b0..0210d18597 100644
> --- a/package/gnutls/gnutls.mk
> +++ b/package/gnutls/gnutls.mk
> @@ -46,6 +46,13 @@ GNUTLS_CONF_ENV = gl_cv_socket_ipv6=yes \
>  	gl_cv_func_gettimeofday_clobber=no
>  GNUTLS_INSTALL_STAGING = YES
>  
> +ifeq ($(BR2_PACKAGE_BROTLI),y)
> +GNUTLS_CONF_OPTS += --with-libbrotli
> +GNUTLS_DEPENDENCIES += brotli
> +else
> +GNUTLS_CONF_OPTS += --without-libbrotli
> +endif
> +
>  ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y)
>  GNUTLS_CONF_OPTS += --enable-cryptodev
>  GNUTLS_DEPENDENCIES += cryptodev-linux
> @@ -71,6 +78,20 @@ else
>  GNUTLS_CONF_OPTS += --with-included-unistring
>  endif
>  
> +ifeq ($(BR2_PACKAGE_ZLIB),y)
> +GNUTLS_CONF_OPTS += --with-zlib
> +GNUTLS_DEPENDENCIES += zlib
> +else
> +GNUTLS_CONF_OPTS += --without-zlib
> +endif
> +
> +ifeq ($(BR2_PACKAGE_ZSTD),y)
> +GNUTLS_CONF_OPTS += --with-libzstd
> +GNUTLS_DEPENDENCIES += zstd
> +else
> +GNUTLS_CONF_OPTS += --without-libzstd
> +endif
> +
>  # Provide a default CA cert location
>  ifeq ($(BR2_PACKAGE_P11_KIT),y)
>  GNUTLS_CONF_OPTS += --with-default-trust-store-pkcs11=pkcs11:model=p11-kit-trust
> -- 
> 2.35.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/package/gnutls/gnutls.mk b/package/gnutls/gnutls.mk
index 1d997781b0..0210d18597 100644
--- a/package/gnutls/gnutls.mk
+++ b/package/gnutls/gnutls.mk
@@ -46,6 +46,13 @@  GNUTLS_CONF_ENV = gl_cv_socket_ipv6=yes \
 	gl_cv_func_gettimeofday_clobber=no
 GNUTLS_INSTALL_STAGING = YES
 
+ifeq ($(BR2_PACKAGE_BROTLI),y)
+GNUTLS_CONF_OPTS += --with-libbrotli
+GNUTLS_DEPENDENCIES += brotli
+else
+GNUTLS_CONF_OPTS += --without-libbrotli
+endif
+
 ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y)
 GNUTLS_CONF_OPTS += --enable-cryptodev
 GNUTLS_DEPENDENCIES += cryptodev-linux
@@ -71,6 +78,20 @@  else
 GNUTLS_CONF_OPTS += --with-included-unistring
 endif
 
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+GNUTLS_CONF_OPTS += --with-zlib
+GNUTLS_DEPENDENCIES += zlib
+else
+GNUTLS_CONF_OPTS += --without-zlib
+endif
+
+ifeq ($(BR2_PACKAGE_ZSTD),y)
+GNUTLS_CONF_OPTS += --with-libzstd
+GNUTLS_DEPENDENCIES += zstd
+else
+GNUTLS_CONF_OPTS += --without-libzstd
+endif
+
 # Provide a default CA cert location
 ifeq ($(BR2_PACKAGE_P11_KIT),y)
 GNUTLS_CONF_OPTS += --with-default-trust-store-pkcs11=pkcs11:model=p11-kit-trust