summaryrefslogtreecommitdiffstats
path: root/src/gnutls-1-fixes.patch
blob: 6b83c577fd51e9603df12415f1e17c2036ebf77c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
This file is part of MXE. See LICENSE.md for licensing information.

Contains ad hoc patches for cross building.

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] 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: http://www.gnutls.org/
 Version: @VERSION@
 Libs: -L${libdir} -lgnutls
-Libs.private: @LIBZ_PC@ @LIBINTL@ @LIBSOCKET@ @LIBNSL@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBIDN2_LIBS@
+Libs.private: @LIBZ_PC@ @LIBINTL@ @LIBSOCKET@ @LIBNSL@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @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: Mon, 24 Nov 2014 08:56:48 +0100
Subject: [PATCH] windows build fix: ws2tcpip.h supplies inet_ntop

Follow-up to 492c2b937ab66134d0b37499a6f3a747e19bc31a

Signed-off-by: Mark Brand <mabrand@mabrand.nl>

taken from: http://lists.gnutls.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
@@ -26,7 +26,11 @@
 #include <gnutls/x509.h>
 
 #ifdef HAVE_INET_NTOP
-# include <arpa/inet.h>
+# ifdef _WIN32
+#  include <ws2tcpip.h>
+# else
+#  include <arpa/inet.h>
+# endif
 #endif
 
 /*-

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Tue, 2 May 2017 23:52:16 +0200
Subject: [PATCH] gnutls.pc: hardcode -lunistring -liconv

See https://github.com/mxe/mxe/issues/1753#issuecomment-298772548

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@ @LIBUNISTRING@ @LIBIDN2_LIBS@ -lcrypt32
+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}