From 78d71d3a1693aaf644306a1300d235603641e038 Mon Sep 17 00:00:00 2001 From: "Randall T. Vasquez" Date: Fri, 29 Jul 2022 09:31:06 -0700 Subject: [PATCH] dev-util/shfmt: bump to 3.5.1 Signed-off-by: Randall T. Vasquez --- dev-util/shfmt/Manifest | 2 ++ dev-util/shfmt/shfmt-3.5.1.ebuild | 50 +++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 dev-util/shfmt/shfmt-3.5.1.ebuild diff --git a/dev-util/shfmt/Manifest b/dev-util/shfmt/Manifest index 2a1bf631eb..160fff6884 100644 --- a/dev-util/shfmt/Manifest +++ b/dev-util/shfmt/Manifest @@ -1,2 +1,4 @@ DIST shfmt-3.5.0-deps.tar.xz 3121980 BLAKE2B 411e7df230864d1692899b89c4b5e25f54582752a10bde30a8a5e1ae03da3b325353d9bab71b46795f3d285747fbbcc63dd367ecddc8055d5df45013c5f491ae SHA512 562fc2a58c0c115d132c9107c569f5139d7e1f817c91077b80151d0043601c328b083ce8261301689ce72deecabe3957bc11e4dc4388024234a2791c9f118743 DIST shfmt-3.5.0.tar.gz 222262 BLAKE2B a54c91afd1da39084637aba43dc9e3af82c2c57dabdd3e24cd80bbfc5fed9632da0e98b5a65169dc439216218a4664afcc8dc77cd409f15a35cd0b505d39dd39 SHA512 9071a015369088dbba8eb7221305893095ebeaa72124e1ca964b7b1e6f34dedc9d11f2daa2f679d24637b04925cbf58427a24cc4885d8e918cb81844e71d3c6b +DIST shfmt-3.5.1-deps.tar.xz 3117092 BLAKE2B 13e85d2b737f80f1c90201e7d035fb01bb624e396ccf292d00e5c8c19da8209c69ecff88ce334ba0de8e7bbf4243be58cbcea21ee99166285f2738f0036862c9 SHA512 24791e7798fdfe69e76117785b5d469742f680c2ed7d186cb580e55776e5e011ab907be882f6394b9f84f82717611a28f9e72ec5280d6a9d7e89f629bb4a378a +DIST shfmt-3.5.1.tar.gz 222608 BLAKE2B a81af092d0f8d0ee7c05240d816a99f044bce3e35d242a815a238a27893db5bfc320efc4a0237ca9ecfa0276e4687152c87f6e0170f5326e2d0a8604f94f6adb SHA512 fd1084921254b70376b3ac47b97e2108308252fa6bd23aff1e59aaefb45a7e01c1738a46ae6f4eb255ecade77fb9659fbc8184d2473e8e4f70e520757bad506d diff --git a/dev-util/shfmt/shfmt-3.5.1.ebuild b/dev-util/shfmt/shfmt-3.5.1.ebuild new file mode 100644 index 0000000000..96a20587ac --- /dev/null +++ b/dev-util/shfmt/shfmt-3.5.1.ebuild @@ -0,0 +1,50 @@ +# Copyright 2020-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module + +DESCRIPTION="Shell script formatter" +HOMEPAGE="https://github.com/mvdan/sh" +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/mvdan/sh.git" + RESTRICT="fetch mirror test" +else + SRC_URI="https://github.com/mvdan/sh/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + SRC_URI+=" https://github.com/ran-dall/portage-deps/raw/master/${P}-deps.tar.xz" + KEYWORDS="~amd64 ~arm64 ~x86" + RESTRICT="mirror test" + S="${WORKDIR}/${PN//fmt}-${PV}" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="+man" + +BDEPEND="man? ( app-text/scdoc )" + +src_unpack() { + default + if [[ ${PV} == *9999 ]]; then + git-r3_src_unpack + go-module_live_vendor + else + go-module_src_unpack + fi +} + +src_compile() { + ego build -v -ldflags "-s -w" -o "${PN}" "./cmd/shfmt" + if use man; then + scdoc < cmd/shfmt/shfmt.1.scd > shfmt.1 || die "conversation of man page failed" + fi +} + +src_install() { + dobin ${PN} + if use man; then + doman shfmt.1 + fi +}