Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/github-cli/files/, dev-util/github-cli/
Date: Sun, 31 May 2020 04:18:06
Message-Id: 1590898599.1f645e13c3bdd0ef8b850dfd084bc0e914ce65c6.robbat2@gentoo
1 commit: 1f645e13c3bdd0ef8b850dfd084bc0e914ce65c6
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 31 04:16:15 2020 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Sun May 31 04:16:39 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f645e13
7
8 dev-util/github-cli: fix PR#16024 issues
9
10 Closes: https://github.com/gentoo/gentoo/pull/16024
11 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
12
13 .../files/cli-0.9.0-manpage-build-gen-docs.patch | 15 +++++++++++++++
14 dev-util/github-cli/github-cli-0.9.0-r1.ebuild | 22 +++++++++++++++++-----
15 2 files changed, 32 insertions(+), 5 deletions(-)
16
17 diff --git a/dev-util/github-cli/files/cli-0.9.0-manpage-build-gen-docs.patch b/dev-util/github-cli/files/cli-0.9.0-manpage-build-gen-docs.patch
18 new file mode 100644
19 index 00000000000..ff79812f2f5
20 --- /dev/null
21 +++ b/dev-util/github-cli/files/cli-0.9.0-manpage-build-gen-docs.patch
22 @@ -0,0 +1,15 @@
23 +--- cli-0.9.0/Makefile.orig 2020-05-30 20:59:44.372628296 -0700
24 ++++ cli-0.9.0/Makefile 2020-05-30 21:02:17.172650230 -0700
25 +@@ -46,6 +46,10 @@
26 + .PHONY: site-publish
27 +
28 +
29 ++bin/gen-docs:
30 ++ @go build -trimpath -ldflags "$(LDFLAGS)" -o "$@" ./cmd/gen-docs
31 ++
32 + .PHONY: manpages
33 +-manpages:
34 +- go run ./cmd/gen-docs --man-page --doc-path ./share/man/man1/
35 ++manpages: bin/gen-docs
36 ++ bin/gen-docs --man-page --doc-path ./share/man/man1/
37 ++
38
39 diff --git a/dev-util/github-cli/github-cli-0.9.0-r1.ebuild b/dev-util/github-cli/github-cli-0.9.0-r1.ebuild
40 index 766be325438..9da2da770a1 100644
41 --- a/dev-util/github-cli/github-cli-0.9.0-r1.ebuild
42 +++ b/dev-util/github-cli/github-cli-0.9.0-r1.ebuild
43 @@ -277,6 +277,10 @@ BDEPEND=">=dev-lang/go-1.13"
44
45 unset GOBIN GOPATH GOCODE
46
47 +PATCHES=(
48 + "${FILESDIR}/cli-0.9.0-manpage-build-gen-docs.patch"
49 +)
50 +
51 src_unpack() {
52 if [[ ${PV} == *9999 ]]; then
53 git-r3_src_unpack
54 @@ -290,16 +294,24 @@ src_compile() {
55 [[ ${PV} == *9999 ]] || export GH_VERSION="v${PV}"
56 # Golang LDFLAGS are not the same as GCC/Binutils LDFLAGS
57 unset LDFLAGS
58 - emake
59 +
60 + emake bin/gh # default target
61 +
62 + einfo "Building manpage"
63 + emake manpages
64 +
65 + einfo "Building completion"
66 + bin/gh completion -s bash > gh.bash-completion || die
67 + bin/gh completion -s zsh > gh.zsh-completion || die
68 }
69
70 src_install() {
71 dobin bin/gh
72 dodoc README.md
73
74 - make manpages
75 - doman share/man/man1/gh*.1
76 + doman share/man/man?/gh*.?
77
78 - bin/gh completion -s bash > gh
79 - dobashcomp gh
80 + newbashcomp gh.bash-completion gh
81 + insinto /usr/share/zsh/site-functions
82 + newins gh.zsh-completion _gh
83 }