From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sys-apps/miller/miller-4.2.0.ebuild | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sys-apps/miller/miller-4.2.0.ebuild (limited to 'sys-apps/miller/miller-4.2.0.ebuild') diff --git a/sys-apps/miller/miller-4.2.0.ebuild b/sys-apps/miller/miller-4.2.0.ebuild new file mode 100644 index 000000000000..df616602dab7 --- /dev/null +++ b/sys-apps/miller/miller-4.2.0.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools + +DESCRIPTION="A tool like sed, awk, cut, join, and sort for name-indexed data (CSV, JSON, ..)" +HOMEPAGE="http://johnkerl.org/miller" +LICENSE="BSD-2" + +SLOT="0" +SRC_URI="https://github.com/johnkerl/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +KEYWORDS="amd64 arm x86" +IUSE="doc test" + +DEPEND="sys-devel/flex" + +my_for_each_test_dir() { + local test_dirs=( c/{reg,unit}_test ) + if use test ; then + for d in "${test_dirs[@]}" ; do + pushd "${d}" >/dev/null || die + "${@}" || die + popd >/dev/null || die + done + fi +} + +src_prepare() { + default + + local sed_args=( + # respect FLAGS + -e '/.*FLAGS[^=]*=/ s:(-g|-pg|-O[0-9]) ::g' + ) + find -type f -name "Makefile.am" | xargs sed -r "${sed_args[@]}" -i -- + assert + + # disable docs rebuilding as they're shipped prebuilt + sed -e '/SUBDIRS[^=]*=/ s:doc::g' -i -- Makefile.am || die + + # disable building tests automagically + use test || sed -e '/SUBDIRS[^=]*=/ s:[^ ]*_test::g' -i -- c/Makefile.am || die + + eautoreconf +} + +src_test() { + my_for_each_test_dir emake check +} + +src_install() { + local HTML_DOCS=( $(usev doc) ) + + default + + doman 'doc/mlr.1' +} -- cgit v1.2.3