mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-21 13:03:31 -04:00
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>
This commit is contained in:
@@ -25,11 +25,11 @@ if [[ ! ${_NIM_UTILS_ECLASS} ]]; then
|
|||||||
# @USER_VARIABLE
|
# @USER_VARIABLE
|
||||||
# @DEFAULT_UNSET
|
# @DEFAULT_UNSET
|
||||||
# @DESCRIPTION:
|
# @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:
|
# Example:
|
||||||
#
|
#
|
||||||
# @CODE@
|
# @CODE@
|
||||||
# # NIMFLAGS='-d:myFlag -d:myOpt:"value"' emerge category/package
|
# # NIMFLAGS="-d:myFlag -d:myOpt:'my value'" emerge category/package
|
||||||
# @CODE@
|
# @CODE@
|
||||||
|
|
||||||
# @ECLASS_VARIABLE: TESTAMENT_DISABLE_MEGATEST
|
# @ECLASS_VARIABLE: TESTAMENT_DISABLE_MEGATEST
|
||||||
@@ -49,14 +49,14 @@ inherit multiprocessing toolchain-funcs xdg-utils
|
|||||||
# @FUNCTION: enim
|
# @FUNCTION: enim
|
||||||
# @USAGE: [<args>...]
|
# @USAGE: [<args>...]
|
||||||
# @DESCRIPTION:
|
# @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'.
|
# 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
|
# If you need to call nim directly in your ebuilds, this is the way it should
|
||||||
# be done.
|
# be done.
|
||||||
enim() {
|
enim() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "${@}"
|
||||||
|
|
||||||
set -- nim "${@}"
|
set -- nim "${@}" ${NIMFLAGS}
|
||||||
echo "$@" >&2
|
echo "$@" >&2
|
||||||
"$@" || die -n "${*} failed"
|
"$@" || die -n "${*} failed"
|
||||||
}
|
}
|
||||||
@@ -173,7 +173,6 @@ nim_gen_config() {
|
|||||||
-d:"$(nim_get_buildtype)"
|
-d:"$(nim_get_buildtype)"
|
||||||
--colors:"$(nim_get_colors)"
|
--colors:"$(nim_get_colors)"
|
||||||
--parallelBuild:"$(makeopts_jobs)"
|
--parallelBuild:"$(makeopts_jobs)"
|
||||||
$(printf "%s\n" ${NIMFLAGS})
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user