changeset 2128:e54452862e8b

package gnutls: clean up -Replace echo and sed hacks -gai_strerror test seems to work now without hack. -Disable crywrap for Windows with configure logic. -Disable doc and tests targets with patch. -Improve handling of LIBS and .pc file -zlib is already in GNUTLS_REQUIRES_PRIVATE -Use LIBS to introduce -lws32_2 into Libs.private
author Mark Brand <mabrand@mabrand.nl>
date Thu, 24 Nov 2011 11:47:42 +0100
parents c249980b95df
children 2373562288ba
files src/gnutls-1-fixes.patch src/gnutls.mk
diffstat 2 files changed, 56 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/gnutls-1-fixes.patch	Thu Nov 24 19:49:07 2011 +1100
+++ b/src/gnutls-1-fixes.patch	Thu Nov 24 11:47:42 2011 +0100
@@ -3,14 +3,14 @@
 
 Contains ad hoc patches for cross building.
 
-From d5d9241c7e40cfc191dfc33c94381a3895e57cd5 Mon Sep 17 00:00:00 2001
+From 1b8300eee68e9768ba628d51facf8183255a6e78 Mon Sep 17 00:00:00 2001
 From: mingw-cross-env
 Date: Fri, 28 Oct 2011 09:23:41 +0200
-Subject: [PATCH] add missing static library linking
+Subject: [PATCH 1/3] add missing static library linking
 
 
 diff --git a/lib/gnutls.pc.in b/lib/gnutls.pc.in
-index 32170b6..6668a5e 100644
+index 32170b6..de032a2 100644
 --- a/lib/gnutls.pc.in
 +++ b/lib/gnutls.pc.in
 @@ -20,6 +20,6 @@ Description: Transport Security Layer implementation for the GNU system
@@ -18,9 +18,55 @@
  Version: @VERSION@
  Libs: -L${libdir} -lgnutls
 -Libs.private: @LTLIBNETTLE@
-+Libs.private: @LTLIBNETTLE@ -lws2_32
++Libs.private: @LTLIBNETTLE@ @LIBS@
  @GNUTLS_REQUIRES_PRIVATE@
  Cflags: -I${includedir}
 -- 
-1.7.7
+1.7.7.3
+
+
+From 84e79eadf2edae75ecb93792cf9899932b9d3a49 Mon Sep 17 00:00:00 2001
+From: mingw-cross-env
+Date: Thu, 24 Nov 2011 14:40:11 +0100
+Subject: [PATCH 2/3] don't try to build crywrap for windows
+
 
+diff --git a/configure.ac b/configure.ac
+index 028ffe4..9c183ae 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -431,7 +431,7 @@ AC_CHECK_FUNCS([alarm atexit dup2 epoll_create kqueue memchr memset munmap \
+ 
+ PKG_CHECK_MODULES(LIBIDN, libidn >= 0.0.0, [libidn=yes], [libidn=no])
+ 
+-AM_CONDITIONAL(ENABLE_CRYWRAP, test "x$libidn" != "xno")
++AM_CONDITIONAL(ENABLE_CRYWRAP, test "x$have_win" != "xyes" && test "x$libidn" != "xno")
+ 
+ dnl end of crywrap requirements
+ 
+-- 
+1.7.7.3
+
+
+From fc59afca0261a79ebca4898c6d70434a7f9895f7 Mon Sep 17 00:00:00 2001
+From: mingw-cross-env
+Date: Thu, 24 Nov 2011 15:06:06 +0100
+Subject: [PATCH 3/3] disable doc and test (mingw-cross-env specific)
+
+
+diff --git a/Makefile.am b/Makefile.am
+index 14c2642..ec86896 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -21,7 +21,7 @@
+ 
+ DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --disable-valgrind-tests
+ 
+-SUBDIRS = gl lib extra po src doc tests
++SUBDIRS = gl lib extra po src
+ 
+ if HAVE_GUILE
+ SUBDIRS += guile
+-- 
+1.7.7.3
+
--- a/src/gnutls.mk	Thu Nov 24 19:49:07 2011 +1100
+++ b/src/gnutls.mk	Thu Nov 24 11:47:42 2011 +0100
@@ -10,7 +10,7 @@
 $(PKG)_WEBSITE  := http://www.gnu.org/software/gnutls/
 $(PKG)_URL      := ftp://ftp.gnutls.org/pub/gnutls/$($(PKG)_FILE)
 $(PKG)_URL_2    := ftp://ftp.gnupg.org/gcrypt/gnutls/$($(PKG)_FILE)
-$(PKG)_DEPS     := gcc zlib nettle
+$(PKG)_DEPS     := gcc nettle zlib
 
 define $(PKG)_UPDATE
     wget -q -O- 'http://git.savannah.gnu.org/gitweb/?p=gnutls.git;a=tags' | \
@@ -22,11 +22,9 @@
 endef
 
 define $(PKG)_BUILD
-    echo '/* DEACTIVATED */' > '$(1)/gl/gai_strerror.c'
-    $(SED) -i 's/^\(SUBDIRS.*\) tests/\1/;' '$(1)/Makefile.in'
-    $(SED) -i 's/^\(SUBDIRS.*\) doc/\1/;' '$(1)/Makefile.in'
-    $(SED) -i 's/ crywrap//;' '$(1)/src/Makefile.in'
-    $(SED) -i 's, sed , $(SED) ,g' '$(1)/gl/tests/Makefile.in'
+    $(SED) -i 's, sed , $(SED) ,g' '$(1)/gl/tests/Makefile.am'
+    cd '$(1)' && autoconf
+    cd '$(1)' && automake
     cd '$(1)' && ./configure \
         --host='$(TARGET)' \
         --enable-static \
@@ -39,7 +37,7 @@
         --without-p11-kit \
         --disable-silent-rules \
         CPPFLAGS='-DWINVER=0x0501' \
-        LIBS='-lz -lws2_32' \
+        LIBS='-lws2_32' \
         ac_cv_prog_AR='$(TARGET)-ar'
     $(MAKE) -C '$(1)' -j '$(JOBS)' install