--- /dev/null
+From 588c60d0c3d11e79d19860fa62b03c935658d13a Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sun, 13 Jan 2013 14:36:48 +0100
+Subject: [PATCH qtbase] eglconvenience: add egl to CONFIG to get correct include
+ paths
+
+The eglconvenience code includes <EGL/egl.h>. Therefore, it should get
+the appropriate EGL-specific include paths from QMAKE_INCDIR_EGL,
+otherwise the build might if the EGL library has its headers in
+special locations. In order to achieve this, we simply add the "egl"
+feature to the list of features imported by eglconvenience.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ .../eglconvenience/eglconvenience.pri | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/platformsupport/eglconvenience/eglconvenience.pri b/src/platformsupport/eglconvenience/eglconvenience.pri
+index 188eb1c..8996cea 100644
+--- a/src/platformsupport/eglconvenience/eglconvenience.pri
++++ b/src/platformsupport/eglconvenience/eglconvenience.pri
+@@ -5,6 +5,7 @@ contains(QT_CONFIG,egl) {
+ SOURCES += \
+ $$PWD/qeglconvenience.cpp \
+ $$PWD/qeglplatformcontext.cpp
++ CONFIG += egl
+
+ contains(QT_CONFIG,xlib) {
+ HEADERS += \
+--
+1.7.9.5
+
--- /dev/null
+Add a Buildroot 'device' to ease cross-compilation
+
+Qt5 has a mechanism to support "device" profiles, so that people can
+specify the compiler, compiler flags and so on for a specific device.
+
+We leverage this mechanism in the Buildroot packaging of qt5 to
+simplify cross-compilation: we have our own "device" definition, which
+allows us to easily pass the cross-compiler paths and flags from our
+qt5.mk.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/mkspecs/devices/linux-buildroot-g++/qmake.conf
+===================================================================
+--- /dev/null
++++ b/mkspecs/devices/linux-buildroot-g++/qmake.conf
+@@ -0,0 +1,43 @@
++MAKEFILE_GENERATOR = UNIX
++CONFIG += incremental gdb_dwarf_index
++QMAKE_INCREMENTAL_STYLE = sublib
++
++include(../../common/linux.conf)
++include(../../common/gcc-base-unix.conf)
++include(../../common/g++-unix.conf)
++
++load(device_config)
++
++QT_QPA_DEFAULT_PLATFORM = eglfs
++
++BUILDROOT_CROSS_COMPILE =
++BUILDROOT_COMPILER_CFLAGS =
++BUILDROOT_COMPILER_CXXFLAGS =
++BUILDROOT_INCLUDE_PATH =
++
++# modifications to g++.conf
++QMAKE_CC = $${BUILDROOT_CROSS_COMPILE}gcc
++QMAKE_CXX = $${BUILDROOT_CROSS_COMPILE}g++
++QMAKE_LINK = $${QMAKE_CXX}
++QMAKE_LINK_SHLIB = $${QMAKE_CXX}
++
++# modifications to linux.conf
++QMAKE_AR = $${BUILDROOT_CROSS_COMPILE}ar cqs
++QMAKE_OBJCOPY = $${BUILDROOT_CROSS_COMPILE}objcopy
++QMAKE_STRIP = $${BUILDROOT_CROSS_COMPILE}strip
++
++#modifications to gcc-base.conf
++QMAKE_CFLAGS += $${BUILDROOT_COMPILER_CFLAGS}
++QMAKE_CXXFLAGS += $${BUILDROOT_COMPILER_CXXFLAGS}
++QMAKE_CXXFLAGS_RELEASE += -O3
++INCLUDEPATH += $${BUILDROOT_INCLUDE_PATH}
++
++QMAKE_LIBS += -lrt -lpthread -ldl
++
++# device specific glue code
++EGLFS_PLATFORM_HOOKS_SOURCES =
++
++# Sanity check
++deviceSanityCheckCompiler()
++
++load(qt_config)
+Index: b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
+===================================================================
+--- /dev/null
++++ b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
+@@ -0,0 +1 @@
++#include "../../linux-g++/qplatformdefs.h"
--- /dev/null
+From 6f88b27de256266947a7f6a3e70e18510754aab2 Mon Sep 17 00:00:00 2001
+From: Peter Korsgaard <jacmet@sunsite.dk>
+Date: Sat, 14 Apr 2012 20:36:07 +0200
+Subject: [PATCH] mkspecs/common/posix: fix !largefile builds on uClibc
+
+uClibc doesn't even define O_LARGEFILE when not configured with large file
+support, so ensure this define is only used when Qt is built with
+-largefile, otherwise the build fails with:
+
+io/qtemporaryfile.cpp: In function 'bool createFileFromTemplate(
+ NativeFileHandle&, QFileSystemEntry::NativePath&, size_t, size_t,
+ QSystemError&)':
+io/qtemporaryfile.cpp:197:57: error: 'O_LARGEFILE' was not declared in
+ this scope
+
+Moved to qt5 by Thomas Petazzoni.
+
+Reported-Upstream: https://bugreports.qt-project.org/browse/QTBUG-25321
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+
+Index: b/mkspecs/common/posix/qplatformdefs.h
+===================================================================
+--- a/mkspecs/common/posix/qplatformdefs.h
++++ b/mkspecs/common/posix/qplatformdefs.h
+@@ -123,7 +123,11 @@
+ #define QT_READ ::read
+ #define QT_WRITE ::write
+
++#ifdef QT_LARGEFILE_SUPPORT
+ #define QT_OPEN_LARGEFILE O_LARGEFILE
++#else
++#define QT_OPEN_LARGEFILE 0
++#endif
+ #define QT_OPEN_RDONLY O_RDONLY
+ #define QT_OPEN_WRONLY O_WRONLY
+ #define QT_OPEN_RDWR O_RDWR
+++ /dev/null
-From 588c60d0c3d11e79d19860fa62b03c935658d13a Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Sun, 13 Jan 2013 14:36:48 +0100
-Subject: [PATCH qtbase] eglconvenience: add egl to CONFIG to get correct include
- paths
-
-The eglconvenience code includes <EGL/egl.h>. Therefore, it should get
-the appropriate EGL-specific include paths from QMAKE_INCDIR_EGL,
-otherwise the build might if the EGL library has its headers in
-special locations. In order to achieve this, we simply add the "egl"
-feature to the list of features imported by eglconvenience.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- .../eglconvenience/eglconvenience.pri | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/platformsupport/eglconvenience/eglconvenience.pri b/src/platformsupport/eglconvenience/eglconvenience.pri
-index 188eb1c..8996cea 100644
---- a/src/platformsupport/eglconvenience/eglconvenience.pri
-+++ b/src/platformsupport/eglconvenience/eglconvenience.pri
-@@ -5,6 +5,7 @@ contains(QT_CONFIG,egl) {
- SOURCES += \
- $$PWD/qeglconvenience.cpp \
- $$PWD/qeglplatformcontext.cpp
-+ CONFIG += egl
-
- contains(QT_CONFIG,xlib) {
- HEADERS += \
---
-1.7.9.5
-
+++ /dev/null
-Add a Buildroot 'device' to ease cross-compilation
-
-Qt5 has a mechanism to support "device" profiles, so that people can
-specify the compiler, compiler flags and so on for a specific device.
-
-We leverage this mechanism in the Buildroot packaging of qt5 to
-simplify cross-compilation: we have our own "device" definition, which
-allows us to easily pass the cross-compiler paths and flags from our
-qt5.mk.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: b/mkspecs/devices/linux-buildroot-g++/qmake.conf
-===================================================================
---- /dev/null
-+++ b/mkspecs/devices/linux-buildroot-g++/qmake.conf
-@@ -0,0 +1,43 @@
-+MAKEFILE_GENERATOR = UNIX
-+CONFIG += incremental gdb_dwarf_index
-+QMAKE_INCREMENTAL_STYLE = sublib
-+
-+include(../../common/linux.conf)
-+include(../../common/gcc-base-unix.conf)
-+include(../../common/g++-unix.conf)
-+
-+load(device_config)
-+
-+QT_QPA_DEFAULT_PLATFORM = eglfs
-+
-+BUILDROOT_CROSS_COMPILE =
-+BUILDROOT_COMPILER_CFLAGS =
-+BUILDROOT_COMPILER_CXXFLAGS =
-+BUILDROOT_INCLUDE_PATH =
-+
-+# modifications to g++.conf
-+QMAKE_CC = $${BUILDROOT_CROSS_COMPILE}gcc
-+QMAKE_CXX = $${BUILDROOT_CROSS_COMPILE}g++
-+QMAKE_LINK = $${QMAKE_CXX}
-+QMAKE_LINK_SHLIB = $${QMAKE_CXX}
-+
-+# modifications to linux.conf
-+QMAKE_AR = $${BUILDROOT_CROSS_COMPILE}ar cqs
-+QMAKE_OBJCOPY = $${BUILDROOT_CROSS_COMPILE}objcopy
-+QMAKE_STRIP = $${BUILDROOT_CROSS_COMPILE}strip
-+
-+#modifications to gcc-base.conf
-+QMAKE_CFLAGS += $${BUILDROOT_COMPILER_CFLAGS}
-+QMAKE_CXXFLAGS += $${BUILDROOT_COMPILER_CXXFLAGS}
-+QMAKE_CXXFLAGS_RELEASE += -O3
-+INCLUDEPATH += $${BUILDROOT_INCLUDE_PATH}
-+
-+QMAKE_LIBS += -lrt -lpthread -ldl
-+
-+# device specific glue code
-+EGLFS_PLATFORM_HOOKS_SOURCES =
-+
-+# Sanity check
-+deviceSanityCheckCompiler()
-+
-+load(qt_config)
-Index: b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
-===================================================================
---- /dev/null
-+++ b/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h
-@@ -0,0 +1 @@
-+#include "../../linux-g++/qplatformdefs.h"
+++ /dev/null
-From 6f88b27de256266947a7f6a3e70e18510754aab2 Mon Sep 17 00:00:00 2001
-From: Peter Korsgaard <jacmet@sunsite.dk>
-Date: Sat, 14 Apr 2012 20:36:07 +0200
-Subject: [PATCH] mkspecs/common/posix: fix !largefile builds on uClibc
-
-uClibc doesn't even define O_LARGEFILE when not configured with large file
-support, so ensure this define is only used when Qt is built with
--largefile, otherwise the build fails with:
-
-io/qtemporaryfile.cpp: In function 'bool createFileFromTemplate(
- NativeFileHandle&, QFileSystemEntry::NativePath&, size_t, size_t,
- QSystemError&)':
-io/qtemporaryfile.cpp:197:57: error: 'O_LARGEFILE' was not declared in
- this scope
-
-Moved to qt5 by Thomas Petazzoni.
-
-Reported-Upstream: https://bugreports.qt-project.org/browse/QTBUG-25321
-Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-
-Index: b/mkspecs/common/posix/qplatformdefs.h
-===================================================================
---- a/mkspecs/common/posix/qplatformdefs.h
-+++ b/mkspecs/common/posix/qplatformdefs.h
-@@ -123,7 +123,11 @@
- #define QT_READ ::read
- #define QT_WRITE ::write
-
-+#ifdef QT_LARGEFILE_SUPPORT
- #define QT_OPEN_LARGEFILE O_LARGEFILE
-+#else
-+#define QT_OPEN_LARGEFILE 0
-+#endif
- #define QT_OPEN_RDONLY O_RDONLY
- #define QT_OPEN_WRONLY O_WRONLY
- #define QT_OPEN_RDWR O_RDWR
--- /dev/null
+Only import bz2 python module when needed
+
+The js2c.py script imports the bz2 module unconditionnally, which
+would require us to build the bzip2 support in host-python. Since in
+fact bzip2 support is not technically used when building this package,
+we ensure that the bz2 module is only imported when needed.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/src/3rdparty/v8/tools/js2c.py
+===================================================================
+--- a/src/3rdparty/v8/tools/js2c.py
++++ b/src/3rdparty/v8/tools/js2c.py
+@@ -33,7 +33,6 @@
+
+ import os, re, sys, string
+ import jsmin
+-import bz2
+
+
+ def ToCAsciiArray(lines):
+@@ -344,6 +343,7 @@
+ else:
+ raw_sources_declaration = RAW_SOURCES_COMPRESSION_DECLARATION
+ if env['COMPRESSION'] == 'bz2':
++ import bz2
+ all_sources = bz2.compress("".join(all_sources))
+ total_length = len(all_sources)
+ sources_data = ToCArray(all_sources)
--- /dev/null
+Fix build on uClibc
+
+Patch taken from https://code.google.com/p/v8/source/detail?r=12094.
+
+Review URL: https://chromiumcodereview.appspot.com/10784012
+Patch from Remi Duraffort <remi.duraffort@st.com>.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: qt5jsbackend-5.0.0/src/3rdparty/v8/src/platform-linux.cc
+===================================================================
+--- qt5jsbackend-5.0.0.orig/src/3rdparty/v8/src/platform-linux.cc 2012-12-18 20:04:01.000000000 +0100
++++ qt5jsbackend-5.0.0/src/3rdparty/v8/src/platform-linux.cc 2013-03-03 20:31:46.000000000 +0100
+@@ -1030,7 +1030,8 @@
+ sample->fp = reinterpret_cast<Address>(mcontext.gregs[REG_RBP]);
+ #elif V8_HOST_ARCH_ARM
+ // An undefined macro evaluates to 0, so this applies to Android's Bionic also.
+-#if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
++#if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3) && \
++ !defined(__UCLIBC__))
+ sample->pc = reinterpret_cast<Address>(mcontext.gregs[R15]);
+ sample->sp = reinterpret_cast<Address>(mcontext.gregs[R13]);
+ sample->fp = reinterpret_cast<Address>(mcontext.gregs[R11]);
+@@ -1038,7 +1039,8 @@
+ sample->pc = reinterpret_cast<Address>(mcontext.arm_pc);
+ sample->sp = reinterpret_cast<Address>(mcontext.arm_sp);
+ sample->fp = reinterpret_cast<Address>(mcontext.arm_fp);
+-#endif // (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
++#endif // (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3) &&
++ // !defined(__UCLIBC__))
+ #elif V8_HOST_ARCH_MIPS
+ sample->pc = reinterpret_cast<Address>(mcontext.pc);
+ sample->sp = reinterpret_cast<Address>(mcontext.gregs[29]);
+++ /dev/null
-Only import bz2 python module when needed
-
-The js2c.py script imports the bz2 module unconditionnally, which
-would require us to build the bzip2 support in host-python. Since in
-fact bzip2 support is not technically used when building this package,
-we ensure that the bz2 module is only imported when needed.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: b/src/3rdparty/v8/tools/js2c.py
-===================================================================
---- a/src/3rdparty/v8/tools/js2c.py
-+++ b/src/3rdparty/v8/tools/js2c.py
-@@ -33,7 +33,6 @@
-
- import os, re, sys, string
- import jsmin
--import bz2
-
-
- def ToCAsciiArray(lines):
-@@ -344,6 +343,7 @@
- else:
- raw_sources_declaration = RAW_SOURCES_COMPRESSION_DECLARATION
- if env['COMPRESSION'] == 'bz2':
-+ import bz2
- all_sources = bz2.compress("".join(all_sources))
- total_length = len(all_sources)
- sources_data = ToCArray(all_sources)
+++ /dev/null
-Fix build on uClibc
-
-Patch taken from https://code.google.com/p/v8/source/detail?r=12094.
-
-Review URL: https://chromiumcodereview.appspot.com/10784012
-Patch from Remi Duraffort <remi.duraffort@st.com>.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: qt5jsbackend-5.0.0/src/3rdparty/v8/src/platform-linux.cc
-===================================================================
---- qt5jsbackend-5.0.0.orig/src/3rdparty/v8/src/platform-linux.cc 2012-12-18 20:04:01.000000000 +0100
-+++ qt5jsbackend-5.0.0/src/3rdparty/v8/src/platform-linux.cc 2013-03-03 20:31:46.000000000 +0100
-@@ -1030,7 +1030,8 @@
- sample->fp = reinterpret_cast<Address>(mcontext.gregs[REG_RBP]);
- #elif V8_HOST_ARCH_ARM
- // An undefined macro evaluates to 0, so this applies to Android's Bionic also.
--#if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
-+#if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3) && \
-+ !defined(__UCLIBC__))
- sample->pc = reinterpret_cast<Address>(mcontext.gregs[R15]);
- sample->sp = reinterpret_cast<Address>(mcontext.gregs[R13]);
- sample->fp = reinterpret_cast<Address>(mcontext.gregs[R11]);
-@@ -1038,7 +1039,8 @@
- sample->pc = reinterpret_cast<Address>(mcontext.arm_pc);
- sample->sp = reinterpret_cast<Address>(mcontext.arm_sp);
- sample->fp = reinterpret_cast<Address>(mcontext.arm_fp);
--#endif // (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
-+#endif // (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3) &&
-+ // !defined(__UCLIBC__))
- #elif V8_HOST_ARCH_MIPS
- sample->pc = reinterpret_cast<Address>(mcontext.pc);
- sample->sp = reinterpret_cast<Address>(mcontext.gregs[29]);
--- /dev/null
+From d6b1b33a12c0cf6c52667afafe34e58a7b00d0d8 Mon Sep 17 00:00:00 2001
+From: Floris Bos <bos@je-eigen-domein.nl>
+Date: Thu, 7 Mar 2013 19:25:17 +0100
+Subject: [PATCH] Webcore: add EGL and OpenGL (ES) INCDIR to INCLUDEPATH
+
+When building with 3D graphics support enabled, add the
+OpenGL (ES) and EGL include directories to the include path.
+
+Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
+---
+ Source/WebCore/Target.pri | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/Source/WebCore/Target.pri b/Source/WebCore/Target.pri
+index 2669748..421a849 100644
+--- a/Source/WebCore/Target.pri
++++ b/Source/WebCore/Target.pri
+@@ -3992,15 +3992,19 @@ use?(3D_GRAPHICS) {
+
+ contains(QT_CONFIG, opengl) | contains(QT_CONFIG, opengles2) {
+ !contains(QT_CONFIG, opengles2) {
++ INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+ SOURCES += \
+ platform/graphics/opengl/GraphicsContext3DOpenGL.cpp \
+ platform/graphics/opengl/Extensions3DOpenGL.cpp
+ } else {
++ INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
+ SOURCES += \
+ platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp \
+ platform/graphics/opengl/Extensions3DOpenGLES.cpp
+ }
+
++ !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL
++
+ HEADERS += platform/graphics/opengl/Extensions3DOpenGL.h
+
+ SOURCES += \
+--
+1.7.10.4
+
+++ /dev/null
-From d6b1b33a12c0cf6c52667afafe34e58a7b00d0d8 Mon Sep 17 00:00:00 2001
-From: Floris Bos <bos@je-eigen-domein.nl>
-Date: Thu, 7 Mar 2013 19:25:17 +0100
-Subject: [PATCH] Webcore: add EGL and OpenGL (ES) INCDIR to INCLUDEPATH
-
-When building with 3D graphics support enabled, add the
-OpenGL (ES) and EGL include directories to the include path.
-
-Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
----
- Source/WebCore/Target.pri | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/Source/WebCore/Target.pri b/Source/WebCore/Target.pri
-index 2669748..421a849 100644
---- a/Source/WebCore/Target.pri
-+++ b/Source/WebCore/Target.pri
-@@ -3992,15 +3992,19 @@ use?(3D_GRAPHICS) {
-
- contains(QT_CONFIG, opengl) | contains(QT_CONFIG, opengles2) {
- !contains(QT_CONFIG, opengles2) {
-+ INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
- SOURCES += \
- platform/graphics/opengl/GraphicsContext3DOpenGL.cpp \
- platform/graphics/opengl/Extensions3DOpenGL.cpp
- } else {
-+ INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
- SOURCES += \
- platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp \
- platform/graphics/opengl/Extensions3DOpenGLES.cpp
- }
-
-+ !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL
-+
- HEADERS += platform/graphics/opengl/Extensions3DOpenGL.h
-
- SOURCES += \
---
-1.7.10.4
-