[vlc-commits] contrib: switch gnutls to nettle (non-Win32 so far)

Rémi Denis-Courmont git at videolan.org
Tue Jul 19 19:35:39 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jul 19 20:35:16 2011 +0300| [2adac96f59e2601ae41f8dc2cf9cf03e9ed4a882] | committer: Rémi Denis-Courmont

contrib: switch gnutls to nettle (non-Win32 so far)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2adac96f59e2601ae41f8dc2cf9cf03e9ed4a882
---

 contrib/src/gnutls/gnutls-no-egd.patch |   51 ++++++++++++++++++++++++++++++++
 contrib/src/gnutls/rules.mak           |   13 ++++++--
 2 files changed, 61 insertions(+), 3 deletions(-)

diff --git a/contrib/src/gnutls/gnutls-no-egd.patch b/contrib/src/gnutls/gnutls-no-egd.patch
new file mode 100644
index 0000000..bd0dbd9
--- /dev/null
+++ b/contrib/src/gnutls/gnutls-no-egd.patch
@@ -0,0 +1,51 @@
+diff -ru gnutls.orig//lib/nettle/Makefile.am gnutls//lib/nettle/Makefile.am
+--- gnutls.orig//lib/nettle/Makefile.am	2011-07-19 20:25:09.000000000 +0300
++++ gnutls//lib/nettle/Makefile.am	2011-07-19 20:25:39.000000000 +0300
+@@ -35,4 +35,4 @@
+ 
+ noinst_LTLIBRARIES = libcrypto.la
+ 
+-libcrypto_la_SOURCES = pk.c mpi.c mac.c cipher.c rnd.c init.c egd.c egd.h
++libcrypto_la_SOURCES = pk.c mpi.c mac.c cipher.c rnd.c init.c
+diff -ru gnutls.orig//lib/nettle/rnd.c gnutls//lib/nettle/rnd.c
+--- gnutls.orig//lib/nettle/rnd.c	2011-07-19 20:25:09.000000000 +0300
++++ gnutls//lib/nettle/rnd.c	2011-07-19 20:26:47.000000000 +0300
+@@ -159,7 +159,7 @@
+ #ifdef HAVE_GETRUSAGE
+ #include <sys/resource.h>
+ #endif
+-#include "egd.h"
++//#include "egd.h"
+ 
+ #define DEVICE_READ_SIZE 16
+ #define DEVICE_READ_SIZE_MAX 32
+@@ -288,6 +288,7 @@
+   return 0;
+ }
+ 
++#if 0
+ static int
+ do_device_source_egd (int init)
+ {
+@@ -342,6 +343,7 @@
+     }
+   return 0;
+ }
++#endif
+ 
+ static int
+ do_device_source (int init)
+@@ -359,11 +361,13 @@
+ 
+       do_source = do_device_source_urandom;
+       ret = do_source (init);
++#if 0
+       if (ret < 0)
+         {
+           do_source = do_device_source_egd;
+           ret = do_source (init);
+         }
++#endif
+ 
+       if (ret < 0)
+         {
diff --git a/contrib/src/gnutls/rules.mak b/contrib/src/gnutls/rules.mak
index 0a19ae4..229c19d 100644
--- a/contrib/src/gnutls/rules.mak
+++ b/contrib/src/gnutls/rules.mak
@@ -16,6 +16,7 @@ $(TARBALLS)/gnutls-$(GNUTLS_VERSION).tar.bz2:
 gnutls: gnutls-$(GNUTLS_VERSION).tar.bz2 .sum-gnutls
 	$(UNPACK)
 	$(APPLY) $(SRC)/gnutls/gnutls-win32.patch
+	$(APPLY) $(SRC)/gnutls/gnutls-no-egd.patch
 	$(MOVE)
 
 GNUTLS_CONF := \
@@ -30,11 +31,17 @@ GNUTLS_CONF := \
 	--disable-session-ticket \
 	--disable-openssl-compatibility \
 	--disable-guile \
-	--with-libgcrypt \
 	$(HOSTCONF)
 
-.gnutls: gnutls .gcrypt .gpg-error
-	#$(RECONF)
+ifdef HAVE_WIN32
+GNUTLS_CONF += --with-libgcrypt
+DEPS_gnutls = gcrypt $(DEPS_gcrypt)
+else
+DEPS_gnutls = nettle $(DEPS_nettle)
+endif
+
+.gnutls: gnutls
+	$(RECONF)
 	cd $< && $(HOSTVARS) ./configure $(GNUTLS_CONF)
 	cd $</lib && $(MAKE) install
 	touch $@



More information about the vlc-commits mailing list