Merge branch '257-build-system-it-should-be-possible-to-append-items-to-configure_args-etc' into 'master'

Resolve "build-system: it should be possible to append items to configure_args etc"

Closes #257

See merge request Pmodules/src!234
This commit is contained in:
2024-04-17 15:19:26 +02:00
2 changed files with 18 additions and 0 deletions
+5
View File
@@ -22,6 +22,11 @@
* The number of directory components to be removed while
un-taring can now be configured in the YAML configuration
file. If not specified, 1 is used as default. (issue #252)
* Arguments to CMake/autotools can now be append to the default
arguments with the 'configure_args+' key in the YAML
configuration file. Patch-files can be appended with the
'patch_file+' key and doc-files with 'docfiles+'.
(issue #257)
## Version 1.1.18
### modulecmd
+13
View File
@@ -633,12 +633,15 @@ declare -A Yaml_default_config=(
["compile_in_sourcetree"]='no' # !!str
["configure_with"]='auto' # !!str
["configure_args"]='' # !!seq of strings
["configure_args+"]='' # !!seq of strings
["default_variant"]='' # !!str
["docfiles"]='' # !!seq of strings
["docfiles+"]='' # !!seq of strings
["group"]='Tools' # !!str
["group_deps"]='' # !!map
["overlay"]='base' # !!str
["patch_files"]='' # !!seq
["patch_files+"]='' # !!seq
["relstage"]='unstable' # !!str
["runtime_deps"]='' # !!seq of strings
["script"]='build' # !!str
@@ -805,6 +808,16 @@ build_modules_yaml_v1(){
get_seq "${yaml_input}" value "${key}"
cfg[${key,,}]="${value}"
;;
'configure_args+' | 'docfiles+' | 'patch_files+' )
get_seq "${yaml_input}" value "${key}"
key="${key:0:-1}"
if [[ -z "${cfg[${key,,}]}" ]]; then
cfg[${key,,}]="${value}"
else
cfg[${key,,}]+=$'\n'"${value}"
fi
;;
* )
std::die 3 "%s '%s' in %s" \
"Oops unhandled key" \