summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-03-01 15:46:35 +0200
committerSebastian Dröge <sebastian@centricular.com>2016-03-01 15:46:35 +0200
commit80a54438808eef95abe410bb30470fdde94c5c3b (patch)
tree8c631327fa5aacf4d6ea14b8c336a679d8597099
parent551f0d41809ea06064aae3fe88e966be9a744d11 (diff)
gnutls: Stop using weak linked _gnutls_global_init_skip() in library constructor
It fails on Windows, see https://gitlab.com/gnutls/gnutls/issues/74 https://bugzilla.gnome.org/show_bug.cgi?id=762921
-rw-r--r--recipes/gnutls.recipe3
-rw-r--r--recipes/gnutls/0001-configure-vasprintf-is-defined-in-stdio.h.patch4
-rw-r--r--recipes/gnutls/0002-configure-Android-is-ELF-too.patch4
-rw-r--r--recipes/gnutls/0003-Disable-ncrypt-support.patch4
-rw-r--r--recipes/gnutls/0004-Stop-using-weak-linked-_gnutls_global_init_skip-in-l.patch44
5 files changed, 52 insertions, 7 deletions
diff --git a/recipes/gnutls.recipe b/recipes/gnutls.recipe
index b41aea49..8ba2b709 100644
--- a/recipes/gnutls.recipe
+++ b/recipes/gnutls.recipe
@@ -23,7 +23,8 @@ class Recipe(recipe.Recipe):
}
patches = [name + "/0001-configure-vasprintf-is-defined-in-stdio.h.patch",
name + "/0002-configure-Android-is-ELF-too.patch",
- name + "/0003-Disable-ncrypt-support.patch"]
+ name + "/0003-Disable-ncrypt-support.patch",
+ name + "/0004-Stop-using-weak-linked-_gnutls_global_init_skip-in-l.patch"]
autoreconf = True
files_libs = ['libgnutls', 'libgnutlsxx']
diff --git a/recipes/gnutls/0001-configure-vasprintf-is-defined-in-stdio.h.patch b/recipes/gnutls/0001-configure-vasprintf-is-defined-in-stdio.h.patch
index 9295342e..5266b780 100644
--- a/recipes/gnutls/0001-configure-vasprintf-is-defined-in-stdio.h.patch
+++ b/recipes/gnutls/0001-configure-vasprintf-is-defined-in-stdio.h.patch
@@ -1,7 +1,7 @@
-From c6e88515b90df7240a23fb66320a544ca3d24adc Mon Sep 17 00:00:00 2001
+From a6dca58b1379edd0a716bc2cb2448db28236d8cd Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Tue, 31 Mar 2015 15:57:59 +0530
-Subject: [PATCH 1/3] configure: vasprintf is defined in stdio.h
+Subject: [PATCH 1/4] configure: vasprintf is defined in stdio.h
mingw requires you to include stdio to make vasprintf available. Without this,
compilation using mingw fails due to redefinition of asprintf.
diff --git a/recipes/gnutls/0002-configure-Android-is-ELF-too.patch b/recipes/gnutls/0002-configure-Android-is-ELF-too.patch
index e13059f1..6ee3cff2 100644
--- a/recipes/gnutls/0002-configure-Android-is-ELF-too.patch
+++ b/recipes/gnutls/0002-configure-Android-is-ELF-too.patch
@@ -1,7 +1,7 @@
-From 6aa766813b4c93458dfbfe0e62590ba76cea3ec7 Mon Sep 17 00:00:00 2001
+From db06b9322de28af1c868a9d4dab2728f6515b996 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
Date: Wed, 24 Feb 2016 12:42:26 +0200
-Subject: [PATCH 2/3] configure: Android is ELF too
+Subject: [PATCH 2/4] configure: Android is ELF too
---
configure.ac | 1 +
diff --git a/recipes/gnutls/0003-Disable-ncrypt-support.patch b/recipes/gnutls/0003-Disable-ncrypt-support.patch
index 3518d6f7..1a2a331a 100644
--- a/recipes/gnutls/0003-Disable-ncrypt-support.patch
+++ b/recipes/gnutls/0003-Disable-ncrypt-support.patch
@@ -1,7 +1,7 @@
-From 3f009ce19972fd78b216a7598a04943daf7b6817 Mon Sep 17 00:00:00 2001
+From 4df19d35188fe9e49eb720760b7aba9ebc3e80e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
Date: Wed, 24 Feb 2016 16:46:11 +0200
-Subject: [PATCH 3/3] Disable ncrypt support
+Subject: [PATCH 3/4] Disable ncrypt support
It's Windows Vista only and our mingw toolchain does not support it currently
either.
diff --git a/recipes/gnutls/0004-Stop-using-weak-linked-_gnutls_global_init_skip-in-l.patch b/recipes/gnutls/0004-Stop-using-weak-linked-_gnutls_global_init_skip-in-l.patch
new file mode 100644
index 00000000..9b25c9e0
--- /dev/null
+++ b/recipes/gnutls/0004-Stop-using-weak-linked-_gnutls_global_init_skip-in-l.patch
@@ -0,0 +1,44 @@
+From 703226118ff5ccd8d5fe9a41ad3e2c6f063b0c75 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
+Date: Tue, 1 Mar 2016 15:43:36 +0200
+Subject: [PATCH 4/4] Stop using weak linked _gnutls_global_init_skip() in
+ library constructor
+
+It fails on Windows, see https://gitlab.com/gnutls/gnutls/issues/74
+
+https://bugzilla.gnome.org/show_bug.cgi?id=762921
+---
+ lib/gnutls_global.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c
+index 9bda352..409fd96 100644
+--- a/lib/gnutls_global.c
++++ b/lib/gnutls_global.c
+@@ -462,9 +462,10 @@ static void _CONSTRUCTOR lib_init(void)
+ int ret;
+ const char *e;
+
++#if 0
+ if (_gnutls_global_init_skip() != 0)
+ return;
+-
++#endif
+ e = getenv("GNUTLS_NO_EXPLICIT_INIT");
+ if (e != NULL) {
+ ret = atoi(e);
+@@ -483,9 +484,10 @@ static void _DESTRUCTOR lib_deinit(void)
+ {
+ const char *e;
+
++#if 0
+ if (_gnutls_global_init_skip() != 0)
+ return;
+-
++#endif
+ e = getenv("GNUTLS_NO_EXPLICIT_INIT");
+ if (e != NULL) {
+ int ret = atoi(e);
+--
+2.7.0
+