Add support for -opengl dynamic

Builds but package not tested
This commit is contained in:
Martchus 2016-09-04 16:38:05 +02:00
parent eda90ac2d7
commit 3a938fa13d
30 changed files with 20466 additions and 380 deletions

7763
devel/qt5/dynamic-openql-fixes/configure vendored Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
f=qt5-add-angle-and-dynamic-support.patch
diff -Naur configure{.orig,} > $f
diff -Naur src/gui/opengl/qopenglfunctions.h{.orig,} >> $f

View File

@ -0,0 +1,75 @@
--- configure.orig 2016-06-10 08:48:56.000000000 +0200
+++ configure 2016-09-04 20:38:55.345362982 +0200
@@ -1287,6 +1287,7 @@
;;
opengl)
if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
+ [ "$VAL" = "angle" ] || [ "$VAL" = "dynamic" ] ||
[ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
[ "$VAL" = "es2" ]; then
CFG_OPENGL="$VAL"
@@ -5312,7 +5313,7 @@
fi
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if compileTest x11/opengl "OpenGL"; then
- CFG_OPENGL=desktop
+ CFG_OPENGL=angle
elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
CFG_OPENGL=es2
else
@@ -5348,6 +5349,17 @@
echo " ${XQMAKESPEC}."
exit 1
fi
+ elif [ "$CFG_OPENGL" = "angle" ]; then
+ compileTest x11/opengl "OpenGL"
+ if [ $? != "0" ]; then
+ echo "The OpenGL functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ elif [ "$CFG_OPENGL" = "dynamic" ]; then
+ true # FIXME: not sure whether/which test required
elif [ "$CFG_OPENGL" = "desktop" ]; then
# Desktop OpenGL support
compileTest x11/opengl "OpenGL"
@@ -6423,6 +6435,16 @@
QT_CONFIG="$QT_CONFIG opengles2"
fi
+if [ "$CFG_OPENGL" = "angle" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES QT_OPENGL_ES_2"
+ QT_CONFIG="$QT_CONFIG opengles2 egl angle"
+fi
+
+if [ "$CFG_OPENGL" = "dynamic" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_DYNAMIC"
+ QT_CONFIG="$QT_CONFIG dynamicgl"
+fi
+
if [ "$CFG_SHARED" = "yes" ]; then
QT_CONFIG="$QT_CONFIG shared"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG shared"
@@ -7474,7 +7496,7 @@
report_support " NIS ...................." "$CFG_NIS"
report_support " OpenGL / OpenVG:"
report_support " EGL .................." "$CFG_EGL"
-report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+"
+report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+" angle "ANGLE" dynamic "Dynamic OpenGL"
report_support " OpenVG ..............." "$CFG_OPENVG-$CFG_OPENVG_SHIVA" yes-yes "ShivaVG" yes-no "native"
report_support " PCRE ..................." "$CFG_PCRE" yes "system library" qt "bundled copy"
if [ -n "$PKG_CONFIG" ]; then
--- src/gui/opengl/qopenglfunctions.h.orig 2016-06-10 08:48:56.000000000 +0200
+++ src/gui/opengl/qopenglfunctions.h 2016-09-04 20:36:07.801522904 +0200
@@ -56,9 +56,7 @@
//#define Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
-#ifdef QT_OPENGL_ES
typedef double GLdouble;
-#endif
#ifdef Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
#include <stdio.h>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8,8 +8,8 @@
# There are different variants of the package which can be selected by simply adjusting pkgname:
# - mingw-w64-qt5-base or mingw-w64-qt5-base-opengl: using native OpenGL
# - mingw-w64-qt5-base-angle: using ANGLE rather then native OpenGL
# - mingw-w64-qt5-base-dynamic: allows choosing between ANGLE and OpenGL dynamically at runtime
# - mingw-w64-qt5-base-angle: using ANGLE rather than native OpenGL
# - mingw-w64-qt5-base-dynamic: allows choosing between ANGLE and native OpenGL dynamically at runtime
# - mingw-w64-qt5-base-noopenql: no OpenGL support
# The variants are conflicting (and hence can not be installed at the same time).
# See also: http://doc.qt.io/qt-5/windows-requirements.html#dynamically-loading-graphics-drivers
@ -17,6 +17,8 @@
# The variants listed above only contain dynamic libraries. For building static libraries
# just append '-static' to the package name, eg. mingw-w64-qt5-base-static or mingw-w64-qt5-base-angle-static.
# The static variants rely on the corresponding dynamic variant for headers and tools.
# I only tested the static version using native OpenGL so far (mingw-w64-qt5-base-static).
# Note that ANGLE will still be loaded as dynamic library in mingw-w64-qt5-base-dynamic-static.
# By default CMake and qmake will link against the dynamic Qt libraries.
@ -50,12 +52,14 @@ isStatic() {
[ "${pkgname##*-}" = 'static' ]
}
isOpenGL() {
isDefault || \ # currently use native OpenGL by default
# Currently use native OpenGL by default
isDefault || \
[[ $pkgname = 'mingw-w64-qt5-base-opengl' ]] || [[ $pkgname = 'mingw-w64-qt5-base-opengl-static' ]]
}
isANGLE() {
[[ $pkgname = 'mingw-w64-qt5-base-angle' ]] || [[ $pkgname = 'mingw-w64-qt5-base-angle-static' ]] || \
[[ $pkgname = 'mingw-w64-qt5-base-dynamic' ]] || [[ $pkgname = 'mingw-w64-qt5-base-dynamic-static' ]] # treat dynamic version like ANGLE version, correct?
[[ $pkgname = 'mingw-w64-qt5-base-dynamic' ]] || [[ $pkgname = 'mingw-w64-qt5-base-dynamic-static' ]]
# Treat dynamic version like ANGLE version, correct?
}
isDynamic() {
[[ $pkgname = 'mingw-w64-qt5-base-dynamic' ]] || [[ $pkgname = 'mingw-w64-qt5-base-dynamic-static' ]]
@ -68,12 +72,13 @@ pkgname=mingw-w64-qt5-base-angle
pkgver=5.7.0
pkgrel=5
pkgdesc="A cross-platform application and UI framework (mingw-w64)"
# the static variant doesn't contain any executables which need to be executed on the build machine
# The static variant doesn't contain any executables which need to be executed on the build machine
isStatic && arch=('any') || arch=('i686' 'x86_64')
url='https://www.qt.io/'
license=('GPL3' 'LGPL3' 'FDL' 'custom')
depends=('mingw-w64-crt' 'mingw-w64-zlib' 'mingw-w64-libjpeg-turbo' 'mingw-w64-sqlite'
'mingw-w64-libpng' 'mingw-w64-openssl' 'mingw-w64-dbus' 'mingw-w64-harfbuzz')
'mingw-w64-libpng' 'mingw-w64-openssl' 'mingw-w64-dbus' 'mingw-w64-harfbuzz'
'mingw-w64-pcre')
groups=('mingw-w64-qt' 'mingw-w64-qt5')
optdepends=('mingw-w64-postgresql-libs: PostgreSQL support' 'mingw-w64-mariadb-connector-c: MySQL support'
'qtchooser')
@ -81,7 +86,7 @@ makedepends=('mingw-w64-gcc' 'mingw-w64-postgresql-libs' 'mingw-w64-mariadb-conn
options=(!strip !buildflags staticlibs !emptydirs)
_pkgfqn="qtbase-opensource-src-${pkgver}"
source=("https://download.qt.io/official_releases/qt/${pkgver:0:3}/${pkgver}/submodules/${_pkgfqn}.tar.xz"
"qt5-add-angle-support.patch"
"qt5-add-angle-and-dynamic-support.patch"
"qt5-use-external-angle-library.patch"
"qt5-workaround-pkgconfig-install-issue.patch"
"qt5-merge-static-and-shared-library-trees.patch"
@ -105,8 +110,8 @@ source=("https://download.qt.io/official_releases/qt/${pkgver:0:3}/${pkgver}/sub
"qt5-use-correct-pkg-config-static-flags.patch"
"qt5-use-pkgconfig-for-harfbuzz.patch")
md5sums=('184f9460b40752d71b15b827260580c2'
'bab00ccc19d888997f323c80354a7c3f'
'f7e1487de6e85116d9c6bde2eac4fb73'
'55a11d8ea5db9ca0cced06b06655b417'
'1f7aea5e8bed840b3efc9172081ddb45'
'bc99c4cc6998295d76f37ed681c20d47'
'e2ffff39673b37c4d9974e92fcf7213c'
'4fe6523dd1c34398df3aa5a8763530cc'
@ -116,7 +121,7 @@ md5sums=('184f9460b40752d71b15b827260580c2'
'99bb9f51ec684803768f36e407baf486'
'6a6bc88f35ac8080869de39bc128ce5b'
'261d9071a6af3f1d5c3f955da3781573'
'f28edb1fe61c575522d3df814e680f9a'
'0524dc5427a6c5338ebd45ab08c6ce80'
'c15d9f480d0248648fa52aeacb46e3c7'
'612a4dfb9f1a3898a1920c28bb999159'
'd0eb81aef1a21c65813fe4ddabbc4206'
@ -127,9 +132,10 @@ md5sums=('184f9460b40752d71b15b827260580c2'
'1dc792faa7761d8d7d2f17170da04d6b'
'41ec67d9e5e70e0d6d93b42aebd0e12a'
'61c0f9d0095c5a6dec8d14e9ec35a608'
'bba65d27704cf36e148d8f18ad02ad15')
'16a7d505b503bb1087fc00fad819f64b')
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
#_architectures='x86_64-w64-mingw32 i686-w64-mingw32'
isStatic && depends+=(${pkgname%-static})
if isANGLE; then
@ -144,11 +150,11 @@ if ! isDefault; then
if isStatic; then
provides+=('mingw-w64-qt5-base-static')
conflicts+=('mingw-w64-qt5-base-static' 'mingw-w64-qt5-base-angle-static' 'mingw-w64-qt5-base-noopengl-static'
'mingw-w64-qt5-base-angle-dynamic-static' 'mingw-w64-qt5-base-angle-openql-static')
'mingw-w64-qt5-base-dynamic-static' 'mingw-w64-qt5-base-openql-static')
else
provides+=('mingw-w64-qt5-base')
conflicts+=('mingw-w64-qt5-base' 'mingw-w64-qt5-base-angle' 'mingw-w64-qt5-base-noopengl'
'mingw-w64-qt5-base-angle-dynamic' 'mingw-w64-qt5-base-angle-openql')
'mingw-w64-qt5-base-dynamic' 'mingw-w64-qt5-base-openql')
fi
fi
@ -169,18 +175,21 @@ patch() {
prepare() {
cd "${srcdir}/${_pkgfqn}"
# include fixes from MXE
# Include fixes from MXE
patch -p1 -b -i ../qt5-fixes-from-mxe.patch
if isANGLE; then
# Add support for Angle
patch -p1 -i ../qt5-add-angle-support.patch
# Add support for configure options '-opengl angle' and '-opengl dynamic'
# to the configure shell script
patch -p0 -i ../qt5-add-angle-and-dynamic-support.patch
# Make sure our external Angle package is used instead of the bundled one
patch -p1 -i ../qt5-use-external-angle-library.patch
fi
# Fix opengl to many sections error
isOpenGL && patch -p0 -i ../qt5-fix-opengl-to-many-sections.patch
# Prevent too many sections / File too big assembler error
# (On x86_64 qopenglversionfunctionsfactory.o exceeds limit of 32768 sections
# otherwise.)
patch -p0 -i ../qt5-fix-opengl-to-many-sections.patch
# Make sure the .pc files of the Qt5 modules are installed correctly
patch -p0 -i ../qt5-workaround-pkgconfig-install-issue.patch
@ -230,7 +239,7 @@ prepare() {
# We have to use rpath here as the library which the
# various tools depend on (libQt5Bootstrap.so) resides
# in the folder /usr/${_arch}/lib
# We can't use the regular %%_libdir for this as we
# We can't use the regular lib dir for this as we
# want to avoid conflicts with the native qt5 packages
patch -p1 -i ../qt5-enable-rpath-for-host-tools.patch
@ -269,10 +278,11 @@ prepare() {
build() {
cd "${srcdir}/${_pkgfqn}"
# Setup flags
local mingw_flags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4'
export CFLAGS="$mingw_flags"
export CXXFLAGS="$mingw_flags"
# Do not set any flags here, flags are configured via mkspec
# Setting flags here is not appropriate as it does not allow to
# distinguish between flags for native compiler and cross compiler
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
for _arch in ${_architectures}; do
@ -282,7 +292,7 @@ build() {
# are all available in the same folder with these exact file names
# To prevent conflicts with the mingw-w64-qt4 package we have
# to put these tools in a dedicated folder
qt_configure_args="\
local qt_configure_args="\
-xplatform win32-g++ \
-optimized-qmake \
-verbose \
@ -323,27 +333,27 @@ build() {
-translationdir /usr/${_arch}/share/qt/translations \
-device-option CROSS_COMPILE=${_arch}-"
# Fix include directory of dbus
qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I dbus-1)"
# Fix include directory of freetype2
qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I freetype2)"
# Fix include directory of freetype2 and dbus
qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I freetype2 dbus-1)"
# Configure usage of ANGLE/OpenGL
if isOpenGL; then
msg2 'Using native OpenGL backend'
qt_configure_args+=' -opengl desktop'
elif isNoOpenGL; then
msg2 'Building without OpenGL support'
qt_configure_args+=' -no-opengl'
elif isANGLE; then
if isDynamic; then
msg2 'Using dynamic OpenGL backend'
qt_configure_args+=' -opengl dynamic'
else
msg2 'Using ANGLE as OpenGL backend'
qt_configure_args+=' -opengl angle'
fi
# GL_GLEXT_PROTOTYPES must be defined to enable declarations of GLES functions
qt_configure_args+=' -DGL_GLEXT_PROTOTYPES'
fi
# TODO: allow dynamic OpenGL configuration
unset PKG_CONFIG_PATH
@ -385,8 +395,8 @@ package() {
# The static release contains only the static libs itself but relies on the
# shared release for Qt5Bootstrap library and tools (qmake, uic, ...)
# Drop Qt5Bootstrap and libraries which are only provided as statically
# and are hence already present in the shared version
# Drop Qt5Bootstrap and libraries which are only provided as static lib
# and are hence already present in static form in the shared version
rm -f "${pkgdir}/usr/${_arch}/lib/"{lib,}qt5main* \
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5OpenGLExtensions* \
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5PlatformSupport* \

View File

@ -0,0 +1,75 @@
--- configure.orig 2016-06-10 08:48:56.000000000 +0200
+++ configure 2016-09-04 20:38:55.345362982 +0200
@@ -1287,6 +1287,7 @@
;;
opengl)
if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
+ [ "$VAL" = "angle" ] || [ "$VAL" = "dynamic" ] ||
[ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
[ "$VAL" = "es2" ]; then
CFG_OPENGL="$VAL"
@@ -5312,7 +5313,7 @@
fi
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if compileTest x11/opengl "OpenGL"; then
- CFG_OPENGL=desktop
+ CFG_OPENGL=angle
elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
CFG_OPENGL=es2
else
@@ -5348,6 +5349,17 @@
echo " ${XQMAKESPEC}."
exit 1
fi
+ elif [ "$CFG_OPENGL" = "angle" ]; then
+ compileTest x11/opengl "OpenGL"
+ if [ $? != "0" ]; then
+ echo "The OpenGL functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ elif [ "$CFG_OPENGL" = "dynamic" ]; then
+ true # FIXME: not sure whether/which test required
elif [ "$CFG_OPENGL" = "desktop" ]; then
# Desktop OpenGL support
compileTest x11/opengl "OpenGL"
@@ -6423,6 +6435,16 @@
QT_CONFIG="$QT_CONFIG opengles2"
fi
+if [ "$CFG_OPENGL" = "angle" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES QT_OPENGL_ES_2"
+ QT_CONFIG="$QT_CONFIG opengles2 egl angle"
+fi
+
+if [ "$CFG_OPENGL" = "dynamic" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_DYNAMIC"
+ QT_CONFIG="$QT_CONFIG dynamicgl"
+fi
+
if [ "$CFG_SHARED" = "yes" ]; then
QT_CONFIG="$QT_CONFIG shared"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG shared"
@@ -7474,7 +7496,7 @@
report_support " NIS ...................." "$CFG_NIS"
report_support " OpenGL / OpenVG:"
report_support " EGL .................." "$CFG_EGL"
-report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+"
+report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+" angle "ANGLE" dynamic "Dynamic OpenGL"
report_support " OpenVG ..............." "$CFG_OPENVG-$CFG_OPENVG_SHIVA" yes-yes "ShivaVG" yes-no "native"
report_support " PCRE ..................." "$CFG_PCRE" yes "system library" qt "bundled copy"
if [ -n "$PKG_CONFIG" ]; then
--- src/gui/opengl/qopenglfunctions.h.orig 2016-06-10 08:48:56.000000000 +0200
+++ src/gui/opengl/qopenglfunctions.h 2016-09-04 20:36:07.801522904 +0200
@@ -56,9 +56,7 @@
//#define Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
-#ifdef QT_OPENGL_ES
typedef double GLdouble;
-#endif
#ifdef Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
#include <stdio.h>

View File

@ -1,46 +0,0 @@
diff -U 3 -r a/configure b/configure
--- a/configure 2015-06-29 14:03:05.000000000 -0600
+++ b/configure 2015-07-18 11:14:30.312317765 -0600
@@ -5081,7 +5081,7 @@
fi
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if compileTest x11/opengl "OpenGL"; then
- CFG_OPENGL=desktop
+ CFG_OPENGL=angle
elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
CFG_OPENGL=es2
else
@@ -6072,6 +6072,11 @@
QT_CONFIG="$QT_CONFIG opengles2"
fi
+if [ "$CFG_OPENGL" = "angle" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES QT_OPENGL_ES_2"
+ QT_CONFIG="$QT_CONFIG opengles2 egl angle"
+fi
+
if [ "$CFG_SHARED" = "yes" ]; then
QT_CONFIG="$QT_CONFIG shared"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG shared"
@@ -7077,7 +7082,7 @@
report_support " NIS ...................." "$CFG_NIS"
report_support " OpenGL / OpenVG:"
report_support " EGL .................." "$CFG_EGL"
-report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+"
+report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+" angle "ANGLE"
report_support " OpenVG ..............." "$CFG_OPENVG-$CFG_OPENVG_SHIVA" yes-yes "ShivaVG" yes-no "native"
report_support " PCRE ..................." "$CFG_PCRE" yes "system library" qt "bundled copy"
if [ -n "$PKG_CONFIG" ]; then
diff -U 3 -r a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp 2015-06-29 14:04:40.000000000 -0600
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp 2015-07-18 11:16:05.767172673 -0600
@@ -45,7 +45,9 @@
#include <algorithm>
#include <wingdi.h>
+#ifndef QT_OPENGL_ES_2
#include <GL/gl.h>
+#endif
// #define DEBUG_GL

View File

@ -4,31 +4,31 @@ diff -U 3 -r a/src/gui/gui.pro b/src/gui/gui.pro
@@ -17,10 +17,5 @@
imageformats \
egldeviceintegrations
-# This is here only because the platform plugin is no module, obviously.
-win32:contains(QT_CONFIG, angle)|contains(QT_CONFIG, dynamicgl) {
- MODULE_AUX_INCLUDES = \
- \$\$QT_MODULE_INCLUDE_BASE/QtANGLE
-}
# Code coverage with TestCocoon
@@ -35,6 +29,10 @@
mac:!ios: LIBS_PRIVATE += -framework Cocoa
+win32:contains(QT_CONFIG, angle) {
+ LIBS_PRIVATE += -lGLESv2
+}
+
CONFIG += simd optimize_full
include(accessible/accessible.pri)
diff -U 3 -r a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
--- a/src/gui/Qt5GuiConfigExtras.cmake.in 2015-06-29 14:04:51.000000000 -0600
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in 2015-07-18 10:51:09.666053970 -0600
@@ -2,9 +2,9 @@
!!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE)
!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
-set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\")
+set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\")
@ -36,19 +36,17 @@ diff -U 3 -r a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.
-set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\")
+set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\")
!!ENDIF
_qt5_Gui_check_file_exists(${Qt5Gui_EGL_INCLUDE_DIRS})
diff -U 3 -r a/src/opengl/opengl.pro b/src/opengl/opengl.pro
--- a/src/opengl/opengl.pro 2015-06-29 14:04:05.000000000 -0600
+++ b/src/opengl/opengl.pro 2015-07-18 10:46:46.588388411 -0600
@@ -12,6 +12,9 @@
@@ -12,6 +12,7 @@
contains(QT_CONFIG, opengl):CONFIG += opengl
contains(QT_CONFIG, opengles2):CONFIG += opengles2
+win32:contains(QT_CONFIG, angle) {
+ LIBS_PRIVATE += -lGLESv2
+}
+win32:contains(QT_CONFIG, angle): LIBS_PRIVATE += -lGLESv2
HEADERS += qgl.h \
qgl_p.h \
@ -57,10 +55,10 @@ diff -U 3 -r a/src/plugins/platforms/windows/windows.pri b/src/plugins/platforms
+++ b/src/plugins/platforms/windows/windows.pri 2015-07-18 10:53:45.585348009 -0600
@@ -3,6 +3,7 @@
!wince*:LIBS *= -luser32 -lwinspool -limm32 -lwinmm -loleaut32
contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles2):!contains(QT_CONFIG, dynamicgl): LIBS *= -lopengl32
+contains(QT_CONFIG, angle):LIBS += -lGLESv2 -lEGL
mingw: LIBS *= -luuid
# For the dialog helpers:
diff -U 3 -r a/src/src.pro b/src/src.pro

View File

@ -25,7 +25,7 @@
QMAKE_LIBS =
QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lz -lpcre16
-QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng -lharfbuzz -lglib-2.0 -lintl -lwinmm
+QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng $$system($${CROSS_COMPILE}pkg-config --static --libs harfbuzz)
+QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng $$system($${CROSS_COMPILE}pkg-config --static --libs harfbuzz) $$system($${CROSS_COMPILE}pkg-config --static --libs freetype2)
QMAKE_LIBS_NETWORK = -lws2_32 -lcrypt32 -ldnsapi
QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2 = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32

View File

@ -5,7 +5,7 @@
QMAKE_YACC = byacc
QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport
+QMAKE_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -fno-keep-inline-dllexport
+QMAKE_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -fno-keep-inline-dllexport $${CROSS_COMPILE_CFLAGS}
QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -Wextra
QMAKE_CFLAGS_WARN_OFF = -w

View File

@ -8,8 +8,8 @@
# There are different variants of the package which can be selected by simply adjusting pkgname:
# - mingw-w64-qt5-base or mingw-w64-qt5-base-opengl: using native OpenGL
# - mingw-w64-qt5-base-angle: using ANGLE rather then native OpenGL
# - mingw-w64-qt5-base-dynamic: allows choosing between ANGLE and OpenGL dynamically at runtime
# - mingw-w64-qt5-base-angle: using ANGLE rather than native OpenGL
# - mingw-w64-qt5-base-dynamic: allows choosing between ANGLE and native OpenGL dynamically at runtime
# - mingw-w64-qt5-base-noopenql: no OpenGL support
# The variants are conflicting (and hence can not be installed at the same time).
# See also: http://doc.qt.io/qt-5/windows-requirements.html#dynamically-loading-graphics-drivers
@ -17,6 +17,8 @@
# The variants listed above only contain dynamic libraries. For building static libraries
# just append '-static' to the package name, eg. mingw-w64-qt5-base-static or mingw-w64-qt5-base-angle-static.
# The static variants rely on the corresponding dynamic variant for headers and tools.
# I only tested the static version using native OpenGL so far (mingw-w64-qt5-base-static).
# Note that ANGLE will still be loaded as dynamic library in mingw-w64-qt5-base-dynamic-static.
# By default CMake and qmake will link against the dynamic Qt libraries.
@ -50,12 +52,14 @@ isStatic() {
[ "${pkgname##*-}" = 'static' ]
}
isOpenGL() {
isDefault || \ # currently use native OpenGL by default
# Currently use native OpenGL by default
isDefault || \
[[ $pkgname = 'mingw-w64-qt5-base-opengl' ]] || [[ $pkgname = 'mingw-w64-qt5-base-opengl-static' ]]
}
isANGLE() {
[[ $pkgname = 'mingw-w64-qt5-base-angle' ]] || [[ $pkgname = 'mingw-w64-qt5-base-angle-static' ]] || \
[[ $pkgname = 'mingw-w64-qt5-base-dynamic' ]] || [[ $pkgname = 'mingw-w64-qt5-base-dynamic-static' ]] # treat dynamic version like ANGLE version, correct?
[[ $pkgname = 'mingw-w64-qt5-base-dynamic' ]] || [[ $pkgname = 'mingw-w64-qt5-base-dynamic-static' ]]
# Treat dynamic version like ANGLE version, correct?
}
isDynamic() {
[[ $pkgname = 'mingw-w64-qt5-base-dynamic' ]] || [[ $pkgname = 'mingw-w64-qt5-base-dynamic-static' ]]
@ -68,12 +72,13 @@ pkgname=mingw-w64-qt5-base-dynamic
pkgver=5.7.0
pkgrel=5
pkgdesc="A cross-platform application and UI framework (mingw-w64)"
# the static variant doesn't contain any executables which need to be executed on the build machine
# The static variant doesn't contain any executables which need to be executed on the build machine
isStatic && arch=('any') || arch=('i686' 'x86_64')
url='https://www.qt.io/'
license=('GPL3' 'LGPL3' 'FDL' 'custom')
depends=('mingw-w64-crt' 'mingw-w64-zlib' 'mingw-w64-libjpeg-turbo' 'mingw-w64-sqlite'
'mingw-w64-libpng' 'mingw-w64-openssl' 'mingw-w64-dbus' 'mingw-w64-harfbuzz')
'mingw-w64-libpng' 'mingw-w64-openssl' 'mingw-w64-dbus' 'mingw-w64-harfbuzz'
'mingw-w64-pcre')
groups=('mingw-w64-qt' 'mingw-w64-qt5')
optdepends=('mingw-w64-postgresql-libs: PostgreSQL support' 'mingw-w64-mariadb-connector-c: MySQL support'
'qtchooser')
@ -81,7 +86,7 @@ makedepends=('mingw-w64-gcc' 'mingw-w64-postgresql-libs' 'mingw-w64-mariadb-conn
options=(!strip !buildflags staticlibs !emptydirs)
_pkgfqn="qtbase-opensource-src-${pkgver}"
source=("https://download.qt.io/official_releases/qt/${pkgver:0:3}/${pkgver}/submodules/${_pkgfqn}.tar.xz"
"qt5-add-angle-support.patch"
"qt5-add-angle-and-dynamic-support.patch"
"qt5-use-external-angle-library.patch"
"qt5-workaround-pkgconfig-install-issue.patch"
"qt5-merge-static-and-shared-library-trees.patch"
@ -105,8 +110,8 @@ source=("https://download.qt.io/official_releases/qt/${pkgver:0:3}/${pkgver}/sub
"qt5-use-correct-pkg-config-static-flags.patch"
"qt5-use-pkgconfig-for-harfbuzz.patch")
md5sums=('184f9460b40752d71b15b827260580c2'
'bab00ccc19d888997f323c80354a7c3f'
'f7e1487de6e85116d9c6bde2eac4fb73'
'55a11d8ea5db9ca0cced06b06655b417'
'1f7aea5e8bed840b3efc9172081ddb45'
'bc99c4cc6998295d76f37ed681c20d47'
'e2ffff39673b37c4d9974e92fcf7213c'
'4fe6523dd1c34398df3aa5a8763530cc'
@ -116,7 +121,7 @@ md5sums=('184f9460b40752d71b15b827260580c2'
'99bb9f51ec684803768f36e407baf486'
'6a6bc88f35ac8080869de39bc128ce5b'
'261d9071a6af3f1d5c3f955da3781573'
'f28edb1fe61c575522d3df814e680f9a'
'0524dc5427a6c5338ebd45ab08c6ce80'
'c15d9f480d0248648fa52aeacb46e3c7'
'612a4dfb9f1a3898a1920c28bb999159'
'd0eb81aef1a21c65813fe4ddabbc4206'
@ -127,9 +132,10 @@ md5sums=('184f9460b40752d71b15b827260580c2'
'1dc792faa7761d8d7d2f17170da04d6b'
'41ec67d9e5e70e0d6d93b42aebd0e12a'
'61c0f9d0095c5a6dec8d14e9ec35a608'
'bba65d27704cf36e148d8f18ad02ad15')
'16a7d505b503bb1087fc00fad819f64b')
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
#_architectures='x86_64-w64-mingw32 i686-w64-mingw32'
isStatic && depends+=(${pkgname%-static})
if isANGLE; then
@ -144,11 +150,11 @@ if ! isDefault; then
if isStatic; then
provides+=('mingw-w64-qt5-base-static')
conflicts+=('mingw-w64-qt5-base-static' 'mingw-w64-qt5-base-angle-static' 'mingw-w64-qt5-base-noopengl-static'
'mingw-w64-qt5-base-angle-dynamic-static' 'mingw-w64-qt5-base-angle-openql-static')
'mingw-w64-qt5-base-dynamic-static' 'mingw-w64-qt5-base-openql-static')
else
provides+=('mingw-w64-qt5-base')
conflicts+=('mingw-w64-qt5-base' 'mingw-w64-qt5-base-angle' 'mingw-w64-qt5-base-noopengl'
'mingw-w64-qt5-base-angle-dynamic' 'mingw-w64-qt5-base-angle-openql')
'mingw-w64-qt5-base-dynamic' 'mingw-w64-qt5-base-openql')
fi
fi
@ -169,18 +175,21 @@ patch() {
prepare() {
cd "${srcdir}/${_pkgfqn}"
# include fixes from MXE
# Include fixes from MXE
patch -p1 -b -i ../qt5-fixes-from-mxe.patch
if isANGLE; then
# Add support for Angle
patch -p1 -i ../qt5-add-angle-support.patch
# Add support for configure options '-opengl angle' and '-opengl dynamic'
# to the configure shell script
patch -p0 -i ../qt5-add-angle-and-dynamic-support.patch
# Make sure our external Angle package is used instead of the bundled one
patch -p1 -i ../qt5-use-external-angle-library.patch
fi
# Fix opengl to many sections error
isOpenGL && patch -p0 -i ../qt5-fix-opengl-to-many-sections.patch
# Prevent too many sections / File too big assembler error
# (On x86_64 qopenglversionfunctionsfactory.o exceeds limit of 32768 sections
# otherwise.)
patch -p0 -i ../qt5-fix-opengl-to-many-sections.patch
# Make sure the .pc files of the Qt5 modules are installed correctly
patch -p0 -i ../qt5-workaround-pkgconfig-install-issue.patch
@ -230,7 +239,7 @@ prepare() {
# We have to use rpath here as the library which the
# various tools depend on (libQt5Bootstrap.so) resides
# in the folder /usr/${_arch}/lib
# We can't use the regular %%_libdir for this as we
# We can't use the regular lib dir for this as we
# want to avoid conflicts with the native qt5 packages
patch -p1 -i ../qt5-enable-rpath-for-host-tools.patch
@ -269,10 +278,11 @@ prepare() {
build() {
cd "${srcdir}/${_pkgfqn}"
# Setup flags
local mingw_flags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4'
export CFLAGS="$mingw_flags"
export CXXFLAGS="$mingw_flags"
# Do not set any flags here, flags are configured via mkspec
# Setting flags here is not appropriate as it does not allow to
# distinguish between flags for native compiler and cross compiler
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
for _arch in ${_architectures}; do
@ -282,7 +292,7 @@ build() {
# are all available in the same folder with these exact file names
# To prevent conflicts with the mingw-w64-qt4 package we have
# to put these tools in a dedicated folder
qt_configure_args="\
local qt_configure_args="\
-xplatform win32-g++ \
-optimized-qmake \
-verbose \
@ -323,27 +333,27 @@ build() {
-translationdir /usr/${_arch}/share/qt/translations \
-device-option CROSS_COMPILE=${_arch}-"
# Fix include directory of dbus
qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I dbus-1)"
# Fix include directory of freetype2
qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I freetype2)"
# Fix include directory of freetype2 and dbus
qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I freetype2 dbus-1)"
# Configure usage of ANGLE/OpenGL
if isOpenGL; then
msg2 'Using native OpenGL backend'
qt_configure_args+=' -opengl desktop'
elif isNoOpenGL; then
msg2 'Building without OpenGL support'
qt_configure_args+=' -no-opengl'
elif isANGLE; then
if isDynamic; then
msg2 'Using dynamic OpenGL backend'
qt_configure_args+=' -opengl dynamic'
else
msg2 'Using ANGLE as OpenGL backend'
qt_configure_args+=' -opengl angle'
fi
# GL_GLEXT_PROTOTYPES must be defined to enable declarations of GLES functions
qt_configure_args+=' -DGL_GLEXT_PROTOTYPES'
fi
# TODO: allow dynamic OpenGL configuration
unset PKG_CONFIG_PATH
@ -385,8 +395,8 @@ package() {
# The static release contains only the static libs itself but relies on the
# shared release for Qt5Bootstrap library and tools (qmake, uic, ...)
# Drop Qt5Bootstrap and libraries which are only provided as statically
# and are hence already present in the shared version
# Drop Qt5Bootstrap and libraries which are only provided as static lib
# and are hence already present in static form in the shared version
rm -f "${pkgdir}/usr/${_arch}/lib/"{lib,}qt5main* \
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5OpenGLExtensions* \
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5PlatformSupport* \

View File

@ -0,0 +1,75 @@
--- configure.orig 2016-06-10 08:48:56.000000000 +0200
+++ configure 2016-09-04 20:38:55.345362982 +0200
@@ -1287,6 +1287,7 @@
;;
opengl)
if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
+ [ "$VAL" = "angle" ] || [ "$VAL" = "dynamic" ] ||
[ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
[ "$VAL" = "es2" ]; then
CFG_OPENGL="$VAL"
@@ -5312,7 +5313,7 @@
fi
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if compileTest x11/opengl "OpenGL"; then
- CFG_OPENGL=desktop
+ CFG_OPENGL=angle
elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
CFG_OPENGL=es2
else
@@ -5348,6 +5349,17 @@
echo " ${XQMAKESPEC}."
exit 1
fi
+ elif [ "$CFG_OPENGL" = "angle" ]; then
+ compileTest x11/opengl "OpenGL"
+ if [ $? != "0" ]; then
+ echo "The OpenGL functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ elif [ "$CFG_OPENGL" = "dynamic" ]; then
+ true # FIXME: not sure whether/which test required
elif [ "$CFG_OPENGL" = "desktop" ]; then
# Desktop OpenGL support
compileTest x11/opengl "OpenGL"
@@ -6423,6 +6435,16 @@
QT_CONFIG="$QT_CONFIG opengles2"
fi
+if [ "$CFG_OPENGL" = "angle" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES QT_OPENGL_ES_2"
+ QT_CONFIG="$QT_CONFIG opengles2 egl angle"
+fi
+
+if [ "$CFG_OPENGL" = "dynamic" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_DYNAMIC"
+ QT_CONFIG="$QT_CONFIG dynamicgl"
+fi
+
if [ "$CFG_SHARED" = "yes" ]; then
QT_CONFIG="$QT_CONFIG shared"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG shared"
@@ -7474,7 +7496,7 @@
report_support " NIS ...................." "$CFG_NIS"
report_support " OpenGL / OpenVG:"
report_support " EGL .................." "$CFG_EGL"
-report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+"
+report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+" angle "ANGLE" dynamic "Dynamic OpenGL"
report_support " OpenVG ..............." "$CFG_OPENVG-$CFG_OPENVG_SHIVA" yes-yes "ShivaVG" yes-no "native"
report_support " PCRE ..................." "$CFG_PCRE" yes "system library" qt "bundled copy"
if [ -n "$PKG_CONFIG" ]; then
--- src/gui/opengl/qopenglfunctions.h.orig 2016-06-10 08:48:56.000000000 +0200
+++ src/gui/opengl/qopenglfunctions.h 2016-09-04 20:36:07.801522904 +0200
@@ -56,9 +56,7 @@
//#define Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
-#ifdef QT_OPENGL_ES
typedef double GLdouble;
-#endif
#ifdef Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
#include <stdio.h>

View File

@ -1,46 +0,0 @@
diff -U 3 -r a/configure b/configure
--- a/configure 2015-06-29 14:03:05.000000000 -0600
+++ b/configure 2015-07-18 11:14:30.312317765 -0600
@@ -5081,7 +5081,7 @@
fi
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if compileTest x11/opengl "OpenGL"; then
- CFG_OPENGL=desktop
+ CFG_OPENGL=angle
elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
CFG_OPENGL=es2
else
@@ -6072,6 +6072,11 @@
QT_CONFIG="$QT_CONFIG opengles2"
fi
+if [ "$CFG_OPENGL" = "angle" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES QT_OPENGL_ES_2"
+ QT_CONFIG="$QT_CONFIG opengles2 egl angle"
+fi
+
if [ "$CFG_SHARED" = "yes" ]; then
QT_CONFIG="$QT_CONFIG shared"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG shared"
@@ -7077,7 +7082,7 @@
report_support " NIS ...................." "$CFG_NIS"
report_support " OpenGL / OpenVG:"
report_support " EGL .................." "$CFG_EGL"
-report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+"
+report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+" angle "ANGLE"
report_support " OpenVG ..............." "$CFG_OPENVG-$CFG_OPENVG_SHIVA" yes-yes "ShivaVG" yes-no "native"
report_support " PCRE ..................." "$CFG_PCRE" yes "system library" qt "bundled copy"
if [ -n "$PKG_CONFIG" ]; then
diff -U 3 -r a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp 2015-06-29 14:04:40.000000000 -0600
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp 2015-07-18 11:16:05.767172673 -0600
@@ -45,7 +45,9 @@
#include <algorithm>
#include <wingdi.h>
+#ifndef QT_OPENGL_ES_2
#include <GL/gl.h>
+#endif
// #define DEBUG_GL

View File

@ -4,31 +4,31 @@ diff -U 3 -r a/src/gui/gui.pro b/src/gui/gui.pro
@@ -17,10 +17,5 @@
imageformats \
egldeviceintegrations
-# This is here only because the platform plugin is no module, obviously.
-win32:contains(QT_CONFIG, angle)|contains(QT_CONFIG, dynamicgl) {
- MODULE_AUX_INCLUDES = \
- \$\$QT_MODULE_INCLUDE_BASE/QtANGLE
-}
# Code coverage with TestCocoon
@@ -35,6 +29,10 @@
mac:!ios: LIBS_PRIVATE += -framework Cocoa
+win32:contains(QT_CONFIG, angle) {
+ LIBS_PRIVATE += -lGLESv2
+}
+
CONFIG += simd optimize_full
include(accessible/accessible.pri)
diff -U 3 -r a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
--- a/src/gui/Qt5GuiConfigExtras.cmake.in 2015-06-29 14:04:51.000000000 -0600
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in 2015-07-18 10:51:09.666053970 -0600
@@ -2,9 +2,9 @@
!!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE)
!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
-set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\")
+set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\")
@ -36,19 +36,17 @@ diff -U 3 -r a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.
-set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\")
+set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\")
!!ENDIF
_qt5_Gui_check_file_exists(${Qt5Gui_EGL_INCLUDE_DIRS})
diff -U 3 -r a/src/opengl/opengl.pro b/src/opengl/opengl.pro
--- a/src/opengl/opengl.pro 2015-06-29 14:04:05.000000000 -0600
+++ b/src/opengl/opengl.pro 2015-07-18 10:46:46.588388411 -0600
@@ -12,6 +12,9 @@
@@ -12,6 +12,7 @@
contains(QT_CONFIG, opengl):CONFIG += opengl
contains(QT_CONFIG, opengles2):CONFIG += opengles2
+win32:contains(QT_CONFIG, angle) {
+ LIBS_PRIVATE += -lGLESv2
+}
+win32:contains(QT_CONFIG, angle): LIBS_PRIVATE += -lGLESv2
HEADERS += qgl.h \
qgl_p.h \
@ -57,10 +55,10 @@ diff -U 3 -r a/src/plugins/platforms/windows/windows.pri b/src/plugins/platforms
+++ b/src/plugins/platforms/windows/windows.pri 2015-07-18 10:53:45.585348009 -0600
@@ -3,6 +3,7 @@
!wince*:LIBS *= -luser32 -lwinspool -limm32 -lwinmm -loleaut32
contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles2):!contains(QT_CONFIG, dynamicgl): LIBS *= -lopengl32
+contains(QT_CONFIG, angle):LIBS += -lGLESv2 -lEGL
mingw: LIBS *= -luuid
# For the dialog helpers:
diff -U 3 -r a/src/src.pro b/src/src.pro

View File

@ -25,7 +25,7 @@
QMAKE_LIBS =
QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lz -lpcre16
-QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng -lharfbuzz -lglib-2.0 -lintl -lwinmm
+QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng $$system($${CROSS_COMPILE}pkg-config --static --libs harfbuzz)
+QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng $$system($${CROSS_COMPILE}pkg-config --static --libs harfbuzz) $$system($${CROSS_COMPILE}pkg-config --static --libs freetype2)
QMAKE_LIBS_NETWORK = -lws2_32 -lcrypt32 -ldnsapi
QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2 = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32

View File

@ -5,7 +5,7 @@
QMAKE_YACC = byacc
QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport
+QMAKE_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -fno-keep-inline-dllexport
+QMAKE_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -fno-keep-inline-dllexport $${CROSS_COMPILE_CFLAGS}
QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -Wextra
QMAKE_CFLAGS_WARN_OFF = -w

View File

@ -8,8 +8,8 @@
# There are different variants of the package which can be selected by simply adjusting pkgname:
# - mingw-w64-qt5-base or mingw-w64-qt5-base-opengl: using native OpenGL
# - mingw-w64-qt5-base-angle: using ANGLE rather then native OpenGL
# - mingw-w64-qt5-base-dynamic: allows choosing between ANGLE and OpenGL dynamically at runtime
# - mingw-w64-qt5-base-angle: using ANGLE rather than native OpenGL
# - mingw-w64-qt5-base-dynamic: allows choosing between ANGLE and native OpenGL dynamically at runtime
# - mingw-w64-qt5-base-noopenql: no OpenGL support
# The variants are conflicting (and hence can not be installed at the same time).
# See also: http://doc.qt.io/qt-5/windows-requirements.html#dynamically-loading-graphics-drivers
@ -17,6 +17,8 @@
# The variants listed above only contain dynamic libraries. For building static libraries
# just append '-static' to the package name, eg. mingw-w64-qt5-base-static or mingw-w64-qt5-base-angle-static.
# The static variants rely on the corresponding dynamic variant for headers and tools.
# I only tested the static version using native OpenGL so far (mingw-w64-qt5-base-static).
# Note that ANGLE will still be loaded as dynamic library in mingw-w64-qt5-base-dynamic-static.
# By default CMake and qmake will link against the dynamic Qt libraries.
@ -50,12 +52,14 @@ isStatic() {
[ "${pkgname##*-}" = 'static' ]
}
isOpenGL() {
isDefault || \ # currently use native OpenGL by default
# Currently use native OpenGL by default
isDefault || \
[[ $pkgname = 'mingw-w64-qt5-base-opengl' ]] || [[ $pkgname = 'mingw-w64-qt5-base-opengl-static' ]]
}
isANGLE() {
[[ $pkgname = 'mingw-w64-qt5-base-angle' ]] || [[ $pkgname = 'mingw-w64-qt5-base-angle-static' ]] || \
[[ $pkgname = 'mingw-w64-qt5-base-dynamic' ]] || [[ $pkgname = 'mingw-w64-qt5-base-dynamic-static' ]] # treat dynamic version like ANGLE version, correct?
[[ $pkgname = 'mingw-w64-qt5-base-dynamic' ]] || [[ $pkgname = 'mingw-w64-qt5-base-dynamic-static' ]]
# Treat dynamic version like ANGLE version, correct?
}
isDynamic() {
[[ $pkgname = 'mingw-w64-qt5-base-dynamic' ]] || [[ $pkgname = 'mingw-w64-qt5-base-dynamic-static' ]]
@ -68,12 +72,13 @@ pkgname=mingw-w64-qt5-base-static
pkgver=5.7.0
pkgrel=5
pkgdesc="A cross-platform application and UI framework (mingw-w64)"
# the static variant doesn't contain any executables which need to be executed on the build machine
# The static variant doesn't contain any executables which need to be executed on the build machine
isStatic && arch=('any') || arch=('i686' 'x86_64')
url='https://www.qt.io/'
license=('GPL3' 'LGPL3' 'FDL' 'custom')
depends=('mingw-w64-crt' 'mingw-w64-zlib' 'mingw-w64-libjpeg-turbo' 'mingw-w64-sqlite'
'mingw-w64-libpng' 'mingw-w64-openssl' 'mingw-w64-dbus' 'mingw-w64-harfbuzz')
'mingw-w64-libpng' 'mingw-w64-openssl' 'mingw-w64-dbus' 'mingw-w64-harfbuzz'
'mingw-w64-pcre')
groups=('mingw-w64-qt' 'mingw-w64-qt5')
optdepends=('mingw-w64-postgresql-libs: PostgreSQL support' 'mingw-w64-mariadb-connector-c: MySQL support'
'qtchooser')
@ -81,7 +86,7 @@ makedepends=('mingw-w64-gcc' 'mingw-w64-postgresql-libs' 'mingw-w64-mariadb-conn
options=(!strip !buildflags staticlibs !emptydirs)
_pkgfqn="qtbase-opensource-src-${pkgver}"
source=("https://download.qt.io/official_releases/qt/${pkgver:0:3}/${pkgver}/submodules/${_pkgfqn}.tar.xz"
"qt5-add-angle-support.patch"
"qt5-add-angle-and-dynamic-support.patch"
"qt5-use-external-angle-library.patch"
"qt5-workaround-pkgconfig-install-issue.patch"
"qt5-merge-static-and-shared-library-trees.patch"
@ -105,8 +110,8 @@ source=("https://download.qt.io/official_releases/qt/${pkgver:0:3}/${pkgver}/sub
"qt5-use-correct-pkg-config-static-flags.patch"
"qt5-use-pkgconfig-for-harfbuzz.patch")
md5sums=('184f9460b40752d71b15b827260580c2'
'bab00ccc19d888997f323c80354a7c3f'
'f7e1487de6e85116d9c6bde2eac4fb73'
'55a11d8ea5db9ca0cced06b06655b417'
'1f7aea5e8bed840b3efc9172081ddb45'
'bc99c4cc6998295d76f37ed681c20d47'
'e2ffff39673b37c4d9974e92fcf7213c'
'4fe6523dd1c34398df3aa5a8763530cc'
@ -116,7 +121,7 @@ md5sums=('184f9460b40752d71b15b827260580c2'
'99bb9f51ec684803768f36e407baf486'
'6a6bc88f35ac8080869de39bc128ce5b'
'261d9071a6af3f1d5c3f955da3781573'
'f28edb1fe61c575522d3df814e680f9a'
'0524dc5427a6c5338ebd45ab08c6ce80'
'c15d9f480d0248648fa52aeacb46e3c7'
'612a4dfb9f1a3898a1920c28bb999159'
'd0eb81aef1a21c65813fe4ddabbc4206'
@ -127,9 +132,10 @@ md5sums=('184f9460b40752d71b15b827260580c2'
'1dc792faa7761d8d7d2f17170da04d6b'
'41ec67d9e5e70e0d6d93b42aebd0e12a'
'61c0f9d0095c5a6dec8d14e9ec35a608'
'bba65d27704cf36e148d8f18ad02ad15')
'16a7d505b503bb1087fc00fad819f64b')
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
#_architectures='x86_64-w64-mingw32 i686-w64-mingw32'
isStatic && depends+=(${pkgname%-static})
if isANGLE; then
@ -144,11 +150,11 @@ if ! isDefault; then
if isStatic; then
provides+=('mingw-w64-qt5-base-static')
conflicts+=('mingw-w64-qt5-base-static' 'mingw-w64-qt5-base-angle-static' 'mingw-w64-qt5-base-noopengl-static'
'mingw-w64-qt5-base-angle-dynamic-static' 'mingw-w64-qt5-base-angle-openql-static')
'mingw-w64-qt5-base-dynamic-static' 'mingw-w64-qt5-base-openql-static')
else
provides+=('mingw-w64-qt5-base')
conflicts+=('mingw-w64-qt5-base' 'mingw-w64-qt5-base-angle' 'mingw-w64-qt5-base-noopengl'
'mingw-w64-qt5-base-angle-dynamic' 'mingw-w64-qt5-base-angle-openql')
'mingw-w64-qt5-base-dynamic' 'mingw-w64-qt5-base-openql')
fi
fi
@ -169,18 +175,21 @@ patch() {
prepare() {
cd "${srcdir}/${_pkgfqn}"
# include fixes from MXE
# Include fixes from MXE
patch -p1 -b -i ../qt5-fixes-from-mxe.patch
if isANGLE; then
# Add support for Angle
patch -p1 -i ../qt5-add-angle-support.patch
# Add support for configure options '-opengl angle' and '-opengl dynamic'
# to the configure shell script
patch -p0 -i ../qt5-add-angle-and-dynamic-support.patch
# Make sure our external Angle package is used instead of the bundled one
patch -p1 -i ../qt5-use-external-angle-library.patch
fi
# Fix opengl to many sections error
isOpenGL && patch -p0 -i ../qt5-fix-opengl-to-many-sections.patch
# Prevent too many sections / File too big assembler error
# (On x86_64 qopenglversionfunctionsfactory.o exceeds limit of 32768 sections
# otherwise.)
patch -p0 -i ../qt5-fix-opengl-to-many-sections.patch
# Make sure the .pc files of the Qt5 modules are installed correctly
patch -p0 -i ../qt5-workaround-pkgconfig-install-issue.patch
@ -230,7 +239,7 @@ prepare() {
# We have to use rpath here as the library which the
# various tools depend on (libQt5Bootstrap.so) resides
# in the folder /usr/${_arch}/lib
# We can't use the regular %%_libdir for this as we
# We can't use the regular lib dir for this as we
# want to avoid conflicts with the native qt5 packages
patch -p1 -i ../qt5-enable-rpath-for-host-tools.patch
@ -269,10 +278,11 @@ prepare() {
build() {
cd "${srcdir}/${_pkgfqn}"
# Setup flags
local mingw_flags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4'
export CFLAGS="$mingw_flags"
export CXXFLAGS="$mingw_flags"
# Do not set any flags here, flags are configured via mkspec
# Setting flags here is not appropriate as it does not allow to
# distinguish between flags for native compiler and cross compiler
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
for _arch in ${_architectures}; do
@ -282,7 +292,7 @@ build() {
# are all available in the same folder with these exact file names
# To prevent conflicts with the mingw-w64-qt4 package we have
# to put these tools in a dedicated folder
qt_configure_args="\
local qt_configure_args="\
-xplatform win32-g++ \
-optimized-qmake \
-verbose \
@ -323,27 +333,27 @@ build() {
-translationdir /usr/${_arch}/share/qt/translations \
-device-option CROSS_COMPILE=${_arch}-"
# Fix include directory of dbus
qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I dbus-1)"
# Fix include directory of freetype2
qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I freetype2)"
# Fix include directory of freetype2 and dbus
qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I freetype2 dbus-1)"
# Configure usage of ANGLE/OpenGL
if isOpenGL; then
msg2 'Using native OpenGL backend'
qt_configure_args+=' -opengl desktop'
elif isNoOpenGL; then
msg2 'Building without OpenGL support'
qt_configure_args+=' -no-opengl'
elif isANGLE; then
if isDynamic; then
msg2 'Using dynamic OpenGL backend'
qt_configure_args+=' -opengl dynamic'
else
msg2 'Using ANGLE as OpenGL backend'
qt_configure_args+=' -opengl angle'
fi
# GL_GLEXT_PROTOTYPES must be defined to enable declarations of GLES functions
qt_configure_args+=' -DGL_GLEXT_PROTOTYPES'
fi
# TODO: allow dynamic OpenGL configuration
unset PKG_CONFIG_PATH
@ -385,8 +395,8 @@ package() {
# The static release contains only the static libs itself but relies on the
# shared release for Qt5Bootstrap library and tools (qmake, uic, ...)
# Drop Qt5Bootstrap and libraries which are only provided as statically
# and are hence already present in the shared version
# Drop Qt5Bootstrap and libraries which are only provided as static lib
# and are hence already present in static form in the shared version
rm -f "${pkgdir}/usr/${_arch}/lib/"{lib,}qt5main* \
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5OpenGLExtensions* \
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5PlatformSupport* \

View File

@ -0,0 +1,75 @@
--- configure.orig 2016-06-10 08:48:56.000000000 +0200
+++ configure 2016-09-04 20:38:55.345362982 +0200
@@ -1287,6 +1287,7 @@
;;
opengl)
if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
+ [ "$VAL" = "angle" ] || [ "$VAL" = "dynamic" ] ||
[ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
[ "$VAL" = "es2" ]; then
CFG_OPENGL="$VAL"
@@ -5312,7 +5313,7 @@
fi
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if compileTest x11/opengl "OpenGL"; then
- CFG_OPENGL=desktop
+ CFG_OPENGL=angle
elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
CFG_OPENGL=es2
else
@@ -5348,6 +5349,17 @@
echo " ${XQMAKESPEC}."
exit 1
fi
+ elif [ "$CFG_OPENGL" = "angle" ]; then
+ compileTest x11/opengl "OpenGL"
+ if [ $? != "0" ]; then
+ echo "The OpenGL functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ elif [ "$CFG_OPENGL" = "dynamic" ]; then
+ true # FIXME: not sure whether/which test required
elif [ "$CFG_OPENGL" = "desktop" ]; then
# Desktop OpenGL support
compileTest x11/opengl "OpenGL"
@@ -6423,6 +6435,16 @@
QT_CONFIG="$QT_CONFIG opengles2"
fi
+if [ "$CFG_OPENGL" = "angle" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES QT_OPENGL_ES_2"
+ QT_CONFIG="$QT_CONFIG opengles2 egl angle"
+fi
+
+if [ "$CFG_OPENGL" = "dynamic" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_DYNAMIC"
+ QT_CONFIG="$QT_CONFIG dynamicgl"
+fi
+
if [ "$CFG_SHARED" = "yes" ]; then
QT_CONFIG="$QT_CONFIG shared"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG shared"
@@ -7474,7 +7496,7 @@
report_support " NIS ...................." "$CFG_NIS"
report_support " OpenGL / OpenVG:"
report_support " EGL .................." "$CFG_EGL"
-report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+"
+report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+" angle "ANGLE" dynamic "Dynamic OpenGL"
report_support " OpenVG ..............." "$CFG_OPENVG-$CFG_OPENVG_SHIVA" yes-yes "ShivaVG" yes-no "native"
report_support " PCRE ..................." "$CFG_PCRE" yes "system library" qt "bundled copy"
if [ -n "$PKG_CONFIG" ]; then
--- src/gui/opengl/qopenglfunctions.h.orig 2016-06-10 08:48:56.000000000 +0200
+++ src/gui/opengl/qopenglfunctions.h 2016-09-04 20:36:07.801522904 +0200
@@ -56,9 +56,7 @@
//#define Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
-#ifdef QT_OPENGL_ES
typedef double GLdouble;
-#endif
#ifdef Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
#include <stdio.h>

View File

@ -1,46 +0,0 @@
diff -U 3 -r a/configure b/configure
--- a/configure 2015-06-29 14:03:05.000000000 -0600
+++ b/configure 2015-07-18 11:14:30.312317765 -0600
@@ -5081,7 +5081,7 @@
fi
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if compileTest x11/opengl "OpenGL"; then
- CFG_OPENGL=desktop
+ CFG_OPENGL=angle
elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
CFG_OPENGL=es2
else
@@ -6072,6 +6072,11 @@
QT_CONFIG="$QT_CONFIG opengles2"
fi
+if [ "$CFG_OPENGL" = "angle" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES QT_OPENGL_ES_2"
+ QT_CONFIG="$QT_CONFIG opengles2 egl angle"
+fi
+
if [ "$CFG_SHARED" = "yes" ]; then
QT_CONFIG="$QT_CONFIG shared"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG shared"
@@ -7077,7 +7082,7 @@
report_support " NIS ...................." "$CFG_NIS"
report_support " OpenGL / OpenVG:"
report_support " EGL .................." "$CFG_EGL"
-report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+"
+report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+" angle "ANGLE"
report_support " OpenVG ..............." "$CFG_OPENVG-$CFG_OPENVG_SHIVA" yes-yes "ShivaVG" yes-no "native"
report_support " PCRE ..................." "$CFG_PCRE" yes "system library" qt "bundled copy"
if [ -n "$PKG_CONFIG" ]; then
diff -U 3 -r a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp 2015-06-29 14:04:40.000000000 -0600
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp 2015-07-18 11:16:05.767172673 -0600
@@ -45,7 +45,9 @@
#include <algorithm>
#include <wingdi.h>
+#ifndef QT_OPENGL_ES_2
#include <GL/gl.h>
+#endif
// #define DEBUG_GL

View File

@ -4,31 +4,31 @@ diff -U 3 -r a/src/gui/gui.pro b/src/gui/gui.pro
@@ -17,10 +17,5 @@
imageformats \
egldeviceintegrations
-# This is here only because the platform plugin is no module, obviously.
-win32:contains(QT_CONFIG, angle)|contains(QT_CONFIG, dynamicgl) {
- MODULE_AUX_INCLUDES = \
- \$\$QT_MODULE_INCLUDE_BASE/QtANGLE
-}
# Code coverage with TestCocoon
@@ -35,6 +29,10 @@
mac:!ios: LIBS_PRIVATE += -framework Cocoa
+win32:contains(QT_CONFIG, angle) {
+ LIBS_PRIVATE += -lGLESv2
+}
+
CONFIG += simd optimize_full
include(accessible/accessible.pri)
diff -U 3 -r a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
--- a/src/gui/Qt5GuiConfigExtras.cmake.in 2015-06-29 14:04:51.000000000 -0600
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in 2015-07-18 10:51:09.666053970 -0600
@@ -2,9 +2,9 @@
!!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE)
!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
-set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\")
+set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\")
@ -36,19 +36,17 @@ diff -U 3 -r a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.
-set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\")
+set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\")
!!ENDIF
_qt5_Gui_check_file_exists(${Qt5Gui_EGL_INCLUDE_DIRS})
diff -U 3 -r a/src/opengl/opengl.pro b/src/opengl/opengl.pro
--- a/src/opengl/opengl.pro 2015-06-29 14:04:05.000000000 -0600
+++ b/src/opengl/opengl.pro 2015-07-18 10:46:46.588388411 -0600
@@ -12,6 +12,9 @@
@@ -12,6 +12,7 @@
contains(QT_CONFIG, opengl):CONFIG += opengl
contains(QT_CONFIG, opengles2):CONFIG += opengles2
+win32:contains(QT_CONFIG, angle) {
+ LIBS_PRIVATE += -lGLESv2
+}
+win32:contains(QT_CONFIG, angle): LIBS_PRIVATE += -lGLESv2
HEADERS += qgl.h \
qgl_p.h \
@ -57,10 +55,10 @@ diff -U 3 -r a/src/plugins/platforms/windows/windows.pri b/src/plugins/platforms
+++ b/src/plugins/platforms/windows/windows.pri 2015-07-18 10:53:45.585348009 -0600
@@ -3,6 +3,7 @@
!wince*:LIBS *= -luser32 -lwinspool -limm32 -lwinmm -loleaut32
contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles2):!contains(QT_CONFIG, dynamicgl): LIBS *= -lopengl32
+contains(QT_CONFIG, angle):LIBS += -lGLESv2 -lEGL
mingw: LIBS *= -luuid
# For the dialog helpers:
diff -U 3 -r a/src/src.pro b/src/src.pro

View File

@ -25,7 +25,7 @@
QMAKE_LIBS =
QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lz -lpcre16
-QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng -lharfbuzz -lglib-2.0 -lintl -lwinmm
+QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng $$system($${CROSS_COMPILE}pkg-config --static --libs harfbuzz)
+QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng $$system($${CROSS_COMPILE}pkg-config --static --libs harfbuzz) $$system($${CROSS_COMPILE}pkg-config --static --libs freetype2)
QMAKE_LIBS_NETWORK = -lws2_32 -lcrypt32 -ldnsapi
QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2 = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32

View File

@ -5,7 +5,7 @@
QMAKE_YACC = byacc
QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport
+QMAKE_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -fno-keep-inline-dllexport
+QMAKE_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -fno-keep-inline-dllexport $${CROSS_COMPILE_CFLAGS}
QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -Wextra
QMAKE_CFLAGS_WARN_OFF = -w

View File

@ -8,8 +8,8 @@
# There are different variants of the package which can be selected by simply adjusting pkgname:
# - mingw-w64-qt5-base or mingw-w64-qt5-base-opengl: using native OpenGL
# - mingw-w64-qt5-base-angle: using ANGLE rather then native OpenGL
# - mingw-w64-qt5-base-dynamic: allows choosing between ANGLE and OpenGL dynamically at runtime
# - mingw-w64-qt5-base-angle: using ANGLE rather than native OpenGL
# - mingw-w64-qt5-base-dynamic: allows choosing between ANGLE and native OpenGL dynamically at runtime
# - mingw-w64-qt5-base-noopenql: no OpenGL support
# The variants are conflicting (and hence can not be installed at the same time).
# See also: http://doc.qt.io/qt-5/windows-requirements.html#dynamically-loading-graphics-drivers
@ -17,6 +17,8 @@
# The variants listed above only contain dynamic libraries. For building static libraries
# just append '-static' to the package name, eg. mingw-w64-qt5-base-static or mingw-w64-qt5-base-angle-static.
# The static variants rely on the corresponding dynamic variant for headers and tools.
# I only tested the static version using native OpenGL so far (mingw-w64-qt5-base-static).
# Note that ANGLE will still be loaded as dynamic library in mingw-w64-qt5-base-dynamic-static.
# By default CMake and qmake will link against the dynamic Qt libraries.
@ -50,12 +52,14 @@ isStatic() {
[ "${pkgname##*-}" = 'static' ]
}
isOpenGL() {
isDefault || \ # currently use native OpenGL by default
# Currently use native OpenGL by default
isDefault || \
[[ $pkgname = 'mingw-w64-qt5-base-opengl' ]] || [[ $pkgname = 'mingw-w64-qt5-base-opengl-static' ]]
}
isANGLE() {
[[ $pkgname = 'mingw-w64-qt5-base-angle' ]] || [[ $pkgname = 'mingw-w64-qt5-base-angle-static' ]] || \
[[ $pkgname = 'mingw-w64-qt5-base-dynamic' ]] || [[ $pkgname = 'mingw-w64-qt5-base-dynamic-static' ]] # treat dynamic version like ANGLE version, correct?
[[ $pkgname = 'mingw-w64-qt5-base-dynamic' ]] || [[ $pkgname = 'mingw-w64-qt5-base-dynamic-static' ]]
# Treat dynamic version like ANGLE version, correct?
}
isDynamic() {
[[ $pkgname = 'mingw-w64-qt5-base-dynamic' ]] || [[ $pkgname = 'mingw-w64-qt5-base-dynamic-static' ]]
@ -68,12 +72,13 @@ pkgname=mingw-w64-qt5-base
pkgver=5.7.0
pkgrel=5
pkgdesc="A cross-platform application and UI framework (mingw-w64)"
# the static variant doesn't contain any executables which need to be executed on the build machine
# The static variant doesn't contain any executables which need to be executed on the build machine
isStatic && arch=('any') || arch=('i686' 'x86_64')
url='https://www.qt.io/'
license=('GPL3' 'LGPL3' 'FDL' 'custom')
depends=('mingw-w64-crt' 'mingw-w64-zlib' 'mingw-w64-libjpeg-turbo' 'mingw-w64-sqlite'
'mingw-w64-libpng' 'mingw-w64-openssl' 'mingw-w64-dbus' 'mingw-w64-harfbuzz')
'mingw-w64-libpng' 'mingw-w64-openssl' 'mingw-w64-dbus' 'mingw-w64-harfbuzz'
'mingw-w64-pcre')
groups=('mingw-w64-qt' 'mingw-w64-qt5')
optdepends=('mingw-w64-postgresql-libs: PostgreSQL support' 'mingw-w64-mariadb-connector-c: MySQL support'
'qtchooser')
@ -81,7 +86,7 @@ makedepends=('mingw-w64-gcc' 'mingw-w64-postgresql-libs' 'mingw-w64-mariadb-conn
options=(!strip !buildflags staticlibs !emptydirs)
_pkgfqn="qtbase-opensource-src-${pkgver}"
source=("https://download.qt.io/official_releases/qt/${pkgver:0:3}/${pkgver}/submodules/${_pkgfqn}.tar.xz"
"qt5-add-angle-support.patch"
"qt5-add-angle-and-dynamic-support.patch"
"qt5-use-external-angle-library.patch"
"qt5-workaround-pkgconfig-install-issue.patch"
"qt5-merge-static-and-shared-library-trees.patch"
@ -105,8 +110,8 @@ source=("https://download.qt.io/official_releases/qt/${pkgver:0:3}/${pkgver}/sub
"qt5-use-correct-pkg-config-static-flags.patch"
"qt5-use-pkgconfig-for-harfbuzz.patch")
md5sums=('184f9460b40752d71b15b827260580c2'
'bab00ccc19d888997f323c80354a7c3f'
'f7e1487de6e85116d9c6bde2eac4fb73'
'55a11d8ea5db9ca0cced06b06655b417'
'1f7aea5e8bed840b3efc9172081ddb45'
'bc99c4cc6998295d76f37ed681c20d47'
'e2ffff39673b37c4d9974e92fcf7213c'
'4fe6523dd1c34398df3aa5a8763530cc'
@ -116,7 +121,7 @@ md5sums=('184f9460b40752d71b15b827260580c2'
'99bb9f51ec684803768f36e407baf486'
'6a6bc88f35ac8080869de39bc128ce5b'
'261d9071a6af3f1d5c3f955da3781573'
'f28edb1fe61c575522d3df814e680f9a'
'0524dc5427a6c5338ebd45ab08c6ce80'
'c15d9f480d0248648fa52aeacb46e3c7'
'612a4dfb9f1a3898a1920c28bb999159'
'd0eb81aef1a21c65813fe4ddabbc4206'
@ -127,9 +132,10 @@ md5sums=('184f9460b40752d71b15b827260580c2'
'1dc792faa7761d8d7d2f17170da04d6b'
'41ec67d9e5e70e0d6d93b42aebd0e12a'
'61c0f9d0095c5a6dec8d14e9ec35a608'
'bba65d27704cf36e148d8f18ad02ad15')
'16a7d505b503bb1087fc00fad819f64b')
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
#_architectures='x86_64-w64-mingw32 i686-w64-mingw32'
isStatic && depends+=(${pkgname%-static})
if isANGLE; then
@ -144,11 +150,11 @@ if ! isDefault; then
if isStatic; then
provides+=('mingw-w64-qt5-base-static')
conflicts+=('mingw-w64-qt5-base-static' 'mingw-w64-qt5-base-angle-static' 'mingw-w64-qt5-base-noopengl-static'
'mingw-w64-qt5-base-angle-dynamic-static' 'mingw-w64-qt5-base-angle-openql-static')
'mingw-w64-qt5-base-dynamic-static' 'mingw-w64-qt5-base-openql-static')
else
provides+=('mingw-w64-qt5-base')
conflicts+=('mingw-w64-qt5-base' 'mingw-w64-qt5-base-angle' 'mingw-w64-qt5-base-noopengl'
'mingw-w64-qt5-base-angle-dynamic' 'mingw-w64-qt5-base-angle-openql')
'mingw-w64-qt5-base-dynamic' 'mingw-w64-qt5-base-openql')
fi
fi
@ -169,18 +175,21 @@ patch() {
prepare() {
cd "${srcdir}/${_pkgfqn}"
# include fixes from MXE
# Include fixes from MXE
patch -p1 -b -i ../qt5-fixes-from-mxe.patch
if isANGLE; then
# Add support for Angle
patch -p1 -i ../qt5-add-angle-support.patch
# Add support for configure options '-opengl angle' and '-opengl dynamic'
# to the configure shell script
patch -p0 -i ../qt5-add-angle-and-dynamic-support.patch
# Make sure our external Angle package is used instead of the bundled one
patch -p1 -i ../qt5-use-external-angle-library.patch
fi
# Fix opengl to many sections error
isOpenGL && patch -p0 -i ../qt5-fix-opengl-to-many-sections.patch
# Prevent too many sections / File too big assembler error
# (On x86_64 qopenglversionfunctionsfactory.o exceeds limit of 32768 sections
# otherwise.)
patch -p0 -i ../qt5-fix-opengl-to-many-sections.patch
# Make sure the .pc files of the Qt5 modules are installed correctly
patch -p0 -i ../qt5-workaround-pkgconfig-install-issue.patch
@ -230,7 +239,7 @@ prepare() {
# We have to use rpath here as the library which the
# various tools depend on (libQt5Bootstrap.so) resides
# in the folder /usr/${_arch}/lib
# We can't use the regular %%_libdir for this as we
# We can't use the regular lib dir for this as we
# want to avoid conflicts with the native qt5 packages
patch -p1 -i ../qt5-enable-rpath-for-host-tools.patch
@ -269,10 +278,11 @@ prepare() {
build() {
cd "${srcdir}/${_pkgfqn}"
# Setup flags
local mingw_flags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4'
export CFLAGS="$mingw_flags"
export CXXFLAGS="$mingw_flags"
# Do not set any flags here, flags are configured via mkspec
# Setting flags here is not appropriate as it does not allow to
# distinguish between flags for native compiler and cross compiler
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
for _arch in ${_architectures}; do
@ -282,7 +292,7 @@ build() {
# are all available in the same folder with these exact file names
# To prevent conflicts with the mingw-w64-qt4 package we have
# to put these tools in a dedicated folder
qt_configure_args="\
local qt_configure_args="\
-xplatform win32-g++ \
-optimized-qmake \
-verbose \
@ -323,27 +333,27 @@ build() {
-translationdir /usr/${_arch}/share/qt/translations \
-device-option CROSS_COMPILE=${_arch}-"
# Fix include directory of dbus
qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I dbus-1)"
# Fix include directory of freetype2
qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I freetype2)"
# Fix include directory of freetype2 and dbus
qt_configure_args+=" $(${_arch}-pkg-config --cflags-only-I freetype2 dbus-1)"
# Configure usage of ANGLE/OpenGL
if isOpenGL; then
msg2 'Using native OpenGL backend'
qt_configure_args+=' -opengl desktop'
elif isNoOpenGL; then
msg2 'Building without OpenGL support'
qt_configure_args+=' -no-opengl'
elif isANGLE; then
if isDynamic; then
msg2 'Using dynamic OpenGL backend'
qt_configure_args+=' -opengl dynamic'
else
msg2 'Using ANGLE as OpenGL backend'
qt_configure_args+=' -opengl angle'
fi
# GL_GLEXT_PROTOTYPES must be defined to enable declarations of GLES functions
qt_configure_args+=' -DGL_GLEXT_PROTOTYPES'
fi
# TODO: allow dynamic OpenGL configuration
unset PKG_CONFIG_PATH
@ -385,8 +395,8 @@ package() {
# The static release contains only the static libs itself but relies on the
# shared release for Qt5Bootstrap library and tools (qmake, uic, ...)
# Drop Qt5Bootstrap and libraries which are only provided as statically
# and are hence already present in the shared version
# Drop Qt5Bootstrap and libraries which are only provided as static lib
# and are hence already present in static form in the shared version
rm -f "${pkgdir}/usr/${_arch}/lib/"{lib,}qt5main* \
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5OpenGLExtensions* \
"${pkgdir}/usr/${_arch}/lib/"{lib,}Qt5PlatformSupport* \

View File

@ -0,0 +1,75 @@
--- configure.orig 2016-06-10 08:48:56.000000000 +0200
+++ configure 2016-09-04 20:38:55.345362982 +0200
@@ -1287,6 +1287,7 @@
;;
opengl)
if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
+ [ "$VAL" = "angle" ] || [ "$VAL" = "dynamic" ] ||
[ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
[ "$VAL" = "es2" ]; then
CFG_OPENGL="$VAL"
@@ -5312,7 +5313,7 @@
fi
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if compileTest x11/opengl "OpenGL"; then
- CFG_OPENGL=desktop
+ CFG_OPENGL=angle
elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
CFG_OPENGL=es2
else
@@ -5348,6 +5349,17 @@
echo " ${XQMAKESPEC}."
exit 1
fi
+ elif [ "$CFG_OPENGL" = "angle" ]; then
+ compileTest x11/opengl "OpenGL"
+ if [ $? != "0" ]; then
+ echo "The OpenGL functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ elif [ "$CFG_OPENGL" = "dynamic" ]; then
+ true # FIXME: not sure whether/which test required
elif [ "$CFG_OPENGL" = "desktop" ]; then
# Desktop OpenGL support
compileTest x11/opengl "OpenGL"
@@ -6423,6 +6435,16 @@
QT_CONFIG="$QT_CONFIG opengles2"
fi
+if [ "$CFG_OPENGL" = "angle" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES QT_OPENGL_ES_2"
+ QT_CONFIG="$QT_CONFIG opengles2 egl angle"
+fi
+
+if [ "$CFG_OPENGL" = "dynamic" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_DYNAMIC"
+ QT_CONFIG="$QT_CONFIG dynamicgl"
+fi
+
if [ "$CFG_SHARED" = "yes" ]; then
QT_CONFIG="$QT_CONFIG shared"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG shared"
@@ -7474,7 +7496,7 @@
report_support " NIS ...................." "$CFG_NIS"
report_support " OpenGL / OpenVG:"
report_support " EGL .................." "$CFG_EGL"
-report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+"
+report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+" angle "ANGLE" dynamic "Dynamic OpenGL"
report_support " OpenVG ..............." "$CFG_OPENVG-$CFG_OPENVG_SHIVA" yes-yes "ShivaVG" yes-no "native"
report_support " PCRE ..................." "$CFG_PCRE" yes "system library" qt "bundled copy"
if [ -n "$PKG_CONFIG" ]; then
--- src/gui/opengl/qopenglfunctions.h.orig 2016-06-10 08:48:56.000000000 +0200
+++ src/gui/opengl/qopenglfunctions.h 2016-09-04 20:36:07.801522904 +0200
@@ -56,9 +56,7 @@
//#define Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
-#ifdef QT_OPENGL_ES
typedef double GLdouble;
-#endif
#ifdef Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
#include <stdio.h>

View File

@ -1,46 +0,0 @@
diff -U 3 -r a/configure b/configure
--- a/configure 2015-06-29 14:03:05.000000000 -0600
+++ b/configure 2015-07-18 11:14:30.312317765 -0600
@@ -5081,7 +5081,7 @@
fi
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if compileTest x11/opengl "OpenGL"; then
- CFG_OPENGL=desktop
+ CFG_OPENGL=angle
elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
CFG_OPENGL=es2
else
@@ -6072,6 +6072,11 @@
QT_CONFIG="$QT_CONFIG opengles2"
fi
+if [ "$CFG_OPENGL" = "angle" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES QT_OPENGL_ES_2"
+ QT_CONFIG="$QT_CONFIG opengles2 egl angle"
+fi
+
if [ "$CFG_SHARED" = "yes" ]; then
QT_CONFIG="$QT_CONFIG shared"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG shared"
@@ -7077,7 +7082,7 @@
report_support " NIS ...................." "$CFG_NIS"
report_support " OpenGL / OpenVG:"
report_support " EGL .................." "$CFG_EGL"
-report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+"
+report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+" angle "ANGLE"
report_support " OpenVG ..............." "$CFG_OPENVG-$CFG_OPENVG_SHIVA" yes-yes "ShivaVG" yes-no "native"
report_support " PCRE ..................." "$CFG_PCRE" yes "system library" qt "bundled copy"
if [ -n "$PKG_CONFIG" ]; then
diff -U 3 -r a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp 2015-06-29 14:04:40.000000000 -0600
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp 2015-07-18 11:16:05.767172673 -0600
@@ -45,7 +45,9 @@
#include <algorithm>
#include <wingdi.h>
+#ifndef QT_OPENGL_ES_2
#include <GL/gl.h>
+#endif
// #define DEBUG_GL

View File

@ -4,31 +4,31 @@ diff -U 3 -r a/src/gui/gui.pro b/src/gui/gui.pro
@@ -17,10 +17,5 @@
imageformats \
egldeviceintegrations
-# This is here only because the platform plugin is no module, obviously.
-win32:contains(QT_CONFIG, angle)|contains(QT_CONFIG, dynamicgl) {
- MODULE_AUX_INCLUDES = \
- \$\$QT_MODULE_INCLUDE_BASE/QtANGLE
-}
# Code coverage with TestCocoon
@@ -35,6 +29,10 @@
mac:!ios: LIBS_PRIVATE += -framework Cocoa
+win32:contains(QT_CONFIG, angle) {
+ LIBS_PRIVATE += -lGLESv2
+}
+
CONFIG += simd optimize_full
include(accessible/accessible.pri)
diff -U 3 -r a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
--- a/src/gui/Qt5GuiConfigExtras.cmake.in 2015-06-29 14:04:51.000000000 -0600
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in 2015-07-18 10:51:09.666053970 -0600
@@ -2,9 +2,9 @@
!!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE)
!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
-set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\")
+set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\")
@ -36,19 +36,17 @@ diff -U 3 -r a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.
-set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\")
+set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\")
!!ENDIF
_qt5_Gui_check_file_exists(${Qt5Gui_EGL_INCLUDE_DIRS})
diff -U 3 -r a/src/opengl/opengl.pro b/src/opengl/opengl.pro
--- a/src/opengl/opengl.pro 2015-06-29 14:04:05.000000000 -0600
+++ b/src/opengl/opengl.pro 2015-07-18 10:46:46.588388411 -0600
@@ -12,6 +12,9 @@
@@ -12,6 +12,7 @@
contains(QT_CONFIG, opengl):CONFIG += opengl
contains(QT_CONFIG, opengles2):CONFIG += opengles2
+win32:contains(QT_CONFIG, angle) {
+ LIBS_PRIVATE += -lGLESv2
+}
+win32:contains(QT_CONFIG, angle): LIBS_PRIVATE += -lGLESv2
HEADERS += qgl.h \
qgl_p.h \
@ -57,10 +55,10 @@ diff -U 3 -r a/src/plugins/platforms/windows/windows.pri b/src/plugins/platforms
+++ b/src/plugins/platforms/windows/windows.pri 2015-07-18 10:53:45.585348009 -0600
@@ -3,6 +3,7 @@
!wince*:LIBS *= -luser32 -lwinspool -limm32 -lwinmm -loleaut32
contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles2):!contains(QT_CONFIG, dynamicgl): LIBS *= -lopengl32
+contains(QT_CONFIG, angle):LIBS += -lGLESv2 -lEGL
mingw: LIBS *= -luuid
# For the dialog helpers:
diff -U 3 -r a/src/src.pro b/src/src.pro

View File

@ -25,7 +25,7 @@
QMAKE_LIBS =
QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lz -lpcre16
-QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng -lharfbuzz -lglib-2.0 -lintl -lwinmm
+QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng $$system($${CROSS_COMPILE}pkg-config --static --libs harfbuzz)
+QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng $$system($${CROSS_COMPILE}pkg-config --static --libs harfbuzz) $$system($${CROSS_COMPILE}pkg-config --static --libs freetype2)
QMAKE_LIBS_NETWORK = -lws2_32 -lcrypt32 -ldnsapi
QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2 = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -ld3d9 -ldxguid -lgdi32 -luser32

View File

@ -5,7 +5,7 @@
QMAKE_YACC = byacc
QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport
+QMAKE_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -fno-keep-inline-dllexport
+QMAKE_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -fno-keep-inline-dllexport $${CROSS_COMPILE_CFLAGS}
QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -Wextra
QMAKE_CFLAGS_WARN_OFF = -w