Gentoo Archives: gentoo-commits

From: Randall Vasquez <ran.dall@××××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-util/shfmt/
Date: Fri, 29 Jul 2022 21:00:54
Message-Id: 1659128419.78d71d3a1693aaf644306a1300d235603641e038.ran.dall@gentoo
1 commit: 78d71d3a1693aaf644306a1300d235603641e038
2 Author: Randall T. Vasquez <ran.dall <AT> icloud <DOT> com>
3 AuthorDate: Fri Jul 29 16:31:06 2022 +0000
4 Commit: Randall Vasquez <ran.dall <AT> icloud <DOT> com>
5 CommitDate: Fri Jul 29 21:00:19 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=78d71d3a
7
8 dev-util/shfmt: bump to 3.5.1
9
10 Signed-off-by: Randall T. Vasquez <ran.dall <AT> icloud.com>
11
12 dev-util/shfmt/Manifest | 2 ++
13 dev-util/shfmt/shfmt-3.5.1.ebuild | 50 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 52 insertions(+)
15
16 diff --git a/dev-util/shfmt/Manifest b/dev-util/shfmt/Manifest
17 index 2a1bf631e..160fff688 100644
18 --- a/dev-util/shfmt/Manifest
19 +++ b/dev-util/shfmt/Manifest
20 @@ -1,2 +1,4 @@
21 DIST shfmt-3.5.0-deps.tar.xz 3121980 BLAKE2B 411e7df230864d1692899b89c4b5e25f54582752a10bde30a8a5e1ae03da3b325353d9bab71b46795f3d285747fbbcc63dd367ecddc8055d5df45013c5f491ae SHA512 562fc2a58c0c115d132c9107c569f5139d7e1f817c91077b80151d0043601c328b083ce8261301689ce72deecabe3957bc11e4dc4388024234a2791c9f118743
22 DIST shfmt-3.5.0.tar.gz 222262 BLAKE2B a54c91afd1da39084637aba43dc9e3af82c2c57dabdd3e24cd80bbfc5fed9632da0e98b5a65169dc439216218a4664afcc8dc77cd409f15a35cd0b505d39dd39 SHA512 9071a015369088dbba8eb7221305893095ebeaa72124e1ca964b7b1e6f34dedc9d11f2daa2f679d24637b04925cbf58427a24cc4885d8e918cb81844e71d3c6b
23 +DIST shfmt-3.5.1-deps.tar.xz 3117092 BLAKE2B 13e85d2b737f80f1c90201e7d035fb01bb624e396ccf292d00e5c8c19da8209c69ecff88ce334ba0de8e7bbf4243be58cbcea21ee99166285f2738f0036862c9 SHA512 24791e7798fdfe69e76117785b5d469742f680c2ed7d186cb580e55776e5e011ab907be882f6394b9f84f82717611a28f9e72ec5280d6a9d7e89f629bb4a378a
24 +DIST shfmt-3.5.1.tar.gz 222608 BLAKE2B a81af092d0f8d0ee7c05240d816a99f044bce3e35d242a815a238a27893db5bfc320efc4a0237ca9ecfa0276e4687152c87f6e0170f5326e2d0a8604f94f6adb SHA512 fd1084921254b70376b3ac47b97e2108308252fa6bd23aff1e59aaefb45a7e01c1738a46ae6f4eb255ecade77fb9659fbc8184d2473e8e4f70e520757bad506d
25
26 diff --git a/dev-util/shfmt/shfmt-3.5.1.ebuild b/dev-util/shfmt/shfmt-3.5.1.ebuild
27 new file mode 100644
28 index 000000000..96a20587a
29 --- /dev/null
30 +++ b/dev-util/shfmt/shfmt-3.5.1.ebuild
31 @@ -0,0 +1,50 @@
32 +# Copyright 2020-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +inherit go-module
38 +
39 +DESCRIPTION="Shell script formatter"
40 +HOMEPAGE="https://github.com/mvdan/sh"
41 +if [[ ${PV} == *9999 ]]; then
42 + inherit git-r3
43 + EGIT_REPO_URI="https://github.com/mvdan/sh.git"
44 + RESTRICT="fetch mirror test"
45 +else
46 + SRC_URI="https://github.com/mvdan/sh/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
47 + SRC_URI+=" https://github.com/ran-dall/portage-deps/raw/master/${P}-deps.tar.xz"
48 + KEYWORDS="~amd64 ~arm64 ~x86"
49 + RESTRICT="mirror test"
50 + S="${WORKDIR}/${PN//fmt}-${PV}"
51 +fi
52 +
53 +LICENSE="MIT"
54 +SLOT="0"
55 +IUSE="+man"
56 +
57 +BDEPEND="man? ( app-text/scdoc )"
58 +
59 +src_unpack() {
60 + default
61 + if [[ ${PV} == *9999 ]]; then
62 + git-r3_src_unpack
63 + go-module_live_vendor
64 + else
65 + go-module_src_unpack
66 + fi
67 +}
68 +
69 +src_compile() {
70 + ego build -v -ldflags "-s -w" -o "${PN}" "./cmd/shfmt"
71 + if use man; then
72 + scdoc < cmd/shfmt/shfmt.1.scd > shfmt.1 || die "conversation of man page failed"
73 + fi
74 +}
75 +
76 +src_install() {
77 + dobin ${PN}
78 + if use man; then
79 + doman shfmt.1
80 + fi
81 +}