2bbd84927a937305ffa72c866f230bf2ad694960
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / qt5 / qt5base / 0004-xcb-egl-fixes.patch
1 The vivante headers pull in X11 defines which break eglconvenience
2
3 * Adds a missing include to qeglplatformcontext.cpp
4 * Fix namespace collision on CursorShape, pulled in from X11/X.h
5 * Do not pass MESA_EGL_NO_X11_HEADERS when xcb is use
6
7 [based on patch from Yocto project]
8 Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
9
10
11 diff -Nuar a/src/platformsupport/eglconvenience/eglconvenience.pri b/src/platformsupport/eglconvenience/eglconvenience.pri
12 --- a/src/platformsupport/eglconvenience/eglconvenience.pri     2014-08-07 16:53:50.038277168 -0400
13 +++ b/src/platformsupport/eglconvenience/eglconvenience.pri     2014-08-07 16:54:52.874278651 -0400
14 @@ -30,8 +30,10 @@
15          }
16      }
17  
18 -    # Avoid X11 header collision
19 -    DEFINES += MESA_EGL_NO_X11_HEADERS
20 +    !contains(QT_CONFIG,xcb) {
21 +        # Avoid X11 header collision
22 +        DEFINES += MESA_EGL_NO_X11_HEADERS
23 +    }
24  
25      contains(QT_CONFIG,xlib) {
26          HEADERS += \
27 diff -Nuar a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
28 --- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp        2014-08-07 16:53:50.038277168 -0400
29 +++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp        2014-08-07 16:56:00.630280249 -0400
30 @@ -39,6 +39,7 @@
31  **
32  ****************************************************************************/
33  
34 +#include <qtextstream.h>
35  #include "qeglplatformcontext_p.h"
36  #include "qeglconvenience_p.h"
37  #include "qeglpbuffer_p.h"
38 --- a/src/platformsupport/eglconvenience/qeglplatformcursor_p.h 2014-08-07 16:53:50.038277168 -0400
39 +++ b/src/platformsupport/eglconvenience/qeglplatformcursor_p.h 2014-08-07 16:58:49.014284222 -0400
40 @@ -42,6 +42,11 @@
41  #ifndef QEGLPLATFORMCURSOR_H
42  #define QEGLPLATFORMCURSOR_H
43  
44 +// avoid namespace collision with X11/X.h
45 +#ifdef CursorShape
46 +#undef CursorShape
47 +#endif
48 +
49  #include <qpa/qplatformcursor.h>
50  #include <qpa/qplatformscreen.h>
51  
52 --- a/src/platformsupport/eglconvenience/qeglplatformcursor.cpp 2014-08-07 16:53:50.038277168 -0400
53 +++ b/src/platformsupport/eglconvenience/qeglplatformcursor.cpp 2014-08-07 17:00:36.806286766 -0400
54 @@ -49,8 +49,8 @@
55  
56  #include <QtPlatformSupport/private/qdevicediscovery_p.h>
57  
58 -#include "qeglplatformcursor_p.h"
59  #include "qeglplatformintegration_p.h"
60 +#include "qeglplatformcursor_p.h"
61  
62  QT_BEGIN_NAMESPACE
63