diff options
author | Mark Brand <mabrand@mabrand.nl> | 2017-05-07 22:22:46 (GMT) |
---|---|---|
committer | Mark Brand <mabrand@mabrand.nl> | 2017-05-20 08:53:02 (GMT) |
commit | 49fee79736a186f3301deabe0b818137a9e15afd (patch) | |
tree | 1e487f78d91bebdf63d3f08ace04d928d5428c77 /src/gnutls-1-fixes.patch | |
parent | b326d3fd7bd9beaf6b323a38b2513fc4f06371c5 (diff) | |
download | mxe-49fee79736a186f3301deabe0b818137a9e15afd.zip mxe-49fee79736a186f3301deabe0b818137a9e15afd.tar.gz mxe-49fee79736a186f3301deabe0b818137a9e15afd.tar.bz2 |
let gnutls use libidn2
Gnutls is supposed to be able to detect and use libidn2, but it
tries to do this without pkg-config, in a way that doesn't
consider transitive dependencies. Using pkg-config with libidn2.pc
seems to work okay with MXE's version of libidn2.
Diffstat (limited to 'src/gnutls-1-fixes.patch')
-rw-r--r-- | src/gnutls-1-fixes.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/gnutls-1-fixes.patch b/src/gnutls-1-fixes.patch index 239525c..6b83c57 100644 --- a/src/gnutls-1-fixes.patch +++ b/src/gnutls-1-fixes.patch @@ -69,3 +69,61 @@ index 1111111..2222222 100644 +Libs.private: @LIBZ_PC@ @LIBINTL@ @LIBSOCKET@ @LIBNSL@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ -lunistring -liconv @LIBIDN2_LIBS@ -lcrypt32 @GNUTLS_REQUIRES_PRIVATE@ Cflags: -I${includedir} + +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] let gnutls configure detect libidn2 + + +diff --git a/configure.ac b/configure.ac +index 1111111..2222222 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -483,24 +483,19 @@ with_libidn=no + if test "$try_libidn" = yes;then + + if test "$try_libidn2" = yes;then +- AC_SEARCH_LIBS(idn2_lookup_u8, idn2, [ +- with_libidn2=yes; ++ 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.]) +- AC_SUBST([LIBIDN_LIBS], [-lidn2]) +- 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; ++ 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) +- ]) +- else +- with_libidn2=no ++ fi + fi + + if test "$with_libidn2" = "no"; then +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: http://www.gnutls.org/ + Version: @VERSION@ + Libs: -L${libdir} -lgnutls +-Libs.private: @LIBZ_PC@ @LIBINTL@ @LIBSOCKET@ @LIBNSL@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ -lunistring -liconv @LIBIDN2_LIBS@ -lcrypt32 ++Libs.private: @LIBZ_PC@ @LIBINTL@ @LIBSOCKET@ @LIBNSL@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ -lunistring -liconv -lcrypt32 + @GNUTLS_REQUIRES_PRIVATE@ + Cflags: -I${includedir} |