commit:     a7181fdca50e66f58ab6bb09d5d8bec30719a086
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sun May 31 04:16:54 2020 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun May 31 04:16:54 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7181fdc

dev-util/github-cli: sync live ebuild

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 dev-util/github-cli/github-cli-9999.ebuild | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/dev-util/github-cli/github-cli-9999.ebuild 
b/dev-util/github-cli/github-cli-9999.ebuild
index 0cdc3f07d7d..9da2da770a1 100644
--- a/dev-util/github-cli/github-cli-9999.ebuild
+++ b/dev-util/github-cli/github-cli-9999.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-inherit go-module
+inherit bash-completion-r1 go-module
 
 DESCRIPTION="GitHub CLI"
 HOMEPAGE="https://github.com/cli/cli";
@@ -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,10 +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
+
+       doman share/man/man?/gh*.?
+
+       newbashcomp gh.bash-completion gh
+       insinto /usr/share/zsh/site-functions
+       newins gh.zsh-completion _gh
 }

Reply via email to