summaryrefslogtreecommitdiff
path: root/Ports
diff options
context:
space:
mode:
Diffstat (limited to 'Ports')
-rwxr-xr-xPorts/.port_include.sh62
-rwxr-xr-xPorts/SDL2_gfx/package.sh1
-rw-r--r--Ports/SDL2_gfx/patches/fix-autoconf.patch11
-rwxr-xr-xPorts/SDL2_image/package.sh1
-rw-r--r--Ports/SDL2_image/patches/configure.patch11
-rwxr-xr-xPorts/SDL2_mixer/package.sh1
-rw-r--r--Ports/SDL2_mixer/patches/configure.patch12
-rwxr-xr-xPorts/SDL2_net/package.sh1
-rw-r--r--Ports/SDL2_net/patches/configure.patch12
-rwxr-xr-xPorts/SDL2_ttf/package.sh1
-rw-r--r--Ports/SDL2_ttf/patches/configure.patch12
-rwxr-xr-xPorts/angband/package.sh1
-rw-r--r--Ports/angband/patches/config-sub.patch12
-rwxr-xr-xPorts/bash/package.sh2
-rw-r--r--Ports/bash/patches/config.sub.patch10
-rwxr-xr-xPorts/binutils/package.sh1
-rw-r--r--Ports/binutils/patches/binutils.patch11
-rwxr-xr-xPorts/dialog/package.sh1
-rw-r--r--Ports/dialog/patches/config.sub.patch10
-rwxr-xr-xPorts/diffutils/package.sh1
-rw-r--r--Ports/diffutils/patches/config.sub.patch11
-rwxr-xr-xPorts/dropbear/package.sh1
-rw-r--r--Ports/dropbear/patches/fix-autoconf.patch10
-rwxr-xr-xPorts/flex/package.sh1
-rw-r--r--Ports/flex/patches/fix-autoconf.patch10
-rwxr-xr-xPorts/fontconfig/package.sh1
-rw-r--r--Ports/fontconfig/patches/config.sub.patch10
-rwxr-xr-xPorts/freeciv/package.sh1
-rw-r--r--Ports/freeciv/patches/configure.patch12
-rwxr-xr-xPorts/freedink/package.sh3
-rw-r--r--Ports/freedink/patches/config.sub.patch10
-rwxr-xr-xPorts/freetype/package.sh1
-rw-r--r--Ports/freetype/patches/configure.patch12
-rwxr-xr-xPorts/gawk/package.sh1
-rw-r--r--Ports/gawk/patches/configure.patch12
-rwxr-xr-xPorts/gltron/package.sh1
-rw-r--r--Ports/gltron/patches/config.sub.patch11
-rwxr-xr-xPorts/gnucobol/package.sh1
-rw-r--r--Ports/gnucobol/patches/config.sub.patch10
-rwxr-xr-xPorts/gnupg/package.sh2
-rw-r--r--Ports/gnupg/patches/configure.patch12
-rwxr-xr-xPorts/grep/package.sh1
-rw-r--r--Ports/grep/patches/fix-autoconf.patch10
-rwxr-xr-xPorts/indent/package.sh1
-rw-r--r--Ports/indent/patches/fix-autoconf.patch10
-rwxr-xr-xPorts/libarchive/package.sh1
-rw-r--r--Ports/libarchive/patches/fix-autoconf.patch13
-rwxr-xr-xPorts/libassuan/package.sh2
-rw-r--r--Ports/libassuan/patches/configure.patch12
-rwxr-xr-xPorts/libatomic_ops/package.sh1
-rw-r--r--Ports/libatomic_ops/patches/fix-autoconf.patch12
-rwxr-xr-xPorts/libexpat/package.sh1
-rw-r--r--Ports/libexpat/patches/fix-autoconf.patch22
-rwxr-xr-xPorts/libffi/package.sh1
-rw-r--r--Ports/libffi/patches/fix-autoconf.patch13
-rwxr-xr-xPorts/libgcrypt/package.sh2
-rw-r--r--Ports/libgcrypt/patches/configure.patch12
-rwxr-xr-xPorts/libgd/package.sh2
-rw-r--r--Ports/libgd/patches/configure.patch12
-rwxr-xr-xPorts/libgpg-error/package.sh2
-rw-r--r--Ports/libgpg-error/patches/configure.patch12
-rwxr-xr-xPorts/libicu/package.sh1
-rw-r--r--Ports/libicu/patches/icu.patch12
-rwxr-xr-xPorts/libjpeg/package.sh1
-rw-r--r--Ports/libjpeg/patches/system-detect.patch11
-rwxr-xr-xPorts/libksba/package.sh2
-rw-r--r--Ports/libksba/patches/configure.patch12
-rwxr-xr-xPorts/libmodplug/package.sh1
-rw-r--r--Ports/libmodplug/patches/config.sub.patch12
-rwxr-xr-xPorts/libogg/package.sh1
-rw-r--r--Ports/libogg/patches/config.sub.patch11
-rwxr-xr-xPorts/liboggz/package.sh1
-rw-r--r--Ports/liboggz/patches/configure.patch11
-rwxr-xr-xPorts/libpng/package.sh1
-rw-r--r--Ports/libpng/patches/detect.patch11
-rwxr-xr-xPorts/libsixel/package.sh1
-rw-r--r--Ports/libsixel/patches/config.sub.patch13
-rwxr-xr-xPorts/libsodium/package.sh2
-rw-r--r--Ports/libsodium/patches/fix-config-sub.patch12
-rwxr-xr-xPorts/libtheora/package.sh1
-rw-r--r--Ports/libtheora/patches/config.sub.patch11
-rwxr-xr-xPorts/libtool/package.sh1
-rw-r--r--Ports/libtool/patches/config.sub.patch10
-rwxr-xr-xPorts/libvorbis/package.sh1
-rw-r--r--Ports/libvorbis/patches/01-add-serenity-system.patch11
-rwxr-xr-xPorts/libxml2/package.sh1
-rw-r--r--Ports/libxml2/patches/config.sub.patch11
-rwxr-xr-xPorts/m4/package.sh1
-rw-r--r--Ports/m4/patches/configure.patch14
-rwxr-xr-xPorts/make/package.sh2
-rw-r--r--Ports/make/patches/make-4.3-serenity.patch12
-rwxr-xr-xPorts/mawk/package.sh1
-rw-r--r--Ports/mawk/patches/fix-autoconf.patch10
-rwxr-xr-xPorts/mpc/package.sh1
-rw-r--r--Ports/mpc/patches/config.sub.patch10
-rwxr-xr-xPorts/mpfr/package.sh1
-rw-r--r--Ports/mpfr/patches/config.sub.patch11
-rwxr-xr-xPorts/nano/package.sh1
-rw-r--r--Ports/nano/patches/fix-autoconf.patch12
-rwxr-xr-xPorts/nasm/package.sh1
-rw-r--r--Ports/nasm/patches/config.sub.patch12
-rwxr-xr-xPorts/npth/package.sh2
-rw-r--r--Ports/npth/patches/configure.patch12
-rwxr-xr-xPorts/ntbtls/package.sh2
-rw-r--r--Ports/ntbtls/patches/configure.patch12
-rwxr-xr-xPorts/openssh/package.sh2
-rw-r--r--Ports/openssh/patches/config.sub.patch13
-rwxr-xr-xPorts/patch/package.sh1
-rw-r--r--Ports/patch/patches/fix-config-sub.patch12
-rwxr-xr-xPorts/pcre/package.sh1
-rw-r--r--Ports/pcre/patches/fix-autoconf.patch12
-rwxr-xr-xPorts/pkgconf/package.sh3
-rw-r--r--Ports/pkgconf/patches/build-system.patch12
-rwxr-xr-xPorts/python3/package.sh1
-rw-r--r--Ports/python3/patches/fix-autoconf.patch12
-rwxr-xr-xPorts/readline/package.sh1
-rw-r--r--Ports/readline/patches/fix-autoconf.patch11
-rwxr-xr-xPorts/rsync/package.sh1
-rw-r--r--Ports/rsync/patches/config.sub.patch12
-rwxr-xr-xPorts/ruby/package.sh2
-rw-r--r--Ports/ruby/patches/config.patch11
-rwxr-xr-xPorts/sed/package.sh2
-rw-r--r--Ports/sed/patches/config.sub.patch11
-rwxr-xr-xPorts/sqlite/package.sh1
-rw-r--r--Ports/sqlite/patches/config.sub.patch11
-rwxr-xr-xPorts/vttest/package.sh1
-rw-r--r--Ports/vttest/patches/fix-autoconf.patch12
-rwxr-xr-xPorts/wget/package.sh2
-rw-r--r--Ports/wget/patches/configure.patch12
-rwxr-xr-xPorts/xz/package.sh2
-rw-r--r--Ports/xz/patches/configure.patch12
-rwxr-xr-xPorts/yasm/package.sh1
-rw-r--r--Ports/yasm/patches/config.sub.patch29
-rwxr-xr-xPorts/zsh/package.sh1
-rw-r--r--Ports/zsh/patches/0001-add-serenity-config-sub.patch11
135 files changed, 128 insertions, 816 deletions
diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh
index e5a1853ac9..32574b0b35 100755
--- a/Ports/.port_include.sh
+++ b/Ports/.port_include.sh
@@ -62,6 +62,8 @@ installopts=()
configscript=configure
configopts=()
useconfigure=false
+config_sub_path=config.sub
+use_fresh_config_sub=false
depends=()
patchlevel=1
auth_type=
@@ -79,7 +81,7 @@ shift
: "${workdir:=$port-$version}"
run_nocd() {
- echo "+ $@ (nocd)"
+ echo "+ $@ (nocd)" >&2
("$@")
}
@@ -92,6 +94,17 @@ run_replace_in_file() {
run perl -p -i -e "$1" $2
}
+get_new_config_sub() {
+ config_sub="${1:-config.sub}"
+ if ! run grep -q serenity "$config_sub"; then
+ run do_download_file "https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub" "${1:-config.sub}" false
+ fi
+}
+
+ensure_new_config_sub() {
+ get_new_config_sub "$config_sub_path"
+}
+
ensure_build() {
# Sanity check.
if [ ! -f "${DESTDIR}/usr/lib/libc.so" ]; then
@@ -193,6 +206,31 @@ func_defined pre_fetch || pre_fetch() {
func_defined post_fetch || post_fetch() {
:
}
+
+do_download_file() {
+ local url="$1"
+ local filename="$2"
+ local accept_existing="${3:-true}"
+
+ echo "Downloading URL: ${url}"
+
+ # FIXME: Serenity's curl port does not support https, even with openssl installed.
+ if which curl >/dev/null 2>&1 && ! curl https://example.com -so /dev/null; then
+ url=$(echo "$url" | sed "s/^https:\/\//http:\/\//")
+ fi
+
+ # download files
+ if $accept_existing && [ -f "$filename" ]; then
+ echo "$filename already exists"
+ else
+ if which curl; then
+ run_nocd curl ${curlopts:-} "$url" -L -o "$filename"
+ else
+ run_nocd pro "$url" > "$filename"
+ fi
+ fi
+}
+
fetch() {
pre_fetch
@@ -211,23 +249,7 @@ fetch() {
for f in $files; do
IFS=$OLDIFS
read url filename auth_sum<<< $(echo "$f")
- echo "Downloading URL: ${url}"
-
- # FIXME: Serenity's curl port does not support https, even with openssl installed.
- if which curl >/dev/null 2>&1 && ! curl https://example.com -so /dev/null; then
- url=$(echo "$url" | sed "s/^https:\/\//http:\/\//")
- fi
-
- # download files
- if [ -f "$filename" ]; then
- echo "$filename already exists"
- else
- if which curl; then
- run_nocd curl ${curlopts:-} "$url" -L -o "$filename"
- else
- run_nocd pro "$url" > "$filename"
- fi
- fi
+ do_download_file "$url" "$filename"
done
verification_failed=0
@@ -343,7 +365,9 @@ func_defined patch_internal || patch_internal() {
fi
}
func_defined pre_configure || pre_configure() {
- :
+ if "$use_fresh_config_sub"; then
+ ensure_new_config_sub
+ fi
}
func_defined configure || configure() {
chmod +x "${workdir}"/"$configscript"
diff --git a/Ports/SDL2_gfx/package.sh b/Ports/SDL2_gfx/package.sh
index f9abb950ea..71c91b5681 100755
--- a/Ports/SDL2_gfx/package.sh
+++ b/Ports/SDL2_gfx/package.sh
@@ -6,6 +6,7 @@ files="https://downloads.sourceforge.net/project/sdl2gfx/SDL2_gfx-${version}.tar
auth_type=sha256
depends=("SDL2")
useconfigure=true
+use_fresh_config_sub=true
configopts=("--with-sdl-prefix=${SERENITY_INSTALL_ROOT}/usr/local")
install() {
diff --git a/Ports/SDL2_gfx/patches/fix-autoconf.patch b/Ports/SDL2_gfx/patches/fix-autoconf.patch
deleted file mode 100644
index 95c6ca2d7f..0000000000
--- a/Ports/SDL2_gfx/patches/fix-autoconf.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- SDL2_gfx-1.0.4/config.sub 2021-04-04 18:40:50.418255684 +0200
-+++ SDL2_gfx-1.0.4/config.sub 2021-04-04 18:42:32.801888295 +0200
-@@ -1355,7 +1355,7 @@
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
-+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -serenity*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
diff --git a/Ports/SDL2_image/package.sh b/Ports/SDL2_image/package.sh
index 97e96c1bf7..7b80629a03 100755
--- a/Ports/SDL2_image/package.sh
+++ b/Ports/SDL2_image/package.sh
@@ -1,6 +1,7 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=SDL2_image
useconfigure=true
+use_fresh_config_sub=true
version=2.0.5
depends=("SDL2" "libpng" "libjpeg" "libtiff")
files="https://www.libsdl.org/projects/SDL_image/release/SDL2_image-${version}.tar.gz SDL_image-${version}.tar.gz bdd5f6e026682f7d7e1be0b6051b209da2f402a2dd8bd1c4bd9c25ad263108d0"
diff --git a/Ports/SDL2_image/patches/configure.patch b/Ports/SDL2_image/patches/configure.patch
deleted file mode 100644
index 01da8b81ae..0000000000
--- a/Ports/SDL2_image/patches/configure.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- SDL2_image-2.0.5/config.sub 2019-06-30 06:52:03.000000000 +0200
-+++ /home/baitinq/serenity/Ports/SDL2_image-2.0.5/config.sub 2021-04-01 01:55:57.769997556 +0200
-@@ -1363,7 +1363,7 @@
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -serenity* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
diff --git a/Ports/SDL2_mixer/package.sh b/Ports/SDL2_mixer/package.sh
index d9b27f839b..84b8d51b0d 100755
--- a/Ports/SDL2_mixer/package.sh
+++ b/Ports/SDL2_mixer/package.sh
@@ -2,6 +2,7 @@
port=SDL2_mixer
version=2.0.4
useconfigure=true
+use_fresh_config_sub=true
files="https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-${version}.tar.gz SDL2_mixer-${version}.tar.gz b4cf5a382c061cd75081cf246c2aa2f9df8db04bdda8dcdc6b6cca55bede2419"
auth_type=sha256
depends=("libmodplug" "libvorbis" "SDL2")
diff --git a/Ports/SDL2_mixer/patches/configure.patch b/Ports/SDL2_mixer/patches/configure.patch
deleted file mode 100644
index cbe59ff03a..0000000000
--- a/Ports/SDL2_mixer/patches/configure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ru SDL2_mixer-2.0.4/build-scripts/config.sub SDL2_mixer-2.0.4-patched/build-scripts/config.sub
---- SDL2_mixer-2.0.4/build-scripts/config.sub 2018-10-31 15:59:00.000000000 +0100
-+++ SDL2_mixer-2.0.4-patched/build-scripts/config.sub 2021-03-07 17:50:05.149501049 +0100
-@@ -1408,7 +1408,7 @@
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -serenity* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
diff --git a/Ports/SDL2_net/package.sh b/Ports/SDL2_net/package.sh
index 9305f1fb59..fdec08db09 100755
--- a/Ports/SDL2_net/package.sh
+++ b/Ports/SDL2_net/package.sh
@@ -2,6 +2,7 @@
port=SDL2_net
version=2.0.1
useconfigure=true
+use_fresh_config_sub=true
configopts=("--with-sdl-prefix=${SERENITY_INSTALL_ROOT}/usr/local")
files="https://www.libsdl.org/projects/SDL_net/release/SDL2_net-${version}.tar.gz SDL2_net-${version}.tar.gz 15ce8a7e5a23dafe8177c8df6e6c79b6749a03fff1e8196742d3571657609d21"
auth_type=sha256
diff --git a/Ports/SDL2_net/patches/configure.patch b/Ports/SDL2_net/patches/configure.patch
deleted file mode 100644
index bdae3d6027..0000000000
--- a/Ports/SDL2_net/patches/configure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur SDL2_net-2.0.1/config.sub SDL2_net-2.0.1.serenity/config.sub
---- SDL2_net-2.0.1/config.sub 2016-01-03 08:57:09.000000000 +0100
-+++ SDL2_net-2.0.1.serenity/config.sub 2021-06-16 10:40:58.771380293 +0200
-@@ -1364,7 +1364,7 @@
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
diff --git a/Ports/SDL2_ttf/package.sh b/Ports/SDL2_ttf/package.sh
index 26f1afedb8..9fd0cbe5fd 100755
--- a/Ports/SDL2_ttf/package.sh
+++ b/Ports/SDL2_ttf/package.sh
@@ -2,6 +2,7 @@
port=SDL2_ttf
version=2.0.15
useconfigure=true
+use_fresh_config_sub=true
files="https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-${version}.tar.gz SDL2_ttf-${version}.tar.gz a9eceb1ad88c1f1545cd7bd28e7cbc0b2c14191d40238f531a15b01b1b22cd33"
auth_type=sha256
depends=("SDL2" "freetype")
diff --git a/Ports/SDL2_ttf/patches/configure.patch b/Ports/SDL2_ttf/patches/configure.patch
deleted file mode 100644
index 014e2c71da..0000000000
--- a/Ports/SDL2_ttf/patches/configure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ru SDL2_ttf-2.0.15/config.sub SDL2_ttf-2.0.15-patched/config.sub
---- SDL2_ttf-2.0.15/config.sub 2021-03-05 22:11:27.518384348 +0100
-+++ SDL2_ttf-2.0.15-patched/config.sub 2019-01-12 20:44:11.000000000 +0100
-@@ -1408,7 +1408,7 @@
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
diff --git a/Ports/angband/package.sh b/Ports/angband/package.sh
index b8f4f73f15..8bc54e1959 100755
--- a/Ports/angband/package.sh
+++ b/Ports/angband/package.sh
@@ -3,6 +3,7 @@ port=angband
version=4.2.3
workdir="Angband-${version}"
useconfigure=true
+use_fresh_config_sub=true
files="https://github.com/angband/angband/releases/download/${version}/Angband-${version}.tar.gz Angband-${version}.tar.gz 833c4f8cff2aee61ad015f9346fceaa4a8c739fe2dbe5bd1acd580c91818e6bb"
auth_type=sha256
depends=("ncurses" "SDL2" "SDL2_image" "SDL2_ttf" "SDL2_mixer")
diff --git a/Ports/angband/patches/config-sub.patch b/Ports/angband/patches/config-sub.patch
deleted file mode 100644
index bbf0e1e1db..0000000000
--- a/Ports/angband/patches/config-sub.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur Angband-4.2.3-orig/config.sub Angband-4.2.3/config.sub
---- Angband-4.2.3-orig/config.sub 2021-08-01 01:29:20.000000000 +0200
-+++ Angband-4.2.3/config.sub 2021-09-04 19:01:55.625519348 +0200
-@@ -1337,7 +1337,7 @@
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -serenity* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
diff --git a/Ports/bash/package.sh b/Ports/bash/package.sh
index da7b3e8f2b..b0c383647a 100755
--- a/Ports/bash/package.sh
+++ b/Ports/bash/package.sh
@@ -2,6 +2,8 @@
port=bash
version=5.1.16
useconfigure=true
+use_fresh_config_sub=true
+config_sub_path=support/config.sub
configopts=("--disable-nls" "--without-bash-malloc")
files="https://ftpmirror.gnu.org/gnu/bash/bash-${version}.tar.gz bash-${version}.tar.gz 5bac17218d3911834520dad13cd1f85ab944e1c09ae1aba55906be1f8192f558"
auth_type="sha256"
diff --git a/Ports/bash/patches/config.sub.patch b/Ports/bash/patches/config.sub.patch
deleted file mode 100644
index 50a254d41e..0000000000
--- a/Ports/bash/patches/config.sub.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- bash-5.1.8/support/config.sub 2020-11-18 19:40:12.000000000 +0000
-+++ bash-5.1.8.serenity/support/config.sub 2021-07-29 15:33:03.347306019 +0100
-@@ -1691,6 +1691,7 @@
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ | serenity* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
diff --git a/Ports/binutils/package.sh b/Ports/binutils/package.sh
index fdff73824e..cdedfece4e 100755
--- a/Ports/binutils/package.sh
+++ b/Ports/binutils/package.sh
@@ -2,6 +2,7 @@
port=binutils
version=2.37
useconfigure=true
+use_fresh_config_sub=true
configopts=("--target=${SERENITY_ARCH}-pc-serenity" "--with-sysroot=/" "--with-build-sysroot=${SERENITY_INSTALL_ROOT}" "--disable-werror" "--disable-gdb" "--disable-nls")
files="https://ftpmirror.gnu.org/gnu/binutils/binutils-${version}.tar.xz binutils-${version}.tar.xz 820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c"
auth_type="sha256"
diff --git a/Ports/binutils/patches/binutils.patch b/Ports/binutils/patches/binutils.patch
index d0512e1aa6..f91ee04915 100644
--- a/Ports/binutils/patches/binutils.patch
+++ b/Ports/binutils/patches/binutils.patch
@@ -26,17 +26,6 @@ diff -Naur binutils-2.37/bfd/config.bfd binutils-2.37.serenity/bfd/config.bfd
aarch64-*-darwin*)
targ_defvec=aarch64_mach_o_vec
targ_selvecs="arm_mach_o_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec"
-diff -Naur binutils-2.37/config.sub binutils-2.37.serenity/config.sub
---- binutils-2.37/config.sub 2021-07-08 13:37:19.000000000 +0200
-+++ binutils-2.37.serenity/config.sub 2021-07-28 18:03:58.972705458 +0200
-@@ -1700,6 +1700,7 @@
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ | serenity* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
diff -Naur binutils-2.37/gas/configure.tgt binutils-2.37.serenity/gas/configure.tgt
--- binutils-2.37/gas/configure.tgt 2021-07-08 13:37:19.000000000 +0200
+++ binutils-2.37.serenity/gas/configure.tgt 2021-07-28 18:03:58.972705458 +0200
diff --git a/Ports/dialog/package.sh b/Ports/dialog/package.sh
index f306b8098f..ea72655d39 100755
--- a/Ports/dialog/package.sh
+++ b/Ports/dialog/package.sh
@@ -8,4 +8,5 @@ auth_type="sig"
auth_import_key="C52048C0C0748FEE227D47A2702353E0F7E48EDB"
auth_opts=("dialog-${version}.tgz.asc" "dialog-${version}.tgz")
useconfigure=true
+use_fresh_config_sub=true
configopts=("--prefix=/usr/local" "--with-ncurses" "--with-curses-dir=${SERENITY_INSTALL_ROOT}/usr/local/include/ncurses")
diff --git a/Ports/dialog/patches/config.sub.patch b/Ports/dialog/patches/config.sub.patch
deleted file mode 100644
index 88de27901f..0000000000
--- a/Ports/dialog/patches/config.sub.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- dialog-1.3-20210324/config.sub 2020-08-16 20:36:41.000000000 -0700
-+++ dialog-1.3-20210324/config.sub 2021-04-11 20:15:18.580516177 -0700
-@@ -1693,6 +1693,7 @@
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ | serenity* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
diff --git a/Ports/diffutils/package.sh b/Ports/diffutils/package.sh
index 4a233f2662..0b15e3e41c 100755
--- a/Ports/diffutils/package.sh
+++ b/Ports/diffutils/package.sh
@@ -4,4 +4,5 @@ version=3.7
files="https://ftpmirror.gnu.org/gnu/diffutils/diffutils-${version}.tar.xz diffutils-${version}.tar.xz b3a7a6221c3dc916085f0d205abf6b8e1ba443d4dd965118da364a1dc1cb3a26"
auth_type=sha256
useconfigure=true
+use_fresh_config_sub=true
depends=("libiconv")
diff --git a/Ports/diffutils/patches/config.sub.patch b/Ports/diffutils/patches/config.sub.patch
deleted file mode 100644
index df5e712e87..0000000000
--- a/Ports/diffutils/patches/config.sub.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- diffutils-3.7/build-aux/config.sub 2018-12-24 02:21:56.000000000 +0100
-+++ diffutils-3.7-patched/build-aux/config.sub 2021-06-13 16:00:32.864108734 +0200
-@@ -1337,7 +1337,7 @@
- gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
-- | sym* | kopensolaris* | plan9* \
-+ | sym* | kopensolaris* | plan9* | serenity* \
- | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
- | aos* | aros* | cloudabi* | sortix* \
- | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
diff --git a/Ports/dropbear/package.sh b/Ports/dropbear/package.sh
index 7c26a22add..7728636306 100755
--- a/Ports/dropbear/package.sh
+++ b/Ports/dropbear/package.sh
@@ -8,6 +8,7 @@ https://mirror.dropbear.nl/mirror/releases/dropbear-key-2015.asc dropbear-key-20
auth_type="sig"
auth_opts=("--keyring" "./dropbear-key-2015.asc" "dropbear-${version}.tar.bz2.asc")
useconfigure=true
+use_fresh_config_sub=true
# don't care about zlib, less deps is better
configopts=("--disable-zlib")
# Serenity's utmp is not fully compatible with what dropbear expects.
diff --git a/Ports/dropbear/patches/fix-autoconf.patch b/Ports/dropbear/patches/fix-autoconf.patch
deleted file mode 100644
index d19d9287c1..0000000000
--- a/Ports/dropbear/patches/fix-autoconf.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/config.sub.orig
-+++ b/config.sub
-@@ -1339,6 +1339,7 @@
- # Each alternative MUST end in a * to match a version number.
- # sysv* is not here because it comes later, after sysvr4.
- gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ | serenity* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | kopensolaris* | plan9* \
diff --git a/Ports/flex/package.sh b/Ports/flex/package.sh
index bee27148df..14b6926c28 100755
--- a/Ports/flex/package.sh
+++ b/Ports/flex/package.sh
@@ -4,6 +4,7 @@ version=2.6.4
files="https://github.com/westes/flex/releases/download/v${version}/flex-${version}.tar.gz flex-${version}.tar.gz
https://github.com/westes/flex/releases/download/v${version}/flex-${version}.tar.gz.sig flex-${version}.tar.gz.sig"
useconfigure=true
+use_fresh_config_sub=true
configopts=("--disable-bootstrap")
depends=("m4" "pcre2")
auth_type="sig"
diff --git a/Ports/flex/patches/fix-autoconf.patch b/Ports/flex/patches/fix-autoconf.patch
deleted file mode 100644
index f9927129ec..0000000000
--- a/Ports/flex/patches/fix-autoconf.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- flex-2.6.4/build-aux/config.sub.orig Thu Jan 23 22:05:46 2020
-+++ flex-2.6.4/build-aux/config.sub Thu Jan 23 22:05:59 2020
-@@ -1375,6 +1375,7 @@
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
diff --git a/Ports/fontconfig/package.sh b/Ports/fontconfig/package.sh
index 25fa4cd290..a5a4d8184f 100755
--- a/Ports/fontconfig/package.sh
+++ b/Ports/fontconfig/package.sh
@@ -2,6 +2,7 @@
port=fontconfig
version=2.13.94
useconfigure="true"
+use_fresh_config_sub="true"
depends=("libxml2")
files="https://www.freedesktop.org/software/fontconfig/release/fontconfig-${version}.tar.xz fontconfig-${version}.tar.xz a5f052cb73fd479ffb7b697980510903b563bbb55b8f7a2b001fcfb94026003c"
auth_type="sha256"
diff --git a/Ports/fontconfig/patches/config.sub.patch b/Ports/fontconfig/patches/config.sub.patch
deleted file mode 100644
index dfd575bce5..0000000000
--- a/Ports/fontconfig/patches/config.sub.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- fontconfig-2.13.94/config.sub.orig 2021-10-24 19:47:39.283922896 -0700
-+++ fontconfig-2.13.94/config.sub 2021-10-24 19:47:56.679967977 -0700
-@@ -1334,6 +1334,7 @@
- # Each alternative MUST end in a * to match a version number.
- # sysv* is not here because it comes later, after sysvr4.
- gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ | serenity* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | kopensolaris* | plan9* \
diff --git a/Ports/freeciv/package.sh b/Ports/freeciv/package.sh
index 83813dc3dc..2b77155150 100755
--- a/Ports/freeciv/package.sh
+++ b/Ports/freeciv/package.sh
@@ -2,6 +2,7 @@
port=freeciv
version=3.0.0-beta2
useconfigure=true
+use_fresh_config_sub=true
configopts=("--enable-client=sdl2" "--enable-fcmp=no")
files="http://files.freeciv.org/beta/freeciv-${version}.tar.xz freeciv-${version}.tar.xz 9f44dc28068b239c18bda68192ddb27622030880f8ab9c17f777eac28391269e"
auth_type=sha256
diff --git a/Ports/freeciv/patches/configure.patch b/Ports/freeciv/patches/configure.patch
deleted file mode 100644
index 04bf7c4989..0000000000
--- a/Ports/freeciv/patches/configure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur freeciv-3.0.0-beta2/bootstrap/config.sub freeciv-3.0.0-beta2.serenity/bootstrap/config.sub
---- freeciv-3.0.0-beta2/bootstrap/config.sub 2021-05-14 12:38:07.000000000 +0200
-+++ freeciv-3.0.0-beta2.serenity/bootstrap/config.sub 2021-06-04 23:07:31.952596066 +0200
-@@ -1363,7 +1363,7 @@
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
diff --git a/Ports/freedink/package.sh b/Ports/freedink/package.sh
index 76cce7697d..b7440f50ed 100755
--- a/Ports/freedink/package.sh
+++ b/Ports/freedink/package.sh
@@ -2,12 +2,13 @@
port=FreeDink
version=109.6
useconfigure="true"
+use_fresh_config_sub="true"
depends=("SDL2" "SDL2_image" "SDL2_mixer" "SDL2_ttf" "SDL2_gfx" "gettext" "fontconfig" "glm")
workdir="freedink-${version}"
freedink_data="freedink-data-1.08.20190120"
files="https://ftpmirror.gnu.org/gnu/freedink/freedink-${version}.tar.gz freedink-${version}.tar.gz
https://ftpmirror.gnu.org/gnu/freedink/freedink-${version}.tar.gz.sig freedink-${version}.tar.gz.sig
-https://ftpmirror.gnu.org/gnu/freedink/${freedink_data}.tar.gz ${freedink_data}.tar.gz 715f44773b05b73a9ec9b62b0e152f3f281be1a1512fbaaa386176da94cffb9d
+https://ftpmirror.gnu.org/gnu/freedink/${freedink_data}.tar.gz ${freedink_data}.tar.gz 715f44773b05b73a9ec9b62b0e152f3f281be1a1512fbaaa386176da94cffb9d
https://ftpmirror.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg"
auth_type="sig"
auth_opts=("--keyring" "./gnu-keyring.gpg" "freedink-${version}.tar.gz.sig")
diff --git a/Ports/freedink/patches/config.sub.patch b/Ports/freedink/patches/config.sub.patch
deleted file mode 100644
index 4baa75088c..0000000000
--- a/Ports/freedink/patches/config.sub.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- freedink-109.6/autotools/config.sub 2018-03-01 08:34:41.000000000 -0800
-+++ freedink-109.6/autotools/config.sub 2021-04-09 10:52:45.687169960 -0700
-@@ -1409,6 +1409,7 @@
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
diff --git a/Ports/freetype/package.sh b/Ports/freetype/package.sh
index 682200ca58..91c83a1cc1 100755
--- a/Ports/freetype/package.sh
+++ b/Ports/freetype/package.sh
@@ -2,6 +2,7 @@
port=freetype
version=2.10.4
useconfigure=true
+use_fresh_config_sub=true
files="https://download.savannah.gnu.org/releases/freetype/freetype-${version}.tar.gz freetype-${version}.tar.gz 5eab795ebb23ac77001cfb68b7d4d50b5d6c7469247b0b01b2c953269f658dac"
auth_type=sha256
configopts=("--with-brotli=no" "--with-bzip2=no" "--with-zlib=no" "--with-harfbuzz=no" "--with-png=no")
diff --git a/Ports/freetype/patches/configure.patch b/Ports/freetype/patches/configure.patch
deleted file mode 100644
index ad8d0a6dc4..0000000000
--- a/Ports/freetype/patches/configure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ru freetype-2.10.4/builds/unix/config.sub freetype-2.10.4-patched/builds/unix/config.sub
---- freetype-2.10.4/builds/unix/config.sub 2020-10-20 07:15:01.000000000 +0200
-+++ freetype-2.10.4-patched/builds/unix/config.sub 2021-03-05 21:50:35.776894354 +0100
-@@ -1690,7 +1690,7 @@
- # Now accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
-- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | serenity* | irix* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
diff --git a/Ports/gawk/package.sh b/Ports/gawk/package.sh
index aba484aa71..c948f94c14 100755
--- a/Ports/gawk/package.sh
+++ b/Ports/gawk/package.sh
@@ -2,6 +2,7 @@
port=gawk
version=5.1.0
useconfigure="true"
+use_fresh_config_sub=true
files="https://ftpmirror.gnu.org/gnu/gawk/gawk-${version}.tar.gz gawk-${version}.tar.gz
https://ftpmirror.gnu.org/gnu/gawk/gawk-${version}.tar.gz.sig gawk-${version}.tar.gz.sig
https://ftpmirror.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg"
diff --git a/Ports/gawk/patches/configure.patch b/Ports/gawk/patches/configure.patch
index 63d0612b17..66a17eb7cd 100644
--- a/Ports/gawk/patches/configure.patch
+++ b/Ports/gawk/patches/configure.patch
@@ -1,15 +1,3 @@
-diff -ur a/config.sub b/config.sub
---- a/config.sub 2020-04-13 08:44:50.000000000 +0200
-+++ b/config.sub 2021-06-02 14:46:39.331046420 +0200
-@@ -1338,7 +1338,7 @@
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
- # sysv* is not here because it comes later, after sysvr4.
-- gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ gnu* | bsd* | mach* | minix* | genix* | ultrix* | serenity* | irix* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | kopensolaris* | plan9* \
diff -ur a/extension/build-aux/config.sub b/extension/build-aux/config.sub
--- a/extension/build-aux/config.sub 2020-04-13 08:44:50.000000000 +0200
+++ b/extension/build-aux/config.sub 2021-06-02 14:46:39.331046420 +0200
diff --git a/Ports/gltron/package.sh b/Ports/gltron/package.sh
index 332115b14d..f4825a4221 100755
--- a/Ports/gltron/package.sh
+++ b/Ports/gltron/package.sh
@@ -1,6 +1,7 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=gltron
useconfigure="true"
+use_fresh_config_sub=true
version="0.70"
files="http://mirror.sobukus.de/files/grimoire/games-arcade-2d/gltron-${version}-source.tar.gz gltron-${version}-source.tar.gz e0c8ebb41a18a1f8d7302a9c2cb466f5b1dd63e9a9966c769075e6b6bdad8bb0"
auth_type=sha256
diff --git a/Ports/gltron/patches/config.sub.patch b/Ports/gltron/patches/config.sub.patch
deleted file mode 100644
index 8cdc25e866..0000000000
--- a/Ports/gltron/patches/config.sub.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- gltron-0.70/config.sub 2002-03-23 17:40:17.000000000 +0000
-+++ gltron-0.70-patched/config.sub 2022-01-09 23:05:14.342418312 +0000
-@@ -1070,7 +1070,7 @@
- | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-- | -os2* | -vos*)
-+ | -os2* | -vos* | -serenity*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
diff --git a/Ports/gnucobol/package.sh b/Ports/gnucobol/package.sh
index 4aa62003f4..5aff56a676 100755
--- a/Ports/gnucobol/package.sh
+++ b/Ports/gnucobol/package.sh
@@ -2,6 +2,7 @@
port=gnucobol
version=3.1.2
useconfigure="true"
+use_fresh_config_sub="true"
depends=("gmp" "gcc" "bash" "ncurses")
files="https://ftpmirror.gnu.org/gnu/gnucobol/gnucobol-${version}.tar.bz2 gnucobol-${version}.tar.bz2
https://ftpmirror.gnu.org/gnu/gnucobol/gnucobol-${version}.tar.bz2.sig gnucobol-${version}.tar.bz2.sig
diff --git a/Ports/gnucobol/patches/config.sub.patch b/Ports/gnucobol/patches/config.sub.patch
deleted file mode 100644
index dc561133a9..0000000000
--- a/Ports/gnucobol/patches/config.sub.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- gnucobol-3.1.2/build_aux/config.sub 2021-04-08 02:49:20.863867201 -0700
-+++ gnucobol-3.1.2/build_aux/config.sub 2021-04-08 02:49:22.715869376 -0700
-@@ -1339,6 +1339,7 @@
- # Each alternative MUST end in a * to match a version number.
- # sysv* is not here because it comes later, after sysvr4.
- gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ | serenity* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | kopensolaris* | plan9* \
diff --git a/Ports/gnupg/package.sh b/Ports/gnupg/package.sh
index d468b16c06..9900ba93ef 100755
--- a/Ports/gnupg/package.sh
+++ b/Ports/gnupg/package.sh
@@ -2,6 +2,8 @@
port=gnupg
version=2.3.0
useconfigure=true
+use_fresh_config_sub=true
+config_sub_path=build-aux/config.sub
configopts=("--with-libgpg-error-prefix=${SERENITY_INSTALL_ROOT}/usr/local"
"--with-libgcrypt-prefix=${SERENITY_INSTALL_ROOT}/usr/local"
"--with-libassuan-prefix=${SERENITY_INSTALL_ROOT}/usr/local"
diff --git a/Ports/gnupg/patches/configure.patch b/Ports/gnupg/patches/configure.patch
deleted file mode 100644
index 35539f7054..0000000000
--- a/Ports/gnupg/patches/configure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur gnupg-2.3.0/build-aux/config.sub gnupg-2.3.0.serenity/build-aux/config.sub
---- gnupg-2.3.0/build-aux/config.sub 2017-03-17 09:34:37.000000000 +0100
-+++ gnupg-2.3.0.serenity/build-aux/config.sub 2021-04-14 01:12:00.264606451 +0200
-@@ -1381,7 +1381,7 @@
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
diff --git a/Ports/grep/package.sh b/Ports/grep/package.sh
index e3be6447d8..d65ea1c726 100755
--- a/Ports/grep/package.sh
+++ b/Ports/grep/package.sh
@@ -6,6 +6,7 @@ https://ftpmirror.gnu.org/gnu/grep/grep-${version}.tar.gz.sig grep-${version}.ta
https://ftpmirror.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg"
useconfigure=true
+use_fresh_config_sub=true
configopts=("--disable-perl-regexp")
auth_type="sig"
auth_opts=("--keyring" "./gnu-keyring.gpg" "grep-${version}.tar.gz.sig")
diff --git a/Ports/grep/patches/fix-autoconf.patch b/Ports/grep/patches/fix-autoconf.patch
deleted file mode 100644
index 34779884ef..0000000000
--- a/Ports/grep/patches/fix-autoconf.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- grep-2.5.4/config.sub.orig Sat Jan 25 11:56:17 2020
-+++ grep-2.5.4/config.sub Sat Jan 25 11:56:28 2020
-@@ -1204,6 +1204,7 @@
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
diff --git a/Ports/indent/package.sh b/Ports/indent/package.sh
index 79788c43e5..3255b44e19 100755
--- a/Ports/indent/package.sh
+++ b/Ports/indent/package.sh
@@ -5,6 +5,7 @@ files="https://ftpmirror.gnu.org/gnu/indent/indent-${version}.tar.gz indent-${ve
https://ftpmirror.gnu.org/gnu/indent/indent-${version}.tar.gz.sig indent-${version}.tar.gz.sig
https://ftpmirror.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg"
useconfigure=true
+use_fresh_config_sub=true
auth_type="sig"
auth_opts=("--keyring" "./gnu-keyring.gpg" "indent-${version}.tar.gz.sig")
diff --git a/Ports/indent/patches/fix-autoconf.patch b/Ports/indent/patches/fix-autoconf.patch
deleted file mode 100644
index 38fa99ccf4..0000000000
--- a/Ports/indent/patches/fix-autoconf.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- indent-2.2.11/config/config.sub.orig 2020-11-08 23:19:24.782365611 -0800
-+++ indent-2.2.11/config/config.sub 2020-11-08 23:19:36.510304136 -0800
-@@ -1236,6 +1236,7 @@
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
diff --git a/Ports/libarchive/package.sh b/Ports/libarchive/package.sh
index 11fd50ae3f..21cbb84136 100755
--- a/Ports/libarchive/package.sh
+++ b/Ports/libarchive/package.sh
@@ -2,6 +2,7 @@
port=libarchive
version=3.5.2
useconfigure=true
+use_fresh_config_sub=true
configopts=("--without-xml2")
files="https://libarchive.org/downloads/libarchive-${version}.tar.gz libarchive-${version}.tar.gz
https://libarchive.org/downloads/libarchive-${version}.tar.gz.asc libarchive-${version}.tar.gz.asc"
diff --git a/Ports/libarchive/patches/fix-autoconf.patch b/Ports/libarchive/patches/fix-autoconf.patch
deleted file mode 100644
index 57efd7537d..0000000000
--- a/Ports/libarchive/patches/fix-autoconf.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/build/autoconf/config.sub.orig b/build/autoconf/config.sub
-index 1d8e98bce..e1d397a3c 100755
---- a/build/autoconf/config.sub.orig
-+++ b/build/autoconf/config.sub
-@@ -1390,7 +1390,7 @@ case $os in
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
-- | -midnightbsd*)
-+ | -midnightbsd* | -serenity*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
diff --git a/Ports/libassuan/package.sh b/Ports/libassuan/package.sh
index ab92104dd8..b9d57f78a8 100755
--- a/Ports/libassuan/package.sh
+++ b/Ports/libassuan/package.sh
@@ -2,6 +2,8 @@
port=libassuan
version=2.5.5
useconfigure=true
+use_fresh_config_sub=true
+config_sub_path=build-aux/config.sub
depends=("libgpg-error")
files="https://gnupg.org/ftp/gcrypt/libassuan/libassuan-${version}.tar.bz2 libassuan-${version}.tar.bz2 8e8c2fcc982f9ca67dcbb1d95e2dc746b1739a4668bc20b3a3c5be632edb34e4"
auth_type=sha256
diff --git a/Ports/libassuan/patches/configure.patch b/Ports/libassuan/patches/configure.patch
deleted file mode 100644
index cca8809e60..0000000000
--- a/Ports/libassuan/patches/configure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur libassuan-2.5.5/build-aux/config.sub libassuan-2.5.5.serenity/build-aux/config.sub
---- libassuan-2.5.5/build-aux/config.sub 2016-07-13 19:01:14.000000000 +0200
-+++ libassuan-2.5.5.serenity/build-aux/config.sub 2021-04-14 02:35:26.315797397 +0200
-@@ -1381,7 +1381,7 @@
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
diff --git a/Ports/libatomic_ops/package.sh b/Ports/libatomic_ops/package.sh
index cc6be68384..353f8607e8 100755
--- a/Ports/libatomic_ops/package.sh
+++ b/Ports/libatomic_ops/package.sh
@@ -3,5 +3,6 @@
port=libatomic_ops
version=7.6.10
useconfigure=true
+use_fresh_config_sub=true
files="https://www.hboehm.info/gc/gc_source/libatomic_ops-${version}.tar.gz libatomic_ops-${version}.tar.gz 587edf60817f56daf1e1ab38a4b3c729b8e846ff67b4f62a6157183708f099af"
auth_type=sha256
diff --git a/Ports/libatomic_ops/patches/fix-autoconf.patch b/Ports/libatomic_ops/patches/fix-autoconf.patch
deleted file mode 100644
index 12fb5ff6c1..0000000000
--- a/Ports/libatomic_ops/patches/fix-autoconf.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- libatomic_ops-7.6.10/config.sub 2021-07-18 14:24:53.950762337 +0100
-+++ libatomic_ops-7.6.10/config.sub 2021-07-18 14:25:19.341651925 +0100
-@@ -1393,7 +1393,8 @@
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
-+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos* \
-+ | -serenity* )
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
diff --git a/Ports/libexpat/package.sh b/Ports/libexpat/package.sh
index d9354c8f3d..f8e55f9f7d 100755
--- a/Ports/libexpat/package.sh
+++ b/Ports/libexpat/package.sh
@@ -2,6 +2,7 @@
port=libexpat
version=2.2.9
useconfigure=true
+use_fresh_config_sub=true
files="https://github.com/libexpat/libexpat/releases/download/R_2_2_9/expat-${version}.tar.xz expat-${version}.tar.xz
https://github.com/libexpat/libexpat/releases/download/R_2_2_9/expat-${version}.tar.xz.asc expat-${version}.tar.xz.asc"
workdir=expat-${version}
diff --git a/Ports/libexpat/patches/fix-autoconf.patch b/Ports/libexpat/patches/fix-autoconf.patch
deleted file mode 100644
index 5f29db8e0f..0000000000
--- a/Ports/libexpat/patches/fix-autoconf.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/conftools/config.sub
-+++ b/conftools/config.sub
-@@ -2,7 +2,7 @@
- # Configuration validation subroutine script.
- # Copyright 1992-2018 Free Software Foundation, Inc.
-
--timestamp='2018-01-01'
-+timestamp='2019-10-03'
-
- # This file is free software; you can redistribute it and/or modify it
- # under the terms of the GNU General Public License as published by
-@@ -1409,6 +1409,7 @@ case $os in
- # Each alternative MUST end in a * to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
---
-2.17.1
-
diff --git a/Ports/libffi/package.sh b/Ports/libffi/package.sh
index c511f1a9b7..0e7acdda61 100755
--- a/Ports/libffi/package.sh
+++ b/Ports/libffi/package.sh
@@ -2,5 +2,6 @@
port=libffi
version=3.4.2
useconfigure=true
+use_fresh_config_sub=true
files="https://github.com/libffi/libffi/releases/download/v${version}/libffi-${version}.tar.gz libffi-${version}.tar.gz 540fb721619a6aba3bdeef7d940d8e9e0e6d2c193595bc243241b77ff9e93620"
auth_type=sha256
diff --git a/Ports/libffi/patches/fix-autoconf.patch b/Ports/libffi/patches/fix-autoconf.patch
deleted file mode 100644
index 7afbcfa491..0000000000
--- a/Ports/libffi/patches/fix-autoconf.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/config.sub b/config.sub
-index 14b5150..b541768 100644
---- a/config.sub
-+++ b/config.sub
-@@ -1722,7 +1722,7 @@ case $os in
- | skyos* | haiku* | rdos* | toppers* | drops* | es* \
- | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
- | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
-- | nsk* | powerunix* | genode* | zvmoe* )
-+ | nsk* | powerunix* | genode* | zvmoe* | serenity* )
- ;;
- # This one is extra strict with allowed versions
- sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
diff --git a/Ports/libgcrypt/package.sh b/Ports/libgcrypt/package.sh
index 3a4a3a2453..b7e022a391 100755
--- a/Ports/libgcrypt/package.sh
+++ b/Ports/libgcrypt/package.sh
@@ -2,6 +2,8 @@
port=libgcrypt
version=1.9.2
useconfigure=true
+use_fresh_config_sub=true
+config_sub_path=build-aux/config.sub
configopts=("--with-libgpg-error-prefix=${SERENITY_INSTALL_ROOT}/usr/local")
depends=("libgpg-error")
files="https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-${version}.tar.bz2 libgcrypt-${version}.tar.bz2 b2c10d091513b271e47177274607b1ffba3d95b188bbfa8797f948aec9053c5a"
diff --git a/Ports/libgcrypt/patches/configure.patch b/Ports/libgcrypt/patches/configure.patch
deleted file mode 100644
index 645cb687d2..0000000000
--- a/Ports/libgcrypt/patches/configure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur libgcrypt-1.9.2/build-aux/config.sub libgcrypt-1.9.2.serenity/build-aux/config.sub
---- libgcrypt-1.9.2/build-aux/config.sub 2019-06-23 17:35:08.000000000 +0200
-+++ libgcrypt-1.9.2.serenity/build-aux/config.sub 2021-04-14 01:14:04.895316310 +0200
-@@ -1381,7 +1381,7 @@
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
diff --git a/Ports/libgd/package.sh b/Ports/libgd/package.sh
index 9b666b0583..c041200e8a 100755
--- a/Ports/libgd/package.sh
+++ b/Ports/libgd/package.sh
@@ -2,6 +2,8 @@
port=libgd
version=2.3.3
useconfigure=true
+use_fresh_config_sub=true
+config_sub_path=build-aux/config.sub
files="https://github.com/libgd/libgd/releases/download/gd-${version}/libgd-${version}.tar.gz libgd-${version}.tar.gz dd3f1f0bb016edcc0b2d082e8229c822ad1d02223511997c80461481759b1ed2"
auth_type=sha256
depends=("libpng")
diff --git a/Ports/libgd/patches/configure.patch b/Ports/libgd/patches/configure.patch
deleted file mode 100644
index 9bca019e10..0000000000
--- a/Ports/libgd/patches/configure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ruN libgd-2.3.3/config/config.sub libgd-2.3.3.patched/config/config.sub
---- libgd-2.3.3/config/config.sub 2021-09-11 01:12:11.000000000 -0400
-+++ libgd-2.3.3.patched/config/config.sub 2022-01-05 15:38:17.115307773 -0500
-@@ -1390,7 +1390,7 @@
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
-- | -midnightbsd*)
-+ | -midnightbsd* | -serenity*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
diff --git a/Ports/libgpg-error/package.sh b/Ports/libgpg-error/package.sh
index bd1fad02b9..251fdfc807 100755
--- a/Ports/libgpg-error/package.sh
+++ b/Ports/libgpg-error/package.sh
@@ -2,6 +2,8 @@
port=libgpg-error
version=1.42
useconfigure=true
+use_fresh_config_sub=true
+config_sub_path=build-aux/config.sub
depends=("gettext")
configopts=("--disable-tests" "--disable-threads")
files="https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-${version}.tar.bz2 libgpg-error-${version}.tar.bz2 fc07e70f6c615f8c4f590a8e37a9b8dd2e2ca1e9408f8e60459c67452b925e23"
diff --git a/Ports/libgpg-error/patches/configure.patch b/Ports/libgpg-error/patches/configure.patch
deleted file mode 100644
index 8d9bb07b8c..0000000000
--- a/Ports/libgpg-error/patches/configure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur libgpg-error-1.42/build-aux/config.sub libgpg-error-1.42.serenity/build-aux/config.sub
---- libgpg-error-1.42/build-aux/config.sub 2018-10-24 10:00:20.000000000 +0200
-+++ libgpg-error-1.42.serenity/build-aux/config.sub 2021-04-14 01:15:34.040231143 +0200
-@@ -1333,7 +1333,7 @@
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
- # sysv* is not here because it comes later, after sysvr4.
-- gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* | serenity* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | kopensolaris* | plan9* \
diff --git a/Ports/libicu/package.sh b/Ports/libicu/package.sh
index d27455de44..6fb95db2d9 100755
--- a/Ports/libicu/package.sh
+++ b/Ports/libicu/package.sh
@@ -2,6 +2,7 @@
port=libicu
version=69.1
useconfigure=true
+use_fresh_config_sub=true
workdir=icu/source
configopts=("--with-cross-build=$(pwd)/${workdir}/../host-build")
files="https://github.com/unicode-org/icu/releases/download/release-${version//./-}/icu4c-${version//./_}-src.tgz icu4c-${version//./_}-src.tgz 4cba7b7acd1d3c42c44bb0c14be6637098c7faf2b330ce876bc5f3b915d09745"
diff --git a/Ports/libicu/patches/icu.patch b/Ports/libicu/patches/icu.patch
index 87f48d7114..2375972ac9 100644
--- a/Ports/libicu/patches/icu.patch
+++ b/Ports/libicu/patches/icu.patch
@@ -89,18 +89,6 @@ diff -ur source/config/mh-serenity source.serenity/config/mh-serenity
+
+## End Linux-specific setup
+
-diff -ur source/config.sub source.serenity/config.sub
---- source/config.sub 2021-04-08 02:10:27.000000000 +0200
-+++ source.serenity/config.sub 2021-04-11 07:59:52.531086431 +0200
-@@ -1416,7 +1416,7 @@
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
-- | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
-+ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -serenity*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
diff -ur source/configure source.serenity/configure
--- source/configure 2021-04-08 02:10:27.000000000 +0200
+++ source.serenity/configure 2021-04-11 09:24:04.971314734 +0200
diff --git a/Ports/libjpeg/package.sh b/Ports/libjpeg/package.sh
index 840b4785dd..293df41af1 100755
--- a/Ports/libjpeg/package.sh
+++ b/Ports/libjpeg/package.sh
@@ -2,6 +2,7 @@
port=libjpeg
version=9d
useconfigure=true
+use_fresh_config_sub=true
files="https://ijg.org/files/jpegsrc.v${version}.tar.gz jpeg-${version}.tar.gz 2303a6acfb6cc533e0e86e8a9d29f7e6079e118b9de3f96e07a71a11c082fa6a"
auth_type=sha256
workdir="jpeg-$version"
diff --git a/Ports/libjpeg/patches/system-detect.patch b/Ports/libjpeg/patches/system-detect.patch
deleted file mode 100644
index 743f6bb617..0000000000
--- a/Ports/libjpeg/patches/system-detect.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- jpeg-9d/config.sub.orig 2021-02-17 23:18:21.463855433 +0000
-+++ jpeg-9d/config.sub 2021-02-17 23:18:42.043804955 +0000
-@@ -1390,7 +1390,7 @@
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
-- | -midnightbsd*)
-+ | -midnightbsd* | -serenity* )
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
diff --git a/Ports/libksba/package.sh b/Ports/libksba/package.sh
index 1f99b83283..5ace159851 100755
--- a/Ports/libksba/package.sh
+++ b/Ports/libksba/package.sh
@@ -2,6 +2,8 @@
port=libksba
version=1.5.1
useconfigure=true
+use_fresh_config_sub=true
+config_sub_path=build-aux/config.sub
depends=("libgpg-error")
files="https://gnupg.org/ftp/gcrypt/libksba/libksba-${version}.tar.bz2 libksba-${version}.tar.bz2 b0f4c65e4e447d9a2349f6b8c0e77a28be9531e4548ba02c545d1f46dc7bf921"
auth_type=sha256
diff --git a/Ports/libksba/patches/configure.patch b/Ports/libksba/patches/configure.patch
deleted file mode 100644
index 0dc619f7a8..0000000000
--- a/Ports/libksba/patches/configure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur libksba-1.5.1/build-aux/config.sub libksba-1.5.1.serenity/build-aux/config.sub
---- libksba-1.5.1/build-aux/config.sub 2016-08-22 10:40:58.000000000 +0200
-+++ libksba-1.5.1.serenity/build-aux/config.sub 2021-04-14 02:31:15.924387614 +0200
-@@ -1381,7 +1381,7 @@
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
diff --git a/Ports/libmodplug/package.sh b/Ports/libmodplug/package.sh
index 4ea4d012bb..ffc7465e02 100755
--- a/Ports/libmodplug/package.sh
+++ b/Ports/libmodplug/package.sh
@@ -2,6 +2,7 @@
port=libmodplug
version=0.8.8.5
useconfigure=true
+use_fresh_config_sub=true
configopts=("ac_cv_c_bigendian=no")
files="https://download.sourceforge.net/modplug-xmms/libmodplug-${version}.tar.gz libmodplug-${version}.tar.gz 77462d12ee99476c8645cb5511363e3906b88b33a6b54362b4dbc0f39aa2daad"
auth_type=sha256
diff --git a/Ports/libmodplug/patches/config.sub.patch b/Ports/libmodplug/patches/config.sub.patch
deleted file mode 100644
index 64d1dc0b83..0000000000
--- a/Ports/libmodplug/patches/config.sub.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur libmodplug-0.8.8.5/config.sub libmodplug-0.8.8.5.serenity/config.sub
---- libmodplug-0.8.8.5/config.sub 2017-03-17 09:34:37.000000000 +0100
-+++ libmodplug-0.8.8.5.serenity/config.sub 2021-04-14 01:12:00.264606451 +0200
-@@ -1381,7 +1381,7 @@
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
diff --git a/Ports/libogg/package.sh b/Ports/libogg/package.sh
index 1076bcb8d4..35103cdc6d 100755
--- a/Ports/libogg/package.sh
+++ b/Ports/libogg/package.sh
@@ -2,6 +2,7 @@
port=libogg
version=1.3.5
useconfigure=true
+use_fresh_config_sub=true
files="https://github.com/xiph/ogg/releases/download/v${version}/libogg-${version}.tar.gz libogg-${version}.tar.gz 0eb4b4b9420a0f51db142ba3f9c64b333f826532dc0f48c6410ae51f4799b664"
auth_type=sha256
diff --git a/Ports/libogg/patches/config.sub.patch b/Ports/libogg/patches/config.sub.patch
deleted file mode 100644
index 39af81c4d6..0000000000
--- a/Ports/libogg/patches/config.sub.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libogg-1.3.5/config.sub 2021-06-04 01:15:56.000000000 +0200
-+++ libogg-1.3.5-patched/config.sub 2022-01-08 00:05:41.813876348 +0100
-@@ -1363,7 +1363,7 @@
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -serenity* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
diff --git a/Ports/liboggz/package.sh b/Ports/liboggz/package.sh
index cf3ba58fc1..084131f8b6 100755
--- a/Ports/liboggz/package.sh
+++ b/Ports/liboggz/package.sh
@@ -2,6 +2,7 @@
port=liboggz
version=1.1.1
useconfigure=true
+use_fresh_config_sub=true
files="https://downloads.xiph.org/releases/liboggz/liboggz-${version}.tar.gz liboggz-${version}.tar.gz 6bafadb1e0a9ae4ac83304f38621a5621b8e8e32927889e65a98706d213d415a"
auth_type=sha256
depends=("libogg")
diff --git a/Ports/liboggz/patches/configure.patch b/Ports/liboggz/patches/configure.patch
deleted file mode 100644
index 08109f3b44..0000000000
--- a/Ports/liboggz/patches/configure.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- liboggz-1.1.1/config.sub.orig 2022-01-05 23:56:43.372206851 +0100
-+++ liboggz-1.1.1/config.sub 2022-01-05 23:57:54.265540213 +0100
-@@ -1266,7 +1266,7 @@
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -serenity* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -kopensolaris* \
diff --git a/Ports/libpng/package.sh b/Ports/libpng/package.sh
index 3668095fc1..2c15d1e56f 100755
--- a/Ports/libpng/package.sh
+++ b/Ports/libpng/package.sh
@@ -2,6 +2,7 @@
port=libpng
version=1.6.37
useconfigure=true
+use_fresh_config_sub=true
files="https://download.sourceforge.net/libpng/libpng-${version}.tar.gz libpng-${version}.tar.gz daeb2620d829575513e35fecc83f0d3791a620b9b93d800b763542ece9390fb4"
auth_type=sha256
depends=("zlib")
diff --git a/Ports/libpng/patches/detect.patch b/Ports/libpng/patches/detect.patch
deleted file mode 100644
index 12e01a882c..0000000000
--- a/Ports/libpng/patches/detect.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- config.sub 2021-03-03 22:42:25.065684142 +0100
-+++ libpng-1.6.37/config.sub 2021-03-03 22:43:50.611720741 +0100
-@@ -1390,7 +1390,7 @@
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
-- | -midnightbsd*)
-+ | -midnightbsd* | -serenity*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
diff --git a/Ports/libsixel/package.sh b/Ports/libsixel/package.sh
index d35a1670ae..6f2c7e13f5 100755
--- a/Ports/libsixel/package.sh
+++ b/Ports/libsixel/package.sh
@@ -3,6 +3,7 @@ port=libsixel
version=1.8.6
files="https://github.com/saitoha/libsixel/archive/refs/tags/v${version}.tar.gz ${port}-${version}.tar.gz 37611d60c7dbcee701346967336dbf135fdd5041024d5f650d52fae14c731ab9"
useconfigure=true
+use_fresh_config_sub=true
auth_type=sha256
configopts=("--prefix=${SERENITY_INSTALL_ROOT}/usr/local")
diff --git a/Ports/libsixel/patches/config.sub.patch b/Ports/libsixel/patches/config.sub.patch
deleted file mode 100644
index 782e94db6a..0000000000
--- a/Ports/libsixel/patches/config.sub.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/config.sub b/config.sub
-index 9ccf09a..3f638ab 100755
---- a/config.sub
-+++ b/config.sub
-@@ -1390,7 +1390,7 @@ case $os in
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
-- | -midnightbsd*)
-+ | -midnightbsd* | -serenity*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
diff --git a/Ports/libsodium/package.sh b/Ports/libsodium/package.sh
index 1b4c0f7712..115531e206 100755
--- a/Ports/libsodium/package.sh
+++ b/Ports/libsodium/package.sh
@@ -2,6 +2,8 @@
port=libsodium
version=1.0.18
useconfigure=true
+use_fresh_config_sub=true
+config_sub_path=build-aux/config.sub
workdir=libsodium-${version}
files="https://download.libsodium.org/libsodium/releases/libsodium-${version}.tar.gz libsodium-${version}.tar.gz 6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1"
auth_type=sha256
diff --git a/Ports/libsodium/patches/fix-config-sub.patch b/Ports/libsodium/patches/fix-config-sub.patch
deleted file mode 100644
index 41f6d11323..0000000000
--- a/Ports/libsodium/patches/fix-config-sub.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur a/build-aux/config.sub b/build-aux/config.sub
---- a/build-aux/config.sub 2019-05-30 22:20:06.000000000 +0200
-+++ b/build-aux/config.sub 2021-11-01 10:53:11.568353185 +0100
-@@ -1341,7 +1341,7 @@
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
- # sysv* is not here because it comes later, after sysvr4.
-- gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ gnu* | bsd* | mach* | minix* | genix* | ultrix* | serenity* | irix* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | kopensolaris* | plan9* \
diff --git a/Ports/libtheora/package.sh b/Ports/libtheora/package.sh
index 19f29103f2..0a7431164e 100755
--- a/Ports/libtheora/package.sh
+++ b/Ports/libtheora/package.sh
@@ -2,6 +2,7 @@
port=libtheora
version=1.1.1
useconfigure=true
+use_fresh_config_sub=true
files="https://ftp.osuosl.org/pub/xiph/releases/theora/libtheora-${version}.tar.bz2 libtheora-${version}.tar.bz2 b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc"
auth_type="sha256"
depends=("libvorbis")
diff --git a/Ports/libtheora/patches/config.sub.patch b/Ports/libtheora/patches/config.sub.patch
deleted file mode 100644
index 30d8c160c8..0000000000
--- a/Ports/libtheora/patches/config.sub.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libtheora-1.1.1/config.sub 2009-02-24 04:50:50.000000000 +0100
-+++ libtheora-1.1.1-patched/config.sub 2021-04-27 21:07:46.414544609 +0200
-@@ -1093,7 +1093,7 @@
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-- | -aos* \
-+ | -aos* | -serenity* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
diff --git a/Ports/libtool/package.sh b/Ports/libtool/package.sh
index 50467598d9..4f7c23d587 100755
--- a/Ports/libtool/package.sh
+++ b/Ports/libtool/package.sh
@@ -2,6 +2,7 @@
port=libtool
version=2.4
useconfigure="true"
+use_fresh_config_sub="true"
depends=("bash" "sed")
files="https://ftpmirror.gnu.org/gnu/libtool/libtool-${version}.tar.xz libtool-${version}.tar.xz
https://ftpmirror.gnu.org/gnu/libtool/libtool-${version}.tar.xz.sig libtool-${version}.tar.xz.sig
diff --git a/Ports/libtool/patches/config.sub.patch b/Ports/libtool/patches/config.sub.patch
deleted file mode 100644
index eaad493ff7..0000000000
--- a/Ports/libtool/patches/config.sub.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- libtool-2.4.6/libltdl/config/config.sub 2010-09-22 07:46:09.000000000 -0700
-+++ libtool-2.4.6/libltdl/config/config.sub 2021-04-11 18:46:03.374661972 -0700
-@@ -1301,6 +1301,7 @@
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
diff --git a/Ports/libvorbis/package.sh b/Ports/libvorbis/package.sh
index cab7cf821e..b2422f0f01 100755
--- a/Ports/libvorbis/package.sh
+++ b/Ports/libvorbis/package.sh
@@ -2,6 +2,7 @@
port=libvorbis
version=1.3.7
useconfigure=true
+use_fresh_config_sub=true
files="https://github.com/xiph/vorbis/releases/download/v${version}/libvorbis-${version}.tar.gz libvorbis-${version}.tar.gz 0e982409a9c3fc82ee06e08205b1355e5c6aa4c36bca58146ef399621b0ce5ab"
auth_type=sha256
depends=("libogg")
diff --git a/Ports/libvorbis/patches/01-add-serenity-system.patch b/Ports/libvorbis/patches/01-add-serenity-system.patch
deleted file mode 100644
index bc4aa117b5..0000000000
--- a/Ports/libvorbis/patches/01-add-serenity-system.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libvorbis-1.3.7/config.sub 2020-07-04 08:20:15.000000000 +0200
-+++ libvorbis-1.3.7.patched/config.sub 2021-03-30 18:28:04.784175977 +0200
-@@ -1390,7 +1390,7 @@
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
-- | -midnightbsd*)
-+ | -midnightbsd* | -serenity*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
diff --git a/Ports/libxml2/package.sh b/Ports/libxml2/package.sh
index b9fb04b395..7ce3004a5b 100755
--- a/Ports/libxml2/package.sh
+++ b/Ports/libxml2/package.sh
@@ -1,6 +1,7 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=libxml2
useconfigure="true"
+use_fresh_config_sub="true"
version="2.9.12"
files="ftp://xmlsoft.org/libxml2/libxml2-${version}.tar.gz libxml2-${version}.tar.gz c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92"
auth_type=sha256
diff --git a/Ports/libxml2/patches/config.sub.patch b/Ports/libxml2/patches/config.sub.patch
deleted file mode 100644
index 00660f6039..0000000000
--- a/Ports/libxml2/patches/config.sub.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libxml2-2.9.12/config.sub 2021-05-13 20:54:55.000000000 +0200
-+++ libxml2-2.9.12-patched/config.sub 2021-06-04 14:55:35.184278060 +0200
-@@ -1360,7 +1360,7 @@
- | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
- | skyos* | haiku* | rdos* | toppers* | drops* | es* \
- | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
-- | midnightbsd*)
-+ | midnightbsd* | serenity*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- qnx*)
diff --git a/Ports/m4/package.sh b/Ports/m4/package.sh
index 33dd797e13..1d114b849b 100755
--- a/Ports/m4/package.sh
+++ b/Ports/m4/package.sh
@@ -2,6 +2,7 @@
port=m4
version=1.4.9
useconfigure=true
+use_fresh_config_sub=true
files="https://ftpmirror.gnu.org/gnu/m4/m4-${version}.tar.gz m4-${version}.tar.gz
https://ftpmirror.gnu.org/gnu/m4/m4-${version}.tar.gz.sig m4-${version}.tar.gz.sig
https://ftpmirror.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg"
diff --git a/Ports/m4/patches/configure.patch b/Ports/m4/patches/configure.patch
deleted file mode 100644
index d99a9c9af0..0000000000
--- a/Ports/m4/patches/configure.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/config.sub b/config.sub
-index 5defff6..040fb4b 100755
---- a/config.sub
-+++ b/config.sub
-@@ -1222,7 +1222,8 @@ case $os in
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
-+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* \
-+ | -serenity*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
diff --git a/Ports/make/package.sh b/Ports/make/package.sh
index 8da9bfc560..94f395056f 100755
--- a/Ports/make/package.sh
+++ b/Ports/make/package.sh
@@ -2,6 +2,8 @@
port=make
version=4.3
useconfigure=true
+use_fresh_config_sub=true
+config_sub_path=build-aux/config.sub
files="https://ftpmirror.gnu.org/gnu/make/make-${version}.tar.gz make-${version}.tar.gz
https://ftpmirror.gnu.org/gnu/make/make-${version}.tar.gz.sig make-${version}.tar.gz.sig
https://ftpmirror.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg"
diff --git a/Ports/make/patches/make-4.3-serenity.patch b/Ports/make/patches/make-4.3-serenity.patch
index 6404ea6965..02ea231838 100644
--- a/Ports/make/patches/make-4.3-serenity.patch
+++ b/Ports/make/patches/make-4.3-serenity.patch
@@ -1,15 +1,3 @@
-diff -ru make-4.3-clean/build-aux/config.sub make-4.3/build-aux/config.sub
---- make-4.3-clean/build-aux/config.sub 2019-09-15 20:23:28.000000000 +0200
-+++ make-4.3/build-aux/config.sub 2020-12-15 00:51:50.738132015 +0100
-@@ -1343,7 +1343,7 @@
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | kopensolaris* | plan9* \
- | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
-- | aos* | aros* | cloudabi* | sortix* | twizzler* \
-+ | aos* | aros* | cloudabi* | sortix* | twizzler* | serenity* \
- | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
- | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
- | knetbsd* | mirbsd* | netbsd* \
diff -ru make-4.3-clean/lib/getdtablesize.c make-4.3/lib/getdtablesize.c
--- make-4.3-clean/lib/getdtablesize.c 2020-01-19 21:34:01.000000000 +0100
+++ make-4.3/lib/getdtablesize.c 2020-12-15 00:53:49.661168383 +0100
diff --git a/Ports/mawk/package.sh b/Ports/mawk/package.sh
index bd637a5b7e..b31d8fbebc 100755
--- a/Ports/mawk/package.sh
+++ b/Ports/mawk/package.sh
@@ -4,6 +4,7 @@ version=1.3.4-20200120
files="https://invisible-mirror.net/archives/mawk/mawk-${version}.tgz mawk-${version}.tgz
https://invisible-mirror.net/archives/mawk/mawk-${version}.tgz.asc mawk-${version}.tgz.asc"
useconfigure=true
+use_fresh_config_sub=true
auth_type="sig"
auth_import_key="C52048C0C0748FEE227D47A2702353E0F7E48EDB"
auth_opts=("mawk-${version}.tgz.asc" "mawk-${version}.tgz")
diff --git a/Ports/mawk/patches/fix-autoconf.patch b/Ports/mawk/patches/fix-autoconf.patch
deleted file mode 100644
index 45c0a02337..0000000000
--- a/Ports/mawk/patches/fix-autoconf.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- mawk-1.3.4-20200120/config.sub.orig Wed Jan 22 22:00:37 2020
-+++ mawk-1.3.4-20200120/config.sub Wed Jan 22 22:00:46 2020
-@@ -1339,6 +1339,7 @@
- # Each alternative MUST end in a * to match a version number.
- # sysv* is not here because it comes later, after sysvr4.
- gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ | serenity* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | kopensolaris* | plan9* \
diff --git a/Ports/mpc/package.sh b/Ports/mpc/package.sh
index e4f809771b..c319e201d8 100755
--- a/Ports/mpc/package.sh
+++ b/Ports/mpc/package.sh
@@ -2,6 +2,7 @@
port=mpc
version=1.2.1
useconfigure=true
+use_fresh_config_sub=true
configopts=("--target=${SERENITY_ARCH}-pc-serenity" "--with-sysroot=/")
files="https://ftpmirror.gnu.org/gnu/mpc/mpc-${version}.tar.gz mpc-${version}.tar.gz
https://ftpmirror.gnu.org/gnu/mpc/mpc-${version}.tar.gz.sig mpc-${version}.tar.gz.sig
diff --git a/Ports/mpc/patches/config.sub.patch b/Ports/mpc/patches/config.sub.patch
deleted file mode 100644
index 8d565ddd0f..0000000000
--- a/Ports/mpc/patches/config.sub.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- mpc-1.2.1/build-aux/config.sub 2020-10-20 17:26:31.000000000 +0100
-+++ mpc-1.2.1.serenity/build-aux/config.sub 2021-07-28 18:13:47.269493423 +0100
-@@ -1339,6 +1339,7 @@
- # Each alternative MUST end in a * to match a version number.
- # sysv* is not here because it comes later, after sysvr4.
- gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ | serenity* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | kopensolaris* | plan9* \
diff --git a/Ports/mpfr/package.sh b/Ports/mpfr/package.sh
index 247bed37ed..1da61bdcd7 100755
--- a/Ports/mpfr/package.sh
+++ b/Ports/mpfr/package.sh
@@ -2,6 +2,7 @@
port=mpfr
version=4.1.0
useconfigure=true
+use_fresh_config_sub=true
configopts=("--target=${SERENITY_ARCH}-pc-serenity" "--with-sysroot=/")
files="https://ftpmirror.gnu.org/gnu/mpfr/mpfr-${version}.tar.xz mpfr-${version}.tar.xz
https://ftpmirror.gnu.org/gnu/mpfr/mpfr-${version}.tar.xz.sig mpfr-${version}.tar.xz.sig
diff --git a/Ports/mpfr/patches/config.sub.patch b/Ports/mpfr/patches/config.sub.patch
deleted file mode 100644
index 38de5314ec..0000000000
--- a/Ports/mpfr/patches/config.sub.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- mpfr-4.1.0/config.sub 2020-07-10 12:59:02.000000000 +0100
-+++ mpfr-4.1.0.serenity/config.sub 2021-07-28 18:05:59.462525103 +0100
-@@ -1390,7 +1390,7 @@
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
-- | -midnightbsd*)
-+ | -midnightbsd* | -serenity*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
diff --git a/Ports/nano/package.sh b/Ports/nano/package.sh
index 1898df62f0..2a63f19c11 100755
--- a/Ports/nano/package.sh
+++ b/Ports/nano/package.sh
@@ -2,6 +2,7 @@
port=nano
version=5.8
useconfigure="true"
+use_fresh_config_sub=true
files="https://www.nano-editor.org/dist/v5/nano-${version}.tar.xz nano-${version}.tar.xz
https://www.nano-editor.org/dist/v5/nano-${version}.tar.xz.asc nano-${version}.tar.xz.asc"
configopts=("--target=${SERENITY_ARCH}-pc-serenity" "--disable-browser" "--disable-utf8")
diff --git a/Ports/nano/patches/fix-autoconf.patch b/Ports/nano/patches/fix-autoconf.patch
deleted file mode 100644
index 48ca66b975..0000000000
--- a/Ports/nano/patches/fix-autoconf.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/config.sub.orig b/config.sub
-index 63c1f1c8b..f14d29e3d 100755
---- a/config.sub.orig
-+++ b/config.sub
-@@ -1696,6 +1696,7 @@ case $os in
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ | serenity* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
diff --git a/Ports/nasm/package.sh b/Ports/nasm/package.sh
index 69691a62c9..01a69cef26 100755
--- a/Ports/nasm/package.sh
+++ b/Ports/nasm/package.sh
@@ -4,4 +4,5 @@ version=2.15.05
files="https://www.nasm.us/pub/nasm/releasebuilds/${version}/nasm-${version}.tar.gz nasm-${version}.tar.gz 9182a118244b058651c576baa9d0366ee05983c4d4ae1d9ddd3236a9f2304997"
auth_type=sha256
useconfigure=true
+use_fresh_config_sub=true
makeopts=()
diff --git a/Ports/nasm/patches/config.sub.patch b/Ports/nasm/patches/config.sub.patch
deleted file mode 100644
index e04f9c2d45..0000000000
--- a/Ports/nasm/patches/config.sub.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur nasm-2.15.05/autoconf/helpers/config.sub nasm-2.15.05.serenity/autoconf/helpers/config.sub
---- nasm-2.15.05/autoconf/helpers/config.sub 2020-08-28 18:04:07.000000000 +0200
-+++ nasm-2.15.05.serenity/autoconf/helpers/config.sub 2021-04-14 11:44:38.324488456 +0200
-@@ -1333,7 +1333,7 @@
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
- # sysv* is not here because it comes later, after sysvr4.
-- gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* | serenity* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | kopensolaris* | plan9* \
diff --git a/Ports/npth/package.sh b/Ports/npth/package.sh
index 5a837921ac..d116fd2b02 100755
--- a/Ports/npth/package.sh
+++ b/Ports/npth/package.sh
@@ -2,6 +2,8 @@
port=npth
version=1.6
useconfigure=true
+use_fresh_config_sub=true
+config_sub_path=build-aux/config.sub
files="https://gnupg.org/ftp/gcrypt/npth/npth-${version}.tar.bz2 npth-${version}.tar.bz2 1393abd9adcf0762d34798dc34fdcf4d0d22a8410721e76f1e3afcd1daa4e2d1"
auth_type=sha256
diff --git a/Ports/npth/patches/configure.patch b/Ports/npth/patches/configure.patch
deleted file mode 100644
index 7bcce5a55b..0000000000
--- a/Ports/npth/patches/configure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur npth-1.6/build-aux/config.sub npth-1.6.serenity/build-aux/config.sub
---- npth-1.6/build-aux/config.sub 2021-04-14 02:43:42.288159882 +0200
-+++ npth-1.6.serenity/build-aux/config.sub 2016-07-13 19:03:42.000000000 +0200
-@@ -1381,7 +1381,7 @@
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
diff --git a/Ports/ntbtls/package.sh b/Ports/ntbtls/package.sh
index 9e1f4f55f0..1d26b683d3 100755
--- a/Ports/ntbtls/package.sh
+++ b/Ports/ntbtls/package.sh
@@ -2,6 +2,8 @@
port=ntbtls
version=0.2.0
useconfigure=true
+use_fresh_config_sub=true
+config_sub_path=build-aux/config.sub
depends=("libgpg-error" "libksba" "libgcrypt")
files="https://gnupg.org/ftp/gcrypt/ntbtls/ntbtls-${version}.tar.bz2 ntbtls-${version}.tar.bz2 649fe74a311d13e43b16b26ebaa91665ddb632925b73902592eac3ed30519e17"
auth_type=sha256
diff --git a/Ports/ntbtls/patches/configure.patch b/Ports/ntbtls/patches/configure.patch
deleted file mode 100644
index aa2b619c82..0000000000
--- a/Ports/ntbtls/patches/configure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur ntbtls-0.2.0/build-aux/config.sub ntbtls-0.2.0.serenity/build-aux/config.sub
---- ntbtls-0.2.0/build-aux/config.sub 2016-07-13 19:10:49.000000000 +0200
-+++ ntbtls-0.2.0.serenity/build-aux/config.sub 2021-04-14 02:52:34.178672014 +0200
-@@ -1381,7 +1381,7 @@
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
diff --git a/Ports/openssh/package.sh b/Ports/openssh/package.sh
index 455126a2dd..a4ce82a251 100755
--- a/Ports/openssh/package.sh
+++ b/Ports/openssh/package.sh
@@ -6,11 +6,13 @@ files="https://github.com/openssh/openssh-portable/archive/9ca7e9c861775dd6c6312
auth_type=sha256
depends=("zlib" "openssl")
useconfigure=true
+use_fresh_config_sub=true
configopts=("--prefix=/usr/local" "--disable-utmp" "--disable-strip" "--sysconfdir=/etc/ssh" "--with-ssl-dir=${SERENITY_INSTALL_ROOT}/usr/local/lib")
export LDFLAGS="-lcrypt -lcore"
pre_configure() {
+ ensure_new_config_sub
run autoreconf
}
diff --git a/Ports/openssh/patches/config.sub.patch b/Ports/openssh/patches/config.sub.patch
deleted file mode 100644
index 999839c90a..0000000000
--- a/Ports/openssh/patches/config.sub.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-cd1bd18834e519c4787a4e3672fa0afdf1b22da7 Add Serenity to config.sub
-diff --git a/config.sub b/config.sub
-index 973a2980..cf386e5c 100755
---- a/config.sub
-+++ b/config.sub
-@@ -1339,6 +1339,7 @@ case $os in
- # Each alternative MUST end in a * to match a version number.
- # sysv* is not here because it comes later, after sysvr4.
- gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ | serenity* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | kopensolaris* | plan9* \
diff --git a/Ports/patch/package.sh b/Ports/patch/package.sh
index a4964759ff..97cd71739a 100755
--- a/Ports/patch/package.sh
+++ b/Ports/patch/package.sh
@@ -2,5 +2,6 @@
port=patch
version=2.7.6
useconfigure=true
+use_fresh_config_sub=true
files="https://ftp.gnu.org/gnu/patch/patch-${version}.tar.gz patch-${version}.tar.gz 8cf86e00ad3aaa6d26aca30640e86b0e3e1f395ed99f189b06d4c9f74bc58a4e"
auth_type=sha256
diff --git a/Ports/patch/patches/fix-config-sub.patch b/Ports/patch/patches/fix-config-sub.patch
deleted file mode 100644
index bbea4431a7..0000000000
--- a/Ports/patch/patches/fix-config-sub.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur a/build-aux/config.sub b/build-aux/config.sub
---- a/build-aux/config.sub 2018-02-03 13:41:53.000000000 +0100
-+++ b/build-aux/config.sub 2021-11-10 01:22:51.034188104 +0100
-@@ -1363,7 +1363,7 @@
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -serenity* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
diff --git a/Ports/pcre/package.sh b/Ports/pcre/package.sh
index dff43ddbaa..2d584578a4 100755
--- a/Ports/pcre/package.sh
+++ b/Ports/pcre/package.sh
@@ -2,6 +2,7 @@
port=pcre
version=8.45
useconfigure=true
+use_fresh_config_sub=true
files="https://downloads.sourceforge.net/project/pcre/pcre/${version}/pcre-${version}.tar.gz pcre-${version}.tar.gz
https://downloads.sourceforge.net/project/pcre/pcre/${version}/pcre-${version}.tar.gz.sig pcre-${version}.tar.gz.sig"
diff --git a/Ports/pcre/patches/fix-autoconf.patch b/Ports/pcre/patches/fix-autoconf.patch
deleted file mode 100644
index 90d18778d7..0000000000
--- a/Ports/pcre/patches/fix-autoconf.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur a/config.sub b/config.sub
---- a/config.sub 2021-06-15 17:52:53.000000000 +0200
-+++ b/config.sub 2021-11-06 02:02:32.208608392 +0100
-@@ -1690,7 +1690,7 @@
- # Now accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
-- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | serenity* | irix* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
diff --git a/Ports/pkgconf/package.sh b/Ports/pkgconf/package.sh
index a2b2c2c922..5d1f98e7ca 100755
--- a/Ports/pkgconf/package.sh
+++ b/Ports/pkgconf/package.sh
@@ -4,7 +4,8 @@ version=1.8.0
files="https://distfiles.dereferenced.org/pkgconf/pkgconf-${version}.tar.xz pkgconf-${version}.tar.xz ef9c7e61822b7cb8356e6e9e1dca58d9556f3200d78acab35e4347e9d4c2bbaf"
auth_type=sha256
useconfigure=true
-# FIXME: This looks suspiciously host-y...
+use_fresh_config_sub=true
+# FIXME: This looks suspiciously host-y...
configopts=("--prefix=/usr/local" "--with-pkg-config-dir=/usr/local/lib/pkgconfig")
post_install() {
diff --git a/Ports/pkgconf/patches/build-system.patch b/Ports/pkgconf/patches/build-system.patch
deleted file mode 100644
index 4600074d1a..0000000000
--- a/Ports/pkgconf/patches/build-system.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- pkgconf-1.7.3/config.sub.orig 2020-10-13 18:51:42.736398026 +1100
-+++ pkgconf-1.7.3/config.sub 2020-10-13 18:51:45.953064825 +1100
-@@ -1393,7 +1393,8 @@
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
-+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos* \
-+ | -serenity*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
diff --git a/Ports/python3/package.sh b/Ports/python3/package.sh
index 5c53f6c0ba..5ad82ee642 100755
--- a/Ports/python3/package.sh
+++ b/Ports/python3/package.sh
@@ -6,6 +6,7 @@ port=python3
version="${PYTHON_VERSION}"
workdir="Python-${version}"
useconfigure="true"
+use_fresh_config_sub=true
files="${PYTHON_ARCHIVE_URL} ${PYTHON_ARCHIVE} ${PYTHON_ARCHIVE_SHA256SUM}
https://raw.githubusercontent.com/python/cpython/942dd9f3f77eef08fabddbd9fb883a866ad6d4cb/PC/pycon.ico launcher.ico 55c1e1fcabc2f254a6d02242912359d29f141d11c4892c20375d58b6dcd89ac0"
auth_type="sha256"
diff --git a/Ports/python3/patches/fix-autoconf.patch b/Ports/python3/patches/fix-autoconf.patch
index 370fb56cc0..914d085d29 100644
--- a/Ports/python3/patches/fix-autoconf.patch
+++ b/Ports/python3/patches/fix-autoconf.patch
@@ -1,15 +1,3 @@
---- Python-3.10.1/config.sub 2021-12-06 18:23:39.000000000 +0000
-+++ Python-3.10.1/config.sub 2021-12-11 17:17:07.076780435 +0000
-@@ -1474,6 +1474,9 @@
- oss*)
- os=sysv3
- ;;
-+ serenity*)
-+ os=serenity
-+ ;;
- svr4*)
- os=sysv4
- ;;
--- Python-3.10.1/configure.ac 2021-12-06 18:23:39.000000000 +0000
+++ Python-3.10.1/configure.ac 2021-12-11 17:23:18.363664786 +0000
@@ -391,6 +391,9 @@
diff --git a/Ports/readline/package.sh b/Ports/readline/package.sh
index d844222eac..fc9f0e8a7d 100755
--- a/Ports/readline/package.sh
+++ b/Ports/readline/package.sh
@@ -3,5 +3,6 @@
port=readline
version=8.1
useconfigure=true
+use_fresh_config_sub=true
files="https://ftpmirror.gnu.org/gnu/readline/readline-${version}.tar.gz readline-${version}.tar.gz f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02"
auth_type=sha256
diff --git a/Ports/readline/patches/fix-autoconf.patch b/Ports/readline/patches/fix-autoconf.patch
deleted file mode 100644
index 8869a48d4b..0000000000
--- a/Ports/readline/patches/fix-autoconf.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- readline-8.1/support/config.sub 2021-04-25 15:47:03.098432900 +0200
-+++ readline-8.1/support/config.sub 2021-04-25 15:49:34.874324300 +0200
-@@ -1690,7 +1690,7 @@
- # Now accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
-- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* | serenity* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
diff --git a/Ports/rsync/package.sh b/Ports/rsync/package.sh
index 8b9c68210b..7e43ca890d 100755
--- a/Ports/rsync/package.sh
+++ b/Ports/rsync/package.sh
@@ -2,6 +2,7 @@
port=rsync
version=3.1.3
useconfigure="true"
+use_fresh_config_sub="true"
files="https://download.samba.org/pub/rsync/src/rsync-${version}.tar.gz rsync-${version}.tar.gz 55cc554efec5fdaad70de921cd5a5eeb6c29a95524c715f3bbf849235b0800c0"
auth_type=sha256
configopts=("--target=${SERENITY_ARCH}-pc-serenity")
diff --git a/Ports/rsync/patches/config.sub.patch b/Ports/rsync/patches/config.sub.patch
deleted file mode 100644
index 62f138e3a3..0000000000
--- a/Ports/rsync/patches/config.sub.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ru rsync-3.1.3/config.sub rsync-3.1.3-port/config.sub
---- rsync-3.1.3/config.sub 2013-05-19 18:01:07.000000000 -0400
-+++ rsync-3.1.3-port/config.sub 2020-05-01 20:10:00.171268526 -0400
-@@ -1373,7 +1373,7 @@
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* | -serenity* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
diff --git a/Ports/ruby/package.sh b/Ports/ruby/package.sh
index 38718b7e5e..9b5a5e57ba 100755
--- a/Ports/ruby/package.sh
+++ b/Ports/ruby/package.sh
@@ -5,6 +5,8 @@ source version.sh
port=ruby
version=${RUBY_VERSION}
useconfigure="true"
+use_fresh_config_sub=true
+config_sub_path=tool/config.sub
files="${RUBY_ARCHIVE_URL} ${RUBY_ARCHIVE} ${RUBY_ARCHIVE_SHA256SUM}
https://cache.ruby-lang.org/pub/misc/logo/ruby-logo-kit.zip ruby-logo-kit.zip 7f0a980e09874d35d80b958949dc2460e683957de3d2494a1499aea9d9989055"
auth_type="sha256"
diff --git a/Ports/ruby/patches/config.patch b/Ports/ruby/patches/config.patch
index ea6a606af1..40afa61d20 100644
--- a/Ports/ruby/patches/config.patch
+++ b/Ports/ruby/patches/config.patch
@@ -1,14 +1,3 @@
---- ruby-3.0.2/tool/config.sub 2021-07-07 03:08:35.000000000 -0700
-+++ ruby-3.0.2/tool/config.sub 2021-09-15 10:18:47.677232027 -0700
-@@ -1695,7 +1695,7 @@
- # Now accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
-- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | serenity* | irix* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
--- ruby-3.0.2/configure 2021-09-16 14:10:42.314091669 -0700
+++ ruby-3.0.2/configure 2021-09-18 19:14:21.633876942 -0700
@@ -28610,7 +28610,7 @@
diff --git a/Ports/sed/package.sh b/Ports/sed/package.sh
index f66d1bc09c..d72439cdd0 100755
--- a/Ports/sed/package.sh
+++ b/Ports/sed/package.sh
@@ -2,6 +2,8 @@
port=sed
version=4.2.1
useconfigure="true"
+use_fresh_config_sub="true"
+config_sub_path=build-aux/config.sub
files="https://ftpmirror.gnu.org/gnu/sed/sed-${version}.tar.bz2 sed-${version}.tar.bz2
https://ftpmirror.gnu.org/gnu/sed/sed-${version}.tar.bz2.sig sed-${version}.tar.bz2.sig
https://ftpmirror.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg"
diff --git a/Ports/sed/patches/config.sub.patch b/Ports/sed/patches/config.sub.patch
deleted file mode 100644
index 72e52e86b7..0000000000
--- a/Ports/sed/patches/config.sub.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./build-aux/config.sub 2009-06-15 10:05:11.000000000 +0100
-+++ ./build-aux/config.sub.sos 2020-01-24 10:43:44.561780477 +0000
-@@ -1269,7 +1269,7 @@
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-- | -kopensolaris* \
-+ | -kopensolaris* | -serenity* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
diff --git a/Ports/sqlite/package.sh b/Ports/sqlite/package.sh
index 82e00096d2..d5d898233a 100755
--- a/Ports/sqlite/package.sh
+++ b/Ports/sqlite/package.sh
@@ -1,6 +1,7 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=sqlite
useconfigure="true"
+use_fresh_config_sub="true"
version="3350500"
files="https://www.sqlite.org/2021/sqlite-autoconf-${version}.tar.gz sqlite-autoconf-${version}.tar.gz f52b72a5c319c3e516ed7a92e123139a6e87af08a2dc43d7757724f6132e6db0"
auth_type=sha256
diff --git a/Ports/sqlite/patches/config.sub.patch b/Ports/sqlite/patches/config.sub.patch
deleted file mode 100644
index 9695dc6180..0000000000
--- a/Ports/sqlite/patches/config.sub.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- sqlite-autoconf-3350300/config.sub 2021-03-26 15:25:02.000000000 +0100
-+++ sqlite-autoconf-port/config.sub 2021-03-26 23:31:42.457629453 +0100
-@@ -1366,7 +1366,7 @@
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
-- | -sym* | -kopensolaris* | -plan9* \
-+ | -sym* | -kopensolaris* | -plan9* | -serenity* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* | -cloudabi* | -sortix* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
diff --git a/Ports/vttest/package.sh b/Ports/vttest/package.sh
index 749cd2a778..2246575042 100755
--- a/Ports/vttest/package.sh
+++ b/Ports/vttest/package.sh
@@ -2,5 +2,6 @@
port=vttest
version=20210210
useconfigure=true
+use_fresh_config_sub=true
files="https://invisible-island.net/datafiles/release/vttest.tar.gz vttest.tar.gz 0f98a2e305982915f1520984c3e8698e3acd508ee210711528c89f5a7ea7f046"
auth_type=sha256
diff --git a/Ports/vttest/patches/fix-autoconf.patch b/Ports/vttest/patches/fix-autoconf.patch
deleted file mode 100644
index 1ac64d1f35..0000000000
--- a/Ports/vttest/patches/fix-autoconf.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nru vttest-orig/config.sub vttest-20210210/config.sub
---- vttest-orig/config.sub 2020-08-17 05:36:41.000000000 +0200
-+++ vttest-20210210/config.sub 2021-02-20 16:22:14.126987759 +0100
-@@ -1700,7 +1700,7 @@
- | os9* | macos* | osx* | ios* \
- | mpw* | magic* | mmixware* | mon960* | lnews* \
- | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
-- | aos* | aros* | cloudabi* | sortix* | twizzler* \
-+ | aos* | aros* | cloudabi* | sortix* | twizzler* | serenity* \
- | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
- | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
- | mirbsd* | netbsd* | dicos* | openedition* | ose* \
diff --git a/Ports/wget/package.sh b/Ports/wget/package.sh
index d0d58e5e4e..a28056203f 100755
--- a/Ports/wget/package.sh
+++ b/Ports/wget/package.sh
@@ -2,6 +2,8 @@
port=wget
version=1.21.1
useconfigure="true"
+use_fresh_config_sub=true
+config_sub_path=build-aux/config.sub
depends=("openssl")
files="https://ftpmirror.gnu.org/gnu/wget/wget-${version}.tar.gz wget-${version}.tar.gz
https://ftpmirror.gnu.org/gnu/wget/wget-${version}.tar.gz.sig wget-${version}.tar.gz.sig
diff --git a/Ports/wget/patches/configure.patch b/Ports/wget/patches/configure.patch
deleted file mode 100644
index c6fdffe2f7..0000000000
--- a/Ports/wget/patches/configure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur a/build-aux/config.sub b/build-aux/config.sub
---- a/build-aux/config.sub 2021-01-09 10:57:19.000000000 +0100
-+++ b/build-aux/config.sub 2021-04-19 14:45:56.132333538 +0200
-@@ -1691,7 +1691,7 @@
- # Now accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
-- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-+ gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | serenity* | irix* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
diff --git a/Ports/xz/package.sh b/Ports/xz/package.sh
index 95f4ff521f..42cf5378d9 100755
--- a/Ports/xz/package.sh
+++ b/Ports/xz/package.sh
@@ -2,6 +2,8 @@
port=xz
version=5.2.5
useconfigure=true
+use_fresh_config_sub=true
+config_sub_path=build-aux/config.sub
files="https://tukaani.org/xz/xz-${version}.tar.gz xz-${version}.tar.gz f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10"
auth_type=sha256
depends=("zlib" "libiconv")
diff --git a/Ports/xz/patches/configure.patch b/Ports/xz/patches/configure.patch
deleted file mode 100644
index 1aa09cca12..0000000000
--- a/Ports/xz/patches/configure.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur xz-5.2.5/build-aux/config.sub xz-5.2.5.serenity/build-aux/config.sub
---- xz-5.2.5/build-aux/config.sub 2020-03-17 15:29:35.000000000 +0100
-+++ xz-5.2.5.serenity/build-aux/config.sub 2021-04-18 21:28:26.405741777 +0200
-@@ -1363,7 +1363,7 @@
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
-- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
diff --git a/Ports/yasm/package.sh b/Ports/yasm/package.sh
index 6839fff858..db7b2573da 100755
--- a/Ports/yasm/package.sh
+++ b/Ports/yasm/package.sh
@@ -4,4 +4,5 @@ version=1.3.0
files="https://www.tortall.net/projects/yasm/releases/yasm-${version}.tar.gz yasm-${version}.tar.gz 3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f"
auth_type="sha256"
useconfigure=true
+use_fresh_config_sub=true
makeopts=()
diff --git a/Ports/yasm/patches/config.sub.patch b/Ports/yasm/patches/config.sub.patch
deleted file mode 100644
index 51f79db2a6..0000000000
--- a/Ports/yasm/patches/config.sub.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- yasm-1.3.0/config/original-config.sub 2021-04-13 19:32:43.345360128 +0100
-+++ yasm-1.3.0/config/config.sub 2021-04-13 19:33:00.992081544 +0100
-@@ -156,7 +156,7 @@
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-- -apple | -axis | -knuth | -cray | -microblaze)
-+ -apple | -axis | -knuth | -cray | -microblaze | serenity*)
- os=
- basic_machine=$1
- ;;
-@@ -1368,7 +1368,7 @@
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
-+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | serenity*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
-@@ -1505,6 +1505,8 @@
- ;;
- -none)
- ;;
-+ -serenity*)
-+ ;;
- *)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
diff --git a/Ports/zsh/package.sh b/Ports/zsh/package.sh
index 5b050aee5d..8608d5b3b5 100755
--- a/Ports/zsh/package.sh
+++ b/Ports/zsh/package.sh
@@ -4,6 +4,7 @@ version=5.8
files="https://sourceforge.net/projects/zsh/files/zsh/${version}/zsh-${version}.tar.xz zsh-${version}.tar.xz dcc4b54cc5565670a65581760261c163d720991f0d06486da61f8d839b52de27"
auth_type="sha256"
useconfigure=true
+use_fresh_config_sub=true
pre_configure() {
run "./Util/preconfig"
diff --git a/Ports/zsh/patches/0001-add-serenity-config-sub.patch b/Ports/zsh/patches/0001-add-serenity-config-sub.patch
deleted file mode 100644
index ac3318512f..0000000000
--- a/Ports/zsh/patches/0001-add-serenity-config-sub.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- zsh-zsh-5.8/original-config.sub 2021-06-04 22:59:03.710400955 -0300
-+++ zsh-zsh-5.8/config.sub 2021-06-04 23:01:41.573688625 -0300
-@@ -1516,6 +1516,8 @@
- ;;
- *-eabi)
- ;;
-+ serenity*)
-+ ;;
- *)
- echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
- exit 1