app-shells/fzy: drop debugging CFLAG and respect CC
authorTim Harder <radhermit@gentoo.org>
Sat, 24 Mar 2018 05:47:20 +0000 (01:47 -0400)
committerTim Harder <radhermit@gentoo.org>
Sat, 24 Mar 2018 05:49:55 +0000 (01:49 -0400)
app-shells/fzy/files/fzy-0.9-cflags.patch [new file with mode: 0644]
app-shells/fzy/fzy-0.9-r1.ebuild [new file with mode: 0644]

diff --git a/app-shells/fzy/files/fzy-0.9-cflags.patch b/app-shells/fzy/files/fzy-0.9-cflags.patch
new file mode 100644 (file)
index 0000000..328abc9
--- /dev/null
@@ -0,0 +1,11 @@
+--- fzy-0.9/Makefile
++++ fzy-0.9/Makefile
+@@ -1,7 +1,7 @@
+ VERSION=0.9
+ 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
diff --git a/app-shells/fzy/fzy-0.9-r1.ebuild b/app-shells/fzy/fzy-0.9-r1.ebuild
new file mode 100644 (file)
index 0000000..3db8979
--- /dev/null
@@ -0,0 +1,36 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit savedconfig toolchain-funcs
+
+DESCRIPTION="Fuzzy text selector (interactive grep) for console"
+HOMEPAGE="https://github.com/jhawthorn/fzy"
+SRC_URI="https://github.com/jhawthorn/fzy/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="test"
+
+KEYWORDS="~amd64 ~x86"
+
+PATCHES=( "${FILESDIR}"/${P}-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
+       exeinto /usr/share/fzy
+       doexe contrib/fzy-tmux
+       doexe contrib/fzy-dvtm
+       einstalldocs
+       save_config config.h
+}