dev-db/rethinkdb: Fix building with GCC-6
authorPeter Levine <plevine457@gmail.com>
Wed, 11 Oct 2017 00:29:23 +0000 (20:29 -0400)
committerUltrabug <ultrabug@gentoo.org>
Fri, 13 Oct 2017 08:09:14 +0000 (10:09 +0200)
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 [new file with mode: 0644]
dev-db/rethinkdb/rethinkdb-2.3.5.ebuild

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 (file)
index 0000000..e3d5eac
--- /dev/null
@@ -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 <etienne@atnnn.com>
+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
index 7dafd2bc1039aa2eb98998371836c5e1d169182f..e9ee79bfdde0c68450bd6d5d4d10a3594285227d 100644 (file)
@@ -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