re2: upgraded package to 2016.05.01

Upgraded dev-libs/re2 to version 2016.05.01 on amd64, arm, and x86.
Manually copied.

BUG=None
TEST=ran build_packages for link, daisy, and x86-generic boards.

Change-Id: I2db3cc2d7394199ecf9f872783c0d1d70b8d6512
Reviewed-on: https://chromium-review.googlesource.com/423433
Commit-Ready: Jennifer Pullman <jpullman@chromium.org>
Tested-by: Jennifer Pullman <jpullman@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/dev-libs/re2/Manifest b/dev-libs/re2/Manifest
index e2df631..a03fa6b 100644
--- a/dev-libs/re2/Manifest
+++ b/dev-libs/re2/Manifest
@@ -1 +1 @@
-DIST re2-20140304.tgz 1050493 SHA256 0bffd1a57de2f4b218ca0f77d8850bfd59c82944a98256c6edba25260e0196a7 SHA512 a426e8d69d2c7614087990180539c5b1aa2c544dee14b144098f810b76b6062d7de9efaf1e90e83c61c8e4382a066201862d09965f1a6a9f86e2912011ad9d40 WHIRLPOOL d998a6dd9edac52fe0c4ed7e895940380d9b67220711d68aed02294c8f65a644a59f77bddce116ccf79860c633046fa2b5060ef45d5cb5ea5bc0c1965cdce052
+DIST re2-2016-05-01.tar.gz 399509 SHA256 d9d13f0ea4e1c6628b1cb85eeee284d4fdd4948da94b1f205096254927092e3d SHA512 6d37ab1eae51a73f60d3c8280ea1162c420638363f0eb1313d7c2d5cee65a5abd4c2927da1a53572afbcb7d07fac2993a7e54c6cbc85e24aaae93c46dab19b14 WHIRLPOOL b601349800341d213b01219cf2171873be551488c71c2c06fbab1da27c20719fca12e0cfac30ac4e8ed0eb062a445b4c008491fd0e379f629434e0c9b4649a7e
diff --git a/dev-libs/re2/files/0.2016.05.01-pkgconfig.patch b/dev-libs/re2/files/0.2016.05.01-pkgconfig.patch
new file mode 100644
index 0000000..685cec2
--- /dev/null
+++ b/dev-libs/re2/files/0.2016.05.01-pkgconfig.patch
@@ -0,0 +1,57 @@
+From ac62674fa16b5a086f02dd208667ba65e22ec09d Mon Sep 17 00:00:00 2001
+From: Paul Wankadia <junyer@google.com>
+Date: Mon, 9 May 2016 14:42:37 +1000
+Subject: [PATCH] Plumb more variables from Makefile to re2.pc.
+
+Change-Id: I35509c273b0bd90242db127121c71be1f628c06f
+Reviewed-on: https://code-review.googlesource.com/4710
+Reviewed-by: Paul Wankadia <junyer@google.com>
+---
+ Makefile | 8 +++++---
+ re2.pc   | 6 +++---
+ 2 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index d0e2090..411e551 100644
+--- a/Makefile
++++ b/Makefile
+@@ -28,11 +28,9 @@ NMFLAGS?=-p
+ # http://www.gnu.org/prep/standards/standards.html
+ prefix=/usr/local
+ exec_prefix=$(prefix)
+-bindir=$(exec_prefix)/bin
+ includedir=$(prefix)/include
+ libdir=$(exec_prefix)/lib
+ INSTALL=install
+-INSTALL_PROGRAM=$(INSTALL)
+ INSTALL_DATA=$(INSTALL) -m 644
+
+ # ABI version
+@@ -273,7 +271,11 @@ install: obj/libre2.a obj/so/libre2.$(SOEXT)
+	$(INSTALL) obj/so/libre2.$(SOEXT) $(DESTDIR)$(libdir)/libre2.$(SOEXTVER00)
+	ln -sf libre2.$(SOEXTVER00) $(DESTDIR)$(libdir)/libre2.$(SOEXTVER)
+	ln -sf libre2.$(SOEXTVER00) $(DESTDIR)$(libdir)/libre2.$(SOEXT)
+-	sed -e "s#@prefix@#${prefix}#" re2.pc >$(DESTDIR)$(libdir)/pkgconfig/re2.pc
++	$(INSTALL_DATA) re2.pc $(DESTDIR)$(libdir)/pkgconfig/re2.pc
++	sed -i \
++	  -e "s#@prefix@#${prefix}#" -e "s#@exec_prefix@#${exec_prefix}#" \
++         -e "s#@includedir@#${includedir}#" -e "s#@libdir@#${libdir}#" \
++	  $(DESTDIR)$(libdir)/pkgconfig/re2.pc
+
+ testinstall: static-testinstall shared-testinstall
+ 	@echo
+diff --git a/re2.pc b/re2.pc
+index 91ba181..d66cf51 100644
+--- a/re2.pc
++++ b/re2.pc
+@@ -1,7 +1,7 @@
+ prefix=@prefix@
+-exec_prefix=${prefix}
+-includedir=${prefix}/include
+-libdir=${exec_prefix}/lib
++exec_prefix=@exec_prefix@
++includedir=@includedir@
++libdir=@libdir@
+
+ Name: re2
+ Description: RE2 is a fast, safe, thread-friendly regular expression engine.
\ No newline at end of file
diff --git a/dev-libs/re2/metadata.xml b/dev-libs/re2/metadata.xml
index fffcfc8..05cb128 100644
--- a/dev-libs/re2/metadata.xml
+++ b/dev-libs/re2/metadata.xml
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-	<herd>chromium</herd>
+	<maintainer type="project">
+		<email>chromium@gentoo.org</email>
+		<name>Chromium in Gentoo Project</name>
+	</maintainer>
 </pkgmetadata>
diff --git a/dev-libs/re2/re2-0.2016.05.01.ebuild b/dev-libs/re2/re2-0.2016.05.01.ebuild
new file mode 100644
index 0000000..20390ea
--- /dev/null
+++ b/dev-libs/re2/re2-0.2016.05.01.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib-minimal toolchain-funcs
+
+# Different date format used upstream.
+RE2_VER=${PV#0.}
+RE2_VER=${RE2_VER//./-}
+
+DESCRIPTION="An efficent, principled regular expression library"
+HOMEPAGE="https://github.com/google/re2"
+SRC_URI="https://github.com/google/re2/archive/${RE2_VER}.tar.gz -> ${PN}-${RE2_VER}.tar.gz"
+
+LICENSE="BSD"
+# NOTE: Always run libre2 through abi-compliance-checker!
+SLOT="0/0.2016.05.01"
+KEYWORDS="*"
+IUSE="icu"
+
+RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+	icu? ( virtual/pkgconfig )"
+
+S="${WORKDIR}/${PN}-${RE2_VER}"
+
+PATCHES=( "${FILESDIR}/${PV}-pkgconfig.patch" )
+DOCS=( "AUTHORS" "CONTRIBUTORS" "README" "doc/syntax.txt" )
+HTML_DOCS=( "doc/syntax.html" )
+
+src_prepare() {
+	default
+	epatch "${PATCHES[@]}"
+	if use icu; then
+		sed -i -e 's:^# \(\(CC\|LD\)ICU=.*\):\1:' Makefile || die
+	fi
+	multilib_copy_sources
+}
+
+src_configure() {
+	tc-export AR CXX NM
+}
+
+multilib_src_install() {
+	emake DESTDIR="${D}" prefix="${EPREFIX}/usr" libdir="\$(exec_prefix)/$(get_libdir)" install
+}
\ No newline at end of file
diff --git a/dev-libs/re2/re2-0_p20140304.ebuild b/dev-libs/re2/re2-0_p20140304.ebuild
deleted file mode 100644
index d4fcfbd..0000000
--- a/dev-libs/re2/re2-0_p20140304.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/re2/re2-0_p20140304.ebuild,v 1.3 2015/03/03 06:42:12 dlan Exp $
-
-EAPI=5
-
-inherit flag-o-matic eutils multilib multilib-minimal toolchain-funcs
-
-DESCRIPTION="An efficent, principled regular expression library"
-HOMEPAGE="http://code.google.com/p/re2/"
-SRC_URI="http://re2.googlecode.com/files/${PN}-${PV##*_p}.tgz"
-
-LICENSE="BSD"
-# Symbols removed in version 20140110
-# http://upstream-tracker.org/compat_reports/re2/20131024_to_20140110/abi_compat_report.html
-# https://code.google.com/p/re2/issues/detail?id=111
-SLOT="0/0.20140110"
-KEYWORDS="*"
-IUSE=""
-
-# TODO: the directory in the tarball should really be versioned.
-S="${WORKDIR}/${PN}"
-
-src_prepare() {
-	multilib_copy_sources
-}
-
-src_configure() {
-	tc-export AR CXX NM
-	append-cxxflags -pthread
-	append-ldflags -pthread
-}
-
-multilib_src_test() {
-	emake static-test
-}
-
-multilib_src_install() {
-	emake DESTDIR="${ED}" prefix=usr libdir=usr/$(get_libdir) install
-}
-
-multilib_src_install_all() {
-	dodoc AUTHORS CONTRIBUTORS README doc/syntax.txt
-	dohtml doc/syntax.html
-}