From dd644b2fb8960c0481c41efe0215eb109bd29ffd Mon Sep 17 00:00:00 2001 From: "Anna (cybertailor) Vyalkova" Date: Tue, 19 Jul 2022 11:29:36 +0500 Subject: [PATCH] nim-utils.eclass: don't write NIMFLAGS to the config file There are issues with strings containing spaces. Signed-off-by: Anna (cybertailor) Vyalkova --- eclass/nim-utils.eclass | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass index 743aa98777..bab1a55f49 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: [...] # @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 }