mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
wget: bump version
* remove old recipes
This commit is contained in:
@@ -1,521 +0,0 @@
|
||||
From 106dffb05519f44684f5f9dc09b0970b8c68a2d9 Mon Sep 17 00:00:00 2001
|
||||
From: Luke <noryb009@gmail.com>
|
||||
Date: Wed, 11 Dec 2013 03:03:50 +0000
|
||||
Subject: [PATCH] Fix build errors
|
||||
|
||||
---
|
||||
lib/regcomp.c | 2 +-
|
||||
src/http.c | 9 ++++--
|
||||
src/main.c | 25 ++++++++------
|
||||
src/retr.c | 3 +-
|
||||
src/utils.c | 2 ++
|
||||
src/warc.c | 102 ++++++++++++++++++++++++++++++++++++----------------------
|
||||
6 files changed, 91 insertions(+), 52 deletions(-)
|
||||
|
||||
diff --git a/lib/regcomp.c b/lib/regcomp.c
|
||||
index 1d7a522..76ed566 100644
|
||||
--- a/lib/regcomp.c
|
||||
+++ b/lib/regcomp.c
|
||||
@@ -952,10 +952,10 @@ static void
|
||||
internal_function
|
||||
init_word_char (re_dfa_t *dfa)
|
||||
{
|
||||
- dfa->word_ops_used = 1;
|
||||
int i = 0;
|
||||
int j;
|
||||
int ch = 0;
|
||||
+ dfa->word_ops_used = 1;
|
||||
if (BE (dfa->map_notascii == 0, 1))
|
||||
{
|
||||
bitset_word_t bits0 = 0x00000000;
|
||||
diff --git a/src/http.c b/src/http.c
|
||||
index fa2d5ed..8500a93 100644
|
||||
--- a/src/http.c
|
||||
+++ b/src/http.c
|
||||
@@ -1076,6 +1076,7 @@ extract_param (const char **source, param_token *name, param_token *value,
|
||||
char separator)
|
||||
{
|
||||
const char *p = *source;
|
||||
+ int param_type;
|
||||
|
||||
while (c_isspace (*p)) ++p;
|
||||
if (!*p)
|
||||
@@ -1131,7 +1132,7 @@ extract_param (const char **source, param_token *name, param_token *value,
|
||||
}
|
||||
*source = p;
|
||||
|
||||
- int param_type = modify_param_name(name);
|
||||
+ param_type = modify_param_name(name);
|
||||
if (NOT_RFC2231 != param_type)
|
||||
{
|
||||
modify_param_value(value, param_type);
|
||||
@@ -1521,6 +1522,7 @@ read_response_body (struct http_stat *hs, int sock, FILE *fp, wgint contlen,
|
||||
int warc_payload_offset = 0;
|
||||
FILE *warc_tmp = NULL;
|
||||
int warcerr = 0;
|
||||
+ int flags;
|
||||
|
||||
if (opt.warc_filename != NULL)
|
||||
{
|
||||
@@ -1557,7 +1559,7 @@ read_response_body (struct http_stat *hs, int sock, FILE *fp, wgint contlen,
|
||||
}
|
||||
|
||||
/* Read the response body. */
|
||||
- int flags = 0;
|
||||
+ flags = 0;
|
||||
if (contlen != -1)
|
||||
/* If content-length is present, read that much; otherwise, read
|
||||
until EOF. The HTTP spec doesn't require the server to
|
||||
@@ -1668,6 +1670,7 @@ static uerr_t
|
||||
gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
|
||||
struct iri *iri, int count)
|
||||
{
|
||||
+ int warc_tmp_written;
|
||||
struct request *req;
|
||||
|
||||
char *type;
|
||||
@@ -2136,7 +2139,7 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
|
||||
warc_payload_offset = ftello (warc_tmp);
|
||||
|
||||
/* Write a copy of the data to the WARC record. */
|
||||
- int warc_tmp_written = fwrite (opt.post_data, 1, post_data_size, warc_tmp);
|
||||
+ warc_tmp_written = fwrite (opt.post_data, 1, post_data_size, warc_tmp);
|
||||
if (warc_tmp_written != post_data_size)
|
||||
write_error = -2;
|
||||
}
|
||||
diff --git a/src/main.c b/src/main.c
|
||||
index b8b2869..cff4fa3 100644
|
||||
--- a/src/main.c
|
||||
+++ b/src/main.c
|
||||
@@ -971,13 +971,20 @@ main (int argc, char **argv)
|
||||
int i, ret, longindex;
|
||||
int nurl;
|
||||
bool append_to_log = false;
|
||||
+ struct ptimer *timer;
|
||||
+ double start_time;
|
||||
+ int arglen;
|
||||
+ int argstring_length;
|
||||
+ int retconf;
|
||||
+ bool use_userconfig = false;
|
||||
+ char *p;
|
||||
|
||||
total_downloaded_bytes = 0;
|
||||
|
||||
program_name = argv[0];
|
||||
|
||||
- struct ptimer *timer = ptimer_new ();
|
||||
- double start_time = ptimer_measure (timer);
|
||||
+ timer = ptimer_new ();
|
||||
+ start_time = ptimer_measure (timer);
|
||||
|
||||
i18n_initialize ();
|
||||
|
||||
@@ -999,10 +1006,10 @@ main (int argc, char **argv)
|
||||
#endif
|
||||
|
||||
/* Construct the arguments string. */
|
||||
- int argstring_length = 1;
|
||||
+ argstring_length = 1;
|
||||
for (i = 1; i < argc; i++)
|
||||
argstring_length += strlen (argv[i]) + 2 + 1;
|
||||
- char *p = program_argstring = malloc (argstring_length * sizeof (char));
|
||||
+ p = program_argstring = malloc (argstring_length * sizeof (char));
|
||||
if (p == NULL)
|
||||
{
|
||||
fprintf (stderr, _("Memory allocation problem\n"));
|
||||
@@ -1011,7 +1018,7 @@ main (int argc, char **argv)
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
*p++ = '"';
|
||||
- int arglen = strlen (argv[i]);
|
||||
+ arglen = strlen (argv[i]);
|
||||
memcpy (p, argv[i], arglen);
|
||||
p += arglen;
|
||||
*p++ = '"';
|
||||
@@ -1027,8 +1034,6 @@ main (int argc, char **argv)
|
||||
/* This separate getopt_long is needed to find the user config file
|
||||
option ("--config") and parse it before the other user options. */
|
||||
longindex = -1;
|
||||
- int retconf;
|
||||
- bool use_userconfig = false;
|
||||
|
||||
while ((retconf = getopt_long (argc, argv,
|
||||
short_options, long_options, &longindex)) != -1)
|
||||
@@ -1597,10 +1602,12 @@ outputting to a regular file.\n"));
|
||||
total_downloaded_bytes != 0)
|
||||
{
|
||||
double end_time = ptimer_measure (timer);
|
||||
+ char *wall_time;
|
||||
+ char *download_time;
|
||||
ptimer_destroy (timer);
|
||||
|
||||
- char *wall_time = xstrdup (secs_to_human_time (end_time - start_time));
|
||||
- char *download_time = xstrdup (secs_to_human_time (total_download_time));
|
||||
+ wall_time = xstrdup (secs_to_human_time (end_time - start_time));
|
||||
+ download_time = xstrdup (secs_to_human_time (total_download_time));
|
||||
logprintf (LOG_NOTQUIET,
|
||||
_("FINISHED --%s--\nTotal wall clock time: %s\n"
|
||||
"Downloaded: %d files, %s in %s (%s)\n"),
|
||||
diff --git a/src/retr.c b/src/retr.c
|
||||
index 6204839..7947a73 100644
|
||||
--- a/src/retr.c
|
||||
+++ b/src/retr.c
|
||||
@@ -374,8 +374,9 @@ fd_read_body (int fd, FILE *out, wgint toread, wgint startpos,
|
||||
|
||||
if (ret > 0)
|
||||
{
|
||||
+ int write_res;
|
||||
sum_read += ret;
|
||||
- int write_res = write_data (out, out2, dlbuf, ret, &skip, &sum_written);
|
||||
+ write_res = write_data (out, out2, dlbuf, ret, &skip, &sum_written);
|
||||
if (write_res != 0)
|
||||
{
|
||||
ret = (write_res == -3) ? -3 : -2;
|
||||
diff --git a/src/utils.c b/src/utils.c
|
||||
index 567dc35..736f6e2 100644
|
||||
--- a/src/utils.c
|
||||
+++ b/src/utils.c
|
||||
@@ -64,7 +64,9 @@ as that of the covered work. */
|
||||
#include <sys/stat.h>
|
||||
|
||||
/* For TIOCGWINSZ and friends: */
|
||||
+#ifndef __HAIKU__
|
||||
#include <sys/ioctl.h>
|
||||
+#endif
|
||||
#ifdef HAVE_TERMIOS_H
|
||||
# include <termios.h>
|
||||
#endif
|
||||
diff --git a/src/warc.c b/src/warc.c
|
||||
index 69f80be..17a48aa 100644
|
||||
--- a/src/warc.c
|
||||
+++ b/src/warc.c
|
||||
@@ -154,10 +154,11 @@ warc_write_buffer (const char *buffer, size_t size)
|
||||
static bool
|
||||
warc_write_string (const char *str)
|
||||
{
|
||||
+ size_t n;
|
||||
if (!warc_write_ok)
|
||||
return false;
|
||||
|
||||
- size_t n = strlen (str);
|
||||
+ n = strlen (str);
|
||||
if (n != warc_write_buffer (str, n))
|
||||
warc_write_ok = false;
|
||||
|
||||
@@ -246,8 +247,11 @@ warc_write_block_from_file (FILE *data_in)
|
||||
{
|
||||
/* Add the Content-Length header. */
|
||||
char *content_length;
|
||||
+ char buffer[BUFSIZ];
|
||||
+ size_t s;
|
||||
+
|
||||
fseeko (data_in, 0L, SEEK_END);
|
||||
- if (! asprintf (&content_length, "%ld", ftello (data_in)))
|
||||
+ if (! asprintf (&content_length, "%ld", (long int)ftello (data_in)))
|
||||
{
|
||||
warc_write_ok = false;
|
||||
return false;
|
||||
@@ -262,8 +266,6 @@ warc_write_block_from_file (FILE *data_in)
|
||||
warc_write_ok = false;
|
||||
|
||||
/* Copy the data in the file to the WARC record. */
|
||||
- char buffer[BUFSIZ];
|
||||
- size_t s;
|
||||
while (warc_write_ok && (s = fread (buffer, 1, BUFSIZ, data_in)) > 0)
|
||||
{
|
||||
if (warc_write_buffer (buffer, s) < s)
|
||||
@@ -288,6 +290,12 @@ warc_write_end_record (void)
|
||||
/* We start a new gzip stream for each record. */
|
||||
if (warc_write_ok && warc_current_gzfile)
|
||||
{
|
||||
+ size_t result;
|
||||
+ char static_header[GZIP_STATIC_HEADER_SIZE];
|
||||
+ off_t current_offset;
|
||||
+ off_t uncompressed_size;
|
||||
+ off_t compressed_size;
|
||||
+ char extra_header[EXTRA_GZIP_HEADER_SIZE];
|
||||
if (gzclose (warc_current_gzfile) != Z_OK)
|
||||
{
|
||||
warc_write_ok = false;
|
||||
@@ -313,17 +321,16 @@ warc_write_end_record (void)
|
||||
*/
|
||||
|
||||
/* Calculate the uncompressed and compressed sizes. */
|
||||
- off_t current_offset = ftello (warc_current_file);
|
||||
- off_t uncompressed_size = current_offset - warc_current_gzfile_offset;
|
||||
- off_t compressed_size = warc_current_gzfile_uncompressed_size;
|
||||
+ current_offset = ftello (warc_current_file);
|
||||
+ uncompressed_size = current_offset - warc_current_gzfile_offset;
|
||||
+ compressed_size = warc_current_gzfile_uncompressed_size;
|
||||
|
||||
/* Go back to the static GZIP header. */
|
||||
fseeko (warc_current_file, warc_current_gzfile_offset
|
||||
+ EXTRA_GZIP_HEADER_SIZE, SEEK_SET);
|
||||
|
||||
/* Read the header. */
|
||||
- char static_header[GZIP_STATIC_HEADER_SIZE];
|
||||
- size_t result = fread (static_header, 1, GZIP_STATIC_HEADER_SIZE,
|
||||
+ result = fread (static_header, 1, GZIP_STATIC_HEADER_SIZE,
|
||||
warc_current_file);
|
||||
if (result != GZIP_STATIC_HEADER_SIZE)
|
||||
{
|
||||
@@ -340,7 +347,6 @@ warc_write_end_record (void)
|
||||
fwrite (static_header, 1, GZIP_STATIC_HEADER_SIZE, warc_current_file);
|
||||
|
||||
/* Prepare the extra GZIP header. */
|
||||
- char extra_header[EXTRA_GZIP_HEADER_SIZE];
|
||||
/* XLEN, the length of the extra header fields. */
|
||||
extra_header[0] = ((EXTRA_GZIP_HEADER_SIZE - 2) & 255);
|
||||
extra_header[1] = ((EXTRA_GZIP_HEADER_SIZE - 2) >> 8) & 255;
|
||||
@@ -649,13 +655,15 @@ warc_write_warcinfo_record (char *filename)
|
||||
/* Write warc-info record as the first record of the file. */
|
||||
/* We add the record id of this info record to the other records in the
|
||||
file. */
|
||||
+ char timestamp[22];
|
||||
+ char *filename_copy, *filename_basename;
|
||||
+ FILE *warc_tmp;
|
||||
+
|
||||
warc_current_warcinfo_uuid_str = (char *) malloc (48);
|
||||
warc_uuid_str (warc_current_warcinfo_uuid_str);
|
||||
|
||||
- char timestamp[22];
|
||||
warc_timestamp (timestamp);
|
||||
|
||||
- char *filename_copy, *filename_basename;
|
||||
filename_copy = strdup (filename);
|
||||
filename_basename = strdup (basename (filename_copy));
|
||||
|
||||
@@ -667,7 +675,7 @@ warc_write_warcinfo_record (char *filename)
|
||||
warc_write_header ("WARC-Filename", filename_basename);
|
||||
|
||||
/* Create content. */
|
||||
- FILE *warc_tmp = warc_tempfile ();
|
||||
+ warc_tmp = warc_tempfile ();
|
||||
if (warc_tmp == NULL)
|
||||
{
|
||||
free (filename_copy);
|
||||
@@ -717,6 +725,10 @@ warc_write_warcinfo_record (char *filename)
|
||||
static bool
|
||||
warc_start_new_file (bool meta)
|
||||
{
|
||||
+ int base_filename_length;
|
||||
+ char *new_filename;
|
||||
+ const char *extension;
|
||||
+
|
||||
if (opt.warc_filename == NULL)
|
||||
return false;
|
||||
|
||||
@@ -729,15 +741,15 @@ warc_start_new_file (bool meta)
|
||||
|
||||
warc_current_file_number++;
|
||||
|
||||
- int base_filename_length = strlen (opt.warc_filename);
|
||||
+ base_filename_length = strlen (opt.warc_filename);
|
||||
/* filename format: base + "-" + 5 digit serial number + ".warc.gz" */
|
||||
- char *new_filename = malloc (base_filename_length + 1 + 5 + 8 + 1);
|
||||
+ new_filename = malloc (base_filename_length + 1 + 5 + 8 + 1);
|
||||
warc_current_filename = new_filename;
|
||||
|
||||
#ifdef HAVE_LIBZ
|
||||
- const char *extension = (opt.warc_compression_enabled ? "warc.gz" : "warc");
|
||||
+ extension = (opt.warc_compression_enabled ? "warc.gz" : "warc");
|
||||
#else
|
||||
- const char *extension = "warc";
|
||||
+ extension = "warc";
|
||||
#endif
|
||||
|
||||
/* If max size is enabled, we add a serial number to the file names. */
|
||||
@@ -811,12 +823,13 @@ static bool
|
||||
warc_parse_cdx_header (char *lineptr, int *field_num_original_url,
|
||||
int *field_num_checksum, int *field_num_record_id)
|
||||
{
|
||||
+ char *token;
|
||||
+ char *save_ptr;
|
||||
+
|
||||
*field_num_original_url = -1;
|
||||
*field_num_checksum = -1;
|
||||
*field_num_record_id = -1;
|
||||
|
||||
- char *token;
|
||||
- char *save_ptr;
|
||||
token = strtok_r (lineptr, CDX_FIELDSEP, &save_ptr);
|
||||
|
||||
if (token != NULL && strcmp (token, "CDX") == 0)
|
||||
@@ -860,10 +873,12 @@ warc_process_cdx_line (char *lineptr, int field_num_original_url,
|
||||
|
||||
char *token;
|
||||
char *save_ptr;
|
||||
+ int field_num;
|
||||
+
|
||||
token = strtok_r (lineptr, CDX_FIELDSEP, &save_ptr);
|
||||
|
||||
/* Read this line to get the fields we need. */
|
||||
- int field_num = 0;
|
||||
+ field_num = 0;
|
||||
while (token != NULL)
|
||||
{
|
||||
char **val;
|
||||
@@ -926,10 +941,7 @@ warc_process_cdx_line (char *lineptr, int field_num_original_url,
|
||||
static bool
|
||||
warc_load_cdx_dedup_file (void)
|
||||
{
|
||||
- FILE *f = fopen (opt.warc_cdx_dedup_filename, "r");
|
||||
- if (f == NULL)
|
||||
- return false;
|
||||
-
|
||||
+ FILE *f;
|
||||
int field_num_original_url = -1;
|
||||
int field_num_checksum = -1;
|
||||
int field_num_record_id = -1;
|
||||
@@ -938,6 +950,10 @@ warc_load_cdx_dedup_file (void)
|
||||
size_t n = 0;
|
||||
ssize_t line_length;
|
||||
|
||||
+ f = fopen (opt.warc_cdx_dedup_filename, "r");
|
||||
+ if (f == NULL)
|
||||
+ return false;
|
||||
+
|
||||
/* The first line should contain the CDX header.
|
||||
Format: " CDX x x x x x"
|
||||
where x are field type indicators. For our purposes, we only
|
||||
@@ -965,6 +981,7 @@ _("CDX file does not list record ids. (Missing column 'u'.)\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
+ int nrecords;
|
||||
/* Initialize the table. */
|
||||
warc_cdx_dedup_table = hash_table_new (1000, warc_hash_sha1_digest,
|
||||
warc_cmp_sha1_digest);
|
||||
@@ -982,7 +999,7 @@ _("CDX file does not list record ids. (Missing column 'u'.)\n"));
|
||||
while (line_length != -1);
|
||||
|
||||
/* Print results. */
|
||||
- int nrecords = hash_table_count (warc_cdx_dedup_table);
|
||||
+ nrecords = hash_table_count (warc_cdx_dedup_table);
|
||||
logprintf (LOG_VERBOSE, ngettext ("Loaded %d record from CDX.\n\n",
|
||||
"Loaded %d records from CDX.\n\n",
|
||||
nrecords),
|
||||
@@ -1002,12 +1019,14 @@ _("CDX file does not list record ids. (Missing column 'u'.)\n"));
|
||||
static struct warc_cdx_record *
|
||||
warc_find_duplicate_cdx_record (char *url, char *sha1_digest_payload)
|
||||
{
|
||||
+ char *key;
|
||||
+ struct warc_cdx_record *rec_existing;
|
||||
+ int found;
|
||||
+
|
||||
if (warc_cdx_dedup_table == NULL)
|
||||
return NULL;
|
||||
|
||||
- char *key;
|
||||
- struct warc_cdx_record *rec_existing;
|
||||
- int found = hash_table_get_pair (warc_cdx_dedup_table, sha1_digest_payload,
|
||||
+ found = hash_table_get_pair (warc_cdx_dedup_table, sha1_digest_payload,
|
||||
&key, &rec_existing);
|
||||
|
||||
if (found && strcmp (rec_existing->url, url) == 0)
|
||||
@@ -1079,11 +1098,13 @@ warc_init (void)
|
||||
static void
|
||||
warc_write_metadata (void)
|
||||
{
|
||||
+ char manifest_uuid [48];
|
||||
+ FILE * warc_tmp_fp;
|
||||
+
|
||||
/* If there are multiple WARC files, the metadata should be written to a separate file. */
|
||||
if (opt.warc_maxsize > 0)
|
||||
warc_start_new_file (true);
|
||||
|
||||
- char manifest_uuid [48];
|
||||
warc_uuid_str (manifest_uuid);
|
||||
|
||||
fflush (warc_manifest_fp);
|
||||
@@ -1093,7 +1114,7 @@ warc_write_metadata (void)
|
||||
warc_manifest_fp, -1);
|
||||
/* warc_write_resource_record has closed warc_manifest_fp. */
|
||||
|
||||
- FILE * warc_tmp_fp = warc_tempfile ();
|
||||
+ warc_tmp_fp = warc_tempfile ();
|
||||
if (warc_tmp_fp == NULL)
|
||||
{
|
||||
logprintf (LOG_NOTQUIET, _("Could not open temporary WARC file.\n"));
|
||||
@@ -1148,10 +1169,11 @@ FILE *
|
||||
warc_tempfile (void)
|
||||
{
|
||||
char filename[100];
|
||||
+ int fd;
|
||||
if (path_search (filename, 100, opt.warc_tempdir, "wget", true) == -1)
|
||||
return NULL;
|
||||
|
||||
- int fd = mkstemp (filename);
|
||||
+ fd = mkstemp (filename);
|
||||
if (fd < 0)
|
||||
return NULL;
|
||||
|
||||
@@ -1210,8 +1232,10 @@ warc_write_cdx_record (const char *url, const char *timestamp_str,
|
||||
off_t offset, const char *warc_filename,
|
||||
const char *response_uuid)
|
||||
{
|
||||
- /* Transform the timestamp. */
|
||||
char timestamp_str_cdx [15];
|
||||
+ const char *checksum;
|
||||
+
|
||||
+ /* Transform the timestamp. */
|
||||
memcpy (timestamp_str_cdx , timestamp_str , 4); /* "YYYY" "-" */
|
||||
memcpy (timestamp_str_cdx + 4, timestamp_str + 5, 2); /* "mm" "-" */
|
||||
memcpy (timestamp_str_cdx + 6, timestamp_str + 8, 2); /* "dd" "T" */
|
||||
@@ -1221,7 +1245,6 @@ warc_write_cdx_record (const char *url, const char *timestamp_str,
|
||||
timestamp_str_cdx[14] = '\0';
|
||||
|
||||
/* Rewrite the checksum. */
|
||||
- const char *checksum;
|
||||
if (payload_digest != NULL)
|
||||
checksum = payload_digest + 5; /* Skip the "sha1:" */
|
||||
else
|
||||
@@ -1235,7 +1258,7 @@ warc_write_cdx_record (const char *url, const char *timestamp_str,
|
||||
/* Print the CDX line. */
|
||||
fprintf (warc_current_cdx_file, "%s %s %s %s %d %s %s - %ld %s %s\n", url,
|
||||
timestamp_str_cdx, url, mime_type, response_code, checksum,
|
||||
- redirect_location, offset, warc_current_filename, response_uuid);
|
||||
+ redirect_location, (long int)offset, warc_current_filename, response_uuid);
|
||||
fflush (warc_current_cdx_file);
|
||||
|
||||
return true;
|
||||
@@ -1260,10 +1283,11 @@ warc_write_revisit_record (char *url, char *timestamp_str,
|
||||
char *refers_to, ip_address *ip, FILE *body)
|
||||
{
|
||||
char revisit_uuid [48];
|
||||
- warc_uuid_str (revisit_uuid);
|
||||
-
|
||||
char *block_digest = NULL;
|
||||
char sha1_res_block[SHA1_DIGEST_SIZE];
|
||||
+
|
||||
+ warc_uuid_str (revisit_uuid);
|
||||
+
|
||||
sha1_stream (body, sha1_res_block);
|
||||
block_digest = warc_base32_sha1_digest (sha1_res_block);
|
||||
|
||||
@@ -1314,6 +1338,9 @@ warc_write_response_record (char *url, char *timestamp_str,
|
||||
char sha1_res_block[SHA1_DIGEST_SIZE];
|
||||
char sha1_res_payload[SHA1_DIGEST_SIZE];
|
||||
|
||||
+ char response_uuid [48];
|
||||
+ off_t offset;
|
||||
+
|
||||
if (opt.warc_digests_enabled)
|
||||
{
|
||||
/* Calculate the block and payload digests. */
|
||||
@@ -1357,11 +1384,10 @@ warc_write_response_record (char *url, char *timestamp_str,
|
||||
|
||||
/* Not a revisit, just store the record. */
|
||||
|
||||
- char response_uuid [48];
|
||||
warc_uuid_str (response_uuid);
|
||||
|
||||
fseeko (warc_current_file, 0L, SEEK_END);
|
||||
- off_t offset = ftello (warc_current_file);
|
||||
+ offset = ftello (warc_current_file);
|
||||
|
||||
warc_write_start_record ();
|
||||
warc_write_header ("WARC-Type", "response");
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
diff -Naur wget-1.14.orig/doc/wget.texi wget-1.14.new/doc/wget.texi
|
||||
--- wget-1.14.orig/doc/wget.texi 2012-08-04 02:41:52.000000000 -0600
|
||||
+++ wget-1.14.new/doc/wget.texi 2013-05-26 11:18:52.986107183 -0600
|
||||
@@ -876,7 +876,7 @@
|
||||
actions of one.
|
||||
|
||||
@cindex proxy
|
||||
-@itemx --no-proxy
|
||||
+@item --no-proxy
|
||||
Don't use proxies, even if the appropriate @code{*_proxy} environment
|
||||
variable is defined.
|
||||
|
||||
@@ -977,7 +977,7 @@
|
||||
whose encoding does not match the one used locally.
|
||||
|
||||
@cindex IPv6
|
||||
-@itemx -4
|
||||
+@item -4
|
||||
@itemx --inet4-only
|
||||
@itemx -6
|
||||
@itemx --inet6-only
|
||||
@@ -2106,32 +2106,32 @@
|
||||
|
||||
|
||||
@table @asis
|
||||
-@item 0
|
||||
+@item C<0>
|
||||
No problems occurred.
|
||||
|
||||
-@item 1
|
||||
+@item C<1>
|
||||
Generic error code.
|
||||
|
||||
-@item 2
|
||||
+@item C<2>
|
||||
Parse error---for instance, when parsing command-line options, the
|
||||
@samp{.wgetrc} or @samp{.netrc}...
|
||||
|
||||
-@item 3
|
||||
+@item C<3>
|
||||
File I/O error.
|
||||
|
||||
-@item 4
|
||||
+@item C<4>
|
||||
Network failure.
|
||||
|
||||
-@item 5
|
||||
+@item C<5>
|
||||
SSL verification failure.
|
||||
|
||||
-@item 6
|
||||
+@item C<6>
|
||||
Username/password authentication failure.
|
||||
|
||||
-@item 7
|
||||
+@item C<7>
|
||||
Protocol errors.
|
||||
|
||||
-@item 8
|
||||
+@item C<8>
|
||||
Server issued an error response.
|
||||
@end table
|
||||
|
||||
@@ -3094,7 +3094,7 @@
|
||||
Change setting of passive @sc{ftp}, equivalent to the
|
||||
@samp{--passive-ftp} option.
|
||||
|
||||
-@itemx password = @var{string}
|
||||
+@item password = @var{string}
|
||||
Specify password @var{string} for both @sc{ftp} and @sc{http} file retrieval.
|
||||
This command can be overridden using the @samp{ftp_password} and
|
||||
@samp{http_password} command for @sc{ftp} and @sc{http} respectively.
|
||||
@@ -3605,7 +3605,7 @@
|
||||
may be specified from within Wget itself.
|
||||
|
||||
@table @samp
|
||||
-@itemx --no-proxy
|
||||
+@item --no-proxy
|
||||
@itemx proxy = on/off
|
||||
This option and the corresponding command may be used to suppress the
|
||||
use of proxy, even if the appropriate environment variables are set.
|
||||
@@ -1,90 +0,0 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 873c3c9..45d6602 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -161,6 +161,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 02d0cf9..33825e2 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 123560b..30a98f9 100644
|
||||
--- a/src/config.h.in
|
||||
+++ b/src/config.h.in
|
||||
@@ -656,6 +656,9 @@
|
||||
/* Define to 1 if you have the <langinfo.h> header file. */
|
||||
#undef HAVE_LANGINFO_H
|
||||
|
||||
+/* 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
|
||||
|
||||
@@ -668,6 +671,9 @@
|
||||
/* Define if you have the libgnutls library. */
|
||||
#undef HAVE_LIBGNUTLS
|
||||
|
||||
+/* Define to 1 if you have the `network' library (-lnetwork). */
|
||||
+#undef HAVE_LIBNETWORK
|
||||
+
|
||||
/* Define to 1 if you have the `gpg-error' library (-lgpg-error). */
|
||||
#undef HAVE_LIBGPG_ERROR
|
||||
|
||||
diff --git a/src/connect.c b/src/connect.c
|
||||
index 119ccb7..7237484 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 3f27ea0..3cd3ed9 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;
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
From 242dd3e8ecdcefbd023b47092cbc19ce806fdacb Mon Sep 17 00:00:00 2001
|
||||
From d95daf9cb193a1fad78540947f57e8737c170835 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 b24588f..b396ec2 100644
|
||||
index 3cbe618..e617bb2 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -161,6 +161,7 @@ AC_HEADER_STDBOOL
|
||||
@@ -170,6 +170,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)
|
||||
@@ -38,10 +38,10 @@ index 777e973..5a8b75d 100644
|
||||
|
||||
|
||||
diff --git a/src/config.h.in b/src/config.h.in
|
||||
index 4b03033..a4543c4 100644
|
||||
index 879ce64..22bd801 100644
|
||||
--- a/src/config.h.in
|
||||
+++ b/src/config.h.in
|
||||
@@ -672,6 +672,9 @@
|
||||
@@ -699,6 +699,9 @@
|
||||
/* Define to 1 if you have the <langinfo.h> header file. */
|
||||
#undef HAVE_LANGINFO_H
|
||||
|
||||
@@ -51,7 +51,7 @@ index 4b03033..a4543c4 100644
|
||||
/* Define to 1 if you have the `dl' library (-ldl). */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
@@ -684,6 +687,9 @@
|
||||
@@ -711,6 +714,9 @@
|
||||
/* Define to 1 if you have the <libintl.h> header file. */
|
||||
#undef HAVE_LIBINTL_H
|
||||
|
||||
@@ -62,7 +62,7 @@ index 4b03033..a4543c4 100644
|
||||
#undef HAVE_LIBNSL
|
||||
|
||||
diff --git a/src/connect.c b/src/connect.c
|
||||
index bfb079b..916a90e 100644
|
||||
index 1fb1819..f2c832b 100644
|
||||
--- a/src/connect.c
|
||||
+++ b/src/connect.c
|
||||
@@ -46,7 +46,7 @@ as that of the covered work. */
|
||||
@@ -75,7 +75,7 @@ index bfb079b..916a90e 100644
|
||||
# endif
|
||||
#endif /* not WINDOWS */
|
||||
diff --git a/src/host.h b/src/host.h
|
||||
index 3f27ea0..3cd3ed9 100644
|
||||
index 84f3d13..e664e7f 100644
|
||||
--- a/src/host.h
|
||||
+++ b/src/host.h
|
||||
@@ -42,9 +42,9 @@ as that of the covered work. */
|
||||
@@ -95,17 +95,17 @@ index 3f27ea0..3cd3ed9 100644
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 6bc747571c02e44994578c13d5920a41f9a68a50 Mon Sep 17 00:00:00 2001
|
||||
From 429d0bbb2c9d1243d009df399045028cc062684e 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/ftp-basic.c b/src/ftp-basic.c
|
||||
index 7a512c6..7237cd1 100644
|
||||
index b6e67e2..61cf7a4 100644
|
||||
--- a/src/ftp-basic.c
|
||||
+++ b/src/ftp-basic.c
|
||||
@@ -969,8 +969,6 @@ ftp_list (int csock, const char *file, bool avoid_list_a, bool avoid_list,
|
||||
@@ -965,8 +965,6 @@ ftp_list (int csock, const char *file, bool avoid_list_a, bool avoid_list,
|
||||
bool ok = false;
|
||||
size_t i = 0;
|
||||
|
||||
@@ -114,7 +114,7 @@ index 7a512c6..7237cd1 100644
|
||||
/* 2013-10-12 Andrea Urbani (matfanjol)
|
||||
For more information about LIST and "LIST -a" please look at ftp.c,
|
||||
function getftp, text "__LIST_A_EXPLANATION__".
|
||||
@@ -979,7 +977,9 @@ ftp_list (int csock, const char *file, bool avoid_list_a, bool avoid_list,
|
||||
@@ -975,7 +973,9 @@ ftp_list (int csock, const char *file, bool avoid_list_a, bool avoid_list,
|
||||
later "i" variable. */
|
||||
const char *list_commands[] = { "LIST -a",
|
||||
"LIST" };
|
||||
@@ -125,10 +125,10 @@ index 7a512c6..7237cd1 100644
|
||||
{
|
||||
i = countof (list_commands)- 1;
|
||||
diff --git a/src/html-url.c b/src/html-url.c
|
||||
index 1bb44b4..5285983 100644
|
||||
index 903864e..ebeb382 100644
|
||||
--- a/src/html-url.c
|
||||
+++ b/src/html-url.c
|
||||
@@ -789,6 +789,7 @@ get_urls_file (const char *file)
|
||||
@@ -790,6 +790,7 @@ get_urls_file (const char *file)
|
||||
char *url_text;
|
||||
struct urlpos *entry;
|
||||
struct url *url;
|
||||
@@ -136,7 +136,7 @@ index 1bb44b4..5285983 100644
|
||||
|
||||
const char *line_beg = text;
|
||||
const char *line_end = memchr (text, '\n', text_end - text);
|
||||
@@ -821,7 +822,7 @@ get_urls_file (const char *file)
|
||||
@@ -822,7 +823,7 @@ get_urls_file (const char *file)
|
||||
url_text = merged;
|
||||
}
|
||||
|
||||
@@ -146,27 +146,10 @@ index 1bb44b4..5285983 100644
|
||||
{
|
||||
xfree (url_text);
|
||||
diff --git a/src/http.c b/src/http.c
|
||||
index 5715df6..d6e875c 100644
|
||||
index 4b99c17..5ecf43b 100644
|
||||
--- a/src/http.c
|
||||
+++ b/src/http.c
|
||||
@@ -1067,6 +1067,7 @@ extract_param (const char **source, param_token *name, param_token *value,
|
||||
char separator)
|
||||
{
|
||||
const char *p = *source;
|
||||
+ int param_type;
|
||||
|
||||
while (c_isspace (*p)) ++p;
|
||||
if (!*p)
|
||||
@@ -1122,7 +1123,7 @@ extract_param (const char **source, param_token *name, param_token *value,
|
||||
}
|
||||
*source = p;
|
||||
|
||||
- int param_type = modify_param_name(name);
|
||||
+ param_type = modify_param_name(name);
|
||||
if (NOT_RFC2231 != param_type)
|
||||
{
|
||||
modify_param_value(value, param_type);
|
||||
@@ -1512,6 +1513,7 @@ read_response_body (struct http_stat *hs, int sock, FILE *fp, wgint contlen,
|
||||
@@ -1532,6 +1532,7 @@ read_response_body (struct http_stat *hs, int sock, FILE *fp, wgint contlen,
|
||||
int warc_payload_offset = 0;
|
||||
FILE *warc_tmp = NULL;
|
||||
int warcerr = 0;
|
||||
@@ -174,7 +157,7 @@ index 5715df6..d6e875c 100644
|
||||
|
||||
if (opt.warc_filename != NULL)
|
||||
{
|
||||
@@ -1548,7 +1550,7 @@ read_response_body (struct http_stat *hs, int sock, FILE *fp, wgint contlen,
|
||||
@@ -1568,7 +1569,7 @@ read_response_body (struct http_stat *hs, int sock, FILE *fp, wgint contlen,
|
||||
}
|
||||
|
||||
/* Read the response body. */
|
||||
@@ -183,7 +166,7 @@ index 5715df6..d6e875c 100644
|
||||
if (contlen != -1)
|
||||
/* If content-length is present, read that much; otherwise, read
|
||||
until EOF. The HTTP spec doesn't require the server to
|
||||
@@ -1653,6 +1655,7 @@ static uerr_t
|
||||
@@ -1673,6 +1674,7 @@ static uerr_t
|
||||
gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
|
||||
struct iri *iri, int count)
|
||||
{
|
||||
@@ -191,7 +174,7 @@ index 5715df6..d6e875c 100644
|
||||
struct request *req;
|
||||
|
||||
char *type;
|
||||
@@ -2125,10 +2128,11 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
|
||||
@@ -2141,10 +2143,11 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
|
||||
if (write_error >= 0 && warc_tmp != NULL)
|
||||
{
|
||||
/* Remember end of headers / start of payload. */
|
||||
@@ -204,7 +187,7 @@ index 5715df6..d6e875c 100644
|
||||
if (warc_tmp_written != body_data_size)
|
||||
write_error = -2;
|
||||
}
|
||||
@@ -2309,6 +2313,7 @@ read_header:
|
||||
@@ -2325,6 +2328,7 @@ read_header:
|
||||
|
||||
if (statcode == HTTP_STATUS_UNAUTHORIZED)
|
||||
{
|
||||
@@ -212,7 +195,7 @@ index 5715df6..d6e875c 100644
|
||||
/* Authorization is required. */
|
||||
|
||||
/* Normally we are not interested in the response body.
|
||||
@@ -2347,7 +2352,7 @@ read_header:
|
||||
@@ -2363,7 +2367,7 @@ read_header:
|
||||
}
|
||||
|
||||
pconn.authorized = false;
|
||||
@@ -222,10 +205,10 @@ index 5715df6..d6e875c 100644
|
||||
{
|
||||
/* IIS sends multiple copies of WWW-Authenticate, one with
|
||||
diff --git a/src/main.c b/src/main.c
|
||||
index 19d7253..ea6986e 100644
|
||||
index 1ada822..a72249d 100644
|
||||
--- a/src/main.c
|
||||
+++ b/src/main.c
|
||||
@@ -987,13 +987,20 @@ main (int argc, char **argv)
|
||||
@@ -987,13 +987,18 @@ main (int argc, char **argv)
|
||||
int i, ret, longindex;
|
||||
int nurl;
|
||||
bool append_to_log = false;
|
||||
@@ -233,8 +216,6 @@ index 19d7253..ea6986e 100644
|
||||
+ double start_time;
|
||||
+ int arglen;
|
||||
+ int argstring_length;
|
||||
+ int retconf;
|
||||
+ bool use_userconfig = false;
|
||||
+ char *p;
|
||||
|
||||
total_downloaded_bytes = 0;
|
||||
@@ -248,7 +229,7 @@ index 19d7253..ea6986e 100644
|
||||
|
||||
i18n_initialize ();
|
||||
|
||||
@@ -1015,10 +1022,10 @@ main (int argc, char **argv)
|
||||
@@ -1015,10 +1020,10 @@ main (int argc, char **argv)
|
||||
#endif
|
||||
|
||||
/* Construct the arguments string. */
|
||||
@@ -261,7 +242,7 @@ index 19d7253..ea6986e 100644
|
||||
if (p == NULL)
|
||||
{
|
||||
fprintf (stderr, _("Memory allocation problem\n"));
|
||||
@@ -1027,7 +1034,7 @@ main (int argc, char **argv)
|
||||
@@ -1027,7 +1032,7 @@ main (int argc, char **argv)
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
*p++ = '"';
|
||||
@@ -270,16 +251,7 @@ index 19d7253..ea6986e 100644
|
||||
memcpy (p, argv[i], arglen);
|
||||
p += arglen;
|
||||
*p++ = '"';
|
||||
@@ -1043,8 +1050,6 @@ main (int argc, char **argv)
|
||||
/* This separate getopt_long is needed to find the user config file
|
||||
option ("--config") and parse it before the other user options. */
|
||||
longindex = -1;
|
||||
- int retconf;
|
||||
- bool use_userconfig = false;
|
||||
|
||||
while ((retconf = getopt_long (argc, argv,
|
||||
short_options, long_options, &longindex)) != -1)
|
||||
@@ -1672,10 +1677,12 @@ outputting to a regular file.\n"));
|
||||
@@ -1702,10 +1707,12 @@ outputting to a regular file.\n"));
|
||||
total_downloaded_bytes != 0)
|
||||
{
|
||||
double end_time = ptimer_measure (timer);
|
||||
@@ -292,13 +264,13 @@ index 19d7253..ea6986e 100644
|
||||
+ wall_time = xstrdup (secs_to_human_time (end_time - start_time));
|
||||
+ download_time = xstrdup (secs_to_human_time (total_download_time));
|
||||
logprintf (LOG_NOTQUIET,
|
||||
_("FINISHED --%s--\nTotal wall clock time: %s\n"
|
||||
"Downloaded: %d files, %s in %s (%s)\n"),
|
||||
_("FINISHED --%s--\nTotal wall clock time: %s\n"
|
||||
"Downloaded: %d files, %s in %s (%s)\n"),
|
||||
diff --git a/src/retr.c b/src/retr.c
|
||||
index 683c811..c0a815e 100644
|
||||
index 71b5c28..0c7c29f 100644
|
||||
--- a/src/retr.c
|
||||
+++ b/src/retr.c
|
||||
@@ -377,8 +377,9 @@ fd_read_body (int fd, FILE *out, wgint toread, wgint startpos,
|
||||
@@ -378,8 +378,9 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread,
|
||||
|
||||
if (ret > 0)
|
||||
{
|
||||
@@ -310,7 +282,7 @@ index 683c811..c0a815e 100644
|
||||
{
|
||||
ret = (write_res == -3) ? -3 : -2;
|
||||
diff --git a/src/utils.c b/src/utils.c
|
||||
index 4354668..d5fecc1 100644
|
||||
index 78c282e..6a21164 100644
|
||||
--- a/src/utils.c
|
||||
+++ b/src/utils.c
|
||||
@@ -64,7 +64,9 @@ as that of the covered work. */
|
||||
@@ -320,26 +292,14 @@ index 4354668..d5fecc1 100644
|
||||
+#ifndef __HAIKU__
|
||||
#include <sys/ioctl.h>
|
||||
+#endif
|
||||
#ifdef HAVE_TERMIOS_H
|
||||
# include <termios.h>
|
||||
#endif
|
||||
diff --git a/src/version.c b/src/version.c
|
||||
new file mode 100644
|
||||
index 0000000..5ee99d1
|
||||
--- /dev/null
|
||||
+++ b/src/version.c
|
||||
@@ -0,0 +1,6 @@
|
||||
+/* version.c */
|
||||
+/* Autogenerated by Makefile - DO NOT EDIT */
|
||||
+
|
||||
+const char *version_string = "1.15";
|
||||
+const char *compilation_string = "gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC=\"/packages/wget-1.15-1/.settings/wgetrc\" -DLOCALEDIR=\"/packages/wget-1.15-1/.self/data/locale\" -I. -I../lib -I../lib -O2 -Wall";
|
||||
+const char *link_string = "gcc -O2 -Wall -lssl -lcrypto -lz -lnetwork -lnetwork -lsocket ftp-opie.o openssl.o http-ntlm.o ../lib/libgnu.a";
|
||||
#include <termios.h>
|
||||
|
||||
/* Needed for Unix version of run_with_timeout. */
|
||||
diff --git a/src/warc.c b/src/warc.c
|
||||
index c3a5857..8dcc055 100644
|
||||
index 46459ac..fdef2d6 100644
|
||||
--- a/src/warc.c
|
||||
+++ b/src/warc.c
|
||||
@@ -160,10 +160,11 @@ warc_write_buffer (const char *buffer, size_t size)
|
||||
@@ -163,10 +163,11 @@ warc_write_buffer (const char *buffer, size_t size)
|
||||
static bool
|
||||
warc_write_string (const char *str)
|
||||
{
|
||||
@@ -352,7 +312,7 @@ index c3a5857..8dcc055 100644
|
||||
if (n != warc_write_buffer (str, n))
|
||||
warc_write_ok = false;
|
||||
|
||||
@@ -251,6 +252,8 @@ static bool
|
||||
@@ -254,6 +255,8 @@ static bool
|
||||
warc_write_block_from_file (FILE *data_in)
|
||||
{
|
||||
/* Add the Content-Length header. */
|
||||
@@ -361,7 +321,7 @@ index c3a5857..8dcc055 100644
|
||||
char content_length[MAX_INT_TO_STRING_LEN(off_t)];
|
||||
fseeko (data_in, 0L, SEEK_END);
|
||||
number_to_string (content_length, ftello (data_in));
|
||||
@@ -263,8 +266,6 @@ warc_write_block_from_file (FILE *data_in)
|
||||
@@ -266,8 +269,6 @@ warc_write_block_from_file (FILE *data_in)
|
||||
warc_write_ok = false;
|
||||
|
||||
/* Copy the data in the file to the WARC record. */
|
||||
@@ -370,7 +330,7 @@ index c3a5857..8dcc055 100644
|
||||
while (warc_write_ok && (s = fread (buffer, 1, BUFSIZ, data_in)) > 0)
|
||||
{
|
||||
if (warc_write_buffer (buffer, s) < s)
|
||||
@@ -289,6 +290,12 @@ warc_write_end_record (void)
|
||||
@@ -292,6 +293,12 @@ warc_write_end_record (void)
|
||||
/* We start a new gzip stream for each record. */
|
||||
if (warc_write_ok && warc_current_gzfile)
|
||||
{
|
||||
@@ -383,7 +343,7 @@ index c3a5857..8dcc055 100644
|
||||
if (gzclose (warc_current_gzfile) != Z_OK)
|
||||
{
|
||||
warc_write_ok = false;
|
||||
@@ -314,17 +321,16 @@ warc_write_end_record (void)
|
||||
@@ -317,17 +324,16 @@ warc_write_end_record (void)
|
||||
*/
|
||||
|
||||
/* Calculate the uncompressed and compressed sizes. */
|
||||
@@ -405,7 +365,7 @@ index c3a5857..8dcc055 100644
|
||||
warc_current_file);
|
||||
if (result != GZIP_STATIC_HEADER_SIZE)
|
||||
{
|
||||
@@ -341,7 +347,6 @@ warc_write_end_record (void)
|
||||
@@ -344,7 +350,6 @@ warc_write_end_record (void)
|
||||
fwrite (static_header, 1, GZIP_STATIC_HEADER_SIZE, warc_current_file);
|
||||
|
||||
/* Prepare the extra GZIP header. */
|
||||
@@ -413,7 +373,7 @@ index c3a5857..8dcc055 100644
|
||||
/* XLEN, the length of the extra header fields. */
|
||||
extra_header[0] = ((EXTRA_GZIP_HEADER_SIZE - 2) & 255);
|
||||
extra_header[1] = ((EXTRA_GZIP_HEADER_SIZE - 2) >> 8) & 255;
|
||||
@@ -653,13 +658,15 @@ warc_write_warcinfo_record (char *filename)
|
||||
@@ -661,13 +666,15 @@ warc_write_warcinfo_record (char *filename)
|
||||
/* Write warc-info record as the first record of the file. */
|
||||
/* We add the record id of this info record to the other records in the
|
||||
file. */
|
||||
@@ -431,7 +391,7 @@ index c3a5857..8dcc055 100644
|
||||
filename_copy = strdup (filename);
|
||||
filename_basename = strdup (basename (filename_copy));
|
||||
|
||||
@@ -671,7 +678,7 @@ warc_write_warcinfo_record (char *filename)
|
||||
@@ -679,7 +686,7 @@ warc_write_warcinfo_record (char *filename)
|
||||
warc_write_header ("WARC-Filename", filename_basename);
|
||||
|
||||
/* Create content. */
|
||||
@@ -440,7 +400,7 @@ index c3a5857..8dcc055 100644
|
||||
if (warc_tmp == NULL)
|
||||
{
|
||||
free (filename_copy);
|
||||
@@ -721,6 +728,10 @@ warc_write_warcinfo_record (char *filename)
|
||||
@@ -729,6 +736,10 @@ warc_write_warcinfo_record (char *filename)
|
||||
static bool
|
||||
warc_start_new_file (bool meta)
|
||||
{
|
||||
@@ -451,7 +411,7 @@ index c3a5857..8dcc055 100644
|
||||
if (opt.warc_filename == NULL)
|
||||
return false;
|
||||
|
||||
@@ -732,9 +743,9 @@ warc_start_new_file (bool meta)
|
||||
@@ -740,9 +751,9 @@ warc_start_new_file (bool meta)
|
||||
|
||||
warc_current_file_number++;
|
||||
|
||||
@@ -463,7 +423,7 @@ index c3a5857..8dcc055 100644
|
||||
warc_current_filename = new_filename;
|
||||
|
||||
#ifdef __VMS
|
||||
@@ -744,9 +755,9 @@ warc_start_new_file (bool meta)
|
||||
@@ -752,9 +763,9 @@ warc_start_new_file (bool meta)
|
||||
#endif /* def __VMS [else] */
|
||||
|
||||
#ifdef HAVE_LIBZ
|
||||
@@ -475,7 +435,7 @@ index c3a5857..8dcc055 100644
|
||||
#endif
|
||||
|
||||
/* If max size is enabled, we add a serial number to the file names. */
|
||||
@@ -820,12 +831,13 @@ static bool
|
||||
@@ -828,12 +839,13 @@ static bool
|
||||
warc_parse_cdx_header (char *lineptr, int *field_num_original_url,
|
||||
int *field_num_checksum, int *field_num_record_id)
|
||||
{
|
||||
@@ -491,7 +451,7 @@ index c3a5857..8dcc055 100644
|
||||
token = strtok_r (lineptr, CDX_FIELDSEP, &save_ptr);
|
||||
|
||||
if (token != NULL && strcmp (token, "CDX") == 0)
|
||||
@@ -869,10 +881,12 @@ warc_process_cdx_line (char *lineptr, int field_num_original_url,
|
||||
@@ -877,10 +889,12 @@ warc_process_cdx_line (char *lineptr, int field_num_original_url,
|
||||
|
||||
char *token;
|
||||
char *save_ptr;
|
||||
@@ -505,7 +465,7 @@ index c3a5857..8dcc055 100644
|
||||
while (token != NULL)
|
||||
{
|
||||
char **val;
|
||||
@@ -934,10 +948,7 @@ warc_process_cdx_line (char *lineptr, int field_num_original_url,
|
||||
@@ -942,10 +956,7 @@ warc_process_cdx_line (char *lineptr, int field_num_original_url,
|
||||
static bool
|
||||
warc_load_cdx_dedup_file (void)
|
||||
{
|
||||
@@ -517,7 +477,7 @@ index c3a5857..8dcc055 100644
|
||||
int field_num_original_url = -1;
|
||||
int field_num_checksum = -1;
|
||||
int field_num_record_id = -1;
|
||||
@@ -946,6 +957,10 @@ warc_load_cdx_dedup_file (void)
|
||||
@@ -954,6 +965,10 @@ warc_load_cdx_dedup_file (void)
|
||||
size_t n = 0;
|
||||
ssize_t line_length;
|
||||
|
||||
@@ -528,7 +488,7 @@ index c3a5857..8dcc055 100644
|
||||
/* The first line should contain the CDX header.
|
||||
Format: " CDX x x x x x"
|
||||
where x are field type indicators. For our purposes, we only
|
||||
@@ -973,6 +988,7 @@ _("CDX file does not list record ids. (Missing column 'u'.)\n"));
|
||||
@@ -981,6 +996,7 @@ _("CDX file does not list record ids. (Missing column 'u'.)\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -536,7 +496,7 @@ index c3a5857..8dcc055 100644
|
||||
/* Initialize the table. */
|
||||
warc_cdx_dedup_table = hash_table_new (1000, warc_hash_sha1_digest,
|
||||
warc_cmp_sha1_digest);
|
||||
@@ -990,7 +1006,7 @@ _("CDX file does not list record ids. (Missing column 'u'.)\n"));
|
||||
@@ -998,7 +1014,7 @@ _("CDX file does not list record ids. (Missing column 'u'.)\n"));
|
||||
while (line_length != -1);
|
||||
|
||||
/* Print results. */
|
||||
@@ -545,7 +505,7 @@ index c3a5857..8dcc055 100644
|
||||
logprintf (LOG_VERBOSE, ngettext ("Loaded %d record from CDX.\n\n",
|
||||
"Loaded %d records from CDX.\n\n",
|
||||
nrecords),
|
||||
@@ -1010,10 +1026,11 @@ _("CDX file does not list record ids. (Missing column 'u'.)\n"));
|
||||
@@ -1018,10 +1034,11 @@ _("CDX file does not list record ids. (Missing column 'u'.)\n"));
|
||||
static struct warc_cdx_record *
|
||||
warc_find_duplicate_cdx_record (char *url, char *sha1_digest_payload)
|
||||
{
|
||||
@@ -558,7 +518,7 @@ index c3a5857..8dcc055 100644
|
||||
= hash_table_get (warc_cdx_dedup_table, sha1_digest_payload);
|
||||
|
||||
if (rec_existing && strcmp (rec_existing->url, url) == 0)
|
||||
@@ -1085,11 +1102,13 @@ warc_init (void)
|
||||
@@ -1093,11 +1110,13 @@ warc_init (void)
|
||||
static void
|
||||
warc_write_metadata (void)
|
||||
{
|
||||
@@ -573,7 +533,7 @@ index c3a5857..8dcc055 100644
|
||||
warc_uuid_str (manifest_uuid);
|
||||
|
||||
fflush (warc_manifest_fp);
|
||||
@@ -1099,7 +1118,7 @@ warc_write_metadata (void)
|
||||
@@ -1107,7 +1126,7 @@ warc_write_metadata (void)
|
||||
warc_manifest_fp, -1);
|
||||
/* warc_write_resource_record has closed warc_manifest_fp. */
|
||||
|
||||
@@ -582,7 +542,7 @@ index c3a5857..8dcc055 100644
|
||||
if (warc_tmp_fp == NULL)
|
||||
{
|
||||
logprintf (LOG_NOTQUIET, _("Could not open temporary WARC file.\n"));
|
||||
@@ -1153,6 +1172,7 @@ warc_close (void)
|
||||
@@ -1161,6 +1180,7 @@ warc_close (void)
|
||||
FILE *
|
||||
warc_tempfile (void)
|
||||
{
|
||||
@@ -590,7 +550,7 @@ index c3a5857..8dcc055 100644
|
||||
char filename[100];
|
||||
if (path_search (filename, 100, opt.warc_tempdir, "wget", true) == -1)
|
||||
return NULL;
|
||||
@@ -1172,7 +1192,7 @@ warc_tempfile (void)
|
||||
@@ -1180,7 +1200,7 @@ warc_tempfile (void)
|
||||
return fopen (tfn, "w+", "fop=tmd"); /* Create auto-delete temp file. */
|
||||
}
|
||||
#else /* def __VMS */
|
||||
@@ -599,8 +559,8 @@ index c3a5857..8dcc055 100644
|
||||
if (fd < 0)
|
||||
return NULL;
|
||||
|
||||
@@ -1234,8 +1254,11 @@ warc_write_cdx_record (const char *url, const char *timestamp_str,
|
||||
off_t offset, const char *warc_filename,
|
||||
@@ -1242,8 +1262,11 @@ warc_write_cdx_record (const char *url, const char *timestamp_str,
|
||||
off_t offset, const char *warc_filename _GL_UNUSED,
|
||||
const char *response_uuid)
|
||||
{
|
||||
- /* Transform the timestamp. */
|
||||
@@ -612,7 +572,7 @@ index c3a5857..8dcc055 100644
|
||||
memcpy (timestamp_str_cdx , timestamp_str , 4); /* "YYYY" "-" */
|
||||
memcpy (timestamp_str_cdx + 4, timestamp_str + 5, 2); /* "mm" "-" */
|
||||
memcpy (timestamp_str_cdx + 6, timestamp_str + 8, 2); /* "dd" "T" */
|
||||
@@ -1245,7 +1268,6 @@ warc_write_cdx_record (const char *url, const char *timestamp_str,
|
||||
@@ -1253,7 +1276,6 @@ warc_write_cdx_record (const char *url, const char *timestamp_str,
|
||||
timestamp_str_cdx[14] = '\0';
|
||||
|
||||
/* Rewrite the checksum. */
|
||||
@@ -620,7 +580,7 @@ index c3a5857..8dcc055 100644
|
||||
if (payload_digest != NULL)
|
||||
checksum = payload_digest + 5; /* Skip the "sha1:" */
|
||||
else
|
||||
@@ -1256,7 +1278,6 @@ warc_write_cdx_record (const char *url, const char *timestamp_str,
|
||||
@@ -1264,7 +1286,6 @@ warc_write_cdx_record (const char *url, const char *timestamp_str,
|
||||
if (redirect_location == NULL || strlen(redirect_location) == 0)
|
||||
redirect_location = "-";
|
||||
|
||||
@@ -628,7 +588,7 @@ index c3a5857..8dcc055 100644
|
||||
number_to_string (offset_string, offset);
|
||||
|
||||
/* Print the CDX line. */
|
||||
@@ -1288,10 +1309,11 @@ warc_write_revisit_record (char *url, char *timestamp_str,
|
||||
@@ -1296,10 +1317,11 @@ warc_write_revisit_record (char *url, char *timestamp_str,
|
||||
char *refers_to, ip_address *ip, FILE *body)
|
||||
{
|
||||
char revisit_uuid [48];
|
||||
@@ -642,7 +602,7 @@ index c3a5857..8dcc055 100644
|
||||
sha1_stream (body, sha1_res_block);
|
||||
block_digest = warc_base32_sha1_digest (sha1_res_block);
|
||||
|
||||
@@ -1342,6 +1364,9 @@ warc_write_response_record (char *url, char *timestamp_str,
|
||||
@@ -1350,6 +1372,9 @@ warc_write_response_record (char *url, char *timestamp_str,
|
||||
char sha1_res_block[SHA1_DIGEST_SIZE];
|
||||
char sha1_res_payload[SHA1_DIGEST_SIZE];
|
||||
|
||||
@@ -652,7 +612,7 @@ index c3a5857..8dcc055 100644
|
||||
if (opt.warc_digests_enabled)
|
||||
{
|
||||
/* Calculate the block and payload digests. */
|
||||
@@ -1385,11 +1410,10 @@ warc_write_response_record (char *url, char *timestamp_str,
|
||||
@@ -1393,11 +1418,10 @@ warc_write_response_record (char *url, char *timestamp_str,
|
||||
|
||||
/* Not a revisit, just store the record. */
|
||||
|
||||
@@ -668,3 +628,202 @@ index c3a5857..8dcc055 100644
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 9c955c94b7c3c9da50351fd68bfa1a9d6dca80ba Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Mon, 1 Dec 2014 18:00:02 +0000
|
||||
Subject: Fix OpenSSL compile-time check for TLSv1.1 and TLSv1.2
|
||||
|
||||
from upstream
|
||||
|
||||
diff --git a/src/openssl.c b/src/openssl.c
|
||||
index e24954a..3f42b8f 100644
|
||||
--- a/src/openssl.c
|
||||
+++ b/src/openssl.c
|
||||
@@ -216,13 +216,20 @@ ssl_init (void)
|
||||
case secure_protocol_tlsv1:
|
||||
meth = TLSv1_client_method ();
|
||||
break;
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x01001000
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10001000
|
||||
case secure_protocol_tlsv1_1:
|
||||
meth = TLSv1_1_client_method ();
|
||||
break;
|
||||
case secure_protocol_tlsv1_2:
|
||||
meth = TLSv1_2_client_method ();
|
||||
break;
|
||||
+#else
|
||||
+ case secure_protocol_tlsv1_1:
|
||||
+ logprintf (LOG_NOTQUIET, _("Your OpenSSL version is too old to support TLSv1.1\n"));
|
||||
+ goto error;
|
||||
+ case secure_protocol_tlsv1_2:
|
||||
+ logprintf (LOG_NOTQUIET, _("Your OpenSSL version is too old to support TLSv1.2\n"));
|
||||
+ goto error;
|
||||
#endif
|
||||
default:
|
||||
abort ();
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 02ca916f8dddcb1c27cefa1f6ab4c99525d6bdc2 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Mon, 1 Dec 2014 18:14:50 +0000
|
||||
Subject: gcc2 fixes
|
||||
|
||||
|
||||
diff --git a/src/ftp.c b/src/ftp.c
|
||||
index 054cb61..723776c 100644
|
||||
--- a/src/ftp.c
|
||||
+++ b/src/ftp.c
|
||||
@@ -2220,9 +2220,9 @@ has_insecure_name_p (const char *s)
|
||||
static bool
|
||||
is_invalid_entry (struct fileinfo *f)
|
||||
{
|
||||
+ char *f_name = f->name;
|
||||
struct fileinfo *cur;
|
||||
cur = f;
|
||||
- char *f_name = f->name;
|
||||
/* If the node we're currently checking has a duplicate later, we eliminate
|
||||
* the current node and leave the next one intact. */
|
||||
while (cur->next)
|
||||
diff --git a/src/http.c b/src/http.c
|
||||
index 5ecf43b..4176678 100644
|
||||
--- a/src/http.c
|
||||
+++ b/src/http.c
|
||||
@@ -1189,8 +1189,8 @@ static bool
|
||||
parse_content_disposition (const char *hdr, char **filename)
|
||||
{
|
||||
param_token name, value;
|
||||
- *filename = NULL;
|
||||
bool is_url_encoded = false;
|
||||
+ *filename = NULL;
|
||||
for ( ; extract_param (&hdr, &name, &value, ';', &is_url_encoded);
|
||||
is_url_encoded = false)
|
||||
{
|
||||
diff --git a/src/main.c b/src/main.c
|
||||
index a72249d..50dc562 100644
|
||||
--- a/src/main.c
|
||||
+++ b/src/main.c
|
||||
@@ -992,6 +992,9 @@ main (int argc, char **argv)
|
||||
int arglen;
|
||||
int argstring_length;
|
||||
char *p;
|
||||
+ int retconf;
|
||||
+ bool use_userconfig = false;
|
||||
+ bool noconfig = false;
|
||||
|
||||
total_downloaded_bytes = 0;
|
||||
|
||||
@@ -1048,9 +1051,6 @@ main (int argc, char **argv)
|
||||
/* This separate getopt_long is needed to find the user config file
|
||||
option ("--config") and parse it before the other user options. */
|
||||
longindex = -1;
|
||||
- int retconf;
|
||||
- bool use_userconfig = false;
|
||||
- bool noconfig = false;
|
||||
|
||||
while ((retconf = getopt_long (argc, argv,
|
||||
short_options, long_options, &longindex)) != -1)
|
||||
diff --git a/src/openssl.c b/src/openssl.c
|
||||
index 3f42b8f..c1d1f52 100644
|
||||
--- a/src/openssl.c
|
||||
+++ b/src/openssl.c
|
||||
@@ -167,6 +167,8 @@ static int ssl_true_initialized = 0;
|
||||
bool
|
||||
ssl_init (void)
|
||||
{
|
||||
+ SSL_METHOD const *meth;
|
||||
+
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x00907000
|
||||
if (ssl_true_initialized == 0)
|
||||
{
|
||||
@@ -174,9 +176,7 @@ ssl_init (void)
|
||||
ssl_true_initialized = 1;
|
||||
}
|
||||
#endif
|
||||
-
|
||||
- SSL_METHOD const *meth;
|
||||
-
|
||||
+
|
||||
if (ssl_ctx)
|
||||
/* The SSL has already been initialized. */
|
||||
return true;
|
||||
diff --git a/src/progress.c b/src/progress.c
|
||||
index 5ba542d..f0da019 100644
|
||||
--- a/src/progress.c
|
||||
+++ b/src/progress.c
|
||||
@@ -903,6 +903,8 @@ get_eta (int *bcd)
|
||||
static void
|
||||
create_image (struct bar_progress *bp, double dl_total_time, bool done)
|
||||
{
|
||||
+ int cols_diff;
|
||||
+ const char * down_size;
|
||||
const int MAX_FILENAME_COLS = bp->width / 4;
|
||||
char *p = bp->buffer;
|
||||
wgint size = bp->initial_length + bp->count;
|
||||
@@ -964,6 +966,7 @@ create_image (struct bar_progress *bp, double dl_total_time, bool done)
|
||||
}
|
||||
else
|
||||
{
|
||||
+ int padding;
|
||||
int offset_cols;
|
||||
int bytes_in_filename, offset_bytes, col;
|
||||
int *cols_ret = &col;
|
||||
@@ -976,7 +979,7 @@ create_image (struct bar_progress *bp, double dl_total_time, bool done)
|
||||
bytes_in_filename = cols_to_bytes (bp->f_download + offset_bytes, MAX_FILENAME_COLS, cols_ret);
|
||||
memcpy (p, bp->f_download + offset_bytes, bytes_in_filename);
|
||||
p += bytes_in_filename;
|
||||
- int padding = MAX_FILENAME_COLS - *cols_ret;
|
||||
+ padding = MAX_FILENAME_COLS - *cols_ret;
|
||||
for (;padding;padding--)
|
||||
*p++ = ' ';
|
||||
*p++ = ' ';
|
||||
@@ -1059,8 +1062,8 @@ create_image (struct bar_progress *bp, double dl_total_time, bool done)
|
||||
++bp->tick;
|
||||
|
||||
/* " 234.56M" */
|
||||
- const char * down_size = human_readable (size, 1000, 2);
|
||||
- int cols_diff = 7 - count_cols (down_size);
|
||||
+ down_size = human_readable (size, 1000, 2);
|
||||
+ cols_diff = 7 - count_cols (down_size);
|
||||
while (cols_diff > 0)
|
||||
{
|
||||
*p++=' ';
|
||||
diff --git a/src/retr.c b/src/retr.c
|
||||
index 0c7c29f..cb5fa3f 100644
|
||||
--- a/src/retr.c
|
||||
+++ b/src/retr.c
|
||||
@@ -1059,6 +1059,7 @@ retrieve_from_file (const char *file, bool html, int *count)
|
||||
int dt;
|
||||
struct iri *tmpiri = iri_dup (iri);
|
||||
struct url *parsed_url = NULL;
|
||||
+ char *proxy;
|
||||
|
||||
if (cur_url->ignore_when_downloading)
|
||||
continue;
|
||||
@@ -1071,7 +1072,7 @@ retrieve_from_file (const char *file, bool html, int *count)
|
||||
|
||||
parsed_url = url_parse (cur_url->url->url, NULL, tmpiri, true);
|
||||
|
||||
- char *proxy = getproxy (cur_url->url);
|
||||
+ proxy = getproxy (cur_url->url);
|
||||
if ((opt.recursive || opt.page_requisites)
|
||||
&& (cur_url->url->scheme != SCHEME_FTP || proxy))
|
||||
{
|
||||
@@ -1283,10 +1284,11 @@ getproxy (struct url *u)
|
||||
bool
|
||||
url_uses_proxy (struct url * u)
|
||||
{
|
||||
+ char *proxy;
|
||||
bool ret;
|
||||
if (!u)
|
||||
return false;
|
||||
- char *proxy = getproxy (u);
|
||||
+ proxy = getproxy (u);
|
||||
ret = proxy != NULL;
|
||||
free(proxy);
|
||||
return ret;
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
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"
|
||||
SRC_URI="http://ftp.gnu.org/gnu/wget/wget-1.14.tar.gz"
|
||||
CHECKSUM_SHA256="f3a6898e3a765bb94435b04a6668db9e5d19b3e90e0c69a503a2773ae936c269"
|
||||
LICENSE="GNU GPL v3"
|
||||
COPYRIGHT="1996-2012 Free Software Foundation"
|
||||
REVISION="2"
|
||||
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
wget$secondaryArchSuffix = $portVersion
|
||||
cmd:wget$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
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
|
||||
"
|
||||
|
||||
USER_SETTINGS_FILES="
|
||||
settings/wgetrc
|
||||
"
|
||||
|
||||
GLOBAL_WRITABLE_FILES="
|
||||
settings/wgetrc keep-old
|
||||
"
|
||||
|
||||
PATCHES="
|
||||
wget-1.14.patch
|
||||
wget-1.14-build-fixes.patch
|
||||
wget-1.14-pod-fixes.patch
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
libtoolize --force --copy --install
|
||||
aclocal -I m4
|
||||
autoconf
|
||||
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
|
||||
}
|
||||
@@ -5,11 +5,11 @@ such as HTTP, HTTPS and FTP. wget is non-interactive, so it can be called from \
|
||||
scripts.
|
||||
"
|
||||
HOMEPAGE="http://www.gnu.org/software/wget"
|
||||
SRC_URI="http://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz"
|
||||
CHECKSUM_SHA256="52126be8cf1bddd7536886e74c053ad7d0ed2aa89b4b630f76785bac21695fcd"
|
||||
SRC_URI="http://ftp.gnu.org/gnu/wget/wget-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="b977fc10ac7a72d987d48136251aeb332f2dced1aabd50d6d56bdf72e2b79101"
|
||||
LICENSE="GNU GPL v3"
|
||||
COPYRIGHT="1996-2013 Free Software Foundation"
|
||||
REVISION="2"
|
||||
COPYRIGHT="1996-2014 Free Software Foundation"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86 x86_gcc2"
|
||||
|
||||
@@ -49,7 +49,7 @@ GLOBAL_WRITABLE_FILES="
|
||||
settings/wgetrc keep-old
|
||||
"
|
||||
|
||||
PATCHES="wget-1.15.patchset"
|
||||
PATCHES="wget-1.16.patchset"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
Reference in New Issue
Block a user