summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2020-05-30 21:16:15 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2020-05-30 21:16:39 -0700
commit1f645e13c3bdd0ef8b850dfd084bc0e914ce65c6 (patch)
treee44ba88c793e2d76b68a6958b9c2c9e6798860a2 /dev-util/github-cli
parentdev-util/github-cli: avoid failure if GOBIN/GOPATH/GOCODE in build env (diff)
downloadgentoo-1f645e13c3bdd0ef8b850dfd084bc0e914ce65c6.tar.gz
gentoo-1f645e13c3bdd0ef8b850dfd084bc0e914ce65c6.tar.bz2
gentoo-1f645e13c3bdd0ef8b850dfd084bc0e914ce65c6.zip
dev-util/github-cli: fix PR#16024 issues
Closes: https://github.com/gentoo/gentoo/pull/16024 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'dev-util/github-cli')
-rw-r--r--dev-util/github-cli/files/cli-0.9.0-manpage-build-gen-docs.patch15
-rw-r--r--dev-util/github-cli/github-cli-0.9.0-r1.ebuild22
2 files changed, 32 insertions, 5 deletions
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
new file mode 100644
index 000000000000..ff79812f2f50
--- /dev/null
+++ b/dev-util/github-cli/files/cli-0.9.0-manpage-build-gen-docs.patch
@@ -0,0 +1,15 @@
+--- cli-0.9.0/Makefile.orig 2020-05-30 20:59:44.372628296 -0700
++++ cli-0.9.0/Makefile 2020-05-30 21:02:17.172650230 -0700
+@@ -46,6 +46,10 @@
+ .PHONY: site-publish
+
+
++bin/gen-docs:
++ @go build -trimpath -ldflags "$(LDFLAGS)" -o "$@" ./cmd/gen-docs
++
+ .PHONY: manpages
+-manpages:
+- go run ./cmd/gen-docs --man-page --doc-path ./share/man/man1/
++manpages: bin/gen-docs
++ bin/gen-docs --man-page --doc-path ./share/man/man1/
++
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
index 766be325438a..9da2da770a1f 100644
--- a/dev-util/github-cli/github-cli-0.9.0-r1.ebuild
+++ b/dev-util/github-cli/github-cli-0.9.0-r1.ebuild
@@ -277,6 +277,10 @@ BDEPEND=">=dev-lang/go-1.13"
unset GOBIN GOPATH GOCODE
+PATCHES=(
+ "${FILESDIR}/cli-0.9.0-manpage-build-gen-docs.patch"
+)
+
src_unpack() {
if [[ ${PV} == *9999 ]]; then
git-r3_src_unpack
@@ -290,16 +294,24 @@ src_compile() {
[[ ${PV} == *9999 ]] || export GH_VERSION="v${PV}"
# Golang LDFLAGS are not the same as GCC/Binutils LDFLAGS
unset LDFLAGS
- emake
+
+ emake bin/gh # default target
+
+ einfo "Building manpage"
+ emake manpages
+
+ einfo "Building completion"
+ bin/gh completion -s bash > gh.bash-completion || die
+ bin/gh completion -s zsh > gh.zsh-completion || die
}
src_install() {
dobin bin/gh
dodoc README.md
- make manpages
- doman share/man/man1/gh*.1
+ doman share/man/man?/gh*.?
- bin/gh completion -s bash > gh
- dobashcomp gh
+ newbashcomp gh.bash-completion gh
+ insinto /usr/share/zsh/site-functions
+ newins gh.zsh-completion _gh
}