media-libs/vulkan-layers: Backport patch to fix build on 1.1.77.0
authorNick Sarnie <sarnex@gentoo.org>
Sat, 7 Jul 2018 17:50:47 +0000 (13:50 -0400)
committerNick Sarnie <sarnex@gentoo.org>
Sat, 7 Jul 2018 17:52:13 +0000 (13:52 -0400)
Same issue as media-libs/vulkan-loader-1.1.77.0

Bug: https://bugs.gentoo.org/658900
Package-Manager: Portage-2.3.41, Repoman-2.3.9

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

diff --git a/media-libs/vulkan-layers/files/vulkan-layers-1.1.77.0-layers-Rework-include-dependencies.patch b/media-libs/vulkan-layers/files/vulkan-layers-1.1.77.0-layers-Rework-include-dependencies.patch
new file mode 100644 (file)
index 0000000..d0b48a7
--- /dev/null
@@ -0,0 +1,68 @@
+From 4c0da77c705464a259b38944fb53cf747e4c0554 Mon Sep 17 00:00:00 2001
+From: Lenny Komow <lenny@lunarg.com>
+Date: Tue, 3 Jul 2018 10:17:21 -0600
+Subject: [PATCH] layers: 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.
+
+Backported-by: Nick Sarnie <Sarnex@gentoo.org>
+
+Change-Id: I082ccc52c3cb8257bf57342404d52dd737009b4b
+---
+ layers/parameter_validation_utils.cpp      | 1 +
+ layers/vk_layer_logging.h                  | 1 +
+ layers/vk_layer_table.h                    | 1 +
+ scripts/dispatch_table_helper_generator.py | 1 +
+ 4 files changed, 4 insertions(+)
+
+diff --git a/layers/parameter_validation_utils.cpp b/layers/parameter_validation_utils.cpp
+index 17f95bb8..c65a4970 100644
+--- a/layers/parameter_validation_utils.cpp
++++ b/layers/parameter_validation_utils.cpp
+@@ -46,6 +46,7 @@
+ #include "vk_layer_logging.h"
+ #include "vk_layer_extension_utils.h"
+ #include "vk_layer_utils.h"
++#include "vk_layer_dispatch_table.h"
+ #include "parameter_name.h"
+ #include "parameter_validation.h"
+diff --git a/layers/vk_layer_logging.h b/layers/vk_layer_logging.h
+index f111cc5d..f67a3f55 100644
+--- a/layers/vk_layer_logging.h
++++ b/layers/vk_layer_logging.h
+@@ -31,6 +31,7 @@
+ #include "vulkan/vk_layer.h"
+ #include "vk_object_types.h"
+ #include "vk_validation_error_messages.h"
++#include "vk_layer_dispatch_table.h"
+ #include <signal.h>
+ #include <cinttypes>
+ #include <stdarg.h>
+diff --git a/layers/vk_layer_table.h b/layers/vk_layer_table.h
+index 45b8f6e1..23990a12 100644
+--- a/layers/vk_layer_table.h
++++ b/layers/vk_layer_table.h
+@@ -19,6 +19,7 @@
+ #pragma once
++#include "vk_layer_dispatch_table.h"
+ #include "vulkan/vk_layer.h"
+ #include "vulkan/vulkan.h"
+ #include <unordered_map>
+diff --git a/scripts/dispatch_table_helper_generator.py b/scripts/dispatch_table_helper_generator.py
+index fba25e55..1e2412c0 100644
+--- a/scripts/dispatch_table_helper_generator.py
++++ b/scripts/dispatch_table_helper_generator.py
+@@ -113,6 +113,7 @@ class DispatchTableHelperOutputGenerator(OutputGenerator):
+         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 436c46fc525966172f75350f536f8b5d57031cbf..cbe189ea63cec0794667b33f14470e6094b48fdd 100644 (file)
@@ -29,7 +29,7 @@ RDEPEND="!<=media-libs/vulkan-loader-1.1.70.0-r999"
 DEPEND="${PYTHON_DEPS}
                dev-util/glslang:=[${MULTILIB_USEDEP}]
                >=dev-util/spirv-tools-2018.2-r1:=[${MULTILIB_USEDEP}]
-               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}]
@@ -38,6 +38,7 @@ DEPEND="${PYTHON_DEPS}
 
 PATCHES=(
        "${FILESDIR}/${PN}-Use-a-file-to-get-the-spirv-tools-commit-ID.patch"
+       "${FILESDIR}/${PN}-1.1.77.0-layers-Rework-include-dependencies.patch"
         )
 
 multilib_src_configure() {
index 436c46fc525966172f75350f536f8b5d57031cbf..b2e238baddb1928c9b2f4ef06f4fedd66fbead09 100644 (file)
@@ -29,7 +29,7 @@ RDEPEND="!<=media-libs/vulkan-loader-1.1.70.0-r999"
 DEPEND="${PYTHON_DEPS}
                dev-util/glslang:=[${MULTILIB_USEDEP}]
                >=dev-util/spirv-tools-2018.2-r1:=[${MULTILIB_USEDEP}]
-               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}]