changeset 5554:578541f66d61

wget: new package.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Fri, 11 Sep 2009 13:42:25 +0200
parents a44065d212a8
children b1a9c39ff09d
files gub/specs/wget.py patches/wget-1.11.4-mingw.patch
diffstat 2 files changed, 51 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gub/specs/wget.py	Fri Sep 11 13:42:25 2009 +0200
@@ -0,0 +1,19 @@
+from gub import target
+from gub import tools
+
+class Wget (target.AutoBuild):
+    source = 'http://ftp.gnu.org/pub/gnu/wget/wget-1.11.4.tar.gz'
+
+class Wget__mingw (Wget):
+    patches = ['wget-1.11.4-mingw.patch']
+    def XXX_need_to_patch_anyway_patch (self):
+        Wget.patch (self)
+        self.file_sub ([('(xmalloc[.]o)', r'\1 mswindows.o')],
+                       '%(srcdir)s/src/Makefile.in')
+    def XXX_need_to_patch_anyway_configure_command (self):
+        return (Wget.configure_command (self)
+                + ' CFLAGS=-DWINDOWS'
+                + ' LIBS=-lwsock32')
+    
+class Wget__tools (tools.AutoBuild, Wget):
+    pass
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/wget-1.11.4-mingw.patch	Fri Sep 11 13:42:25 2009 +0200
@@ -0,0 +1,32 @@
+--- wget-1.11.4/configure.in~	2008-04-27 06:48:19.000000000 +0200
++++ wget-1.11.4/configure.in	2009-09-11 13:32:07.869172196 +0200
+@@ -207,7 +207,17 @@ AC_DEFINE([HAVE_STRCASECMP], 1, [Define 
+ AC_DEFINE([HAVE_STRNCASECMP], 1, [Define to 1 if you have the `strncasecmp' function.])
+ AC_DEFINE([HAVE_STRDUP], 1, [Define to 1 if you have the `strdup' function.])
+ AC_DEFINE([HAVE_ISATTY], 1, [Define to 1 if you have the `isatty' function.])
+-AC_DEFINE([HAVE_SYMLINK], 1, [Define to 1 if you have the `symlink' function.])
++dnl ... and they most probably are available on the build system that
++dnl configure runs on, but possibly not on the host system
++dnl FIXME: replace stupid guesswork by checks
++UNIX=1
++case $host in
++  *-*-mingw*) UNIX=0 CFLAGS="-DWINDOWS $CFLAGS" LIBS="-lwsock32 $LIBS";;
++esac
++dnl AC_DEFINE_UNQUOTED([HAVE_SYMLINK], [$UNIX], [Define to 1 if you have the `symlink' function.])
++if test "$UNIX" = "1"; then
++    AC_DEFINE([HAVE_SYMLINK], [1], [Define to 1 if you have the `symlink' function.])
++fi
+ 
+ dnl
+ dnl Call Wget-specific macros defined in aclocal.
+--- wget-1.11.4/src/Makefile.in~	2008-04-27 06:48:21.000000000 +0200
++++ wget-1.11.4/src/Makefile.in	2009-09-11 13:23:17.533172370 +0200
+@@ -78,7 +78,7 @@ OBJ = $(ALLOCA) cmpt.o connect.o convert
+       host.o html-parse.o html-url.o http.o $(NTLM_OBJ) init.o    \
+       log.o main.o $(MD5_OBJ) netrc.o progress.o ptimer.o recur.o \
+       res.o retr.o safe-ctype.o snprintf.o spider.o $(SSL_OBJ)    \
+-      url.o utils.o version.o xmalloc.o
++      url.o utils.o version.o xmalloc.o mswindows.o
+ 
+ .SUFFIXES:
+ .SUFFIXES: .c .o