[packages/wxWidgets] - added c++ patch (fixes DFB build using gcc 5+) - uncommented bakefile regeneration to allow build
qboosh
qboosh at pld-linux.org
Sun Apr 9 13:06:07 CEST 2017
commit 66a90916be64dfec696438ef4dfcb69e5f2fa613
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Apr 9 13:06:11 2017 +0200
- added c++ patch (fixes DFB build using gcc 5+)
- uncommented bakefile regeneration to allow build using bakefile > 0.2.9
wxWidgets-c++.patch | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++
wxWidgets.spec | 14 ++++----
2 files changed, 103 insertions(+), 6 deletions(-)
---
diff --git a/wxWidgets.spec b/wxWidgets.spec
index 9cf8922..4b76dbc 100644
--- a/wxWidgets.spec
+++ b/wxWidgets.spec
@@ -23,6 +23,7 @@ Patch0: %{name}-samples.patch
Patch1: %{name}-ac.patch
Patch2: %{name}-link.patch
Patch3: export-wxGetRootWindow.patch
+Patch4: %{name}-c++.patch
Patch5: %{name}-gifdelay.patch
URL: http://www.wxWidgets.org/
%{?with_directfb:BuildRequires: DirectFB-devel >= 0.9.23}
@@ -777,17 +778,17 @@ obsługą UNICODE.
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%patch5 -p1
%{__rm} build/aclocal/bakefile*.m4
%build
-# if bakefiles rebuild is needed:
-#%if "%(rpm -q bakefile --qf '%%{VERSION}')" != "0.2.1"
-#cd build/bakefiles
-#bakefile_gen -f autoconf
-#cd ../..
-#%endif
+%if "%(rpm -q bakefile --qf '%%{VERSION}')" != "0.2.9"
+cd build/bakefiles
+bakefile_gen -f autoconf
+cd ../..
+%endif
cp -f /usr/share/automake/config.sub .
%{__aclocal} -I build/aclocal
%{__autoconf}
@@ -992,6 +993,7 @@ rm -rf $RPM_BUILD_ROOT
%files -n bakefile-wxWidgets
%defattr(644,root,root,755)
%{_datadir}/bakefile/presets/wx*.bkl
+%{_datadir}/bakefile/presets/wx_presets.py
%files examples
%defattr(644,root,root,755)
diff --git a/wxWidgets-c++.patch b/wxWidgets-c++.patch
new file mode 100644
index 0000000..dd53fde
--- /dev/null
+++ b/wxWidgets-c++.patch
@@ -0,0 +1,95 @@
+.././src/dfb/bitmap.cpp:626:64: error: in C++98 'r' must be initialized by constructor, not by '{...}'
+ DFBRectangle r = { rect.x, rect.y, rect.width, rect.height };
+ ^
+.././src/dfb/dc.cpp:707:47: error: in C++98 'srcRect' must be initialized by constructor, not by '{...}'
+ DFBRectangle srcRect = { srcx, srcy, w, h };
+ ^
+.././src/dfb/dc.cpp:709:61: error: in C++98 'dstRect' must be initialized by constructor, not by '{...}'
+ XLOG2DEVREL(w), YLOG2DEVREL(h) };
+ ^
+.././src/dfb/dcclient.cpp:170:62: error: in C++98 'dfbrect' must be initialized by constructor, not by '{...}'
+ DFBRectangle dfbrect = { r.x, r.y, r.width, r.height };
+ ^
+.././src/dfb/nonownedwnd.cpp:348:67: error: in C++98 'r' must be initialized by constructor, not by '{...}'
+ paintedRect.GetRight(), paintedRect.GetBottom()};
+ ^
+.././src/dfb/window.cpp:153:55: error: in C++98 'rect' must be initialized by constructor, not by '{...}'
+ DFBRectangle rect = { r.x, r.y, r.width, r.height };
+ ^
+.././src/dfb/window.cpp:762:60: error: in C++98 'dfbRect' must be initialized by constructor, not by '{...}'
+ orect.width, orect.height };
+ ^
+
+--- wxWidgets-3.0.2/src/dfb/bitmap.cpp.orig 2014-10-06 23:33:44.000000000 +0200
++++ wxWidgets-3.0.2/src/dfb/bitmap.cpp 2017-04-08 21:02:22.420076242 +0200
+@@ -623,7 +623,8 @@
+
+ // NB: DirectFB subsurfaces share the same pixels buffer, so we must
+ // clone the obtained subsurface
+- DFBRectangle r = { rect.x, rect.y, rect.width, rect.height };
++ DFBRectangle r;
++ r.x = rect.x; r.y = rect.y; r.w = rect.width; r.h = rect.height;
+ return wxBitmap(M_BITMAP->m_surface->GetSubSurface(&r)->Clone());
+ }
+
+--- wxWidgets-3.0.2/src/dfb/dc.cpp.orig 2014-10-06 23:33:44.000000000 +0200
++++ wxWidgets-3.0.2/src/dfb/dc.cpp 2017-04-08 22:30:42.656682391 +0200
+@@ -704,9 +704,9 @@
+ CalcBoundingBox(dstx, dsty);
+ CalcBoundingBox(dstx + w, dsty + h);
+
+- DFBRectangle srcRect = { srcx, srcy, w, h };
+- DFBRectangle dstRect = { XLOG2DEV(dstx), YLOG2DEV(dsty),
+- XLOG2DEVREL(w), YLOG2DEVREL(h) };
++ DFBRectangle srcRect; srcRect.x = srcx; srcRect.y = srcy; srcRect.w = w; srcRect.h = h;
++ DFBRectangle dstRect; dstRect.x = XLOG2DEV(dstx); dstRect.y = YLOG2DEV(dsty);
++ dstRect.w = XLOG2DEVREL(w); dstRect.h = YLOG2DEVREL(h);
+
+ wxIDirectFBSurfacePtr dst(m_surface);
+
+--- wxWidgets-3.0.2/src/dfb/dcclient.cpp.orig 2014-10-06 23:33:44.000000000 +0200
++++ wxWidgets-3.0.2/src/dfb/dcclient.cpp 2017-04-08 22:35:18.586679239 +0200
+@@ -167,7 +167,7 @@
+ else
+ {
+ m_winRect = r;
+- DFBRectangle dfbrect = { r.x, r.y, r.width, r.height };
++ DFBRectangle dfbrect; dfbrect.x = r.x; dfbrect.y = r.y; dfbrect.w = r.width; dfbrect.h = r.height;
+ surface = win->GetDfbSurface()->GetSubSurface(&dfbrect);
+
+ // if the DC was clipped thanks to rectPaint, we must adjust the
+--- wxWidgets-3.0.2/src/dfb/nonownedwnd.cpp.orig 2014-10-06 23:33:44.000000000 +0200
++++ wxWidgets-3.0.2/src/dfb/nonownedwnd.cpp 2017-04-08 22:37:43.196677588 +0200
+@@ -344,8 +344,8 @@
+ // do FlipToFront() for each of them, because that could result in visible
+ // updating of the screen; instead, we prefer to flip everything at once.
+
+- DFBRegion r = {paintedRect.GetLeft(), paintedRect.GetTop(),
+- paintedRect.GetRight(), paintedRect.GetBottom()};
++ DFBRegion r; r.x1 = paintedRect.GetLeft(); r.y1 = paintedRect.GetTop();
++ r.x2 = paintedRect.GetRight(); r.y2 = paintedRect.GetBottom();
+ DFBRegion *rptr = (winRect == paintedRect) ? NULL : &r;
+
+ GetDfbSurface()->FlipToFront(rptr);
+--- wxWidgets-3.0.2/src/dfb/window.cpp.orig 2014-10-06 23:33:44.000000000 +0200
++++ wxWidgets-3.0.2/src/dfb/window.cpp 2017-04-08 22:40:07.890009269 +0200
+@@ -150,7 +150,7 @@
+
+ wxRect r(GetRect());
+ AdjustForParentClientOrigin(r.x, r.y, 0);
+- DFBRectangle rect = { r.x, r.y, r.width, r.height };
++ DFBRectangle rect; rect.x = r.x; rect.y = r.y; rect.w = r.width; rect.h = r.height;
+
+ return parentSurface->GetSubSurface(&rect);
+ }
+@@ -758,8 +758,8 @@
+ if ( overlay->IsEmpty() )
+ continue; // nothing to paint
+
+- DFBRectangle dfbRect = { orect.x - orectOrig.x, orect.y - orectOrig.y,
+- orect.width, orect.height };
++ DFBRectangle dfbRect; dfbRect.x = orect.x - orectOrig.x; dfbRect.y = orect.y - orectOrig.y;
++ dfbRect.w = orect.width; dfbRect.h = orect.height;
+ GetDfbSurface()->Blit
+ (
+ overlay->GetDirectFBSurface(),
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/wxWidgets.git/commitdiff/66a90916be64dfec696438ef4dfcb69e5f2fa613
More information about the pld-cvs-commit
mailing list