aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2023-05-10 00:28:54 +0500
committerAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2023-05-10 00:30:07 +0500
commit68db6d9b906fc6c0efecfdbc797aa286bc155546 (patch)
treea2c31af4e0c90d4595772c691982d1fafb2b1b1a /eclass
parentgui-apps/swaylock-effects: remove unused eclass (diff)
downloadguru-68db6d9b906fc6c0efecfdbc797aa286bc155546.tar.gz
guru-68db6d9b906fc6c0efecfdbc797aa286bc155546.tar.bz2
guru-68db6d9b906fc6c0efecfdbc797aa286bc155546.zip
shards.eclass: detect build targets using gshards
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/shards.eclass15
1 files changed, 8 insertions, 7 deletions
diff --git a/eclass/shards.eclass b/eclass/shards.eclass
index 5fd9f6c10..0de0deb47 100644
--- a/eclass/shards.eclass
+++ b/eclass/shards.eclass
@@ -28,7 +28,7 @@ inherit crystal-utils multiprocessing toolchain-funcs
BDEPEND="
${CRYSTAL_DEPS}
${SHARDS_DEPS}
- dev-util/gshards
+ >=dev-util/gshards-0.2
"
IUSE="debug doc"
@@ -67,10 +67,15 @@ shards_src_configure() {
# @FUNCTION: shards_src_compile
# @DESCRIPTION:
-# Function for building the package's documentation.
+# Function for building the package's executables and documentation.
shards_src_compile() {
debug-print-function ${FUNCNAME} "${@}"
+ local args
+ gshards-print-targets | while read -r args; do
+ crystal_build "${@}" ${args}
+ done
+
if use doc; then
ecrystal docs
HTML_DOCS=( docs/. )
@@ -95,14 +100,10 @@ shards_src_test() {
# @FUNCTION: shards_src_install
# @DESCRIPTION:
-# Function for installing the package.
+# Function for installing the package's source.
shards_src_install() {
debug-print-function ${FUNCNAME} "${@}"
- if [[ -d "bin" ]]; then
- dobin bin/*
- fi
-
if [[ -d "src" ]]; then
insinto $(shards_get_libdir)/$(shards_get_pkgname)
doins -r src