diff options
author | 2022-07-19 11:29:36 +0500 | |
---|---|---|
committer | 2022-07-19 11:33:01 +0500 | |
commit | dd644b2fb8960c0481c41efe0215eb109bd29ffd (patch) | |
tree | 6b76d5a33171f34d647fb185e0d78261b70702f2 /eclass | |
parent | nim-utils.eclass: link bug (diff) | |
download | guru-dd644b2fb8960c0481c41efe0215eb109bd29ffd.tar.gz guru-dd644b2fb8960c0481c41efe0215eb109bd29ffd.tar.bz2 guru-dd644b2fb8960c0481c41efe0215eb109bd29ffd.zip |
nim-utils.eclass: don't write NIMFLAGS to the config file
There are issues with strings containing spaces.
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/nim-utils.eclass | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass index 743aa9877..bab1a55f4 100644 --- a/eclass/nim-utils.eclass +++ b/eclass/nim-utils.eclass @@ -25,11 +25,11 @@ if [[ ! ${_NIM_UTILS_ECLASS} ]]; then # @USER_VARIABLE # @DEFAULT_UNSET # @DESCRIPTION: -# Flags for the Nim compiler. All values (if any) must be double-quoted. +# Flags for the Nim compiler. Spaces need to be quoted or shell-escaped. # Example: # # @CODE@ -# # NIMFLAGS='-d:myFlag -d:myOpt:"value"' emerge category/package +# # NIMFLAGS="-d:myFlag -d:myOpt:'my value'" emerge category/package # @CODE@ # @ECLASS_VARIABLE: TESTAMENT_DISABLE_MEGATEST @@ -49,14 +49,14 @@ inherit multiprocessing toolchain-funcs xdg-utils # @FUNCTION: enim # @USAGE: [<args>...] # @DESCRIPTION: -# Call nim, passing the supplied arguments. +# Call nim, passing the supplied arguments and NIMFLAGS. # This function dies if nim fails. It also supports being called via 'nonfatal'. # If you need to call nim directly in your ebuilds, this is the way it should # be done. enim() { debug-print-function ${FUNCNAME} "${@}" - set -- nim "${@}" + set -- nim "${@}" ${NIMFLAGS} echo "$@" >&2 "$@" || die -n "${*} failed" } @@ -173,7 +173,6 @@ nim_gen_config() { -d:"$(nim_get_buildtype)" --colors:"$(nim_get_colors)" --parallelBuild:"$(makeopts_jobs)" - $(printf "%s\n" ${NIMFLAGS}) EOF } |