diff options
author | Sam James <sam@gentoo.org> | 2024-02-27 22:01:37 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-02-27 22:01:37 +0000 |
commit | f44ccd6080ad1c0e7892f70581d1ba3004333b78 (patch) | |
tree | 5a58d2914490674bce1f613237a13a588cc642a7 /dev-util | |
parent | dev-util/fq: add 0.10.0 (diff) | |
download | gentoo-f44ccd6080ad1c0e7892f70581d1ba3004333b78.tar.gz gentoo-f44ccd6080ad1c0e7892f70581d1ba3004333b78.tar.bz2 gentoo-f44ccd6080ad1c0e7892f70581d1ba3004333b78.zip |
dev-util/sh: add 3.8.0
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/sh/Manifest | 2 | ||||
-rw-r--r-- | dev-util/sh/sh-3.8.0.ebuild | 54 |
2 files changed, 56 insertions, 0 deletions
diff --git a/dev-util/sh/Manifest b/dev-util/sh/Manifest index 5f386fada8a5..d83812ede7c3 100644 --- a/dev-util/sh/Manifest +++ b/dev-util/sh/Manifest @@ -1,2 +1,4 @@ DIST sh-3.7.0-deps.tar.xz 9776560 BLAKE2B 2376bba34d0b57897f748ce277b8c40da2ac98ad518e516868c442a521b24e4e19016b26dd0e889157781fa75cc7f945dea72a0451937a3bef24d65149d8de7b SHA512 3baf5276b1916e726a99b47dcf1319fb9a015e6096d8dbd430df478f9dbc1ecbcffcb82de72efbb455aa4a6dc17437e00287df27abd2e7e126253171d7024a9e DIST sh-3.7.0.tar.gz 219380 BLAKE2B 5de1f5576f3e92f5cc892da730b62640b0922f879005e844b3e0b0d84a4e8f1a5f76e89c53152dd3de11c67da20411c5bddd44627ab31b66a72f950b1bf03393 SHA512 5869b68d4bb59907ff7543019e02e8e1efee5963475763b2b2daf0b1ef8621d919d54978a50e52d865b5b76b188c821fecb673e6a9ce42b30cd9907a020e6387 +DIST sh-3.8.0-deps.tar.xz 3129756 BLAKE2B e8a7a6f4a699b55d2b2533065ff0030777fddcb444606889cbf0b811715e89af8f97fb28d1ed71e8bb9ee07517cf71930c03151c2f102c316902e6b55141ee85 SHA512 1bb8776d308aea471051002ba2c426d6a59b354e3615561e33f42938c55472e402b037651db8307d593be0489df30a0d99be3a4e0d75972a85266facebdab32e +DIST sh-3.8.0.tar.gz 221631 BLAKE2B b2235c88d2601c0c223b8bc55682ee7490da7bf97696fdf3fa32787e5ef123bf4072e281daf29851695b590fe93f7bf180b03558974ad726fab10f799881ec92 SHA512 fbeba1883f9458c480663c31d51beaffb780205f5251cae956f6582d494109e21e062e444f7436db220fb647e833ec48498fa1f75daa7fa7ec88ba1f564d4213 diff --git a/dev-util/sh/sh-3.8.0.ebuild b/dev-util/sh/sh-3.8.0.ebuild new file mode 100644 index 000000000000..9aa4c37a568f --- /dev/null +++ b/dev-util/sh/sh-3.8.0.ebuild @@ -0,0 +1,54 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module + +DESCRIPTION="A shell parser, formatter, and interpreter with bash support" +HOMEPAGE="https://github.com/mvdan/sh" + +if [[ ${PV} == *9999 ]]; then + EGIT_REPO_URI="https://github.com/mvdan/sh.git" + inherit git-r3 +else + SRC_URI="https://github.com/mvdan/sh/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-deps.tar.xz" + KEYWORDS="~amd64 ~arm64 ~riscv ~x86" + S="${WORKDIR}/${PN//fmt/}-${PV}" +fi + +LICENSE="Apache-2.0 BSD" +SLOT="0" +IUSE="+man" + +BDEPEND="man? ( app-text/scdoc )" + +src_unpack() { + default + if [[ ${PV} == *9999 ]]; then + git-r3_src_unpack + go-module_live_vendor + fi +} + +src_compile() { + # Not bothering with gosh for now as it's very new + # https://github.com/mvdan/sh#gosh + ego build ./cmd/shfmt + if use man; then + scdoc <cmd/shfmt/shfmt.1.scd >shfmt.1 || die "conversation of man page failed" + fi +} + +src_test() { + cd syntax || die + ego test -run=- +} + +src_install() { + dobin shfmt + if use man; then + doman shfmt.1 + fi +} |