dev-libs/leatherman: 1.12.0 stable amd64/x86 with cleanup
[gentoo.git] / dev-libs / re2 / re2-0.2020.04.01.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit multilib-minimal toolchain-funcs
7
8 # Different date format used upstream.
9 RE2_VER=${PV#0.}
10 RE2_VER=${RE2_VER//./-}
11
12 DESCRIPTION="An efficient, principled regular expression library"
13 HOMEPAGE="https://github.com/google/re2"
14 SRC_URI="https://github.com/google/re2/archive/${RE2_VER}.tar.gz -> re2-${RE2_VER}.tar.gz"
15
16 LICENSE="BSD"
17 # NOTE: Always run libre2 through abi-compliance-checker!
18 # https://abi-laboratory.pro/tracker/timeline/re2/
19 SONAME="6"
20 SLOT="0/${SONAME}"
21 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
22 IUSE="icu"
23
24 RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )"
25 DEPEND="${RDEPEND}"
26 BDEPEND="icu? ( virtual/pkgconfig )"
27
28 S="${WORKDIR}/re2-${RE2_VER}"
29
30 DOCS=( AUTHORS CONTRIBUTORS README doc/syntax.txt )
31 HTML_DOCS=( doc/syntax.html )
32
33 src_prepare() {
34         default
35         grep -q "^SONAME=${SONAME}\$" Makefile || die "SONAME mismatch"
36         if use icu; then
37                 sed -i -e 's:^# \(\(CC\|LD\)ICU=.*\):\1:' Makefile || die
38         fi
39         multilib_copy_sources
40 }
41
42 src_configure() {
43         tc-export AR CXX NM
44 }
45
46 multilib_src_compile() {
47         emake SONAME="${SONAME}"
48 }
49
50 multilib_src_install() {
51         emake SONAME="${SONAME}" DESTDIR="${D}" prefix="${EPREFIX}/usr" libdir="\$(exec_prefix)/$(get_libdir)" install
52 }