summaryrefslogtreecommitdiff
path: root/app-text/fzy
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/fzy')
-rw-r--r--app-text/fzy/Manifest5
-rw-r--r--app-text/fzy/files/1.0-cflags.patch34
-rw-r--r--app-text/fzy/fzy-1.0-r1.ebuild45
-rw-r--r--app-text/fzy/fzy-9999.ebuild44
-rw-r--r--app-text/fzy/metadata.xml23
5 files changed, 151 insertions, 0 deletions
diff --git a/app-text/fzy/Manifest b/app-text/fzy/Manifest
new file mode 100644
index 000000000000..80923aa512fb
--- /dev/null
+++ b/app-text/fzy/Manifest
@@ -0,0 +1,5 @@
+AUX 1.0-cflags.patch 882 BLAKE2B 451086d7f84b97fd78518838ac34541b961cdcc76e929153f1bdfbf0bf95e6ee50d923a33b70514314cb70b35dd48d3930a5f5281eb1d80588f3263cc5e6e972 SHA512 173dda551294d4ac83e286844e63af46e988d5ceaf812537e7300ade56a8d1ba5da4db2db9da49dce7ab491324888860692746e2ec47e8cf44dce16300b54dfe
+DIST fzy-1.0.tar.gz 47432 BLAKE2B 5fef7061c797e63dabc3f77daf3dbc8a58671c257430dc8ba4680363a9ace5722562fc7e0aba618d53820e703b261dbe0182638f16223d1202080450a6c21ec2 SHA512 de5ed1af035260f4ae550c53b08c4ff302c978350784cbfd2981d1691f55d9c0f26b9333c74adea939b3f4578dd47e66ee99112e10afc5497c64011827d19dbc
+EBUILD fzy-1.0-r1.ebuild 1146 BLAKE2B 9f3489b4e0d8c2f2e667b15fee91e679c75ae5e76f79ff207fb3e2b122e312ff25efb10ca0a2732635dd9eb57fce3914668c0f55ecf09b9ee58803675ce721dd SHA512 cc460463823cbd9b492cb8e970e3e3815ff18c0de4651aa4bec529d4ae6885cc50f1e64ed82149d71e3d4393b168bf82c51fc753b029af5934f2e2660a32af49
+EBUILD fzy-9999.ebuild 1157 BLAKE2B 06a72491bceabd358164632f75dedea112f5478d7dfa1f4204e6e05a3681a5408e13a09a83e4fa0652b581141a9f1c35422d06fdfd55701326c8f77d0d3584b0 SHA512 472f5416705c992f64de24cec7c9aa935da1053fe691c503a02a3b6bf54b996c4a50bb5a326ad80e0f135c4571b9b5e3332dfb31c4765e7e10de2e8ec75d0a2b
+MISC metadata.xml 893 BLAKE2B d0aba43213e0797bfb8e40a8d86430fa2cbfca2edfb1fdaaebb0d4421026f2fe8f0eefe9a09cf7aa6e13792111401734e47d30eccc1e83d002b6cf9a553af63b SHA512 c4026784659f2f796d285dd07ce7cd6de4542239f0804104d57c25786273283cc76b446a8c82de42cee2226dead0f3e37bc00a9e4256d90e124e2f50af8b49ed
diff --git a/app-text/fzy/files/1.0-cflags.patch b/app-text/fzy/files/1.0-cflags.patch
new file mode 100644
index 000000000000..4805b4814a45
--- /dev/null
+++ b/app-text/fzy/files/1.0-cflags.patch
@@ -0,0 +1,34 @@
+From 89b4a0437dce6f99de80482d484b3e0346067889 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Fri, 24 Apr 2020 19:12:16 -0700
+Subject: [PATCH] cflags
+
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2d23118..713daad 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,7 @@
+ VERSION=1.0
+
+ CPPFLAGS=-DVERSION=\"${VERSION}\" -D_GNU_SOURCE
+-CFLAGS+=-Wall -Wextra -g -std=c99 -O3 -pedantic -Ideps
++CFLAGS+=-Wall -Wextra -std=c99 -pedantic -Ideps
+ PREFIX?=/usr/local
+ MANDIR?=$(PREFIX)/share/man
+ BINDIR?=$(PREFIX)/bin
+@@ -29,7 +29,7 @@ check: test/fzytest
+ $(DEBUGGER) ./test/fzytest
+
+ fzy: $(OBJECTS)
+- $(CC) $(CFLAGS) $(CCFLAGS) -o $@ $(OBJECTS) $(LIBS)
++ $(CC) $(CFLAGS) $(CCFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
+
+ %.o: %.c config.h
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+--
+2.26.2
+
diff --git a/app-text/fzy/fzy-1.0-r1.ebuild b/app-text/fzy/fzy-1.0-r1.ebuild
new file mode 100644
index 000000000000..a7450fedb766
--- /dev/null
+++ b/app-text/fzy/fzy-1.0-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit optfeature savedconfig toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/jhawthorn/fzy.git"
+else
+ SRC_URI="https://github.com/jhawthorn/${PN}/releases/download/${PV}/${P}.tar.gz"
+ KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86"
+fi
+
+DESCRIPTION="Fuzzy text selector (interactive grep) for console"
+HOMEPAGE="https://github.com/jhawthorn/fzy"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+PATCHES=( "${FILESDIR}"/1.0-cflags.patch )
+
+src_prepare() {
+ default
+ restore_config config.h
+ tc-export CC
+}
+
+src_install() {
+ local DOCS=( ALGORITHM.md CHANGELOG.md README.md )
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
+ dobin contrib/fzy-tmux
+ dobin contrib/fzy-dvtm
+ einstalldocs
+ save_config config.h
+}
+
+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
+}
diff --git a/app-text/fzy/fzy-9999.ebuild b/app-text/fzy/fzy-9999.ebuild
new file mode 100644
index 000000000000..702455296c5c
--- /dev/null
+++ b/app-text/fzy/fzy-9999.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit optfeature savedconfig toolchain-funcs
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/jhawthorn/fzy.git"
+else
+ SRC_URI="https://github.com/jhawthorn/${PN}/releases/download/${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
+fi
+
+DESCRIPTION="Fuzzy text selector (interactive grep) for console"
+HOMEPAGE="https://github.com/jhawthorn/fzy"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+src_prepare() {
+ default
+ restore_config config.h
+ tc-export CC
+ sed -i 's/$(LIBS)/$(LIBS) $(LDFLAGS)/g' Makefile || die
+}
+
+src_install() {
+ local DOCS=( ALGORITHM.md CHANGELOG.md README.md )
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
+ dobin contrib/fzy-tmux
+ dobin contrib/fzy-dvtm
+ einstalldocs
+ save_config config.h
+}
+
+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
+}
diff --git a/app-text/fzy/metadata.xml b/app-text/fzy/metadata.xml
new file mode 100644
index 000000000000..77fefea822bc
--- /dev/null
+++ b/app-text/fzy/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gyakovlev@gentoo.org</email>
+ <name>Georgy Yakovlev</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>shell-tools@gentoo.org</email>
+ <name>Gentoo Shell Tools Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Fuzzy text selector (interactive grep) for console.
+ It can be used to filter any list:
+ files, command history, processes, hostnames, bookmarks, git commits, etc.
+ It's designed to be used both as an editor plugin and on the command line.
+ Rather than clearing the screen, fzy displays its interface directly below
+ the current cursor position, scrolling the screen if necessary.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">jhawthorn/fzy</remote-id>
+ </upstream>
+</pkgmetadata>