summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Levine <plevine457@gmail.com>2017-07-24 02:25:27 -0400
committerDavid Seifert <soap@gentoo.org>2017-07-30 11:09:56 +0200
commit7740aaf860fb686e087e174158dacf4f7c8051b2 (patch)
treec3b769a6a19a57a807643fa8306ef2ad8649fe89 /dev-cpp/yaml-cpp
parentgames-action/btanks: Fix building with -Werror=terminate in GCC-6 (diff)
downloadgentoo-7740aaf860fb686e087e174158dacf4f7c8051b2.tar.gz
gentoo-7740aaf860fb686e087e174158dacf4f7c8051b2.tar.bz2
gentoo-7740aaf860fb686e087e174158dacf4f7c8051b2.zip
dev-cpp/yaml-cpp: Fix test failure with GCC-6
Bug: https://bugs.gentoo.org/show_bug.cgi?id=609176 Package-Manager: Portage-2.3.6, Repoman-2.3.2 Closes: https://github.com/gentoo/gentoo/pull/5191
Diffstat (limited to 'dev-cpp/yaml-cpp')
-rw-r--r--dev-cpp/yaml-cpp/files/yaml-cpp-0.5.3-gcc6.patch44
-rw-r--r--dev-cpp/yaml-cpp/yaml-cpp-0.5.3.ebuild2
2 files changed, 46 insertions, 0 deletions
diff --git a/dev-cpp/yaml-cpp/files/yaml-cpp-0.5.3-gcc6.patch b/dev-cpp/yaml-cpp/files/yaml-cpp-0.5.3-gcc6.patch
new file mode 100644
index 000000000000..88ee25fa0acb
--- /dev/null
+++ b/dev-cpp/yaml-cpp/files/yaml-cpp-0.5.3-gcc6.patch
@@ -0,0 +1,44 @@
+Bug: https://bugs.gentoo.org/609176
+Upstream PR: https://github.com/jbeder/yaml-cpp/pull/514
+
+From a83a1b3a7bd0a5a4eb458d898b057f6a8d409b7e Mon Sep 17 00:00:00 2001
+From: Peter-Levine <plevine457@gmail.com>
+Date: Mon, 24 Jul 2017 02:00:24 -0400
+Subject: [PATCH] Fix segfault in gmock when running tests
+
+Taken from https://github.com/google/googletest/issues/705#issuecomment-235067917
+---
+ test/gmock-1.7.0/include/gmock/gmock-spec-builders.h | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h b/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h
+index 312fbe87..2dd733b6 100644
+--- a/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h
++++ b/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h
+@@ -1370,6 +1370,8 @@ class ActionResultHolder : public UntypedActionResultHolderBase {
+ template <>
+ class ActionResultHolder<void> : public UntypedActionResultHolderBase {
+ public:
++ explicit ActionResultHolder() {}
++
+ void GetValueAndDelete() const { delete this; }
+
+ virtual void PrintAsActionResult(::std::ostream* /* os */) const {}
+@@ -1381,7 +1383,7 @@ class ActionResultHolder<void> : public UntypedActionResultHolderBase {
+ const typename Function<F>::ArgumentTuple& args,
+ const string& call_description) {
+ func_mocker->PerformDefaultAction(args, call_description);
+- return NULL;
++ return new ActionResultHolder();
+ }
+
+ // Performs the given action and returns NULL.
+@@ -1390,7 +1392,7 @@ class ActionResultHolder<void> : public UntypedActionResultHolderBase {
+ const Action<F>& action,
+ const typename Function<F>::ArgumentTuple& args) {
+ action.Perform(args);
+- return NULL;
++ return new ActionResultHolder();
+ }
+ };
+
diff --git a/dev-cpp/yaml-cpp/yaml-cpp-0.5.3.ebuild b/dev-cpp/yaml-cpp/yaml-cpp-0.5.3.ebuild
index a857f75d61b6..503d7e2b9ff4 100644
--- a/dev-cpp/yaml-cpp/yaml-cpp-0.5.3.ebuild
+++ b/dev-cpp/yaml-cpp/yaml-cpp-0.5.3.ebuild
@@ -19,6 +19,8 @@ RDEPEND="${DEPEND}"
S="${WORKDIR}/${PN}-release-${PV}"
+PATCHES=( "${FILESDIR}"/${P}-gcc6.patch )
+
src_prepare() {
sed -i \
-e 's:INCLUDE_INSTALL_ROOT_DIR:INCLUDE_INSTALL_DIR:g' \