aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2022-11-26 17:08:43 +0500
committerAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2022-11-26 17:27:24 +0500
commitcae492830d1fab28d9df55d6786d5ec0ff87b011 (patch)
tree4a13960ce46117cd391c23ca2aa717c086216507 /eclass
parentnimble.eclass: add depends examples (diff)
downloadguru-cae492830d1fab28d9df55d6786d5ec0ff87b011.tar.gz
guru-cae492830d1fab28d9df55d6786d5ec0ff87b011.tar.bz2
guru-cae492830d1fab28d9df55d6786d5ec0ff87b011.zip
nim-utils.eclass: use "edo"
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/nim-utils.eclass58
1 files changed, 23 insertions, 35 deletions
diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass
index 61f25905b..e72eb1bb5 100644
--- a/eclass/nim-utils.eclass
+++ b/eclass/nim-utils.eclass
@@ -44,7 +44,7 @@ if [[ ! ${_NIM_UTILS_ECLASS} ]]; then
# Specifies an array of test files to be deselected via testament's --skipFrom
# parameter, when calling etestament.
-inherit multiprocessing toolchain-funcs xdg-utils
+inherit edo multiprocessing toolchain-funcs xdg-utils
# @FUNCTION: enim
# @USAGE: [<args>...]
@@ -56,9 +56,7 @@ inherit multiprocessing toolchain-funcs xdg-utils
enim() {
debug-print-function ${FUNCNAME} "${@}"
- set -- nim "${@}" ${NIMFLAGS}
- echo "$@" >&2
- "$@" || die -n "${*} failed"
+ edo nim "${@}" ${NIMFLAGS}
}
# @FUNCTION: ekoch
@@ -80,9 +78,7 @@ ekoch() {
eerror "${FUNCNAME} is not implemented for ${CATEGORY}/${PN}" ;;
esac
- set -- ${koch} "${@}"
- echo "$@" >&2
- "$@" || die -n "${*} failed"
+ edo ${koch} "${@}"
}
# @FUNCTION: etestament
@@ -110,17 +106,12 @@ etestament() {
testament_args+=( --skipFrom:"${skipfile}" )
fi
- set -- testament "${testament_args[@]}" "${@}"
- echo "$@" >&2
- "$@" || die -n "${*} failed"
+ edo testament "${testament_args[@]}" "${@}"
}
# @FUNCTION: nim_get_buildtype
-# @USAGE:
# @RETURN: build type (debug or release) based on USE flags
nim_get_buildtype() {
- debug-print-function ${FUNCNAME} "${@}"
-
if has debug ${IUSE}; then
echo $(usex debug "debug" "release")
else
@@ -129,11 +120,8 @@ nim_get_buildtype() {
}
# @FUNCTION: nim_get_colors
-# @USAGE:
# @RETURN: "off" if colors should be disabled, "on" otherwise
nim_get_colors() {
- debug-print-function ${FUNCNAME} "${@}"
-
case ${NOCOLOR} in
true|yes) echo "off" ;;
*) echo "on" ;;
@@ -154,25 +142,25 @@ nim_gen_config() {
local dir=${1:-${WORKDIR}}
cat > "${dir}"/nim.cfg <<- EOF || die "Failed to create Nim config"
- cc:"gcc"
- gcc.exe:"$(tc-getCC)"
- gcc.linkerexe:"$(tc-getCC)"
- gcc.cpp.exe:"$(tc-getCXX)"
- gcc.cpp.linkerexe:"$(tc-getCXX)"
- gcc.options.speed:"${CFLAGS}"
- gcc.options.size:"${CFLAGS}"
- gcc.options.debug:"${CFLAGS}"
- gcc.options.always:"${CPPFLAGS}"
- gcc.options.linker:"${LDFLAGS}"
- gcc.cpp.options.speed:"${CXXFLAGS}"
- gcc.cpp.options.size:"${CXXFLAGS}"
- gcc.cpp.options.debug:"${CXXFLAGS}"
- gcc.cpp.options.always:"${CPPFLAGS}"
- gcc.cpp.options.linker:"${LDFLAGS}"
-
- -d:"$(nim_get_buildtype)"
- --colors:"$(nim_get_colors)"
- --parallelBuild:"$(makeopts_jobs)"
+ cc:"gcc"
+ gcc.exe:"$(tc-getCC)"
+ gcc.linkerexe:"$(tc-getCC)"
+ gcc.cpp.exe:"$(tc-getCXX)"
+ gcc.cpp.linkerexe:"$(tc-getCXX)"
+ gcc.options.speed:"${CFLAGS}"
+ gcc.options.size:"${CFLAGS}"
+ gcc.options.debug:"${CFLAGS}"
+ gcc.options.always:"${CPPFLAGS}"
+ gcc.options.linker:"${LDFLAGS}"
+ gcc.cpp.options.speed:"${CXXFLAGS}"
+ gcc.cpp.options.size:"${CXXFLAGS}"
+ gcc.cpp.options.debug:"${CXXFLAGS}"
+ gcc.cpp.options.always:"${CPPFLAGS}"
+ gcc.cpp.options.linker:"${LDFLAGS}"
+
+ -d:"$(nim_get_buildtype)"
+ --colors:"$(nim_get_colors)"
+ --parallelBuild:"$(makeopts_jobs)"
EOF
}