libpcre, rhash: upgraded packages to upstream

Upgraded app-crypt/rhash to version 1.3.5 on amd64
Upgraded dev-libs/libpcre to version 8.41-r1 on amd64

veyron_minnie-paladin-tryjob
https://cros-goldeneye.corp.google.com/chromeos/healthmonitoring/buildDetails?buildbucketId=8942625495478859696

guado_moblab-paladin-tryjob
https://cros-goldeneye.corp.google.com/chromeos/healthmonitoring/buildDetails?buildbucketId=8942625496187301472

eve-paladin-tryjob
https://cros-goldeneye.corp.google.com/chromeos/healthmonitoring/buildDetails?buildbucketId=8942625496907788416

BUG=chromium:853401
TEST=Build and tested on moblab, tryjobs

Change-Id: Ic0ef06af790247c440dfc1bb365b395320611cde
Reviewed-on: https://chromium-review.googlesource.com/1115909
Commit-Ready: Keith Haddow <haddowk@chromium.org>
Tested-by: Keith Haddow <haddowk@chromium.org>
Reviewed-by: Jason Clinton <jclinton@chromium.org>
Reviewed-by: Keith Haddow <haddowk@chromium.org>
diff --git a/app-crypt/rhash/Manifest b/app-crypt/rhash/Manifest
new file mode 100644
index 0000000..ab38da2
--- /dev/null
+++ b/app-crypt/rhash/Manifest
@@ -0,0 +1 @@
+DIST rhash-1.3.5-src.tar.gz 316867 SHA256 98e0688acae29e68c298ffbcdbb0f838864105f9b2bd8857980664435b1f1f2e SHA512 e8450aab0c16bfb975bf4aeee218740fb4d86d5514e426b70c3edb84e4d63865cd4051939aa95c24a87a78baaedc49e40bb509b2610e89ca3745930808b3ef6c WHIRLPOOL 80540e96b554fad8c18da431677a0bdc361f7c406b746050bd25ad0b2eeb9d318f1ef0d87ef002d8b8c6fa7db6d789391115358a1676358afd478564d193b229
diff --git a/app-crypt/rhash/files/rhash-1.3.6-no_echon.patch b/app-crypt/rhash/files/rhash-1.3.6-no_echon.patch
new file mode 100644
index 0000000..9b25b29
--- /dev/null
+++ b/app-crypt/rhash/files/rhash-1.3.6-no_echon.patch
@@ -0,0 +1,54 @@
+From c1776248a0b34a690e99ab9a7a814c34f78088ec Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Mon, 19 Mar 2018 10:47:13 +0100
+Subject: [PATCH] "echo -n" cannot be expected to work with every POSIX shell
+
+See "man 1p echo" section APPLICATION USAGE. This patch replaces "echo -n"
+with "printf '%s'".
+---
+ configure | 15 ++-------------
+ 1 file changed, 2 insertions(+), 13 deletions(-)
+
+diff --git a/configure b/configure
+index f480f7b..2a7d485 100755
+--- a/configure
++++ b/configure
+@@ -22,17 +22,6 @@ INSTALL_LIB_STATIC=auto
+ INSTALL_LIB_SHARED=auto
+ INSTALL_PKGCONFIGDIR="$PKG_INSTALLDIR"
+ 
+-case $(echo -n) in
+-  -n) # SysV style
+-    ECHO_N=
+-    ECHO_C='\c'
+-    ;;
+-  *) # BSD style
+-    ECHO_N='-n '
+-    ECHO_C=
+-    ;;
+-esac
+-
+ # display error message and exit
+ die () {
+   echo
+@@ -235,7 +224,7 @@ trap remove_tmpdir EXIT
+ 
+ str_concat()
+ {
+-  echo ${ECHO_N} $@ ${ECHO_C}
++  printf '%s ' $@
+ }
+ 
+ yn_nonempty()
+@@ -246,7 +235,7 @@ yn_nonempty()
+ # Use this before starting a check
+ start_check() {
+   echo "============ Checking for $1 ============" >> "$TMPLOG"
+-  echo ${ECHO_N} "Checking for $1 ... ${ECHO_C}"
++  printf '%s' "Checking for $1 ... "
+   res_comment=""
+ }
+ 
+-- 
+2.16.2
+
diff --git a/app-crypt/rhash/files/unquote-cc.patch b/app-crypt/rhash/files/unquote-cc.patch
new file mode 100644
index 0000000..77ccc9b
--- /dev/null
+++ b/app-crypt/rhash/files/unquote-cc.patch
@@ -0,0 +1,26 @@
+From 4558d6753611ab1bf21765017e5b451aee8409f6 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sun, 18 Mar 2018 14:23:28 +0000
+Subject: [PATCH] configure: Don't quote $CC when calling it
+
+It might have additional arguments.
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index f480f7b..8ebb929 100755
+--- a/configure
++++ b/configure
+@@ -480,7 +480,7 @@ if test "$(basename $CC)" = "icc" || test "$(basename $CC)" = "ecc"; then
+ else
+   CC_TMP="$CC"
+   for CC in "$CC_TMP" gcc cc ; do
+-    if "$CC" -v >/dev/null 2>&1; then
++    if $CC -v >/dev/null 2>&1; then
+       cc_name_tmp=$($CC -v 2>&1 | tail -n 1 | cut -d ' ' -f 1)
+       if test "$cc_name_tmp" = "gcc"; then
+         cc_name=$cc_name_tmp
+-- 
+2.16.1
+
diff --git a/app-crypt/rhash/metadata.xml b/app-crypt/rhash/metadata.xml
new file mode 100644
index 0000000..a6651d8
--- /dev/null
+++ b/app-crypt/rhash/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>chewi@gentoo.org</email>
+		<name>James Le Cuirot</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="sourceforge">rhash</remote-id>
+		<remote-id type="github">rhash/RHash</remote-id>
+		<bugs-to>https://github.com/rhash/RHash/issues</bugs-to>
+	</upstream>
+	<longdescription lang="en">
+		RHash is a console utility for calculation and verification of magnet links and a wide range of hash sums like CRC32, MD4, MD5, SHA1, SHA256, SHA512, SHA3, AICH, ED2K, Tiger, DC++ TTH, BitTorrent BTIH, GOST R 34.11-94, RIPEMD-160, HAS-160, EDON-R, Whirlpool and Snefru.
+	</longdescription>
+</pkgmetadata>
diff --git a/app-crypt/rhash/rhash-1.3.5.ebuild b/app-crypt/rhash/rhash-1.3.5.ebuild
new file mode 100644
index 0000000..8c8aacf
--- /dev/null
+++ b/app-crypt/rhash/rhash-1.3.5.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs multilib-minimal
+
+DESCRIPTION="Console utility and library for computing and verifying file hash sums"
+HOMEPAGE="http://rhash.anz.ru/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="*"
+IUSE="debug nls libressl ssl static-libs"
+
+RDEPEND="
+	ssl? (
+		!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+)"
+
+DEPEND="${RDEPEND}
+	nls? ( sys-devel/gettext )"
+
+S="${WORKDIR}/RHash-${PV}"
+
+src_prepare() {
+	default
+
+	# Install /etc stuff inside the Prefix
+	sed -i -e 's:\$(DESTDIR)/etc:\$(DESTDIR)/$(SYSCONFDIR):g' Makefile || die
+
+	if use elibc_Darwin ; then
+		local ver_script='-Wl,--version-script,exports.sym,-soname,$(SONAME)'
+		local install_name='-install_name $(LIBDIR)/$(SONAME)'
+		sed -i -e '/^\(SONAME\|SHAREDLIB\)/s/\.so\.\([0-9]\+\)/.\1.dylib/' \
+			-e '/^SOLINK/s/\.so/.dylib/' \
+			-e "s:${ver_script}:${install_name}:" \
+			librhash/Makefile \
+			Makefile || die
+	fi
+
+	if use elibc_SunOS ; then
+		# https://sourceware.org/bugzilla/show_bug.cgi?id=12548
+		# skip the export.sym for now
+		sed -i -e 's/,--version-script,exports.sym//' librhash/Makefile || die
+	fi
+
+	multilib_copy_sources
+}
+
+multilib_src_compile() {
+	local ADDCFLAGS=(
+		$(use debug || echo -DNDEBUG)
+		$(use nls && echo -DUSE_GETTEXT)
+		$(use ssl && echo -DOPENSSL_RUNTIME -rdynamic)
+	)
+
+	local ADDLDFLAGS=(
+		$(use ssl && echo -ldl)
+	)
+
+	use elibc_Darwin || use elibc_DragonFly || use elibc_FreeBSD ||
+		use elibc_NetBSD || use elibc_OpenBSD || use elibc_SunOS &&
+			ADDLDFLAGS+=( $(use nls && echo -lintl) )
+
+	emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" \
+		  ADDCFLAGS="${ADDCFLAGS[*]}" ADDLDFLAGS="${ADDLDFLAGS[*]}" \
+		  PREFIX="${EPREFIX}"/usr LIBDIR='$(PREFIX)'/$(get_libdir) \
+		  build-shared $(use static-libs && echo lib-static)
+}
+
+myemake() {
+	emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr \
+		LIBDIR='$(PREFIX)'/$(get_libdir) SYSCONFDIR="${EPREFIX}"/etc "${@}"
+}
+
+multilib_src_install() {
+	myemake -C librhash install-lib-shared install-so-link
+	multilib_is_native_abi && myemake install-shared
+	use static-libs && myemake install-lib-static
+}
+
+multilib_src_install_all() {
+	myemake -C librhash install-headers
+	use nls && myemake install-gmo
+	einstalldocs
+}
+
+multilib_src_test() {
+	cd tests || die
+	LD_LIBRARY_PATH=$(pwd)/../librhash ./test_rhash.sh --full ../rhash_shared || die "tests failed"
+}
diff --git a/dev-libs/libpcre/Manifest b/dev-libs/libpcre/Manifest
index dacf77d..ce74278 100644
--- a/dev-libs/libpcre/Manifest
+++ b/dev-libs/libpcre/Manifest
@@ -1 +1 @@
-DIST pcre-8.40.tar.bz2 1560119 SHA256 00e27a29ead4267e3de8111fcaa59b132d0533cdfdbdddf4b0604279acbcf4f4 SHA512 b4c27eafbdf33bd7a1384655b1936f4be3bc6745c072347eb26e988896c52664bd85ac42444da1be78b6e20f45b6c7e5921f5f20f5b0741b5bd3d9844e5bd4e2 WHIRLPOOL 6711688972b3db4b98902d548b84e8b03b61c3a12d24a4e42fc49ddc5e2b4be51f98f91873166e550866e88b6cd55092ea27704a3b7e71d58a2af21148ad3340
+DIST pcre-8.41.tar.bz2 1561874 SHA256 e62c7eac5ae7c0e7286db61ff82912e1c0b7a0c13706616e94a7dd729321b530 SHA512 cc9cdbeb98c010fe4f093a019bebfb91965dae4c6a48f8e49c38ec8df7d9da7f0d32c12fc58f22c51f1c2f010e72b65bcbf8bbf180060e93edf464fa9a7c3551 WHIRLPOOL 24d891c4f6580af20aa07a166038a2bacb52cdb305987f8b91b2fecae65e7b5277d3ef0b26ddbb3a33fd34794e6340e77df6a321e770b3aca4393d1ed144cf64
diff --git a/dev-libs/libpcre/files/libpcre-8.40-jit-else.patch b/dev-libs/libpcre/files/libpcre-8.40-jit-else.patch
deleted file mode 100644
index d347a7f..0000000
--- a/dev-libs/libpcre/files/libpcre-8.40-jit-else.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-https://bugs.gentoo.org/609592
-https://bugs.exim.org/show_bug.cgi?id=2035
-
-From 7ddfbe9d0b9f43402f8043e940172a318cc407c6 Mon Sep 17 00:00:00 2001
-From: Zoltan Herczeg <hzmester@freemail.hu>
-Date: Tue, 14 Feb 2017 08:48:18 +0000
-Subject: [PATCH] Fix a missing else in the JIT compiler reported by
- 'idaifish'.
-
-git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1680 2f5784b3-3f2a-0410-8824-cb99058d5e15
----
- ChangeLog             | 2 ++
- pcre_jit_compile.c    | 2 +-
- testdata/testinput12  | 2 ++
- testdata/testoutput12 | 2 ++
- 4 files changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index 373ee8422ef5..d813935539bd 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -15,6 +15,8 @@ mode with --only-matching matched several lines, it restarted scanning at the
- next line instead of moving on to the end of the matched string, which can be 
- several lines after the start.
- 
-+3.  Fix a missing else in the JIT compiler reported by 'idaifish'.
-+
- 
- Version 8.40 11-January-2017
- ----------------------------
-diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c
-index c301f05d5e3f..6ef8e48ff5e8 100644
---- a/pcre_jit_compile.c
-+++ b/pcre_jit_compile.c
-@@ -8110,7 +8110,7 @@ if (opcode == OP_COND || opcode == OP_SCOND)
- 
-     if (*matchingpath == OP_FAIL)
-       stacksize = 0;
--    if (*matchingpath == OP_RREF)
-+    else if (*matchingpath == OP_RREF)
-       {
-       stacksize = GET2(matchingpath, 1);
-       if (common->currententry == NULL)
-diff --git a/testdata/testinput12 b/testdata/testinput12
-index 944be6943f5e..89ed4564bcd4 100644
---- a/testdata/testinput12
-+++ b/testdata/testinput12
-@@ -104,4 +104,6 @@ and a couple of things that are different with JIT. --/
- /(.|.)*?bx/
-     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabax
- 
-+/((?(?!))x)(?'name')(?1)/S++
-+
- /-- End of testinput12 --/
-diff --git a/testdata/testoutput12 b/testdata/testoutput12
-index 87911086f498..7632c4e58013 100644
---- a/testdata/testoutput12
-+++ b/testdata/testoutput12
-@@ -201,4 +201,6 @@ No match, mark = m (JIT)
-     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabax
- Error -8 (match limit exceeded)
- 
-+/((?(?!))x)(?'name')(?1)/S++
-+
- /-- End of testinput12 --/
--- 
-2.12.0
-
diff --git a/dev-libs/libpcre/files/libpcre-8.40-pcregrep-multiline-1.patch b/dev-libs/libpcre/files/libpcre-8.40-pcregrep-multiline-1.patch
deleted file mode 100644
index f15968d..0000000
--- a/dev-libs/libpcre/files/libpcre-8.40-pcregrep-multiline-1.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 5be027b624bc866702808abadfe5f99360414086 Mon Sep 17 00:00:00 2001
-From: Philip Hazel <ph10@cam.ac.uk>
-Date: Fri, 10 Feb 2017 17:47:34 +0000
-Subject: [PATCH] Correct fix for pcre2grep multiline with --only-matching.
-
-git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1678 2f5784b3-3f2a-0410-8824-cb99058d5e15
----
- ChangeLog    |  5 +++++
- configure.ac |  6 +++---
- pcregrep.c   | 20 +++++++++++++++-----
- 3 files changed, 23 insertions(+), 8 deletions(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index ab4e053e601e..373ee8422ef5 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -10,6 +10,11 @@ Version 8.41
- 1.  Fixed typo in CMakeLists.txt (wrong number of arguments for 
- PCRE_STATIC_RUNTIME (affects MSVC only).
- 
-+2. Issue 1 for 8.40 below was not correctly fixed. If pcregrep in multiline 
-+mode with --only-matching matched several lines, it restarted scanning at the 
-+next line instead of moving on to the end of the matched string, which can be 
-+several lines after the start.
-+
- 
- Version 8.40 11-January-2017
- ----------------------------
-diff --git a/pcregrep.c b/pcregrep.c
-index fd2a67622baa..2070c057e4a0 100644
---- a/pcregrep.c
-+++ b/pcregrep.c
-@@ -1804,11 +1804,6 @@ while (ptr < endptr)
-         if (line_buffered) fflush(stdout);
-         rc = 0;                      /* Had some success */
- 
--        /* If the current match ended past the end of the line (only possible
--        in multiline mode), we are done with this line. */
--
--        if ((unsigned int)offsets[1] > linelength) goto END_ONE_MATCH;
--
-         startoffset = offsets[1];    /* Restart after the match */
-         if (startoffset <= oldstartoffset)
-           {
-@@ -1818,6 +1813,21 @@ while (ptr < endptr)
-           if (utf8)
-             while ((matchptr[startoffset] & 0xc0) == 0x80) startoffset++;
-           }
-+
-+        /* If the current match ended past the end of the line (only possible
-+        in multiline mode), we must move on to the line in which it did end
-+        before searching for more matches. */                                
-+                                                          
-+        while (startoffset > (int)linelength)
-+          {                                                                  
-+          matchptr = ptr += linelength + endlinelength;                      
-+          filepos += (int)(linelength + endlinelength);                        
-+          linenumber++;                    
-+          startoffset -= (int)(linelength + endlinelength);
-+          t = end_of_line(ptr, endptr, &endlinelength);
-+          linelength = t - ptr - endlinelength;
-+          }              
-+
-         goto ONLY_MATCHING_RESTART;
-         }
-       }
--- 
-2.12.0
-
diff --git a/dev-libs/libpcre/files/libpcre-8.40-pcregrep-multiline-2.patch b/dev-libs/libpcre/files/libpcre-8.40-pcregrep-multiline-2.patch
deleted file mode 100644
index 63ad51c..0000000
--- a/dev-libs/libpcre/files/libpcre-8.40-pcregrep-multiline-2.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 8b0fdf16e57ce9a653a0a03c39f6cc061e8122e8 Mon Sep 17 00:00:00 2001
-From: Philip Hazel <ph10@cam.ac.uk>
-Date: Sun, 12 Feb 2017 13:28:11 +0000
-Subject: [PATCH] Fix bug in most recent fix for multiline pcre2grep.
-
-git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1679 2f5784b3-3f2a-0410-8824-cb99058d5e15
----
- pcregrep.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/pcregrep.c b/pcregrep.c
-index 2070c057e4a0..3cd70eeb4261 100644
---- a/pcregrep.c
-+++ b/pcregrep.c
-@@ -1826,6 +1826,7 @@ while (ptr < endptr)
-           startoffset -= (int)(linelength + endlinelength);
-           t = end_of_line(ptr, endptr, &endlinelength);
-           linelength = t - ptr - endlinelength;
-+          length = (size_t)(endptr - ptr); 
-           }              
- 
-         goto ONLY_MATCHING_RESTART;
--- 
-2.12.0
-
diff --git a/dev-libs/libpcre/files/libpcre-8.41-fix-stack-size-detection.patch b/dev-libs/libpcre/files/libpcre-8.41-fix-stack-size-detection.patch
new file mode 100644
index 0000000..b539267
--- /dev/null
+++ b/dev-libs/libpcre/files/libpcre-8.41-fix-stack-size-detection.patch
@@ -0,0 +1,17 @@
+https://bugs.exim.org/show_bug.cgi?id=2173#c4
+
+--- a/pcre_exec.c
++++ b/pcre_exec.c
+@@ -509,6 +509,12 @@
+                  (e.g. stopped by repeated call or recursion limit)
+ */
+ 
++#ifdef __GNUC__
++static int
++match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
++  PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
++  unsigned int rdepth) __attribute__((noinline,noclone));
++#endif
+ static int
+ match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
+   PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
diff --git a/dev-libs/libpcre/files/libpcre-8.41-sljit_mips-label-statement-fix.patch b/dev-libs/libpcre/files/libpcre-8.41-sljit_mips-label-statement-fix.patch
new file mode 100644
index 0000000..0494ccc
--- /dev/null
+++ b/dev-libs/libpcre/files/libpcre-8.41-sljit_mips-label-statement-fix.patch
@@ -0,0 +1,15 @@
+diff -Naurp pcre-8.41.orig/sljit/sljitNativeMIPS_common.c pcre-8.41/sljit/sljitNativeMIPS_common.c
+--- pcre-8.41.orig/sljit/sljitNativeMIPS_common.c	2017-05-07 11:32:25.000000000 -0400
++++ pcre-8.41/sljit/sljitNativeMIPS_common.c	2017-07-29 17:50:24.508909742 -0400
+@@ -503,9 +503,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit
+ #ifdef SLJIT_IS_FPU_AVAILABLE
+ 		return SLJIT_IS_FPU_AVAILABLE;
+ #elif defined(__GNUC__)
++	{
+ 		sljit_sw fir;
+ 		asm ("cfc1 %0, $0" : "=r"(fir));
+ 		return (fir >> 22) & 0x1;
++	}
+ #else
+ #error "FIR check is not implemented for this architecture"
+ #endif
diff --git a/dev-libs/libpcre/libpcre-8.40-r1.ebuild b/dev-libs/libpcre/libpcre-8.41-r1.ebuild
similarity index 62%
rename from dev-libs/libpcre/libpcre-8.40-r1.ebuild
rename to dev-libs/libpcre/libpcre-8.41-r1.ebuild
index 1ebcefe..c829a6e 100644
--- a/dev-libs/libpcre/libpcre-8.40-r1.ebuild
+++ b/dev-libs/libpcre/libpcre-8.41-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="5"
+EAPI=5
 
 inherit eutils multilib libtool flag-o-matic toolchain-funcs multilib-minimal
 
@@ -23,27 +23,29 @@
 REQUIRED_USE="readline? ( !libedit )
 	libedit? ( !readline )"
 
-RDEPEND="bzip2? ( app-arch/bzip2 )
+RDEPEND="
+	bzip2? ( app-arch/bzip2 )
 	zlib? ( sys-libs/zlib )
 	libedit? ( dev-libs/libedit )
-	readline? ( sys-libs/readline:0= )"
-DEPEND="${RDEPEND}
-	virtual/pkgconfig"
-RDEPEND="${RDEPEND}
-	abi_x86_32? (
-		!<=app-emulation/emul-linux-x86-baselibs-20131008-r2
-		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
-	)"
+	readline? ( sys-libs/readline:0= )
+"
+DEPEND="
+	${RDEPEND}
+	virtual/pkgconfig
+"
+RDEPEND="
+	${RDEPEND}
+"
 
-S=${WORKDIR}/${MY_P}
+S="${WORKDIR}/${MY_P}"
 
 MULTILIB_CHOST_TOOLS=(
 	/usr/bin/pcre-config
 )
 
 PATCHES=(
-	"${FILESDIR}"/${P}-pcregrep-multiline-{1,2}.patch
-	"${FILESDIR}"/${P}-jit-else.patch #609592
+	"${FILESDIR}"/${PN}-8.41-sljit_mips-label-statement-fix.patch
+	"${FILESDIR}"/${PN}-8.41-fix-stack-size-detection.patch
 )
 
 src_prepare() {
@@ -53,22 +55,24 @@
 }
 
 multilib_src_configure() {
-	ECONF_SOURCE="${S}" econf \
-		--with-match-limit-recursion=$(usex recursion-limit 8192 MATCH_LIMIT) \
-		$(multilib_native_use_enable bzip2 pcregrep-libbz2) \
-		$(use_enable cxx cpp) \
-		$(use_enable jit) $(use_enable jit pcregrep-jit) \
-		$(use_enable pcre16) \
-		$(use_enable pcre32) \
-		$(multilib_native_use_enable libedit pcretest-libedit) \
-		$(multilib_native_use_enable readline pcretest-libreadline) \
-		$(use_enable static-libs static) \
-		$(use_enable unicode utf) $(use_enable unicode unicode-properties) \
-		$(multilib_native_use_enable zlib pcregrep-libz) \
-		--enable-pcre8 \
-		--enable-shared \
-		--htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+	local myeconfargs=(
+		--with-match-limit-recursion=$(usex recursion-limit 8192 MATCH_LIMIT)
+		$(multilib_native_use_enable bzip2 pcregrep-libbz2)
+		$(use_enable cxx cpp)
+		$(use_enable jit) $(use_enable jit pcregrep-jit)
+		$(use_enable pcre16)
+		$(use_enable pcre32)
+		$(multilib_native_use_enable libedit pcretest-libedit)
+		$(multilib_native_use_enable readline pcretest-libreadline)
+		$(use_enable static-libs static)
+		$(use_enable unicode utf) $(use_enable unicode unicode-properties)
+		$(multilib_native_use_enable zlib pcregrep-libz)
+		--enable-pcre8
+		--enable-shared
+		--htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
 		--docdir="${EPREFIX}"/usr/share/doc/${PF}
+	)
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
 }
 
 multilib_src_compile() {
diff --git a/metadata/md5-cache/app-crypt/rhash-1.3.5 b/metadata/md5-cache/app-crypt/rhash-1.3.5
new file mode 100644
index 0000000..566f030
--- /dev/null
+++ b/metadata/md5-cache/app-crypt/rhash-1.3.5
@@ -0,0 +1,13 @@
+DEFINED_PHASES=compile configure install prepare test
+DEPEND=ssl? ( !libressl? ( dev-libs/openssl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) nls? ( sys-devel/gettext )
+DESCRIPTION=Console utility and library for computing and verifying file hash sums
+EAPI=6
+HOMEPAGE=http://rhash.anz.ru/
+IUSE=debug nls libressl ssl static-libs abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
+KEYWORDS=*
+LICENSE=MIT
+RDEPEND=ssl? ( !libressl? ( dev-libs/openssl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) libressl? ( dev-libs/libressl:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) )
+SLOT=0
+SRC_URI=mirror://sourceforge/rhash/rhash-1.3.5-src.tar.gz
+_eclasses_=multibuild	742139c87a9fa3766f0c2b155e5522bf	multilib	97f470f374f2e94ccab04a2fb21d811e	multilib-build	8fe2e81aeb36cdf8a6cc5f50443879cc	multilib-minimal	0224dee31c0f98405d572e14ad6dee65	toolchain-funcs	1e35303c63cd707f6c3422b4493d5607
+_md5_=8c6679b59d6b12debf7ce1a54f5ed171
diff --git a/metadata/md5-cache/dev-libs/libpcre-8.40-r1 b/metadata/md5-cache/dev-libs/libpcre-8.41-r1
similarity index 74%
rename from metadata/md5-cache/dev-libs/libpcre-8.40-r1
rename to metadata/md5-cache/dev-libs/libpcre-8.41-r1
index b8ade38..8eb7eb4 100644
--- a/metadata/md5-cache/dev-libs/libpcre-8.40-r1
+++ b/metadata/md5-cache/dev-libs/libpcre-8.41-r1
@@ -6,9 +6,9 @@
 IUSE=bzip2 +cxx +jit libedit pcre16 pcre32 +readline +recursion-limit static-libs unicode zlib abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
 KEYWORDS=*
 LICENSE=BSD
-RDEPEND=bzip2? ( app-arch/bzip2 ) zlib? ( sys-libs/zlib ) libedit? ( dev-libs/libedit ) readline? ( sys-libs/readline:0= ) abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20131008-r2 !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )
+RDEPEND=bzip2? ( app-arch/bzip2 ) zlib? ( sys-libs/zlib ) libedit? ( dev-libs/libedit ) readline? ( sys-libs/readline:0= )
 REQUIRED_USE=readline? ( !libedit ) libedit? ( !readline )
 SLOT=3
-SRC_URI=mirror://sourceforge/pcre/pcre-8.40.tar.bz2 ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.bz2
+SRC_URI=mirror://sourceforge/pcre/pcre-8.41.tar.bz2 ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.41.tar.bz2
 _eclasses_=eutils	06133990e861be0fe60c2b428fd025d9	flag-o-matic	5d5921a298e95441da2f85be419894c0	libtool	52d0e17251d04645ffaa61bfdd858944	multibuild	742139c87a9fa3766f0c2b155e5522bf	multilib	97f470f374f2e94ccab04a2fb21d811e	multilib-build	8fe2e81aeb36cdf8a6cc5f50443879cc	multilib-minimal	0224dee31c0f98405d572e14ad6dee65	toolchain-funcs	1e35303c63cd707f6c3422b4493d5607
-_md5_=92a1c4305d2cbc9c01b316ce0b043d50
+_md5_=e94fc8bff73ffb89434133a0f7975e2f