commit: e75c73870af006070292d631e1fe4e7490b0a5ec
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sun May 21 16:17:52 2023 +0000
Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sun May 21 16:19:55 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e75c7387
crystal-utils.eclass: add CRYSTAL_DEFINES var
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>
eclass/crystal-utils.eclass | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/eclass/crystal-utils.eclass b/eclass/crystal-utils.eclass
index 8456c5af6..57325a993 100644
--- a/eclass/crystal-utils.eclass
+++ b/eclass/crystal-utils.eclass
@@ -48,6 +48,11 @@ SHARDS_DEPS="
)
"
+# @ECLASS_VARIABLE: CRYSTAL_DEFINES
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# List of compile-time defines. Used by 'crystal build' and 'crystal docs'.
+
# @FUNCTION: _crystal_get_colors_opt
# @INTERNAL
# @RETURN: "--no-color" if colors should be disabled, empty string otherwise
@@ -76,15 +81,6 @@ _crystal_get_debug_opt() {
# mycrystalargs bash array.
#
# Must be run or ecrystal/eshards will fail.
-#
-# @CODE
-# src_configure() {
-# local mycrystalargs=(
-# -Dfoo
-# )
-# crystal_configure
-# }
-# @CODE
crystal_configure() {
debug-print-function ${FUNCNAME} "${@}"
@@ -107,6 +103,7 @@ crystal_configure() {
$(is-flagq -mcpu && echo "--mcpu=$(get-flag mcpu)")
$(is-flagq -mcmodel && echo "--mcmodel=$(get-flag mcmodel)")
# TODO: --mattr
+ "${CRYSTAL_DEFINES[@]}"
"${mycrystalargs[@]}"
)