commit:     f68353d2a5e5417b3d39f659ebd9aaee6190da63
Author:     Peter Levine <plevine457 <AT> gmail <DOT> com>
AuthorDate: Wed Oct 11 00:29:23 2017 +0000
Commit:     Alexys Jacob <ultrabug <AT> gentoo <DOT> org>
CommitDate: Fri Oct 13 08:09:14 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f68353d2

dev-db/rethinkdb: Fix building with GCC-6

Bug: https://bugs.gentoo.org/594220
Package-Manager: Portage-2.3.10, Repoman-2.3.3
Closes: https://github.com/gentoo/gentoo/pull/5911

 dev-db/rethinkdb/files/rethinkdb-2.3.5-gcc6.patch | 37 +++++++++++++++++++++++
 dev-db/rethinkdb/rethinkdb-2.3.5.ebuild           |  6 +++-
 2 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/dev-db/rethinkdb/files/rethinkdb-2.3.5-gcc6.patch 
b/dev-db/rethinkdb/files/rethinkdb-2.3.5-gcc6.patch
new file mode 100644
index 00000000000..e3d5eac88a4
--- /dev/null
+++ b/dev-db/rethinkdb/files/rethinkdb-2.3.5-gcc6.patch
@@ -0,0 +1,37 @@
+Bug: https://bugs.gentoo.org/594220
+Commit: 
https://github.com/rethinkdb/rethinkdb/commit/871bd3705a1f29c4ab07a096d562a4b06231a97c
+
+From 871bd3705a1f29c4ab07a096d562a4b06231a97c Mon Sep 17 00:00:00 2001
+From: Etienne Laurin <[email protected]>
+Date: Wed, 16 Nov 2016 04:17:41 +0000
+Subject: [PATCH] Workaround for building V8 with GCC 6.2
+
+---
+ mk/support/pkg/v8.sh | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/mk/support/pkg/v8.sh b/mk/support/pkg/v8.sh
+index dc339ad0715..97f4d336c03 100644
+--- a/mk/support/pkg/v8.sh
++++ b/mk/support/pkg/v8.sh
+@@ -44,8 +44,10 @@ pkg_install () {
+         arm*)   arch=arm; arch_gypflags=$raspberry_pi_gypflags ;;
+         *)      arch=native ;;
+     esac
++
+     mode=release
+-    pkg_make $arch.$mode CXX=$CXX LINK=$CXX LINK.target=$CXX 
GYPFLAGS="-Dwerror= $arch_gypflags" V=1
++    pkg_make $arch.$mode CXX=$CXX LINK=$CXX LINK.target=$CXX 
GYPFLAGS="-Dwerror= -Dv8_use_snapshot=false $arch_gypflags" V=1 
++
+     for lib in `find "$build_dir/out/$arch.$mode" -maxdepth 1 -name \*.a` 
`find "$build_dir/out/$arch.$mode/obj.target" -name \*.a`; do
+         name=`basename $lib`
+         cp $lib "$install_dir/lib/${name/.$arch/}"
+@@ -56,7 +58,7 @@ pkg_install () {
+ pkg_link-flags () {
+     # These are the necessary libraries recommended by the docs:
+     # https://developers.google.com/v8/get_started#hello
+-    for lib in libv8_{base,libbase,snapshot,libplatform}; do
++    for lib in libv8_{base,nosnapshot,libbase,libplatform}; do
+         echo "$install_dir/lib/$lib.a"
+     done
+     for lib in libicu{i18n,uc,data}; do

diff --git a/dev-db/rethinkdb/rethinkdb-2.3.5.ebuild 
b/dev-db/rethinkdb/rethinkdb-2.3.5.ebuild
index 7dafd2bc103..e9ee79bfdde 100644
--- a/dev-db/rethinkdb/rethinkdb-2.3.5.ebuild
+++ b/dev-db/rethinkdb/rethinkdb-2.3.5.ebuild
@@ -32,8 +32,12 @@ pkg_setup() {
        enewuser rethinkdb -1 -1 /var/lib/${PN} rethinkdb
 }
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.3.5-gcc6.patch
+)
+
 src_prepare() {
-       eapply_user
+       default
 
        # don't use predefined configuration
        rm configure.default

Reply via email to