mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-24 23:47:14 -08:00
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:
@@ -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/
|
||||
+
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user