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.
This commit is contained in:
parent
aed2e214b6
commit
4f89f47acb
Notes:
sideshowbarker
2024-07-17 18:06:52 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/4f89f47acb Pull-request: https://github.com/SerenityOS/serenity/pull/12886 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/linusg ✅
2 changed files with 18 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue