You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.1 KiB
45 lines
1.1 KiB
3 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
6 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
4 years ago
|
EAPI=7
|
||
6 years ago
|
|
||
4 years ago
|
inherit optfeature savedconfig toolchain-funcs
|
||
6 years ago
|
|
||
|
if [[ ${PV} == 9999 ]]; then
|
||
|
inherit git-r3
|
||
|
EGIT_REPO_URI="https://github.com/jhawthorn/fzy.git"
|
||
|
else
|
||
6 years ago
|
SRC_URI="https://github.com/jhawthorn/${PN}/releases/download/${PV}/${P}.tar.gz"
|
||
3 years ago
|
KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
|
||
6 years ago
|
fi
|
||
6 years ago
|
|
||
|
DESCRIPTION="Fuzzy text selector (interactive grep) for console"
|
||
|
HOMEPAGE="https://github.com/jhawthorn/fzy"
|
||
|
|
||
|
LICENSE="MIT"
|
||
|
SLOT="0"
|
||
|
IUSE="test"
|
||
5 years ago
|
RESTRICT="!test? ( test )"
|
||
6 years ago
|
|
||
|
src_prepare() {
|
||
6 years ago
|
default
|
||
6 years ago
|
restore_config config.h
|
||
6 years ago
|
tc-export CC
|
||
4 years ago
|
sed -i 's/$(LIBS)/$(LIBS) $(LDFLAGS)/g' Makefile || die
|
||
6 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
|
local DOCS=( ALGORITHM.md CHANGELOG.md README.md )
|
||
|
emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
|
||
6 years ago
|
dobin contrib/fzy-tmux
|
||
|
dobin contrib/fzy-dvtm
|
||
6 years ago
|
einstalldocs
|
||
|
save_config config.h
|
||
|
}
|
||
6 years ago
|
|
||
|
pkg_postinst() {
|
||
|
savedconfig_pkg_postinst
|
||
|
optfeature "opening search results in dvtm pane with provided ${EPREFIX}/usr/bin/fzy-dvtm" app-misc/dvtm
|
||
|
optfeature "opening search results in tmux pane with provided ${EPREFIX}/usr/bin/fzy-tmux" app-misc/tmux
|
||
|
}
|