From 6971f76bd3c308175f7a437f405df16d8818a9fd Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 22 Jul 2025 10:13:41 +0300 Subject: [PATCH] ports: Add support for downloading upstream config.sub banan-os is now in the upstream config.sub. This means no more config.sub patches! --- ports/install.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ports/install.sh b/ports/install.sh index 6d510458..27fb14a2 100755 --- a/ports/install.sh +++ b/ports/install.sh @@ -49,10 +49,26 @@ fi MAKE_BUILD_TARGETS=('all') MAKE_INSTALL_TARGETS=('install') +CONFIG_SUB=() + clean() { find . -mindepth 1 -maxdepth 1 -not -name 'patches' -not -name 'build.sh' -exec rm -rf {} + } +config_sub_update() { + [ ${#CONFIG_SUB[@]} -eq 0 ] && return + + config_sub_path="$BANAN_PORT_DIR/config.sub" + + if [ $(find $config_sub_path -mtime +1) ]; then + wget -O "$config_sub_path" 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' + fi + + for target in "${CONFIG_SUB[@]}"; do + cp "$config_sub_path" "$target" + done +} + pre_configure() { : } @@ -202,6 +218,7 @@ fi cd "$build_dir" if (( $needs_compile )); then + config_sub_update configure build sha256sum "$BANAN_SYSROOT/usr/lib/libc.a" > "../.compile_hash"