summaryrefslogtreecommitdiff
path: root/graphics/vulkan-loader/files/patch-pkg-config
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/vulkan-loader/files/patch-pkg-config')
-rw-r--r--graphics/vulkan-loader/files/patch-pkg-config32
1 files changed, 32 insertions, 0 deletions
diff --git a/graphics/vulkan-loader/files/patch-pkg-config b/graphics/vulkan-loader/files/patch-pkg-config
new file mode 100644
index 000000000000..0821d30aa523
--- /dev/null
+++ b/graphics/vulkan-loader/files/patch-pkg-config
@@ -0,0 +1,32 @@
+https://github.com/KhronosGroup/Vulkan-Loader/issues/1318
+https://github.com/KhronosGroup/Vulkan-Loader/issues/1319
+
+--- loader/CMakeLists.txt.orig 2023-10-06 16:33:44 UTC
++++ loader/CMakeLists.txt
+@@ -446,13 +446,6 @@ if (PKG_CONFIG_FOUND)
+ endif()
+ endif()
+
+- # BUG: The following code will NOT work well with `cmake --install ... --prefix <dir>`
+- # due to this code relying on CMAKE_INSTALL_PREFIX being defined at configure time.
+- if ("${CMAKE_INSTALL_PREFIX}" STREQUAL "")
+- set(CMAKE_INSTALL_LIBDIR_PC ${CMAKE_INSTALL_FULL_LIBDIR})
+- else()
+- file(RELATIVE_PATH CMAKE_INSTALL_LIBDIR_PC ${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_FULL_LIBDIR})
+- endif()
+ configure_file("vulkan.pc.in" "vulkan.pc" @ONLY)
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/vulkan.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+ endif()
+--- loader/vulkan.pc.in.orig 2023-10-06 16:33:44 UTC
++++ loader/vulkan.pc.in
+@@ -1,4 +1,9 @@
++prefix=@CMAKE_INSTALL_PREFIX@
++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
++
+ Name: Vulkan-Loader
+ Description: Vulkan Loader
+ Version: @VULKAN_LOADER_VERSION@
+-Libs: -L@CMAKE_INSTALL_LIBDIR_PC@ -lvulkan@VULKAN_LIB_SUFFIX@
++Libs: -L${libdir} -lvulkan@VULKAN_LIB_SUFFIX@
++Cflags: -I${includedir}