From 55bd0093765de27062e3fdfad00d617f2d2b2fcb Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Thu, 16 Feb 2017 22:29:47 +0100 Subject: [PATCH] wget: add recipe for version 1.19.1. --- net-misc/wget/patches/wget-1.19.1.patchset | 151 +++++++++++++++++++++ net-misc/wget/wget-1.19.1.recipe | 75 ++++++++++ 2 files changed, 226 insertions(+) create mode 100644 net-misc/wget/patches/wget-1.19.1.patchset create mode 100644 net-misc/wget/wget-1.19.1.recipe diff --git a/net-misc/wget/patches/wget-1.19.1.patchset b/net-misc/wget/patches/wget-1.19.1.patchset new file mode 100644 index 000000000..e52223655 --- /dev/null +++ b/net-misc/wget/patches/wget-1.19.1.patchset @@ -0,0 +1,151 @@ +From bde15653f181802cbd9ac661f40de5c0604020ab 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 686f040..9c3cdb5 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 ]) + +@@ -305,6 +306,9 @@ dnl + + PKG_PROG_PKG_CONFIG + ++AC_CHECK_LIB(network, gethostbyname) ++AC_CHECK_LIB(network, socket) ++ + AS_IF([test "x$with_libpsl" != xno], [ + PKG_CHECK_MODULES([LIBPSL], libpsl, [ + with_libpsl=yes +diff --git a/src/config.h.in b/src/config.h.in +index afb806f..6628225 100644 +--- a/src/config.h.in ++++ b/src/config.h.in +@@ -842,6 +842,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 + +@@ -854,6 +857,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 if libpcre is available. */ + #undef HAVE_LIBPCRE + +diff --git a/src/connect.c b/src/connect.c +index 7e18171..b421306 100644 +--- a/src/connect.c ++++ b/src/connect.c +@@ -47,7 +47,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.10.2 + + +From 31f227097a4615c99649da25efaf3c72310ce726 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 db89ae1..f2a11ff 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.10.2 + + +From c9be4a66b439c9fe3364879fece245bbe391fa02 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 581a33d..e8268c7 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -80,6 +80,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 +@@ -163,6 +167,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.10.2 + diff --git a/net-misc/wget/wget-1.19.1.recipe b/net-misc/wget/wget-1.19.1.recipe new file mode 100644 index 000000000..971015d57 --- /dev/null +++ b/net-misc/wget/wget-1.19.1.recipe @@ -0,0 +1,75 @@ +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="https://www.gnu.org/software/wget/" +COPYRIGHT="1996-2016 Free Software Foundation" +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="http://ftpmirror.gnu.org/wget/wget-$portVersion.tar.gz" +CHECKSUM_SHA256="9e4f12da38cc6167d0752d934abe27c7b1599a9af294e73829be7ac7b5b4da40" +PATCHES="wget-$portVersion.patchset" + +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 + lib:libiconv$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libcrypto$secondaryArchSuffix + devel:libiconv$secondaryArchSuffix + devel:libssl$secondaryArchSuffix + devel:libz$secondaryArchSuffix >= 1.2.3 + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:aclocal + cmd:autoconf + cmd:libtoolize$secondaryArchSuffix + 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 + " + +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 +}