From: "Randall Vasquez" <ran.dall@icloud.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-util/shfmt/
Date: Sat, 21 May 2022 16:57:03 +0000 (UTC) [thread overview]
Message-ID: <1653151909.4a38bce6483cddb086321a61561a65cfaa4401a1.ran.dall@gentoo> (raw)
commit: 4a38bce6483cddb086321a61561a65cfaa4401a1
Author: Randall T. Vasquez <ran.dall <AT> icloud <DOT> com>
AuthorDate: Sat May 21 16:51:49 2022 +0000
Commit: Randall Vasquez <ran.dall <AT> icloud <DOT> com>
CommitDate: Sat May 21 16:51:49 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4a38bce6
dev-util/shfmt: add shfmt v3.5.0 and v9999
This commits adds ebuilds for shfmt v3.5.0 and v9999
Signed-off-by: Randall T. Vasquez <ran.dall <AT> icloud.com>
dev-util/shfmt/Manifest | 2 ++
dev-util/shfmt/metadata.xml | 14 ++++++++++
dev-util/shfmt/shfmt-3.5.0.ebuild | 56 ++++++++++++++++++++++++++++++++++++++
dev-util/shfmt/shfmt-9999.ebuild | 57 +++++++++++++++++++++++++++++++++++++++
4 files changed, 129 insertions(+)
diff --git a/dev-util/shfmt/Manifest b/dev-util/shfmt/Manifest
new file mode 100644
index 000000000..15f0d5e01
--- /dev/null
+++ b/dev-util/shfmt/Manifest
@@ -0,0 +1,2 @@
+DIST shfmt-3.5.0-deps.tar.xz 3121980 BLAKE2B 411e7df230864d1692899b89c4b5e25f54582752a10bde30a8a5e1ae03da3b325353d9bab71b46795f3d285747fbbcc63dd367ecddc8055d5df45013c5f491ae SHA512 562fc2a58c0c115d132c9107c569f5139d7e1f817c91077b80151d0043601c328b083ce8261301689ce72deecabe3957bc11e4dc4388024234a2791c9f118743
+DIST shfmt-3.5.0.tar.gz 222314 BLAKE2B 733785dbeb4af946f316aae1c9bf917c0d70598e3b19b993f592d35bbce53ef8ab613935ebc5ecbfb11677b722e4ca12175b85e30be2467abed381d30b6c3159 SHA512 8a3225a39a415d4926e44f214e8de6d25fedf5a0fe6b09743cc43e1c849094a3d8a34f327d00bffaaf93e4552f7ea03b681d3bb97f59727ab36ac66bafb6d4e7
diff --git a/dev-util/shfmt/metadata.xml b/dev-util/shfmt/metadata.xml
new file mode 100644
index 000000000..66342d17d
--- /dev/null
+++ b/dev-util/shfmt/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ran.dall@icloud.com</email>
+ <name>Randall Vasquez</name>
+ </maintainer>
+ <longdescription lang="en">
+ A shell parser, formatter, and interpreter with bash support; includes shfmt. Supports POSIX Shell, Bash, and mksh.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">mvdan/sh</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-util/shfmt/shfmt-3.5.0.ebuild b/dev-util/shfmt/shfmt-3.5.0.ebuild
new file mode 100644
index 000000000..069e7e3d8
--- /dev/null
+++ b/dev-util/shfmt/shfmt-3.5.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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
+ inherit go-module
+ 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"
+
+BDEPENDS="
+ dev-lang/go
+ man? ( app-text/scdoc )
+"
+
+src_unpack() {
+ if [[ ${PV} == *9999 ]]; then
+ git-r3_fetch
+ git-r3_checkout
+ pushd ${P}/cmd/shfmt || die "location change for module building failed"
+ ego get
+ popd || die "location reset from module building failed"
+ else
+ mv mvdan-sh-* || die "correct placement of directory failed"
+ go-module_src_unpack
+ fi
+ default
+}
+
+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
+}
diff --git a/dev-util/shfmt/shfmt-9999.ebuild b/dev-util/shfmt/shfmt-9999.ebuild
new file mode 100644
index 000000000..65a9730a9
--- /dev/null
+++ b/dev-util/shfmt/shfmt-9999.ebuild
@@ -0,0 +1,57 @@
+# 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+=" ${P}-deps.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+ RESTRICT="mirror test"
+ S="${WORKDIR}/${PN/fmt}-${PV}"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="+man"
+
+BDEPENDS="
+ dev-lang/go
+ man? ( app-text/scdoc )
+"
+
+src_unpack() {
+ default
+ if [[ ${PV} == *9999 ]]; then
+ git-r3_fetch
+ git-r3_checkout
+ pushd ${P}/cmd/shfmt || die "location change for module building failed"
+ ego get
+ popd || die "location reset from module building failed"
+ else
+ mv mvdan-sh-* || die "correct placement of directory failed"
+ 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
+}
next reply other threads:[~2022-05-21 16:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-21 16:57 Randall Vasquez [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-05-21 18:05 [gentoo-commits] repo/proj/guru:dev commit in: dev-util/shfmt/ Randall Vasquez
2022-05-22 2:47 Randall Vasquez
2022-05-22 16:30 Randall Vasquez
2022-05-24 13:04 Randall Vasquez
2022-05-28 21:16 Randall Vasquez
2022-07-29 21:00 Randall Vasquez
2022-07-29 21:00 Randall Vasquez
2022-07-30 16:30 Randall Vasquez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1653151909.4a38bce6483cddb086321a61561a65cfaa4401a1.ran.dall@gentoo \
--to=ran.dall@icloud.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox