From 90939f597e8742abc1d6b289f7a25ba970c4f80d Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Mon, 15 Jul 2024 20:13:33 +0200 Subject: [PATCH] build-system: configurable download_dir YAML config file --- Pmodules/modbuild.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Pmodules/modbuild.in b/Pmodules/modbuild.in index 508b5a0..7c2f4c4 100755 --- a/Pmodules/modbuild.in +++ b/Pmodules/modbuild.in @@ -720,6 +720,7 @@ declare -A Yaml_default_config=( ["sub_packages"]='' # !!map ["urls"]='' # !!map ["variant"]='' # !!str + ['download_dir']='' # !!str ) declare -A Yaml_valid_vk_keys=( @@ -844,7 +845,7 @@ build_modules_yaml_v1(){ ;; esac ;; - default_variant | group | overlay | script | suffix ) + default_variant | download_dir | group | overlay | script | suffix ) get_value "${yaml_input}" value "${key}" '!!str' cfg[${key,,}]="${value}" ;; @@ -1412,6 +1413,9 @@ build_modules_yaml_v1(){ set_configure_args "${module_config['configure_args']}" set_patch_files "${module_config['patch_files']}" + if [[ -n "${module_config['download_dir']}" ]]; then + PMODULES_DISTFILESDIR="${module_config['download_dir']}" + fi local -a runtime_deps=() if [[ -n ${module_config['runtime_deps']} ]]; then readarray -t runtime_deps <<<"${module_config['runtime_deps']}"