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>
This commit is contained in:
Robin H. Johnson
2020-05-30 21:16:39 -07:00
parent 7d3eec2b8e
commit 1f645e13c3
2 changed files with 32 additions and 5 deletions
@@ -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/
+
+17 -5
View File
@@ -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
}