commit: a908862549f4504fd88bfbe5305dd3c34101ea77
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Mon May 8 18:51:48 2023 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Tue May 9 15:42:47 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a9088625
crystal-utils.eclass: add crystal_build function
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>
eclass/crystal-utils.eclass | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/eclass/crystal-utils.eclass b/eclass/crystal-utils.eclass
index 09a4049a4..3c0b7d48a 100644
--- a/eclass/crystal-utils.eclass
+++ b/eclass/crystal-utils.eclass
@@ -24,7 +24,7 @@ esac
if [[ ! ${_CRYSTAL_UTILS_ECLASS} ]]; then
_CRYSTAL_UTILS_ECLASS=1
-inherit edo flag-o-matic
+inherit edo flag-o-matic multiprocessing
# @ECLASS_VARIABLE: CRYSTAL_DEPS
# @OUTPUT_VARIABLE
@@ -151,4 +151,17 @@ eshards() {
edo shards "${args[@]}" "${@}"
}
+# @FUNCTION: crystal_build
+# @USAGE: <args>...
+# @DESCRIPTION:
+# Function for building a target. All arguments are passed to crystal.
+crystal_build() {
+ local build_args=(
+ --threads=$(makeopts_jobs)
+ --verbose
+ )
+
+ ecrystal build "${build_args[@]}" "${@}"
+}
+
fi