Skip to content

Commit

Permalink
app-shells/fzf: add 0.39.0
Browse files Browse the repository at this point in the history
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
thesamesam committed Apr 2, 2023
1 parent 8e3f3e6 commit 523c9b2
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app-shells/fzf/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ DIST fzf-0.37.0-deps.tar.xz 16806808 BLAKE2B f121b3000bc5a0d72ee5cb66f59f4f44c41
DIST fzf-0.37.0.tar.gz 230469 BLAKE2B 3281ae0e9b13f8be9d2bc5eb5bfab534a7b56279346ed500932840fb90e3bf0137c5610fdc5928faa99fadbb2cb10b98c46eea7a41f3a76cff3805ed52d255a7 SHA512 bb8cb4b6c83e978c45de757784f29be883070ef7abab2fe2dd89bc668be7628a3f476f97abf82f98220942c37317df0404e3fd2205c2e93ec506a6ca8beaf74c
DIST fzf-0.38.0-deps.tar.xz 16806808 BLAKE2B f121b3000bc5a0d72ee5cb66f59f4f44c41af30f28ca935a607b424399d12dc762f25811aea999e5de126e2727f8bda614e026da6983ed535d048a7229a07065 SHA512 121c6b1be0cd3af752b11461a72c22e3bc55eec12c12367b354a4ff4d4dc75fb0215cf19cec52008473045c6330a4af71b2e3a14a9a0a124e18aacc1aaad97a9
DIST fzf-0.38.0.tar.gz 232613 BLAKE2B fa05732fadfa47646d67aaf7bca94d143c5cb9267520e83a2278aac88c32624cb2dc87d198e1e83348fc3bb1339d38cb1b59e0fa251aa97c5f32daf9c0f71603 SHA512 a9a89f8e228b52fc20b21624c9024c932dee2a786a711788b1ea8b0c2829099be0b74e6a5e2676ec23288a846af9feda683ac4644409848fb362e4ff9278f5fc
DIST fzf-0.39.0-deps.tar.xz 16890324 BLAKE2B ddf650dabbefcad339b677ae9196714c81533a338ffe35240acd44db1afdc83d2912fec339ccc90276795b2a7047ec569404483308a9f1ac8050debac3e4e49b SHA512 1944a5088f448d6d69ff567bc77f5a15af1a7df51aae97c4fa53145734c9bfe5ed6c04bf34d6233488247f0e32674a17d8caa7753b04ddb5d77274df6e738609
DIST fzf-0.39.0.tar.gz 235093 BLAKE2B 4db2877a6c7cc5418b643b572d17350f16794d6e417dd90da5684676ce04a341ce3a7fd3f2e7f6c5d740c9dabfc9c3faca2da2c5b9030e69403d847399f9db1b SHA512 0e8ccb460aeed5b5ccb04bba663b28565666c50a7c974fd0818ab6d6e4a7cd7958f285a47023f632a22417eee2130a670076180590c81f87d67081f39d566e5d
72 changes: 72 additions & 0 deletions app-shells/fzf/fzf-0.39.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Copyright 2019-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit bash-completion-r1 go-module

DESCRIPTION="General-purpose command-line fuzzy finder, written in Golang"
HOMEPAGE="https://github.com/junegunn/fzf"

# For fancy versioning only. Bump on the next release!
# MY_GIT_REV is the first 7 characters of release commit, we truncate it
# after to make it easier to copy/paste.
MY_GIT_REV=20230402d087858ca9a93aa8fe53d289f29c1836
MY_GIT_REV=${MY_GIT_REV:0:7}

SRC_URI="https://github.com/junegunn/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-deps.tar.xz"

LICENSE="MIT BSD-with-disclosure"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"

src_prepare() {
default
sed -i 's/-s -w //' Makefile || die # bug #795225
}

src_compile() {
emake PREFIX="${EPREFIX}"/usr VERSION=${PV} REVISION=${MY_GIT_REV} bin/${PN}
}

src_install() {
dobin bin/${PN}
doman man/man1/${PN}.1

dobin bin/${PN}-tmux
doman man/man1/${PN}-tmux.1

insinto /usr/share/vim/vimfiles/plugin
doins plugin/${PN}.vim

insinto /usr/share/nvim/runtime/plugin
doins plugin/${PN}.vim

newbashcomp shell/completion.bash ${PN}

insinto /usr/share/zsh/site-functions
newins shell/completion.zsh _${PN}

insinto /usr/share/fzf
doins shell/key-bindings.bash
doins shell/key-bindings.fish
doins shell/key-bindings.zsh
}

pkg_postinst() {
if [[ -z ${REPLACING_VERSIONS} ]]; then
elog "To add fzf support to your shell, make sure to use the right file"
elog "from ${EROOT}/usr/share/fzf."
elog
elog "For bash, add the following line to ~/.bashrc:"
elog
elog " # source ${EROOT}/usr/share/bash-completion/completions/fzf"
elog " # source ${EROOT}/usr/share/fzf/key-bindings.bash"
elog
elog "Plugins for Vim and Neovim are installed to respective directories"
elog "and will work out of the box."
elog
elog "For fzf support in tmux see fzf-tmux(1)."
fi
}

0 comments on commit 523c9b2

Please sign in to comment.