1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit multilib-minimal toolchain-funcs
8 # Different date format used upstream.
10 RE2_VER=${RE2_VER//./-}
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"
17 # NOTE: Always run libre2 through abi-compliance-checker!
18 # https://abi-laboratory.pro/tracker/timeline/re2/
21 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
24 RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )"
26 BDEPEND="icu? ( virtual/pkgconfig )"
28 S="${WORKDIR}/re2-${RE2_VER}"
30 DOCS=( AUTHORS CONTRIBUTORS README doc/syntax.txt )
31 HTML_DOCS=( doc/syntax.html )
35 grep -q "^SONAME=${SONAME}\$" Makefile || die "SONAME mismatch"
37 sed -i -e 's:^# \(\(CC\|LD\)ICU=.*\):\1:' Makefile || die
46 multilib_src_compile() {
47 emake SONAME="${SONAME}"
50 multilib_src_install() {
51 emake SONAME="${SONAME}" DESTDIR="${D}" prefix="${EPREFIX}/usr" libdir="\$(exec_prefix)/$(get_libdir)" install