shards.eclass: add examples

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
Anna (cybertailor) Vyalkova
2025-10-30 22:26:10 +05:00
parent 69360898d4
commit 95ee170d0d

View File

@@ -14,6 +14,63 @@
# Shards as a build system.
#
# If the package has no shard.yml(5) file, use crystal-utils.eclass(5) instead.
# @EXAMPLE:
# Typical ebuild for a Crystal application:
#
# @CODE@
# EAPI=8
#
# inherit shards
#
# ...
#
# DEPEND="dev-crystal/foo"
#
# CRYSTAL_DEFINES=( -Denable_cli )
#
# src_install() {
# dobin hello-world
# einstalldocs
# }
# @CODE@
#
#
# Typical ebuild for a Crystal library:
#
# @CODE@
# EAPI=8
#
# inherit shards
#
# ...
#
# RDEPEND="
# dev-crystal/bar
# dev-crystal/baz
# "
# @CODE@
#
#
# Typical ebuild for a hybrid Crystal library/applicaton:
#
# @CODE@
# EAPI=8
#
# inherit shards
#
# ...
#
# DEPEND="
# dev-crystal/bar
# dev-crystal/baz
# "
# RDEPEND="${DEPEND}"
#
# src_install() {
# dobin helper-util
# shards_src_install # install library sources
# }
# @CODE@
case ${EAPI} in
8) ;;