changeset 5450:8bede4ae3bc6

Update gnutls to v3.6.14 * src/gnutls-1-fixes.patch: update patch * src/gnutls.mk: update version/checksum, simply build rule
author John Donoghue <john.donoghue@ieee.org>
date Fri, 05 Jun 2020 09:10:32 -0400
parents c12e2cbdd9c9
children a92a992c7697
files src/gnutls-1-fixes.patch src/gnutls.mk
diffstat 2 files changed, 26 insertions(+), 135 deletions(-) [+]
line wrap: on
line diff
--- a/src/gnutls-1-fixes.patch	Fri Jun 05 08:24:35 2020 -0400
+++ b/src/gnutls-1-fixes.patch	Fri Jun 05 09:10:32 2020 -0400
@@ -4,126 +4,15 @@
 
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
-Date: Mon, 4 Feb 2013 16:11:12 +0100
-Subject: [PATCH 1/4] add missing private lib to pc file
-
-
-diff --git a/lib/gnutls.pc.in b/lib/gnutls.pc.in
-index 1111111..2222222 100644
---- a/lib/gnutls.pc.in
-+++ b/lib/gnutls.pc.in
-@@ -19,6 +19,6 @@ Description: Transport Security Layer implementation for the GNU system
- URL: https://www.gnutls.org/
- Version: @VERSION@
- Libs: -L${libdir} -lgnutls
--Libs.private: @LIBINTL@ @LIBSOCKET@ @INET_PTON_LIB@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBIDN2_LIBS@ @LIBATOMIC_LIBS@
-+Libs.private: @LIBINTL@ @LIBSOCKET@ @INET_PTON_LIB@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBIDN2_LIBS@ @LIBATOMIC_LIBS@ -lcrypt32
- @GNUTLS_REQUIRES_PRIVATE@
- Cflags: -I${includedir}
-
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Mark Brand <mabrand@mabrand.nl>
-Date: Mon, 24 Nov 2014 08:56:48 +0100
-Subject: [PATCH 2/4] windows build fix: ws2tcpip.h supplies inet_ntop
-
-Follow-up to 492c2b937ab66134d0b37499a6f3a747e19bc31a
-
-Signed-off-by: Mark Brand <mabrand@mabrand.nl>
-
-taken from: https://lists.gnupg.org/pipermail/gnutls-devel/2014-November/007250.html
-
-diff --git a/lib/x509/ip.c b/lib/x509/ip.c
-index 1111111..2222222 100644
---- a/lib/x509/ip.c
-+++ b/lib/x509/ip.c
-@@ -24,7 +24,11 @@
- #include "gnutls_int.h"
- #include "ip.h"
- #include <gnutls/x509.h>
--#include <arpa/inet.h>
-+#ifdef _WIN32
-+# include <ws2tcpip.h>
-+#else
-+# include <arpa/inet.h>
-+#endif
- 
- /*-
-  * _gnutls_mask_to_prefix:
-
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Mark Brand <mabrand@mabrand.nl>
-Date: Sun, 7 May 2017 20:17:13 +0200
-Subject: [PATCH 3/4] let gnutls configure detect libidn2
+Date: Thu, 6 Dec 2018 10:36:30 +0100
+Subject: [PATCH 1/1] remove docs from configure.ac: avoid GTK_DOC dependencies
 
 
 diff --git a/configure.ac b/configure.ac
 index 1111111..2222222 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -511,26 +511,19 @@ idna_support=no
- with_libidn2=no
- 
- if test "$try_libidn2" = yes;then
--    save_LIBS=$LIBS
--    AC_SEARCH_LIBS(idn2_lookup_u8, idn2, [
--      with_libidn2=yes;
--      idna_support="IDNA 2008 (libidn2)"
--      AC_DEFINE([HAVE_LIBIDN2], 1, [Define if IDNA 2008 support is enabled.])
--      AC_SUBST([LIBIDN2_CFLAGS], [])
--      AC_SUBST([LIBIDN2_LIBS], [-lidn2]) dnl used in gnutls.pc.in
--dnl enable once libidn2.pc is widespread; and remove LIBIDN2_LIBS from gnutls.pc.in (Libs.private)
--dnl      if test "x$GNUTLS_REQUIRES_PRIVATE" = "x"; then
--dnl        GNUTLS_REQUIRES_PRIVATE="Requires.private: libidn2"
--dnl      else
--dnl        GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, libidn2"
--dnl      fi
--    ],[
--      with_libidn2=no;
--      AC_MSG_WARN(*** LIBIDN2 was not found. You will not be able to use IDN2008 support)
--    ])
--    LIBS=$save_LIBS
--else
--  with_libidn2=no
-+  PKG_CHECK_MODULES(LIBIDN2, libidn2, [with_libidn2=yes], [with_libidn2=no])
-+  if test "$with_libidn2" != "no";then
-+    idna_support="IDNA 2008 (libidn2)"
-+
-+    AC_DEFINE([HAVE_LIBIDN2], 1, [Define if IDNA 2008 support is enabled.])
-+    if test "x$GNUTLS_REQUIRES_PRIVATE" = "x"; then
-+      GNUTLS_REQUIRES_PRIVATE="Requires.private: libidn2"
-+    else
-+      GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, libidn2"
-+    fi
-+  else
-+    AC_MSG_WARN(*** LIBIDN2 was not found. You will not be able to use IDN2008 support)
-+ fi
- fi
- 
- AM_CONDITIONAL(HAVE_LIBIDN2, test "$with_libidn2" != "no")
-diff --git a/lib/gnutls.pc.in b/lib/gnutls.pc.in
-index 1111111..2222222 100644
---- a/lib/gnutls.pc.in
-+++ b/lib/gnutls.pc.in
-@@ -19,6 +19,6 @@ Description: Transport Security Layer implementation for the GNU system
- URL: https://www.gnutls.org/
- Version: @VERSION@
- Libs: -L${libdir} -lgnutls
--Libs.private: @LIBINTL@ @LIBSOCKET@ @INET_PTON_LIB@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBIDN2_LIBS@ @LIBATOMIC_LIBS@ -lcrypt32
-+Libs.private: @LIBINTL@ @LIBSOCKET@ @INET_PTON_LIB@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBATOMIC_LIBS@ -lcrypt32
- @GNUTLS_REQUIRES_PRIVATE@
- Cflags: -I${includedir}
-
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Mark Brand <mabrand@mabrand.nl>
-Date: Thu, 6 Dec 2018 10:36:30 +0100
-Subject: [PATCH 4/4] remove docs from configure.ac: avoid GTK_DOC dependencies
-
-
-diff --git a/configure.ac b/configure.ac
-index 1111111..2222222 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -946,17 +946,6 @@ AC_SUBST([YEAR], $YEAR)
+@@ -1145,17 +1145,6 @@ AC_DEFINE_UNQUOTED([INI_START_COMMENT_PREFIXES], [";#"], [The comment prefixes])
  AC_CONFIG_FILES([guile/pre-inst-guile], [chmod +x guile/pre-inst-guile])
  AC_CONFIG_FILES([
    Makefile
@@ -141,3 +30,16 @@
    extra/Makefile
    extra/includes/Makefile
    libdane/Makefile
+
+diff -ur gnutls-3.6.14.orig/lib/Makefile.am gnutls-3.6.14/lib/Makefile.am
+--- gnutls-3.6.14.orig/lib/Makefile.am	2020-06-03 15:36:52.735849576 -0400
++++ gnutls-3.6.14/lib/Makefile.am	2020-06-05 09:01:14.649375795 -0400
+@@ -151,7 +151,7 @@
+ 	auth/libgnutls_auth.la algorithms/libgnutls_alg.la \
+ 	extras/libgnutls_extras.la
+ thirdparty_libadd = $(LTLIBZ) $(LTLIBINTL) $(LIBSOCKET) $(LTLIBNSL) \
+-	$(P11_KIT_LIBS) $(LIB_SELECT) $(LIB_CRYPT32)
++	$(P11_KIT_LIBS) $(LIB_SELECT) $(LIB_CRYPT32) $(LIBNCRYPT)
+ 
+ if HAVE_LIBIDN2
+ thirdparty_libadd += $(LIBIDN2_LIBS)
--- a/src/gnutls.mk	Fri Jun 05 08:24:35 2020 -0400
+++ b/src/gnutls.mk	Fri Jun 05 09:10:32 2020 -0400
@@ -2,13 +2,13 @@
 # See index.html for further information.
 
 PKG             := gnutls
-$(PKG)_VERSION  := 3.6.13
-$(PKG)_CHECKSUM := 0d3d0d093d6a7cf589612a7c21dbb46cb31c644b
+$(PKG)_VERSION  := 3.6.14
+$(PKG)_CHECKSUM := bea1b5abcb691acf014e592f41d0a9580a41216a
 $(PKG)_SUBDIR   := gnutls-$($(PKG)_VERSION)
 $(PKG)_FILE     := gnutls-$($(PKG)_VERSION).tar.xz
 $(PKG)_URL      := ftp://ftp.gnutls.org/gcrypt/gnutls/v3.6/$($(PKG)_FILE)
 $(PKG)_URL_2    := https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gnutls/v3.6/$($(PKG)_FILE)
-$(PKG)_DEPS     := gettext libidn2 libunistring nettle pcre zlib
+$(PKG)_DEPS     := gettext gmp libidn2 libtasn1 libunistring nettle zlib
 
 define $(PKG)_UPDATE
     $(WGET) -q -O- https://gnupg.org/ftp/gcrypt/gnutls/v3.6/ | \
@@ -18,7 +18,7 @@
 endef
 
 $(PKG)_WINDOWS_CONFIGURE_OPTIONS := \
-   CPPFLAGS='-D_WIN32_WINNT=0x0600'
+   CPPFLAGS='-D_WIN32_WINNT=0x0600' --disable-rpath 
 
 ifeq ($(MXE_SYSTEM),mingw)
   $(PKG)_CONFIGURE_OPTIONS := $($(PKG)_WINDOWS_CONFIGURE_OPTIONS)
@@ -28,14 +28,9 @@
 endif
 
 define $(PKG)_BUILD
-    $(SED) -i 's, sed , $(SED) ,g' '$(1)/gl/tests/Makefile.am'
-    cd '$(1)' && autoreconf -fi  -I m4 -I src/libopts/m4
-    if [ "$(MXE_NATIVE_BUILD)" = no ]; then \
-      $(SED) -i 's/libopts_cv_with_libregex=no/libopts_cv_with_libregex=yes/g;' '$(1)/configure'; \
-    fi
-    # AI_ADDRCONFIG referenced by src/serv.c but not provided by mingw.
-    # Value taken from http://msdn.microsoft.com/en-us/library/windows/desktop/ms737530%28v=vs.85%29.aspx
-    cd '$(1)' && ./configure \
+    mkdir '$(1)/.build'
+    cd '$(1)' && autoreconf -fi 
+    cd '$(1)/.build' && ../configure \
         $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \
         $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
         $(ENABLE_SHARED_OR_STATIC) \
@@ -44,18 +39,12 @@
         --disable-guile \
         --disable-doc \
         --disable-tests \
-        --with-included-libtasn1 \
-        --with-libregex='$(HOST_PREFIX)' \
-        --with-regex-header=pcreposix.h \
-        --with-libregex-cflags="`$(MXE_PKG_CONFIG) libpcreposix --cflags`" \
-        --with-libregex-libs="`$(MXE_PKG_CONFIG) libpcreposix --libs`" \
-        --with-included-libcfg \
         --enable-local-libopts \
         --without-p11-kit \
         --disable-silent-rules \
         $($(PKG)_CONFIGURE_OPTIONS) \
-        ac_cv_prog_AR='$(MXE_AR)' && $(CONFIGURE_POST_HOOK)
+        && $(CONFIGURE_POST_HOOK)
 
-    $(MAKE) -C '$(1)' -j '$(JOBS)'
-    $(MAKE) -C '$(1)' -j 1 install DESTDIR='$(3)'
+    $(MAKE) -C '$(1)/.build' -j '$(JOBS)'
+    $(MAKE) -C '$(1)/.build' -j 1 install DESTDIR='$(3)'
 endef