summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2016-10-02 11:41:03 +0200
committerDavid Seifert <soap@gentoo.org>2016-10-02 13:23:07 +0200
commiteb60cc77486346e23e843acc46e4a710b9d8cdbc (patch)
treed375d7d09c5835873562d570495e8b30d9d44199 /x11-libs/wxGTK
parentnet-misc/youtube-dl: Fix typo, bug 595794 (diff)
downloadgentoo-eb60cc77486346e23e843acc46e4a710b9d8cdbc.tar.gz
gentoo-eb60cc77486346e23e843acc46e4a710b9d8cdbc.tar.bz2
gentoo-eb60cc77486346e23e843acc46e4a710b9d8cdbc.zip
x11-libs/wxGTK: Allow for compiling with GCC 6
Gentoo-bug: 592436 Acked-by: Ryan Hill <rhill@gentoo.org> Package-Manager: portage-2.3.1
Diffstat (limited to 'x11-libs/wxGTK')
-rw-r--r--x11-libs/wxGTK/files/wxGTK-3.0.2.0-gcc6.patch39
-rw-r--r--x11-libs/wxGTK/wxGTK-3.0.2.0-r3.ebuild1
2 files changed, 40 insertions, 0 deletions
diff --git a/x11-libs/wxGTK/files/wxGTK-3.0.2.0-gcc6.patch b/x11-libs/wxGTK/files/wxGTK-3.0.2.0-gcc6.patch
new file mode 100644
index 000000000000..119175c624d2
--- /dev/null
+++ b/x11-libs/wxGTK/files/wxGTK-3.0.2.0-gcc6.patch
@@ -0,0 +1,39 @@
+From 73e9e18ea09ffffcaac50237def0d9728a213c02 Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt@techie.net>
+Date: Sat, 20 Feb 2016 00:08:14 -0500
+Subject: [PATCH] Fix STC compilation with GCC6
+
+Use std::abs() from <cmath> instead of abs() from <math.h> to avoid problems
+with ambiguous overloads.
+
+Closes #17147.
+
+Closes https://github.com/wxWidgets/wxWidgets/pull/222
+---
+ src/stc/scintilla/src/Editor.cxx | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/stc/scintilla/src/Editor.cxx b/src/stc/scintilla/src/Editor.cxx
+index cd72953..2081df2 100644
+--- a/src/stc/scintilla/src/Editor.cxx
++++ b/src/stc/scintilla/src/Editor.cxx
+@@ -11,6 +11,7 @@
+ #include <ctype.h>
+ #include <assert.h>
+
++#include <cmath>
+ #include <string>
+ #include <vector>
+ #include <map>
+@@ -5841,9 +5842,9 @@ void Editor::GoToLine(int lineNo) {
+ }
+
+ static bool Close(Point pt1, Point pt2) {
+- if (abs(pt1.x - pt2.x) > 3)
++ if (std::abs(pt1.x - pt2.x) > 3)
+ return false;
+- if (abs(pt1.y - pt2.y) > 3)
++ if (std::abs(pt1.y - pt2.y) > 3)
+ return false;
+ return true;
+ }
diff --git a/x11-libs/wxGTK/wxGTK-3.0.2.0-r3.ebuild b/x11-libs/wxGTK/wxGTK-3.0.2.0-r3.ebuild
index efffba9ce84c..25bf6ac390dc 100644
--- a/x11-libs/wxGTK/wxGTK-3.0.2.0-r3.ebuild
+++ b/x11-libs/wxGTK/wxGTK-3.0.2.0-r3.ebuild
@@ -66,6 +66,7 @@ S="${WORKDIR}/wxPython-src-${PV}"
src_prepare() {
epatch "${FILESDIR}"/${PN}-3.0.0.0-collision.patch
epatch "${FILESDIR}"/${P}-webview-fixes.patch
+ epatch "${FILESDIR}"/${P}-gcc6.patch
epatch_user
for f in $(find "${S}" -name configure.in); do