Warning, /graphics/krita/3rdparty/ext_qt/disable-builtin-ANGLE.patch is written in an unsupported language. File is not indexed.

0001 From 0e0020e1250c1e7ef0704c240778d57317d2fdd9 Mon Sep 17 00:00:00 2001
0002 From: Alvin Wong <alvinhochun@gmail.com>
0003 Date: Mon, 28 Mar 2022 23:45:10 +0800
0004 Subject: [PATCH] Disable Qt's copy of ANGLE and use external build
0005 
0006 ---
0007  src/gui/Qt5GuiConfigExtras.cmake.in                  | 12 ++++++------
0008  src/gui/configure.json                               |  4 ++--
0009  src/gui/gui.pro                                      |  8 ++++----
0010  src/plugins/platforms/windows/qwindowseglcontext.cpp |  2 +-
0011  src/plugins/platforms/winrt/qwinrteglcontext.cpp     |  2 +-
0012  src/src.pro                                          | 12 ++++++------
0013  6 files changed, 20 insertions(+), 20 deletions(-)
0014 
0015 diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
0016 index 84dbbfebd4..6cb7d554a9 100644
0017 --- a/src/gui/Qt5GuiConfigExtras.cmake.in
0018 +++ b/src/gui/Qt5GuiConfigExtras.cmake.in
0019 @@ -2,16 +2,16 @@
0020  !!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE)
0021  
0022  !!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
0023 -set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\")
0024 +#set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\")
0025  !!ELSE
0026 -set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\")
0027 +#set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\")
0028  !!ENDIF
0029  
0030 -_qt5_Gui_check_file_exists(${Qt5Gui_EGL_INCLUDE_DIRS})
0031 +#_qt5_Gui_check_file_exists(${Qt5Gui_EGL_INCLUDE_DIRS})
0032  
0033 -list(APPEND Qt5Gui_INCLUDE_DIRS ${Qt5Gui_EGL_INCLUDE_DIRS})
0034 -set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Qt5Gui_EGL_INCLUDE_DIRS})
0035 -set(Qt5Gui_OPENGL_INCLUDE_DIRS ${Qt5Gui_EGL_INCLUDE_DIRS})
0036 +#list(APPEND Qt5Gui_INCLUDE_DIRS ${Qt5Gui_EGL_INCLUDE_DIRS})
0037 +#set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Qt5Gui_EGL_INCLUDE_DIRS})
0038 +#set(Qt5Gui_OPENGL_INCLUDE_DIRS ${Qt5Gui_EGL_INCLUDE_DIRS})
0039  
0040  macro(_populate_qt5gui_gl_target_properties TargetName Configuration LIB_LOCATION IMPLIB_LOCATION)
0041      set_property(TARGET Qt5::${TargetName} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
0042 diff --git a/src/gui/configure.json b/src/gui/configure.json
0043 index 6dd6f5b16c..7a54639704 100644
0044 --- a/src/gui/configure.json
0045 +++ b/src/gui/configure.json
0046 @@ -1123,7 +1123,7 @@
0047          "combined-angle-lib": {
0048              "label": "Combined ANGLE Library",
0049              "autoDetect": false,
0050 -            "condition": "features.angle",
0051 +            "condition": "features.angle && !features.angle",
0052              "output": [ "publicFeature" ]
0053          },
0054          "directfb": {
0055 @@ -1895,7 +1895,7 @@ QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your pla
0056                          {
0057                              "type": "feature",
0058                              "args": "combined-angle-lib",
0059 -                            "condition": "features.angle"
0060 +                            "condition": "features.angle && !features.angle"
0061                          },
0062                          "opengl-desktop",
0063                          {
0064 diff --git a/src/gui/gui.pro b/src/gui/gui.pro
0065 index 06c9cd3939..1b622b12fa 100644
0066 --- a/src/gui/gui.pro
0067 +++ b/src/gui/gui.pro
0068 @@ -19,10 +19,10 @@ MODULE_PLUGIN_TYPES = \
0069      egldeviceintegrations
0070  
0071  # This is here only because the platform plugin is no module, obviously.
0072 -qtConfig(angle) {
0073 -    MODULE_AUX_INCLUDES = \
0074 -        \$\$QT_MODULE_INCLUDE_BASE/QtANGLE
0075 -}
0076 +#qtConfig(angle) {
0077 +#    MODULE_AUX_INCLUDES = \
0078 +#        \$\$QT_MODULE_INCLUDE_BASE/QtANGLE
0079 +#}
0080  
0081  # Code coverage with TestCocoon
0082  # The following is required as extra compilers use $$QMAKE_CXX instead of $(CXX).
0083 diff --git a/src/plugins/platforms/windows/qwindowseglcontext.cpp b/src/plugins/platforms/windows/qwindowseglcontext.cpp
0084 index c69f18006e..4d2ce9fc05 100644
0085 --- a/src/plugins/platforms/windows/qwindowseglcontext.cpp
0086 +++ b/src/plugins/platforms/windows/qwindowseglcontext.cpp
0087 @@ -224,7 +224,7 @@ bool QWindowsEGLStaticContext::initializeAngle(QWindowsOpenGLTester::Renderers p
0088              { EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, EGL_NONE },
0089              { EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE, EGL_NONE },
0090              { EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
0091 -              EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE, EGL_NONE }
0092 +              EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE, EGL_NONE }
0093          };
0094          const EGLint *attributes = nullptr;
0095          if (preferredType & QWindowsOpenGLTester::AngleRendererD3d11)
0096 diff --git a/src/plugins/platforms/winrt/qwinrteglcontext.cpp b/src/plugins/platforms/winrt/qwinrteglcontext.cpp
0097 index aa64ac1f99..ee650640c5 100644
0098 --- a/src/plugins/platforms/winrt/qwinrteglcontext.cpp
0099 +++ b/src/plugins/platforms/winrt/qwinrteglcontext.cpp
0100 @@ -105,7 +105,7 @@ void QWinRTEGLContext::initialize()
0101      HRESULT hr = D3D11CreateDevice(nullptr, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, featureLevels, 1,
0102                                     D3D11_SDK_VERSION, nullptr, nullptr, nullptr);
0103      EGLint deviceType = SUCCEEDED(hr) ? EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE
0104 -                                      : EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE;
0105 +                                      : EGL_PLATFORM_ANGLE_DEVICE_TYPE_D3D_WARP_ANGLE;
0106  
0107      eglBindAPI(EGL_OPENGL_ES_API);
0108  
0109 diff --git a/src/src.pro b/src/src.pro
0110 index 1c76a2e46f..7bd42392e0 100644
0111 --- a/src/src.pro
0112 +++ b/src/src.pro
0113 @@ -111,8 +111,8 @@ src_3rdparty_freetype.target = sub-3rdparty-freetype
0114  src_3rdparty_gradle.subdir = $$PWD/3rdparty/gradle
0115  src_3rdparty_gradle.target = sub-3rdparty-gradle
0116  
0117 -src_angle.subdir = $$PWD/angle
0118 -src_angle.target = sub-angle
0119 +#src_angle.subdir = $$PWD/angle
0120 +#src_angle.target = sub-angle
0121  
0122  src_gui.subdir = $$PWD/gui
0123  src_gui.target = sub-gui
0124 @@ -199,10 +199,10 @@ qtConfig(gui) {
0125          SUBDIRS += src_3rdparty_harfbuzzng
0126          src_gui.depends += src_3rdparty_harfbuzzng
0127      }
0128 -    qtConfig(angle) {
0129 -        SUBDIRS += src_angle
0130 -        src_gui.depends += src_angle
0131 -    }
0132 +    #qtConfig(angle) {
0133 +    #    SUBDIRS += src_angle
0134 +    #    src_gui.depends += src_angle
0135 +    #}
0136      qtConfig(png):!qtConfig(system-png) {
0137          SUBDIRS += src_3rdparty_libpng
0138          src_3rdparty_freetype.depends += src_3rdparty_libpng
0139 -- 
0140 2.24.1.windows.2
0141