commit 5157e719a6aa3af9526da9136ac7a89e7e1aec33
Author: Jan Rękorajski <[email protected]>
Date:   Sat Apr 15 23:44:32 2017 +0200

    - fix building with gcc 6.x
    - relax oversensitive abi check

 gcc6.patch           | 37 +++++++++++++++++++++++++++++++++++++
 relax-abicheck.patch | 35 +++++++++++++++++++++++++++++++++++
 wxWidgets.spec       |  4 ++++
 3 files changed, 76 insertions(+)
---
diff --git a/wxWidgets.spec b/wxWidgets.spec
index 0e45dcb..473f773 100644
--- a/wxWidgets.spec
+++ b/wxWidgets.spec
@@ -25,6 +25,8 @@ Patch2:               %{name}-link.patch
 Patch3:                export-wxGetRootWindow.patch
 Patch4:                %{name}-c++.patch
 Patch5:                %{name}-gifdelay.patch
+Patch6:                relax-abicheck.patch
+Patch7:                gcc6.patch
 URL:           http://www.wxWidgets.org/
 %{?with_directfb:BuildRequires:        DirectFB-devel >= 0.9.23}
 BuildRequires: OpenGL-GLU-devel
@@ -780,6 +782,8 @@ obsługą UNICODE.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
+%patch7 -p1
 
 %{__rm} build/aclocal/bakefile*.m4
 
diff --git a/gcc6.patch b/gcc6.patch
new file mode 100644
index 0000000..c2bf5de
--- /dev/null
+++ b/gcc6.patch
@@ -0,0 +1,37 @@
+commit 73e9e18ea09ffffcaac50237def0d9728a213c02
+Author: Scott Talbert <[email protected]>
+Date:   Sat Feb 20 00:08:14 2016 -0500
+
+    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
+
+diff --git a/src/stc/scintilla/src/Editor.cxx 
b/src/stc/scintilla/src/Editor.cxx
+index cd72953a..2081df28 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/relax-abicheck.patch b/relax-abicheck.patch
new file mode 100644
index 0000000..2ba14fe
--- /dev/null
+++ b/relax-abicheck.patch
@@ -0,0 +1,35 @@
+Description: Relax error about mismatching C++ ABI version to warning
+ In practice, the differences between ABI versions 2 and 8 don't seem to be
+ incompatible since they apparently only affect obscure corner cases.  So
+ relax this error to a warning so we don't have to rebuild the entire wx world
+ in one go.
+Author: Olly Betts <[email protected]>
+Forwarded: no
+Last-Update: 2015-06-29
+
+--- wxwidgets3.0-3.0.2.orig/src/common/appbase.cpp
++++ wxwidgets3.0-3.0.2/src/common/appbase.cpp
+@@ -762,6 +762,23 @@ bool wxAppConsoleBase::CheckBuildOptions
+         msg.Printf(wxT("Mismatch between the program and library build 
versions detected.\nThe library used %s,\nand %s used %s."),
+                    lib.c_str(), progName.c_str(), prog.c_str());
+ 
++
++      int l_off = lib.Find("compiler with C++ ABI ");
++      int p_off = prog.Find("compiler with C++ ABI ");
++      if (l_off != wxNOT_FOUND && p_off != wxNOT_FOUND) {
++          int space;
++          space = lib.Find(' ', l_off);
++          lib.erase(l_off, space - l_off);
++          space = prog.Find(' ', l_off);
++          prog.erase(p_off, space - p_off);
++          if (lib == prog) {
++              // Only difference is the ABI version, which apparently only
++              // affect obscure cases, so just warn.
++              wxLogWarning(msg.c_str());
++              return false;
++          }
++      }
++
+         wxLogFatalError(msg.c_str());
+ 
+         // normally wxLogFatalError doesn't return
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/wxWidgets.git/commitdiff/5157e719a6aa3af9526da9136ac7a89e7e1aec33

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to