From: RĂ©mi Denis-Courmont Date: Tue, 19 Jul 2011 17:35:16 +0000 (+0300) Subject: contrib: switch gnutls to nettle (non-Win32 so far) X-Git-Tag: 1.2.0-pre1~1701 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=2adac96f59e2601ae41f8dc2cf9cf03e9ed4a882;p=vlc contrib: switch gnutls to nettle (non-Win32 so far) --- diff --git a/contrib/src/gnutls/gnutls-no-egd.patch b/contrib/src/gnutls/gnutls-no-egd.patch new file mode 100644 index 0000000000..bd0dbd98e3 --- /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 + #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 0a19ae4b76..229c19db63 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 $