1 |
commit: b64a70f1930b2e79a9c727bff489faa7882df485 |
2 |
Author: Randall T. Vasquez <ran.dall <AT> icloud <DOT> com> |
3 |
AuthorDate: Wed Aug 3 22:30:20 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 5 01:52:34 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b64a70f1 |
7 |
|
8 |
dev-util/sh: generate man page |
9 |
|
10 |
Signed-off-by: Randall T. Vasquez <ran.dall <AT> icloud.com> |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
dev-util/sh/sh-3.5.1.ebuild | 18 ++++++++++++++++++ |
14 |
1 file changed, 18 insertions(+) |
15 |
|
16 |
diff --git a/dev-util/sh/sh-3.5.1.ebuild b/dev-util/sh/sh-3.5.1.ebuild |
17 |
index f5098aea771b..7da56df5263e 100644 |
18 |
--- a/dev-util/sh/sh-3.5.1.ebuild |
19 |
+++ b/dev-util/sh/sh-3.5.1.ebuild |
20 |
@@ -13,11 +13,25 @@ SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-deps.tar |
21 |
LICENSE="Apache-2.0 BSD" |
22 |
SLOT="0" |
23 |
KEYWORDS="~amd64" |
24 |
+IUSE="+man" |
25 |
+ |
26 |
+BDEPEND="man? ( app-text/scdoc )" |
27 |
+ |
28 |
+src_unpack() { |
29 |
+ default |
30 |
+ if [[ ${PV} == *9999 ]]; then |
31 |
+ git-r3_src_unpack |
32 |
+ go-module_live_vendor |
33 |
+ fi |
34 |
+} |
35 |
|
36 |
src_compile() { |
37 |
# Not bothering with gosh for now as it's very new |
38 |
# https://github.com/mvdan/sh#gosh |
39 |
ego build ./cmd/shfmt |
40 |
+ if use man; then |
41 |
+ scdoc <cmd/shfmt/shfmt.1.scd >shfmt.1 || die "conversation of man page failed" |
42 |
+ fi |
43 |
} |
44 |
|
45 |
src_test() { |
46 |
@@ -27,4 +41,8 @@ src_test() { |
47 |
|
48 |
src_install() { |
49 |
dobin shfmt |
50 |
+ if use man; then |
51 |
+ doman shfmt.1 |
52 |
+ fi |
53 |
+ |
54 |
} |