From c411f65f26582f4c75d2edbf4fa90a708474ace3 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 5 Aug 2022 08:07:19 +0100 Subject: gentoo auto-resync : 05:08:2022 - 08:07:19 --- dev-util/sh/sh-3.5.1.ebuild | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'dev-util/sh/sh-3.5.1.ebuild') diff --git a/dev-util/sh/sh-3.5.1.ebuild b/dev-util/sh/sh-3.5.1.ebuild index f5098aea771b..ea48ab9e9b7d 100644 --- a/dev-util/sh/sh-3.5.1.ebuild +++ b/dev-util/sh/sh-3.5.1.ebuild @@ -7,17 +7,38 @@ inherit go-module DESCRIPTION="A shell parser, formatter, and interpreter with bash support" HOMEPAGE="https://github.com/mvdan/sh" -SRC_URI="https://github.com/mvdan/sh/archive/v${PV}.tar.gz -> ${P}.tar.gz" -SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-deps.tar.xz" + +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" -KEYWORDS="~amd64" +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 shfmt.1 || die "conversation of man page failed" + fi } src_test() { @@ -27,4 +48,7 @@ src_test() { src_install() { dobin shfmt + if use man; then + doman shfmt.1 + fi } -- cgit v1.2.3