[vlc-devel] [PATCH] contrib: gnutls: enable pkconfig detection of libidn2 for Windows targets
Steve Lhomme
robux4 at ycbcr.xyz
Fri Mar 23 09:25:49 CET 2018
Otherwise it doesn't link properly under mingw64
---
contrib/src/gnutls/gnutls-libidn2.patch | 20 ++++++++++++++++++++
contrib/src/gnutls/rules.mak | 3 +++
2 files changed, 23 insertions(+)
create mode 100644 contrib/src/gnutls/gnutls-libidn2.patch
diff --git a/contrib/src/gnutls/gnutls-libidn2.patch b/contrib/src/gnutls/gnutls-libidn2.patch
new file mode 100644
index 0000000000..f21903069d
--- /dev/null
+++ b/contrib/src/gnutls/gnutls-libidn2.patch
@@ -0,0 +1,20 @@
+--- gnutls/configure.ac 2017-10-21 02:16:51.000000000 +0200
++++ gnutls/configure.ac.libidn2pc 2018-03-23 09:15:40.837415600 +0100
+@@ -495,12 +495,11 @@ if test "$try_libidn" = yes;then
+ 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
++ if test "x$GNUTLS_REQUIRES_PRIVATE" = "x"; then
++ GNUTLS_REQUIRES_PRIVATE="Requires.private: libidn2"
++ else
++ GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, libidn2"
++ fi
+ ],[
+ with_libidn2=no;
+ AC_MSG_WARN(*** LIBIDN2 was not found. You will not be able to use IDN2008 support)
diff --git a/contrib/src/gnutls/rules.mak b/contrib/src/gnutls/rules.mak
index dfc31eec6f..6f3eb8e8ee 100644
--- a/contrib/src/gnutls/rules.mak
+++ b/contrib/src/gnutls/rules.mak
@@ -38,6 +38,9 @@ ifdef HAVE_MACOSX
$(APPLY) $(SRC)/gnutls/gnutls-disable-connectx-macos.patch
endif
$(APPLY) $(SRC)/gnutls/gnutls-libidn.patch
+ifdef HAVE_WIN32
+ $(APPLY) $(SRC)/gnutls/gnutls-libidn2.patch
+endif
$(call pkg_static,"lib/gnutls.pc.in")
$(UPDATE_AUTOCONFIG)
$(MOVE)
--
2.16.2
More information about the vlc-devel
mailing list