diff mbox series

[5/5] package/gnutls: libunistring is not optional

Message ID 20220512160116.2011627-5-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
Since the very beginning, libunistring was a mandatory dependency of
gnutls. However, it would use its internal copy if libunistring was not
selected. We never want that, so make libunistring an actual mandatory
dependency.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/gnutls/Config.in | 5 ++---
 package/gnutls/gnutls.mk | 9 ++-------
 2 files changed, 4 insertions(+), 10 deletions(-)

Comments

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

On 2022-05-12 18:01 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly:
> Since the very beginning, libunistring was a mandatory dependency of
> gnutls. However, it would use its internal copy if libunistring was not
> selected. We never want that, so make libunistring an actual mandatory
> dependency.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
>  package/gnutls/Config.in | 5 ++---
>  package/gnutls/gnutls.mk | 9 ++-------
>  2 files changed, 4 insertions(+), 10 deletions(-)
> 
> diff --git a/package/gnutls/Config.in b/package/gnutls/Config.in
> index 28982b15a1..b3f9f5420b 100644
> --- a/package/gnutls/Config.in
> +++ b/package/gnutls/Config.in
> @@ -2,10 +2,9 @@ config BR2_PACKAGE_GNUTLS
>  	bool "gnutls"
>  	# https://gitlab.com/gnutls/gnutls/issues/203
>  	depends on !BR2_STATIC_LIBS
> -	# gnulib requires a library that implements wctomb().
> -	# This is noticed only when linking with libgnutls.so.
> -	depends on BR2_USE_WCHAR
> +	depends on BR2_USE_WCHAR # libunistring

In  fact, the wchar dependency is for gnutls itself; the source code is
littered with wchar_t everywhere, so I jsut dropped the comment.

Applied to master, thanks.

Regards,
Yann E. MORIN.

>  	select BR2_PACKAGE_LIBTASN1
> +	select BR2_PACKAGE_LIBUNISTRING
>  	select BR2_PACKAGE_NETTLE
>  	help
>  	  GnuTLS is a secure communications library implementing the SSL
> diff --git a/package/gnutls/gnutls.mk b/package/gnutls/gnutls.mk
> index 0210d18597..89ab9b9476 100644
> --- a/package/gnutls/gnutls.mk
> +++ b/package/gnutls/gnutls.mk
> @@ -17,7 +17,7 @@ GNUTLS_LICENSE += , GPL-3.0+ (gnutls-openssl library)
>  GNUTLS_LICENSE_FILES += doc/COPYING
>  endif
>  
> -GNUTLS_DEPENDENCIES = host-pkgconf libtasn1 nettle
> +GNUTLS_DEPENDENCIES = host-pkgconf libtasn1 libunistring nettle
>  GNUTLS_CPE_ID_VENDOR = gnu
>  GNUTLS_CONF_OPTS = \
>  	--disable-doc \
> @@ -25,6 +25,7 @@ GNUTLS_CONF_OPTS = \
>  	--disable-libdane \
>  	--disable-rpath \
>  	--disable-tests \
> +	--without-included-unistring \
>  	--without-libcrypto-prefix \
>  	--without-libdl-prefix \
>  	--without-libev-prefix \
> @@ -72,12 +73,6 @@ else
>  GNUTLS_CONF_OPTS += --without-p11-kit
>  endif
>  
> -ifeq ($(BR2_PACKAGE_LIBUNISTRING),y)
> -GNUTLS_DEPENDENCIES += libunistring
> -else
> -GNUTLS_CONF_OPTS += --with-included-unistring
> -endif
> -
>  ifeq ($(BR2_PACKAGE_ZLIB),y)
>  GNUTLS_CONF_OPTS += --with-zlib
>  GNUTLS_DEPENDENCIES += zlib
> -- 
> 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/Config.in b/package/gnutls/Config.in
index 28982b15a1..b3f9f5420b 100644
--- a/package/gnutls/Config.in
+++ b/package/gnutls/Config.in
@@ -2,10 +2,9 @@  config BR2_PACKAGE_GNUTLS
 	bool "gnutls"
 	# https://gitlab.com/gnutls/gnutls/issues/203
 	depends on !BR2_STATIC_LIBS
-	# gnulib requires a library that implements wctomb().
-	# This is noticed only when linking with libgnutls.so.
-	depends on BR2_USE_WCHAR
+	depends on BR2_USE_WCHAR # libunistring
 	select BR2_PACKAGE_LIBTASN1
+	select BR2_PACKAGE_LIBUNISTRING
 	select BR2_PACKAGE_NETTLE
 	help
 	  GnuTLS is a secure communications library implementing the SSL
diff --git a/package/gnutls/gnutls.mk b/package/gnutls/gnutls.mk
index 0210d18597..89ab9b9476 100644
--- a/package/gnutls/gnutls.mk
+++ b/package/gnutls/gnutls.mk
@@ -17,7 +17,7 @@  GNUTLS_LICENSE += , GPL-3.0+ (gnutls-openssl library)
 GNUTLS_LICENSE_FILES += doc/COPYING
 endif
 
-GNUTLS_DEPENDENCIES = host-pkgconf libtasn1 nettle
+GNUTLS_DEPENDENCIES = host-pkgconf libtasn1 libunistring nettle
 GNUTLS_CPE_ID_VENDOR = gnu
 GNUTLS_CONF_OPTS = \
 	--disable-doc \
@@ -25,6 +25,7 @@  GNUTLS_CONF_OPTS = \
 	--disable-libdane \
 	--disable-rpath \
 	--disable-tests \
+	--without-included-unistring \
 	--without-libcrypto-prefix \
 	--without-libdl-prefix \
 	--without-libev-prefix \
@@ -72,12 +73,6 @@  else
 GNUTLS_CONF_OPTS += --without-p11-kit
 endif
 
-ifeq ($(BR2_PACKAGE_LIBUNISTRING),y)
-GNUTLS_DEPENDENCIES += libunistring
-else
-GNUTLS_CONF_OPTS += --with-included-unistring
-endif
-
 ifeq ($(BR2_PACKAGE_ZLIB),y)
 GNUTLS_CONF_OPTS += --with-zlib
 GNUTLS_DEPENDENCIES += zlib