commit:     294d82958602c7479816e4086c9bbd7413251142
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 19 01:57:37 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 19 02:01:55 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=294d8295

dev-vcs/git-extras: initial import

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-vcs/git-extras/Manifest                        |  1 +
 ...t-extras-6.1.0-no-bash-completion-install.patch | 12 +++++
 dev-vcs/git-extras/git-extras-6.1.0.ebuild         | 55 ++++++++++++++++++++++
 dev-vcs/git-extras/metadata.xml                    | 11 +++++
 4 files changed, 79 insertions(+)

diff --git a/dev-vcs/git-extras/Manifest b/dev-vcs/git-extras/Manifest
new file mode 100644
index 00000000000..47bb99cfa0a
--- /dev/null
+++ b/dev-vcs/git-extras/Manifest
@@ -0,0 +1 @@
+DIST git-extras-6.1.0.tar.gz 153503 BLAKE2B 
3450edecb3116e19ffcf918b118aee04f025c06d812e29e8701f35a3c466b13d2578d41c8e1ee93327743d0019bf98bb3f397189e19435f89e3a259ff1b82747
 SHA512 
098415339177f802299d93947e2979a2fc6c2935eb2d735cd71ad76e035d5489e4c8d9009e2673c109b28e393319745be249cc195814087d59b436f4a56dabab

diff --git 
a/dev-vcs/git-extras/files/git-extras-6.1.0-no-bash-completion-install.patch 
b/dev-vcs/git-extras/files/git-extras-6.1.0-no-bash-completion-install.patch
new file mode 100644
index 00000000000..c1d606c3a38
--- /dev/null
+++ b/dev-vcs/git-extras/files/git-extras-6.1.0-no-bash-completion-install.patch
@@ -0,0 +1,12 @@
+We shouldn't install this manually via the Makefile - or to that location.
+--- a/Makefile
++++ b/Makefile
+@@ -69,8 +69,6 @@ install: check
+               cp -f man/git-*.1 $(DESTDIR)$(MANPREFIX); \
+               echo "cp -f man/git-*.1 $(DESTDIR)$(MANPREFIX)"; \
+       fi
+-      @mkdir -p $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
+-      cp -f etc/bash_completion.sh 
$(DESTDIR)$(SYSCONFDIR)/bash_completion.d/git-extras
+       @echo ""
+       @echo "If you are a zsh user, you may want to 'source 
$(CODE_DIR)etc/git-extras-completion.zsh'" \
+               "and put this line into ~/.zshrc to enable zsh completion"

diff --git a/dev-vcs/git-extras/git-extras-6.1.0.ebuild 
b/dev-vcs/git-extras/git-extras-6.1.0.ebuild
new file mode 100644
index 00000000000..7ee7468ae07
--- /dev/null
+++ b/dev-vcs/git-extras/git-extras-6.1.0.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Git utilities -- repo summary, repl, changelog population, author 
commit percentages and more"
+HOMEPAGE="https://github.com/tj/git-extras";
+SRC_URI="https://github.com/tj/git-extras/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x64-macos"
+
+RDEPEND="
+       app-shells/bash
+       dev-vcs/git
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-6.1.0-no-bash-completion-install.patch
+)
+
+src_prepare() {
+       default
+
+       # For now, don't force including the git completion
+       # sed -i -e "1 i source $(get_bashcompdir)\/git" etc/bash_completion.sh 
|| die
+}
+
+src_configure() {
+       return
+}
+
+src_compile() {
+       return
+}
+
+src_install() {
+       emake \
+               DESTDIR="${D}" \
+               PREFIX="${EPREFIX}/usr" \
+               SYSCONFDIR="${EPREFIX}/etc" \
+               install
+
+       # TODO: Unfortunately, none of the completion seems to
+       # actually work for me yet(?)
+
+       #newbashcomp "${S}"/etc/bash_completion.sh ${PN}
+
+       #insinto /usr/share/zsh/site-functions
+       #newins "${S}"/etc/${PN}-completion.zsh _${PN}
+
+    #insinto /usr/share/fish/vendor_completions.d
+    #doins "${S}"/etc/${PN}.fish
+}

diff --git a/dev-vcs/git-extras/metadata.xml b/dev-vcs/git-extras/metadata.xml
new file mode 100644
index 00000000000..a74e708790b
--- /dev/null
+++ b/dev-vcs/git-extras/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Sam James</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">tj/git-extras</remote-id>
+       </upstream>
+</pkgmetadata>

Reply via email to