From bc0be845a34eb9b0d8427127b56d0bae591ec8a9 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Tue, 19 Jul 2016 20:17:50 +0200 Subject: [PATCH] wget: bump version. --- net-misc/wget/patches/wget-1.18.patchset | 162 +++++++++++++++++++++++ net-misc/wget/wget-1.18.recipe | 77 +++++++++++ 2 files changed, 239 insertions(+) create mode 100644 net-misc/wget/patches/wget-1.18.patchset create mode 100644 net-misc/wget/wget-1.18.recipe diff --git a/net-misc/wget/patches/wget-1.18.patchset b/net-misc/wget/patches/wget-1.18.patchset new file mode 100644 index 000000000..bd7588351 --- /dev/null +++ b/net-misc/wget/patches/wget-1.18.patchset @@ -0,0 +1,162 @@ +From e20d11eff28c8075768c5cffbcccca4af551ad50 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Mon, 19 May 2014 15:38:37 +0000 +Subject: apply wget-1.14.patch + + +diff --git a/configure.ac b/configure.ac +index eb303f0..0385d0f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -238,6 +238,7 @@ AC_HEADER_STDBOOL + AC_CHECK_HEADERS(unistd.h sys/time.h) + AC_CHECK_HEADERS(termios.h sys/ioctl.h sys/select.h utime.h sys/utime.h) + AC_CHECK_HEADERS(stdint.h inttypes.h pwd.h wchar.h) ++AC_CHECK_HEADERS(arpa/inet.h) + + AC_CHECK_DECLS(h_errno,,,[#include ]) + +diff --git a/m4/wget.m4 b/m4/wget.m4 +index 777e973..5a8b75d 100644 +--- a/m4/wget.m4 ++++ b/m4/wget.m4 +@@ -88,6 +88,7 @@ AC_DEFUN([WGET_POSIX_CLOCK], [ + + dnl Check whether we need to link with -lnsl and -lsocket, as is the + dnl case on e.g. Solaris. ++dnl Haiku needs libnetwork + + AC_DEFUN([WGET_NSL_SOCKET], [ + dnl On Solaris, -lnsl is needed to use gethostbyname. But checking +@@ -107,6 +108,8 @@ AC_DEFUN([WGET_NSL_SOCKET], [ + AC_CHECK_LIB(nsl, $wget_check_in_nsl) + fi + AC_CHECK_LIB(socket, socket) ++ AC_CHECK_LIB(network, gethostbyname) ++ AC_CHECK_LIB(network, socket) + ]) + + +diff --git a/src/config.h.in b/src/config.h.in +index 8b39c52..bf125e3 100644 +--- a/src/config.h.in ++++ b/src/config.h.in +@@ -750,6 +750,9 @@ + /* Define if libcares is available. */ + #undef HAVE_LIBCARES + ++/* Define to 1 if you have the `bind' library (-lbind). */ ++#undef HAVE_LIBBIND ++ + /* Define to 1 if you have the `dl' library (-ldl). */ + #undef HAVE_LIBDL + +@@ -762,6 +765,9 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_LIBINTL_H + ++/* Define to 1 if you have the `network' library (-lnetwork). */ ++#undef HAVE_LIBNETWORK ++ + /* Define to 1 if you have the `nsl' library (-lnsl). */ + #undef HAVE_LIBNSL + +diff --git a/src/connect.c b/src/connect.c +index 0704000..4810fb3 100644 +--- a/src/connect.c ++++ b/src/connect.c +@@ -46,7 +46,7 @@ as that of the covered work. */ + # include + # endif /* def __VMS [else] */ + # include +-# ifndef __BEOS__ ++# ifdef HAVE_ARPA_INET_H + # include + # endif + #endif /* not WINDOWS */ +diff --git a/src/host.h b/src/host.h +index 785a570..3ef63cd 100644 +--- a/src/host.h ++++ b/src/host.h +@@ -42,9 +42,9 @@ as that of the covered work. */ + # endif /* def __VMS [else] */ + # include + # include +-#ifndef __BEOS__ +-# include +-#endif ++# ifdef HAVE_ARPA_INET_H ++# include ++# endif + #endif + + struct url; +-- +2.2.2 + + +From a1b6a03da5fc9ae858648d3610182f201efa744e Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Mon, 19 May 2014 15:47:24 +0000 +Subject: apply and augment wget-1.14-build-fixes.patch + + +diff --git a/src/utils.c b/src/utils.c +index b07da9f..561598c 100644 +--- a/src/utils.c ++++ b/src/utils.c +@@ -63,7 +63,9 @@ as that of the covered work. */ + + /* For TIOCGWINSZ and friends: */ + #ifndef WINDOWS ++#ifndef __HAIKU__ + # include ++#endif + # include + #endif + +-- +2.2.2 + + +From 35fc251c6ace586a16b0d843b916f465ccd9fce5 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 14 Feb 2016 11:05:10 +0100 +Subject: Move wget-hsts out of home directory. + + +diff --git a/src/main.c b/src/main.c +index e7d5c66..046ff9d 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -78,6 +78,10 @@ as that of the covered work. */ + # include "vms.h" + #endif /* __VMS */ + ++#ifdef __HAIKU__ ++#include "FindDirectory.h" ++#endif ++ + #ifndef PATH_SEPARATOR + # define PATH_SEPARATOR '/' + #endif +@@ -161,6 +165,16 @@ get_hsts_database (void) + if (opt.hsts_file) + return xstrdup (opt.hsts_file); + ++#ifdef __HAIKU__ ++ { ++ char buffer[256]; ++ if (find_directory(B_USER_SETTINGS_DIRECTORY, 0, false, buffer, sizeof(buffer)) == B_OK) { ++ home = aprintf("%s/wget-hsts", buffer); ++ return home; ++ } ++ } ++#endif ++ + home = home_dir (); + if (home) + { +-- +2.2.2 + diff --git a/net-misc/wget/wget-1.18.recipe b/net-misc/wget/wget-1.18.recipe new file mode 100644 index 000000000..36ae7774e --- /dev/null +++ b/net-misc/wget/wget-1.18.recipe @@ -0,0 +1,77 @@ +SUMMARY="A tool for downloading files from the internet" +DESCRIPTION=" +wget is a tool that can download files from the internet through protocols \ +such as HTTP, HTTPS and FTP. wget is non-interactive, so it can be called from \ +scripts. +" +HOMEPAGE="http://www.gnu.org/software/wget" +SOURCE_URI="http://ftp.gnu.org/gnu/wget/wget-$portVersion.tar.gz" +CHECKSUM_SHA256="a00a65fab84cc46e24c53ce88c45604668a7a479276e037dc2f558e34717fb2d" +LICENSE="GNU GPL v3" +COPYRIGHT="1996-2014 Free Software Foundation" +REVISION="1" +ARCHITECTURES="x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86 x86_gcc2" + +PROVIDES=" + wget$secondaryArchSuffix = $portVersion + cmd:wget$secondaryArchSuffix = $portVersion + " + +REQUIRES=" + haiku$secondaryArchSuffix + lib:libcrypto$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + lib:libz$secondaryArchSuffix + lib:libintl$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libcrypto$secondaryArchSuffix + devel:libssl$secondaryArchSuffix + devel:libz$secondaryArchSuffix >= 1.2.3 + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:aclocal + cmd:autoconf + cmd:libtoolize + cmd:make + cmd:makeinfo + cmd:pod2man + cmd:gettext + cmd:find + cmd:pkg_config$secondaryArchSuffix + " + +USER_SETTINGS_FILES=" + settings/wgetrc + " + +GLOBAL_WRITABLE_FILES=" + settings/wgetrc keep-old +" + +PATCHES="wget-$portVersion.patchset" + +BUILD() +{ + AUTOPOINT=true autoreconf -fi + runConfigure ./configure --with-ssl=openssl + make +} + +INSTALL() +{ + make install + # Tells wget where to find certificates + echo "ca_certificate=/boot/system/data/ssl/CARootCertificates.pem" > $settingsDir/wgetrc +} + +TEST() +{ + [ -d .git ] && mv .git .git-temp + make check || true + [ -d .git-temp ] && mv .git-temp .git +}