Files
haikuports/net-misc/wget/patches/wget-1.18.patchset
2016-07-19 20:17:50 +02:00

163 lines
3.9 KiB
Plaintext

From e20d11eff28c8075768c5cffbcccca4af551ad50 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
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 <netdb.h>])
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 <libintl.h> 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 <netdb.h>
# endif /* def __VMS [else] */
# include <netinet/in.h>
-# ifndef __BEOS__
+# ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
# 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 <sys/socket.h>
# include <netinet/in.h>
-#ifndef __BEOS__
-# include <arpa/inet.h>
-#endif
+# ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+# endif
#endif
struct url;
--
2.2.2
From a1b6a03da5fc9ae858648d3610182f201efa744e Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
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 <sys/ioctl.h>
+#endif
# include <termios.h>
#endif
--
2.2.2
From 35fc251c6ace586a16b0d843b916f465ccd9fce5 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
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