diff --git a/ports/wget/wget.patch b/ports/wget/wget.patch index f91f6d37..9b83b663 100644 --- a/ports/wget/wget.patch +++ b/ports/wget/wget.patch @@ -124,30 +124,21 @@ diff -Paur --no-dereference -- wget.upstream/configure wget/configure +export gl_cv_struct_dirent_d_ino=yes # Only if the OS actually supports this, Sortix does. +export ac_cv_func_realloc_0_nonnull=yes # TODO: Investigate this, found in flex. # Guess values for system-dependent variables and create Makefiles. - # Generated by GNU Autoconf 2.69 for wget 1.18. + # Generated by GNU Autoconf 2.71 for wget 1.21.4. # -@@ -39179,6 +39299,8 @@ +@@ -65572,6 +65692,8 @@ esac fi GPGME_CONFIG=$ac_cv_path_GPGME_CONFIG +# PATCH: Not cross-compile safe. +GPGME_CONFIG=no if test -n "$GPGME_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GPGME_CONFIG" >&5 - $as_echo "$GPGME_CONFIG" >&6; } -@@ -39841,7 +39963,7 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_idn_stringprep_check_version" >&5 - $as_echo "$ac_cv_lib_idn_stringprep_check_version" >&6; } - if test "x$ac_cv_lib_idn_stringprep_check_version" = xyes; then : -- iri=yes LIBS="${LIBS} -lidn" -+ iri=yes LIBS="${LIBS} -lidn $LIBINTL" - else - iri=no - fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GPGME_CONFIG" >&5 + printf "%s\n" "$GPGME_CONFIG" >&6; } diff -Paur --no-dereference -- wget.upstream/lib/flock.c wget/lib/flock.c --- wget.upstream/lib/flock.c +++ wget/lib/flock.c -@@ -211,6 +211,16 @@ +@@ -215,6 +215,16 @@ return r; } @@ -164,25 +155,22 @@ diff -Paur --no-dereference -- wget.upstream/lib/flock.c wget/lib/flock.c # else /* !HAVE_STRUCT_FLOCK_L_TYPE */ # error "This platform lacks flock function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib." -diff -Paur --no-dereference -- wget.upstream/src/hsts.c wget/src/hsts.c ---- wget.upstream/src/hsts.c -+++ wget/src/hsts.c -@@ -325,9 +325,9 @@ - struct hsts_kh *kh = (struct hsts_kh *) it.key; - struct hsts_kh_info *khi = (struct hsts_kh_info *) it.value; - -- if (fprintf (fp, "%s\t%d\t%d\t%lu\t%lu\n", -+ if (fprintf (fp, "%s\t%d\t%d\t%lli\t%lli\n", - kh->host, kh->explicit_port, khi->include_subdomains, -- khi->created, khi->max_age) < 0) -+ (long long)khi->created, (long long)khi->max_age) < 0) - { - logprintf (LOG_ALWAYS, "Could not write the HSTS database correctly.\n"); - break; +diff -Paur --no-dereference -- wget.upstream/lib/getgroups.c wget/lib/getgroups.c +--- wget.upstream/lib/getgroups.c ++++ wget/lib/getgroups.c +@@ -30,7 +30,7 @@ + /* Provide a stub that fails with ENOSYS, since there is no group + information available on mingw. */ + int +-getgroups (_GL_UNUSED int n, _GL_UNUSED GETGROUPS_T *groups) ++getgroups (_GL_UNUSED int n, _GL_UNUSED gid_t *groups) + { + errno = ENOSYS; + return -1; diff -Paur --no-dereference -- wget.upstream/src/init.c wget/src/init.c --- wget.upstream/src/init.c +++ wget/src/init.c -@@ -39,13 +39,6 @@ +@@ -38,13 +38,6 @@ #include #include #include @@ -195,11 +183,23 @@ diff -Paur --no-dereference -- wget.upstream/src/init.c wget/src/init.c -#endif #include - #ifdef HAVE_LIBPCRE + +diff -Paur --no-dereference -- wget.upstream/src/log.c wget/src/log.c +--- wget.upstream/src/log.c ++++ wget/src/log.c +@@ -981,7 +981,7 @@ + { + pid_t foreground_pgrp = tcgetpgrp (STDIN_FILENO); + +- if (foreground_pgrp != -1 && foreground_pgrp != getpgrp () && !opt.quiet) ++ if (foreground_pgrp != -1 && foreground_pgrp != getpgid (0) && !opt.quiet) + { + /* Process backgrounded */ + redirect_output (true,NULL); diff -Paur --no-dereference -- wget.upstream/src/progress.c wget/src/progress.c --- wget.upstream/src/progress.c +++ wget/src/progress.c -@@ -311,9 +311,15 @@ +@@ -352,9 +352,15 @@ if (dp->rows == dp->initial_length / ROW_BYTES) bytes_this_row -= dp->initial_length % ROW_BYTES; rate = calc_rate (bytes_this_row, dltime - dp->last_timer_value, &units); @@ -215,7 +215,7 @@ diff -Paur --no-dereference -- wget.upstream/src/progress.c wget/src/progress.c dp->last_timer_value = dltime; } -@@ -1093,8 +1099,14 @@ +@@ -1250,8 +1256,14 @@ wgint dlquant = hist->total_bytes + bp->recent_bytes; double dltime = hist->total_time + (dl_total_time - bp->recent_start); double dlspeed = calc_rate (dlquant, dltime, &units); @@ -233,26 +233,28 @@ diff -Paur --no-dereference -- wget.upstream/src/progress.c wget/src/progress.c diff -Paur --no-dereference -- wget.upstream/src/retr.c wget/src/retr.c --- wget.upstream/src/retr.c +++ wget/src/retr.c -@@ -634,9 +634,15 @@ +@@ -783,10 +783,16 @@ double dlrate = calc_rate (bytes, secs, &units); /* Use more digits for smaller numbers (regardless of unit used), e.g. "1022", "247", "12.5", "2.38". */ -+#if defined(__sortix__) ++#if defined(__sortix__) && !defined(__SORTIX_HAS_FORMAT_FLOAT__) + /* PATCH: HACK: Sortix doesn't support floating point printf right now. */ -+ sprintf (res, "%lli %s", (long long)dlrate, ++ snprintf (res, sizeof(res), "%lli %s", ++ (long long)dlrate, + !opt.report_bps ? rate_names[units]: rate_names_bits[units]); +#else - sprintf (res, "%.*f %s", + snprintf (res, sizeof(res), "%.*f %s", dlrate >= 99.95 ? 0 : dlrate >= 9.995 ? 1 : 2, dlrate, !opt.report_bps ? rate_names[units]: rate_names_bits[units]); +- +#endif - return res; } + diff -Paur --no-dereference -- wget.upstream/src/utils.c wget/src/utils.c --- wget.upstream/src/utils.c +++ wget/src/utils.c -@@ -505,7 +505,9 @@ +@@ -504,7 +504,9 @@ } /* child: give up the privileges and keep running. */ @@ -262,7 +264,7 @@ diff -Paur --no-dereference -- wget.upstream/src/utils.c wget/src/utils.c if (freopen ("/dev/null", "r", stdin) == NULL) DEBUGP (("Failed to redirect stdin to /dev/null.\n")); if (freopen ("/dev/null", "w", stdout) == NULL) -@@ -1583,8 +1585,13 @@ +@@ -1708,8 +1710,13 @@ double val = n / 1024.0; /* Print values smaller than the accuracy level (acc) with (decimal) * decimal digits, and others without any decimals. */ @@ -276,7 +278,7 @@ diff -Paur --no-dereference -- wget.upstream/src/utils.c wget/src/utils.c return buf; } n /= 1024; -@@ -1843,9 +1850,11 @@ +@@ -1952,9 +1959,11 @@ #endif /* neither TIOCGWINSZ nor WINDOWS */ } @@ -288,7 +290,7 @@ diff -Paur --no-dereference -- wget.upstream/src/utils.c wget/src/utils.c /* Return a random number between 0 and MAX-1, inclusive. -@@ -1862,7 +1871,9 @@ +@@ -1971,7 +1980,9 @@ int random_number (int max) { @@ -299,7 +301,7 @@ diff -Paur --no-dereference -- wget.upstream/src/utils.c wget/src/utils.c if (!rnd_seeded) { srandom ((long) time (NULL) ^ (long) getpid ()); -@@ -2444,6 +2455,10 @@ +@@ -2629,6 +2640,10 @@ static char buf[32]; double n = number >= 0 ? number : -number; @@ -310,7 +312,7 @@ diff -Paur --no-dereference -- wget.upstream/src/utils.c wget/src/utils.c if (n >= 9.95) /* Cut off at 9.95 because the below %.1f would round 9.96 to "10.0" instead of "10". OTOH 9.94 will print as "9.9". */ -@@ -2458,6 +2473,7 @@ +@@ -2643,6 +2658,7 @@ else /* print numbers close to 0 as 0, not 0.000 */ strcpy (buf, "0"); diff --git a/ports/wget/wget.port b/ports/wget/wget.port index 465058c8..94ac4324 100644 --- a/ports/wget/wget.port +++ b/ports/wget/wget.port @@ -1,12 +1,13 @@ NAME=wget BUILD_LIBRARIES='libz libiconv? libintl? libssl libpsl? libmetalink? libuuid? libpcre? libidn?' -VERSION=1.18 +VERSION=1.21.4 DISTNAME=$NAME-$VERSION -COMPRESSION=tar.xz +COMPRESSION=tar.gz ARCHIVE=$DISTNAME.$COMPRESSION -SHA256SUM=b5b55b75726c04c06fe253daec9329a6f1a3c0c1878e3ea76ebfebc139ea9cc1 +SHA256SUM=81542f5cefb8faacc39bbbc6c82ded80e3e4a88505ae72ea51df27525bcde04c UPSTREAM_SITE=https://ftp.gnu.org/gnu/wget UPSTREAM_ARCHIVE=$ARCHIVE +LICENSE=GPL-3.0-or-later BUILD_SYSTEM=configure CONFIGURE_ARGS='--with-ssl=openssl' MAKE_VARS='V=1' diff --git a/ports/wget/wget.rmpatch b/ports/wget/wget.rmpatch index 43fea873..d2f7e849 100644 --- a/ports/wget/wget.rmpatch +++ b/ports/wget/wget.rmpatch @@ -1,4 +1,8 @@ rm -rf -- 'doc/stamp-vti' +rm -rf -- 'gnulib_po/stamp-po' +rm -rf -- 'po/stamp-po' rm -rf -- 'src/build_info.c' rm -rf -- 'src/css.c' rm -rf -- 'src/css_.c' +rm -rf -- 'tests/certs/interca.conf' +rm -rf -- 'tests/certs/rootca.conf'