diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2025-10-06 10:17:11 +0300 |
|---|---|---|
| committer | Andreas Enge <andreas@enge.fr> | 2025-12-15 10:13:25 +0100 |
| commit | 4a2281923ab608b5aa120499d8c13bd39c245d46 (patch) | |
| tree | c27724b480a863c3597f1433f5f1a56804a8a337 /gnu/packages/patches/qtbase-patch-libvulkan.patch | |
| parent | 4a1ba85b97c132b3e3572f52a9ce3517b2fe70ce (diff) | |
gnu: qtbase: Always find libvulkan.
Fixes: guix/guix#3330
* gnu/packages/qt.scm (qtbase)[source]: Add patch.
[arguments]: Adjust a phase to substitute the location for libvulkan.so.
* gnu/packages/patches/qtbase-patch-libvulkan.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
Co-authored-by: kestrelwx <kestrel.w@proton.me>
Change-Id: I39f1be5a30c5c17a4e4ea6c853b475f20ba8272c
Signed-off-by: Andreas Enge <andreas@enge.fr>
Diffstat (limited to 'gnu/packages/patches/qtbase-patch-libvulkan.patch')
| -rw-r--r-- | gnu/packages/patches/qtbase-patch-libvulkan.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gnu/packages/patches/qtbase-patch-libvulkan.patch b/gnu/packages/patches/qtbase-patch-libvulkan.patch new file mode 100644 index 00000000000..b8b3847504e --- /dev/null +++ b/gnu/packages/patches/qtbase-patch-libvulkan.patch @@ -0,0 +1,28 @@ +Add the full name for libvulkan.so.1 so that we can patch it in the 'build phase. +Not sent upstream. + +diff --git a/src/gui/vulkan/qbasicvulkanplatforminstance.cpp b/src/gui/vulkan/qbasicvulkanplatforminstance.cpp +index 47d9a7e9..80c929e5 100644 +--- a/src/gui/vulkan/qbasicvulkanplatforminstance.cpp ++++ b/src/gui/vulkan/qbasicvulkanplatforminstance.cpp +@@ -45,7 +45,7 @@ QBasicPlatformVulkanInstance::~QBasicPlatformVulkanInstance() + + void QBasicPlatformVulkanInstance::loadVulkanLibrary(const QString &defaultLibraryName, int defaultLibraryVersion) + { +- QVarLengthArray<std::pair<QString, int>, 3> loadList; ++ QVarLengthArray<std::pair<QString, int>, 4> loadList; + + // First in the list of libraries to try is the manual override, relevant on + // embedded systems without a Vulkan loader and possibly with custom vendor +@@ -63,6 +63,11 @@ void QBasicPlatformVulkanInstance::loadVulkanLibrary(const QString &defaultLibra + if (defaultLibraryVersion >= 0) + loadList.append({ defaultLibraryName, -1 }); + ++#ifdef __linux__ ++ // As a fallback we append to the list the full default name of libvulkan. ++ loadList.append({ QString::fromUtf8("libvulkan.so.1"), -1 }); ++#endif ++ + bool ok = false; + for (const auto &lib : loadList) { + m_vulkanLib.reset(new QLibrary); |
