aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2023-05-21 21:17:52 +0500
committerAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2023-05-21 21:19:55 +0500
commite75c73870af006070292d631e1fe4e7490b0a5ec (patch)
tree9dc17b9c99ffdf84636841139e8168ee0eeb5950 /eclass
parentapp-text/mandown: update Manifest (diff)
downloadguru-e75c73870af006070292d631e1fe4e7490b0a5ec.tar.gz
guru-e75c73870af006070292d631e1fe4e7490b0a5ec.tar.bz2
guru-e75c73870af006070292d631e1fe4e7490b0a5ec.zip
crystal-utils.eclass: add CRYSTAL_DEFINES var
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/crystal-utils.eclass15
1 files 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[@]}"
)