Skip to contentSkip to conversation

libgcrypt: disable tests

PATCH New Gustavo Zacarias 2 participants 5 messages Dec 26, 2012 – Feb 5, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 libgcrypt: disable tests

The testsuite uses fork() hence fails on !MMU targets. We don't use/install these so just get rid of them.

---
 package/libgcrypt/libgcrypt.mk |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
package/libgcrypt/libgcrypt.mk +8 -1
index a320e48..3aa60c6 100644
@@ -10,6 +10,7 @@ LIBGCRYPT_LICENSE = LGPLv2.1+
 LIBGCRYPT_LICENSE_FILES = COPYING.LIB
 LIBGCRYPT_SITE = ftp://ftp.gnupg.org/gcrypt/libgcrypt
 LIBGCRYPT_INSTALL_STAGING = YES
+LIBGCRYPT_DEPENDENCIES = libgpg-error
 
 LIBGCRYPT_CONF_ENV = \
 	ac_cv_sys_symbol_underscore=no
@@ -17,6 +18,12 @@ LIBGCRYPT_CONF_OPT = \
 	--disable-optimization \
 	--with-gpg-error-prefix=$(STAGING_DIR)/usr
 
-LIBGCRYPT_DEPENDENCIES = libgpg-error
+# Tests use fork()
+define LIBGCRYPT_DISABLE_TESTS
+	$(SED) 's/ tests//' $(@D)/Makefile.in
+endef
+
+LIBGCRYPT_POST_PATCH_HOOKS += LIBGCRYPT_DISABLE_TESTS
+
 
 $(eval $(autotools-package))
Signature · 1 line
1.7.8.6
#1 lore raw

PATCH 2/3 gnutls: make it non-wchar friendly

Make gnutls work for non-wchar toolchains.
It's just a matter of throwing a helping hand to configure.

---
 package/connman/Config.in         |    2 +-
 package/gnutls/Config.in          |    4 ----
 package/gnutls/gnutls.mk          |    5 ++++-
 package/libsoup/Config.in         |    2 +-
 package/network-manager/Config.in |    2 +-
 5 files changed, 7 insertions(+), 8 deletions(-)
package/connman/Config.in +1 -1
index 93f9ab5..4c9741b 100644
@@ -5,7 +5,7 @@ config BR2_PACKAGE_CONNMAN
 	select BR2_PACKAGE_IPTABLES
 	select BR2_PACKAGE_GNUTLS
 	depends on !(BR2_UCLIBC_VERSION_0_9_31 || BR2_UCLIBC_VERSION_0_9_32)
-	depends on BR2_USE_WCHAR # libglib2 and gnutls
+	depends on BR2_USE_WCHAR # libglib2
 	depends on BR2_INET_IPV6
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
 	depends on BR2_USE_MMU # dbus
package/gnutls/Config.in +0 -4
index 556caea..cedf120 100644
@@ -1,12 +1,8 @@
 config BR2_PACKAGE_GNUTLS
 	bool "gnutls"
 	select BR2_PACKAGE_LIBGCRYPT
-	depends on BR2_USE_WCHAR
 	help
 	  GnuTLS is a secure communications library implementing the SSL
 	  and TLS protocols and technologies around them.
 
 	  http://www.gnu.org/software/gnutls/gnutls.html
-
-comment "gnutls requires a toolchain with WCHAR support"
-	depends on !BR2_USE_WCHAR
package/gnutls/gnutls.mk +4 -1
index 2634642..506d7f5 100644
@@ -10,7 +10,10 @@ GNUTLS_SITE = $(BR2_GNU_MIRROR)/gnutls
 GNUTLS_LICENSE = GPLv3+ LGPLv2.1+
 GNUTLS_LICENSE_FILES = COPYING lib/COPYING
 GNUTLS_DEPENDENCIES = host-pkgconf libgcrypt $(if $(BR2_PACKAGE_ZLIB),zlib)
-GNUTLS_CONF_ENV = acl_cv_rpath=no
+GNUTLS_CONF_ENV = acl_cv_rpath=no \
+	ac_cv_header_wchar_h=$(if $(BR2_USE_WCHAR),yes,no) \
+	gt_cv_c_wchar_t=$(if $(BR2_USE_WCHAR),yes,no) \
+	gt_cv_c_wint_t=$(if $(BR2_USE_WCHAR),yes,no)
 GNUTLS_CONF_OPT = --with-libgcrypt --without-libgcrypt-prefix \
 		--without-p11-kit --disable-rpath
 GNUTLS_INSTALL_STAGING = YES
package/libsoup/Config.in +1 -1
index 57b425f..c3b4ceb 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LIBSOUP
 	bool "libsoup"
-	depends on BR2_USE_WCHAR # glib2 and gnutls
+	depends on BR2_USE_WCHAR # glib2
 	select BR2_PACKAGE_LIBXML2
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
package/network-manager/Config.in +1 -1
index e2324d6..f2544da 100644
@@ -4,7 +4,7 @@ config BR2_PACKAGE_NETWORK_MANAGER
 	select BR2_PACKAGE_DBUS
 	depends on BR2_INET_IPV6
 	depends on BR2_LARGEFILE # acl
-	depends on BR2_USE_WCHAR # libglib2 and gnutls
+	depends on BR2_USE_WCHAR # libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
 	depends on BR2_USE_MMU # dbus
 	select BR2_PACKAGE_DBUS_GLIB
Signature · 1 line
1.7.8.6
#2 lore raw

PATCH 2/3 gnutls: make it non-wchar friendly

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> Make gnutls work for non-wchar toolchains. Gustavo> It's just a matter of throwing a helping hand to configure.

While this makes gnutls build, it doesn't actually work as there's no rpl_wctomb implementation so the .so ends up with an undefined reference to wctomb:

./host/usr/bin/arm-linux-nm -D staging/usr/lib/libgnutls.so.28|grep wctomb
U wctomb

Causing linker errors for packages trying to use it:

CCLD msmtp
host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libgnutls.so: undefined reference to `wctomb'
collect2: ld returned 1 exit status

So I'll have to revert this.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 3/3 libmicrohttpd: bump to version 0.9.24

In reply to Gustavo Zacarias
---
 package/libmicrohttpd/Config.in        |    5 +++++
 package/libmicrohttpd/libmicrohttpd.mk |    8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)
package/libmicrohttpd/Config.in +5 -0
index cfedc8f..4e78a99 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LIBMICROHTTPD
 	bool "libmicrohttpd"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
 	help
 	  GNU libmicrohttpd is a small C library that makes it easy to
 	  run an HTTP server as part of another application.
@@ -9,6 +10,10 @@ config BR2_PACKAGE_LIBMICROHTTPD
 config BR2_PACKAGE_LIBMICROHTTPD_SSL
        bool "https support"
        depends on BR2_PACKAGE_LIBMICROHTTPD
+       select BR2_PACKAGE_GNUTLS
        select BR2_PACKAGE_LIBGCRYPT
        help
          Enable HTTPS (SSL) support.
+
+comment "libmicrohttpd needs a toolchain with thread support"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
package/libmicrohttpd/libmicrohttpd.mk +4 -4
index f8690ee..cf84b2d 100644
@@ -3,14 +3,14 @@
 # libmicrohttpd
 #
 #############################################################
-LIBMICROHTTPD_VERSION = 0.4.6
-LIBMICROHTTPD_SOURCE = libmicrohttpd-$(LIBMICROHTTPD_VERSION).tar.gz
+
+LIBMICROHTTPD_VERSION = 0.9.24
 LIBMICROHTTPD_SITE = $(BR2_GNU_MIRROR)/libmicrohttpd
 LIBMICROHTTPD_INSTALL_STAGING = YES
 
 ifeq ($(BR2_PACKAGE_LIBMICROHTTPD_SSL),y)
-LIBMICROHTTPD_DEPENDENCIES += libgcrypt
-LIBMICROHTTPD_CONF_OPT += --enable-https \
+LIBMICROHTTPD_DEPENDENCIES += gnutls libgcrypt
+LIBMICROHTTPD_CONF_OPT += --enable-https --with-gnutls=$(STAGING_DIR)/usr \
 			  --with-libgcrypt-prefix=$(STAGING_DIR)/usr
 else
 LIBMICROHTTPD_CONF_OPT += --disable-https
Signature · 1 line
1.7.8.6
#4 lore raw

PATCH 1/3 libgcrypt: disable tests

In reply to Gustavo Zacarias
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> The testsuite uses fork() hence fails on !MMU targets. Gustavo> We don't use/install these so just get rid of them.

Committed all 3, thanks.

Signature · 1 line
Bye, Peter Korsgaard