]> git.pld-linux.org Git - packages/wxWidgets.git/commitdiff
- fix building with gcc 6.x
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 15 Apr 2017 21:44:32 +0000 (23:44 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 15 Apr 2017 21:44:32 +0000 (23:44 +0200)
- relax oversensitive abi check

gcc6.patch [new file with mode: 0644]
relax-abicheck.patch [new file with mode: 0644]
wxWidgets.spec

diff --git a/gcc6.patch b/gcc6.patch
new file mode 100644 (file)
index 0000000..c2bf5de
--- /dev/null
@@ -0,0 +1,37 @@
+commit 73e9e18ea09ffffcaac50237def0d9728a213c02
+Author: Scott Talbert <swt@techie.net>
+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 (file)
index 0000000..2ba14fe
--- /dev/null
@@ -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 <olly@survex.com>
+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
index 0e45dcb3b54efc0377fda3469d169d4553579e8b..473f7731a750aae992b9cc6be0cbc40e5acd18f2 100644 (file)
@@ -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
 
This page took 0.214049 seconds and 4 git commands to generate.