# HG changeset patch # User John Donoghue # Date 1681846941 14400 # Node ID 473a2c005dd520e6ef73356e7730791c83adbe9b # Parent 52492aff7131b3bb5c75760c9467207f12ed5721 Load opengl from octave installed files if present (Bug #64024) * src/qtbase-2-fixes.patch: new file * dist-files.mk: add ref to patch file diff -r 52492aff7131 -r 473a2c005dd5 dist-files.mk --- a/dist-files.mk Mon Apr 17 09:15:05 2023 -0400 +++ b/dist-files.mk Tue Apr 18 15:42:21 2023 -0400 @@ -645,6 +645,7 @@ qt.mk \ qt5.mk \ qtbase-1-fixes.patch \ + qtbase-2-fixes.patch \ qtbase.mk \ qtimageformats.mk \ qtsvg.mk \ diff -r 52492aff7131 -r 473a2c005dd5 src/qtbase-2-fixes.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/qtbase-2-fixes.patch Tue Apr 18 15:42:21 2023 -0400 @@ -0,0 +1,35 @@ +diff -ur qtbase-everywhere-src-5.15.9.new/src/plugins/platforms/windows/qwindowsglcontext.cpp qtbase-everywhere-src-5.15.9/src/plugins/platforms/windows/qwindowsglcontext.cpp +--- qtbase-everywhere-src-5.15.9.new/src/plugins/platforms/windows/qwindowsglcontext.cpp 2023-04-18 08:53:03.907016122 -0400 ++++ qtbase-everywhere-src-5.15.9/src/plugins/platforms/windows/qwindowsglcontext.cpp 2023-04-18 12:05:50.420715889 -0400 +@@ -179,7 +179,7 @@ + qCDebug(lcQpaGl) << "Qt: Using WGL and OpenGL from" << openglDll; + + if (useSystemLib) +- m_lib = QSystemLibrary::load((wchar_t*)(QString::fromLatin1(openglDll).utf16())); ++ m_lib = QSystemLibrary::load((wchar_t*)(QString::fromLatin1(openglDll).utf16()), false); + else + m_lib = LoadLibraryA(openglDll.constData()); + if (!m_lib) { +@@ -191,7 +191,7 @@ + // Load opengl32.dll always. GDI functions like ChoosePixelFormat do + // GetModuleHandle for opengl32.dll and behave differently (and call back into + // opengl32) when the module is present. This is fine for dummy contexts and windows. +- QSystemLibrary::load(L"opengl32"); ++ QSystemLibrary::load(L"opengl32", false); + } + + wglCreateContext = reinterpret_cast(resolve("wglCreateContext")); +Only in qtbase-everywhere-src-5.15.9/src/plugins/platforms/windows: .qwindowsglcontext.cpp.swp +diff -ur qtbase-everywhere-src-5.15.9.new/src/plugins/platforms/windows/qwindowsopengltester.cpp qtbase-everywhere-src-5.15.9/src/plugins/platforms/windows/qwindowsopengltester.cpp +--- qtbase-everywhere-src-5.15.9.new/src/plugins/platforms/windows/qwindowsopengltester.cpp 2023-04-18 08:53:03.908016176 -0400 ++++ qtbase-everywhere-src-5.15.9/src/plugins/platforms/windows/qwindowsopengltester.cpp 2023-04-18 12:02:48.957638686 -0400 +@@ -397,7 +397,7 @@ + + // Test #1: Load opengl32.dll and try to resolve an OpenGL 2 function. + // This will typically fail on systems that do not have a real OpenGL driver. +- lib = QSystemLibrary::load(L"opengl32"); ++ lib = QSystemLibrary::load(L"opengl32", false); + if (lib) { + CreateContext = reinterpret_cast( + reinterpret_cast(::GetProcAddress(lib, "wglCreateContext"))); +Binary files qtbase-everywhere-src-5.15.9.new/src/plugins/platforms/windows/.qwindowsopengltester.cpp.swp and qtbase-everywhere-src-5.15.9/src/plugins/platforms/windows/.qwindowsopengltester.cpp.swp differ