[arch-commits] Commit in wxgtk/trunk (PKGBUILD wxgtk-gcc6.patch)

Antonio Rojas arojas at archlinux.org
Thu May 19 21:16:41 UTC 2016


    Date: Thursday, May 19, 2016 @ 23:16:41
  Author: arojas
Revision: 268337

Fix build with GCC 6 (FS#49402)

Added:
  wxgtk/trunk/wxgtk-gcc6.patch
Modified:
  wxgtk/trunk/PKGBUILD

------------------+
 PKGBUILD         |    8 ++++++--
 wxgtk-gcc6.patch |   39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-05-19 21:09:53 UTC (rev 268336)
+++ PKGBUILD	2016-05-19 21:16:41 UTC (rev 268337)
@@ -13,9 +13,10 @@
 optdepends=('webkitgtk2: for webview support')
 options=('!emptydirs')
 source=(http://downloads.sourceforge.net/wxwindows/wxWidgets-${pkgver}.tar.bz2
-        make-abicheck-non-fatal.patch)
+        make-abicheck-non-fatal.patch wxgtk-gcc6.patch)
 sha1sums=('6461eab4428c0a8b9e41781b8787510484dea800'
-          'dfe38650c655395b90bf082b5734c4093508bfa3')
+          'dfe38650c655395b90bf082b5734c4093508bfa3'
+          '498202334c69d49c1ebbc9d36ad382cfa237f3f8')
 
 prepare() {
   cd wxWidgets-${pkgver}
@@ -23,6 +24,9 @@
   # C++ ABI check is too strict and breaks with GCC 5.1
   # https://bugzilla.redhat.com/show_bug.cgi?id=1200611
   patch -Np1 -i ../make-abicheck-non-fatal.patch
+
+  # Fix build with GCC 6
+  patch -p1 -i ../wxgtk-gcc6.patch
 }
 
 build() {

Added: wxgtk-gcc6.patch
===================================================================
--- wxgtk-gcc6.patch	                        (rev 0)
+++ wxgtk-gcc6.patch	2016-05-19 21:16:41 UTC (rev 268337)
@@ -0,0 +1,39 @@
+From 73e9e18ea09ffffcaac50237def0d9728a213c02 Mon Sep 17 00:00:00 2001
+From: Scott Talbert <swt at 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;
+ }



More information about the arch-commits mailing list