1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 SUPPORT_PYTHON_ABIS="1"
9 RESTRICT_PYTHON_ABIS="3.* *-jython"
11 inherit distutils eutils
13 DESCRIPTION="Lightweight, robust, and efficient POSIX compliant regexp matching library"
14 HOMEPAGE="http://laurikari.net/tre/"
15 SRC_URI="http://laurikari.net/tre/${P}.tar.bz2"
19 KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
20 IUSE="nls python static-libs"
27 nls? ( sys-devel/gettext )"
29 DISTUTILS_SETUP_FILES=("python/setup.py")
32 use python && python_pkg_setup
37 "${FILESDIR}"/${PV}-python.patch \
38 "${FILESDIR}"/${PV}-pkgcfg.patch
43 --disable-dependency-tracking \
47 $(use_enable static-libs static)
52 use python && distutils_src_compile
56 if $(locale -a | grep -iq en_US.iso88591); then
60 ewarn "If you like to run the test,"
61 ewarn "please make sure en_US.ISO-8859-1 is installed."
62 die "en_US.ISO-8859-1 locale is missing"
67 emake DESTDIR="${D}" install || die
70 [[ ${CHOST} = *mingw32* ]] && exe_ext=.exe
71 mv "${ED}"/usr/bin/agrep{,-tre}${exe_ext} || die
73 dodoc AUTHORS ChangeLog NEWS README THANKS TODO || die
74 dohtml doc/*.{css,html} || die
75 use python && distutils_src_install
80 ewarn "app-misc/glimpse, app-text/agrep and this package all provide agrep."
81 ewarn "If this causes any unforeseen incompatibilities please file a bug"
82 ewarn "on https://bugs.gentoo.org."
85 use python && distutils_pkg_postinst
89 use python && distutils_pkg_postrm