diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-08-05 08:07:19 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-08-05 08:07:19 +0100 |
commit | c411f65f26582f4c75d2edbf4fa90a708474ace3 (patch) | |
tree | a530098a38ad69dcc0e9ec69f47a1bca219d8253 /dev-util/sh/sh-9999.ebuild | |
parent | a5a60a0e01733705770f24a57953bf44ee06467d (diff) |
gentoo auto-resync : 05:08:2022 - 08:07:19
Diffstat (limited to 'dev-util/sh/sh-9999.ebuild')
-rw-r--r-- | dev-util/sh/sh-9999.ebuild | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/dev-util/sh/sh-9999.ebuild b/dev-util/sh/sh-9999.ebuild new file mode 100644 index 000000000000..ea48ab9e9b7d --- /dev/null +++ b/dev-util/sh/sh-9999.ebuild @@ -0,0 +1,54 @@ +# Copyright 2022 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 ~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 +} |