summaryrefslogtreecommitdiff
path: root/Ports
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2022-02-25 20:26:15 +0100
committerLinus Groh <mail@linusgroh.de>2022-03-08 23:30:47 +0100
commit4f89f47acb27ac05debf179a8f37c78462819a58 (patch)
treec92057ee794b8856dae479eb78a9787e65482c7b /Ports
parentaed2e214b660ad8ffa512315ca554011d03ed7bd (diff)
downloadserenity-4f89f47acb27ac05debf179a8f37c78462819a58.zip
Ports: Download fresh config.guess if needed
The config.guess file needs to know about the SerenityOS `uname -m` system name if we want to build ports inside Serenity. Support was only added in January 2022, so most ports don't have a new enough version yet. This commit adds facilities for fetching a fresh config.guess file that supports SerenityOS, similarly to what we do for config.sub. As its first user, we make the bash port buildable inside the system.
Diffstat (limited to 'Ports')
-rwxr-xr-xPorts/.port_include.sh16
-rwxr-xr-xPorts/bash/package.sh2
2 files changed, 18 insertions, 0 deletions
diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh
index f8f030b119..0386bee8d2 100755
--- a/Ports/.port_include.sh
+++ b/Ports/.port_include.sh
@@ -65,7 +65,9 @@ configscript=configure
configopts=()
useconfigure=false
config_sub_path=config.sub
+config_guess_path=config.guess
use_fresh_config_sub=false
+use_fresh_config_guess=false
depends=()
patchlevel=1
auth_type=
@@ -122,10 +124,21 @@ get_new_config_sub() {
fi
}
+get_new_config_guess() {
+ config_guess="${1:-config.guess}"
+ if ! run grep -q SerenityOS "$config_guess"; then
+ run do_download_file "https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess" "${1:-config_guess}" false
+ fi
+}
+
ensure_new_config_sub() {
get_new_config_sub "$config_sub_path"
}
+ensure_new_config_guess() {
+ get_new_config_guess "$config_guess_path"
+}
+
ensure_build() {
# Sanity check.
if [ ! -f "${DESTDIR}/usr/lib/libc.so" ]; then
@@ -516,6 +529,9 @@ do_configure() {
if "$use_fresh_config_sub"; then
ensure_new_config_sub
fi
+ if "$use_fresh_config_guess"; then
+ ensure_new_config_guess
+ fi
pre_configure
configure
post_configure
diff --git a/Ports/bash/package.sh b/Ports/bash/package.sh
index b0c383647a..6272bc70fb 100755
--- a/Ports/bash/package.sh
+++ b/Ports/bash/package.sh
@@ -3,7 +3,9 @@ port=bash
version=5.1.16
useconfigure=true
use_fresh_config_sub=true
+use_fresh_config_guess=true
config_sub_path=support/config.sub
+config_guess_path=support/config.guess
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"