diff options
author | 2020-04-08 03:21:17 +0300 | |
---|---|---|
committer | 2020-04-08 03:21:17 +0300 | |
commit | 80233e4bed50a9aa42f502659b5f228027cc1337 (patch) | |
tree | 01e26bd85da45f0e8b79ebef0191e2847f508230 /dev-vcs | |
parent | media-video/vidify-audiosync: add py3_6 (diff) | |
download | guru-80233e4bed50a9aa42f502659b5f228027cc1337.tar.gz guru-80233e4bed50a9aa42f502659b5f228027cc1337.tar.bz2 guru-80233e4bed50a9aa42f502659b5f228027cc1337.zip |
dev-vcs/lazygit: add new package
Add ebuild for lazygit-0.19:
a simple terminal UI for git commands, written in Go with the gocui library.
The patch fix crash if git config use 'showSignature = true' option.
Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
Diffstat (limited to 'dev-vcs')
-rw-r--r-- | dev-vcs/lazygit/Manifest | 1 | ||||
-rw-r--r-- | dev-vcs/lazygit/files/lazygit-0.19-fix-gpg-breaking-terminal.patch | 32 | ||||
-rw-r--r-- | dev-vcs/lazygit/lazygit-0.19.ebuild | 40 | ||||
-rw-r--r-- | dev-vcs/lazygit/metadata.xml | 14 |
4 files changed, 87 insertions, 0 deletions
diff --git a/dev-vcs/lazygit/Manifest b/dev-vcs/lazygit/Manifest new file mode 100644 index 000000000..780c69f12 --- /dev/null +++ b/dev-vcs/lazygit/Manifest @@ -0,0 +1 @@ +DIST lazygit-0.19.tar.gz 9193308 BLAKE2B c07141661387094651cb6137579dea8ab5231b3e08b0733124cc97f1392251db592e01d60297356c8c5df1f1db554bc8a3be86cd07beed158d33b9eabdb015d4 SHA512 6259fdb98ae74ee59f395bd79fcbe3280b679883cbc0c190e64a36464c258597e18a6b70842cb242696536cfea35ea9c83f43b05ad20ead4f5120e436875abad diff --git a/dev-vcs/lazygit/files/lazygit-0.19-fix-gpg-breaking-terminal.patch b/dev-vcs/lazygit/files/lazygit-0.19-fix-gpg-breaking-terminal.patch new file mode 100644 index 000000000..a3bee2b82 --- /dev/null +++ b/dev-vcs/lazygit/files/lazygit-0.19-fix-gpg-breaking-terminal.patch @@ -0,0 +1,32 @@ +From 7b7f7f0696d94c01852290fa3552caffa0b2af7b Mon Sep 17 00:00:00 2001 +From: Glenn Vriesman <glenn.vriesman@gmail.com> +Date: Mon, 6 Apr 2020 19:26:12 +0200 +Subject: [PATCH] fix: fixed gpg breaking terminal + +Signed-off-by: Glenn Vriesman <glenn.vriesman@gmail.com> +--- + pkg/commands/commit_list_builder.go | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/src/github.com/jesseduffield/lazygit/pkg/commands/commit_list_builder.go b/pkg/commands/commit_list_builder.go +index 1204b488..f4bbc9dd 100644 +--- a/src/github.com/jesseduffield/lazygit/pkg/commands/commit_list_builder.go ++++ b/src/github.com/jesseduffield/lazygit/pkg/commands/commit_list_builder.go +@@ -109,11 +109,12 @@ func (c *CommitListBuilder) GetCommits(options GetCommitsOptions) ([]*Commit, er + cmd := c.getLogCmd(options) + + err = RunLineOutputCmd(cmd, func(line string) (bool, error) { +- commit := c.extractCommitFromLine(line) +- _, unpushed := unpushedCommits[commit.ShortSha()] +- commit.Status = map[bool]string{true: "unpushed", false: "pushed"}[unpushed] +- commits = append(commits, commit) +- ++ if strings.Split(line, " ")[0] != "gpg:" { ++ commit := c.extractCommitFromLine(line) ++ _, unpushed := unpushedCommits[commit.ShortSha()] ++ commit.Status = map[bool]string{true: "unpushed", false: "pushed"}[unpushed] ++ commits = append(commits, commit) ++ } + return false, nil + }) + if err != nil { diff --git a/dev-vcs/lazygit/lazygit-0.19.ebuild b/dev-vcs/lazygit/lazygit-0.19.ebuild new file mode 100644 index 000000000..618124082 --- /dev/null +++ b/dev-vcs/lazygit/lazygit-0.19.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +EGO_PN="github.com/jesseduffield/lazygit" + +inherit golang-build golang-vcs-snapshot + +DESCRIPTION="Lazygit, a simple terminal UI for git commands" +HOMEPAGE="https://github.com/jesseduffield/lazygit" +SRC_URI="https://github.com/jesseduffield/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND=( sys-libs/glibc ) +RDEPEND=( + ${DEPEND} + dev-vcs/git +) + +PATCHES=( "${FILESDIR}/${P}-fix-gpg-breaking-terminal.patch" ) + +src_compile() { + GOPATH="${S}" go build -v -o bin/lazygit src/${EGO_PN}/main.go || die +} + +src_install() { + dobin bin/lazygit + + local DOCS=( + src/${EGO_PN}/{CONTRIBUTING,README}.md + src/${EGO_PN}/docs/*.md + src/${EGO_PN}/docs/keybindings/*.md + ) + einstalldocs +} diff --git a/dev-vcs/lazygit/metadata.xml b/dev-vcs/lazygit/metadata.xml new file mode 100644 index 000000000..dceadcf82 --- /dev/null +++ b/dev-vcs/lazygit/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>torokhov-s-a@yandex.ru</email> + <name>Sergey Torokhov</name> + </maintainer> +<longdescription> + A simple terminal UI for git commands, written in Go with the gocui library +</longdescription> +<upstream> + <remote-id type="github">jesseduffield/lazygit</remote-id> +</upstream> +</pkgmetadata> |