media-libs/vulkan-loader: Backport upstream patch
authorNick Sarnie <sarnex@gentoo.org>
Sat, 7 Jul 2018 17:24:25 +0000 (13:24 -0400)
committerNick Sarnie <sarnex@gentoo.org>
Sat, 7 Jul 2018 17:51:58 +0000 (13:51 -0400)
Also update dep in 9999

Fixes: https://bugs.gentoo.org/658900

Package-Manager: Portage-2.3.41, Repoman-2.3.9

media-libs/vulkan-loader/files/vulkan-loader-1.1.77.0-loader-Rework-include-dependencies.patch [new file with mode: 0644]
media-libs/vulkan-loader/vulkan-loader-1.1.77.0.ebuild
media-libs/vulkan-loader/vulkan-loader-9999.ebuild

diff --git a/media-libs/vulkan-loader/files/vulkan-loader-1.1.77.0-loader-Rework-include-dependencies.patch b/media-libs/vulkan-loader/files/vulkan-loader-1.1.77.0-loader-Rework-include-dependencies.patch
new file mode 100644 (file)
index 0000000..21fe853
--- /dev/null
@@ -0,0 +1,54 @@
+From 700483f5d92de01c1c8f413f8a4172d96684e93e Mon Sep 17 00:00:00 2001
+From: Lenny Komow <lenny@lunarg.com>
+Date: Mon, 25 Jun 2018 14:09:51 -0600
+Subject: [PATCH] loader: Rework include dependencies
+
+This change removes the assumption that vk_layer.h will include
+vk_layer_dispatch_table.h, since it will be removed from vk_layer.h
+in the near future.
+
+Change-Id: I3fed5efbc35781c96aa9d0977d046c8555e04a7c
+---
+ CMakeLists.txt                             | 2 --
+ loader/loader.h                            | 1 +
+ scripts/dispatch_table_helper_generator.py | 1 +
+ 3 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b942bd47c..64f498945 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -201,8 +201,6 @@ if(NOT WIN32)
+     endif()
+ endif()
+-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/vk_layer_dispatch_table.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/vulkan")
+-
+ # uninstall target
+ if(NOT TARGET uninstall)
+     configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+diff --git a/loader/loader.h b/loader/loader.h
+index 0af2abf27..c39c5385e 100644
+--- a/loader/loader.h
++++ b/loader/loader.h
+@@ -34,6 +34,7 @@
+ #include <vulkan/vk_layer.h>
+ #include <vulkan/vk_icd.h>
+ #include <assert.h>
++#include "vk_layer_dispatch_table.h"
+ #include "vk_loader_extensions.h"
+ #if defined(__GNUC__) && __GNUC__ >= 4
+diff --git a/scripts/dispatch_table_helper_generator.py b/scripts/dispatch_table_helper_generator.py
+index fba25e55e..1e2412c0c 100644
+--- a/scripts/dispatch_table_helper_generator.py
++++ b/scripts/dispatch_table_helper_generator.py
+@@ -113,6 +113,7 @@ def beginFile(self, genOpts):
+         preamble += '#include <vulkan/vulkan.h>\n'
+         preamble += '#include <vulkan/vk_layer.h>\n'
+         preamble += '#include <string.h>\n'
++        preamble += '#include "vk_layer_dispatch_table.h"\n'
+         write(copyright, file=self.outFile)
+         write(preamble, file=self.outFile)
+
index 4f7ccd73988bb41153b43f794012a546e5cde632..28a5a5566365c7e5773056bd34ec372f7bf2e2a4 100644 (file)
@@ -26,13 +26,15 @@ IUSE="layers wayland X"
 
 PDEPEND="layers? ( media-libs/vulkan-layers:=[${MULTILIB_USEDEP}] )"
 DEPEND="${PYTHON_DEPS}
-       dev-util/vulkan-headers
+       >=dev-util/vulkan-headers-1.1.77.0-r1
        wayland? ( dev-libs/wayland:=[${MULTILIB_USEDEP}] )
        X? (
                x11-libs/libX11:=[${MULTILIB_USEDEP}]
                x11-libs/libXrandr:=[${MULTILIB_USEDEP}]
        )"
 
+PATCHES=( "${FILESDIR}"/vulkan-loader-1.1.77.0-loader-Rework-include-dependencies.patch )
+
 multilib_src_configure() {
        local mycmakeargs=(
                -DCMAKE_SKIP_RPATH=True
index 4f7ccd73988bb41153b43f794012a546e5cde632..0331bbbe2b69003ce5fb014cdd091d8ff0c24ad4 100644 (file)
@@ -26,7 +26,7 @@ IUSE="layers wayland X"
 
 PDEPEND="layers? ( media-libs/vulkan-layers:=[${MULTILIB_USEDEP}] )"
 DEPEND="${PYTHON_DEPS}
-       dev-util/vulkan-headers
+       >=dev-util/vulkan-headers-1.1.77.0-r1
        wayland? ( dev-libs/wayland:=[${MULTILIB_USEDEP}] )
        X? (
                x11-libs/libX11:=[${MULTILIB_USEDEP}]