dev-libs/botan: Declare distribution name
[gentoo.git] / dev-libs / tre / tre-0.8.0-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit multilib
7
8 DESCRIPTION="Lightweight, robust, and efficient POSIX compliant regexp matching library"
9 HOMEPAGE="https://laurikari.net/tre/ https://github.com/laurikari/tre/"
10 SRC_URI="https://laurikari.net/tre/${P}.tar.bz2"
11
12 LICENSE="BSD-2"
13 SLOT="0"
14 KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x86-solaris"
15 IUSE="nls static-libs"
16
17 RDEPEND="
18         !app-text/agrep
19         !dev-ruby/amatch
20         !app-misc/glimpse"
21
22 DEPEND="
23         ${RDEPEND}
24         virtual/pkgconfig
25         nls? ( sys-devel/gettext )"
26
27 PATCHES=( "${FILESDIR}/${PV}-pkgcfg.patch" )
28
29 src_prepare() {
30         default
31 }
32
33 src_configure() {
34         econf \
35                 --enable-agrep \
36                 --enable-system-abi \
37                 $(use_enable nls) \
38                 $(use_enable static-libs static)
39 }
40
41 src_test() {
42         if locale -a | grep -iq en_US.iso88591; then
43                 emake -j1 check
44         else
45                 ewarn "If you like to run the test,"
46                 ewarn "please make sure en_US.ISO-8859-1 is installed."
47                 die "en_US.ISO-8859-1 locale is missing"
48         fi
49 }
50
51 src_install() {
52         local HTML_DOCS=( doc/*.{css,html} )
53
54         default
55
56         # 626480
57         mv "${ED%/}"/usr/bin/agrep{,-tre}$(get_exeext) || die
58 }
59
60 pkg_postinst() {
61         ewarn "app-misc/glimpse, app-text/agrep and this package all provide agrep."
62         ewarn "If this causes any unforeseen incompatibilities please file a bug"
63         ewarn "on https://bugs.gentoo.org."
64 }