summaryrefslogtreecommitdiff
path: root/media-libs/vulkan-layers
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/vulkan-layers')
-rw-r--r--media-libs/vulkan-layers/Manifest6
-rw-r--r--media-libs/vulkan-layers/files/vulkan-layers-1.3.204-Dont-use-static-spirv-tools.patch27
-rw-r--r--media-libs/vulkan-layers/files/vulkan-layers-1.3.204-Fix-dependency-detection.patch90
-rw-r--r--media-libs/vulkan-layers/vulkan-layers-1.3.204.ebuild61
-rw-r--r--media-libs/vulkan-layers/vulkan-layers-9999.ebuild4
5 files changed, 185 insertions, 3 deletions
diff --git a/media-libs/vulkan-layers/Manifest b/media-libs/vulkan-layers/Manifest
index 5503c28e8e06..d8996b56110c 100644
--- a/media-libs/vulkan-layers/Manifest
+++ b/media-libs/vulkan-layers/Manifest
@@ -1,4 +1,8 @@
+AUX vulkan-layers-1.3.204-Dont-use-static-spirv-tools.patch 1068 BLAKE2B 4a91aa7fbebf2707c34dc228d6ba81989c07fefb1386b8293f6d7707be7c76ad1abb96b0e9ac7cf6830ba60de97bf32fdeb94fa3432440fdeeee2e7d57bd24a0 SHA512 7ccd1380dc2796a6b671014be0af40d2591cefb4e04c8260e924ebbfafbc336b3a8f3fde4a238a6bf013b6528e5aadbcef208a8fa4ad8042803e9366b999aefc
+AUX vulkan-layers-1.3.204-Fix-dependency-detection.patch 3923 BLAKE2B 7c07fb98dd07855e38d52b5af7fa557f722b83e6afa1c22bba027f2ffd6d6fee71dd27e4782b40d5e62734e7b913e332dfbf2d01b69eaad1a563337f9ac5df19 SHA512 4d4323acac168e5d9ea2b530c69400e980278bf5ec4450dcb2ff865c9714e02646ce90918dc4aa2f9dda932e46e3ff90c1639e4507ce5bf498a512b26f6b0417
DIST vulkan-layers-1.2.198.tar.gz 3555293 BLAKE2B 1a419b1b4b50241f6f4225a8666b8f6f4fc00e30dba045deeca709f4b9ff777f8a66691ef094b72cbf059c9dafee9f1ad2986108e48c8ef3974ac805c103644e SHA512 c5ac3e458987f3aa8ca21a79aa7819fbc1ca6013b6e445a82407ac0664884b90b8f79a2593368f6264a509674aa1f9584614c7c464c88d74284601f0c7636ef0
+DIST vulkan-layers-1.3.204.tar.gz 3662632 BLAKE2B 277ab312fa8b127fadb2df37933b7eaf11b6ff5dc40246fb35c7e5d35f7d80b17bdc55e5a5686b5222500f416f462be06a3991bf786100bf0fc1af57be569a6f SHA512 9f0649d2e3eccd52a093b4d9c3446d7f05ad4938a6950042fc2c3cf05f6ca2f513706385fc39cf4559344a4770fcc4375306904a233d0edd48b6eff5f17f1b0f
EBUILD vulkan-layers-1.2.198-r1.ebuild 1602 BLAKE2B 8eacbcfd0c71f721bfcefd5487570635c2113067104c3ef97cfe448a2ba4bec2a8c17fc162603060dce5ee83c1cc08f08cb59435c0cb97ac3c6e1d00d0bc187d SHA512 313a2f169ce77b408715cf6f6122d6856d5cff491f5160e8d594337ed21e94e3f314b635de00beecbb228a68020591a633b93c707e879a4abc3e600c923b70aa
-EBUILD vulkan-layers-9999.ebuild 1611 BLAKE2B 50fd48eb09f923675ba0eab56f6d47eecab42c1ea0cea439a9b741f402c5c0f79fdf39ef22e9ea2718439f34ffcbdf5e9b562cae10e0ec92d5d4ba34ca834b60 SHA512 47f1a60644c9ee16254d07db612f05d2a9a9367a7baba136499e26b1752fabe9dc5a2aff2a6aa413ab4eb478cbec1956037d9480e9082b877fbbd8677461e036
+EBUILD vulkan-layers-1.3.204.ebuild 1673 BLAKE2B 67a14dc9785acd9c61319e8772f6dc55f635a3b8c20d6f1bcef027472278b1ca5f327d25cb66b2223615352c1de44eef05aa85620a3ca801c8d64e30579d976d SHA512 3b3012e79208a4fc778c49c4344f7696fa48f30396df4c23c0a99a638a1760b570794f9fb6e70493bd972afd3b353b0c5d3a5a1e8ee26acf7d200896b7e92827
+EBUILD vulkan-layers-9999.ebuild 1620 BLAKE2B 9eed71962ec4bb21c802b5a8d511f853dc7d2fc2cb10a26956c3ca2fb7fa391ea0e9e870be32f9001e107c28e6b0c15ad8a998b0a52e7b0bc4d11be25a9afc43 SHA512 d34fec44047ff30b6681efc9fb0da9ed22a48e746d3edc570f949f0a889c97832826735030adbc431bddcf4ca16f21cdb4af88ff053739b567c2d30d4c124175
MISC metadata.xml 441 BLAKE2B d2183b70060e05054bd1fa93696ab04b5487fb8cc6b6af72520a47d0490b066c8ecdf10c9717cfaec7463668d7f639cfe8d05e5aa3ad860dbce3f4316122cd02 SHA512 c6c9c42f4cdd6c08cff6259c24ae05fe0755792f77078741e60594cd083a198b5575def4544a85162a7120578416c95b76d4b5847b9b781e16e9b826dcb5d095
diff --git a/media-libs/vulkan-layers/files/vulkan-layers-1.3.204-Dont-use-static-spirv-tools.patch b/media-libs/vulkan-layers/files/vulkan-layers-1.3.204-Dont-use-static-spirv-tools.patch
new file mode 100644
index 000000000000..791ac6764bce
--- /dev/null
+++ b/media-libs/vulkan-layers/files/vulkan-layers-1.3.204-Dont-use-static-spirv-tools.patch
@@ -0,0 +1,27 @@
+From 68f030f9e776d1f2549e471f40c9794f6056bb05 Mon Sep 17 00:00:00 2001
+From: Nick Sarnie <sarnex@gentoo.org>
+Date: Sat, 19 Feb 2022 20:41:44 -0500
+Subject: [PATCH] Dont use static spirv-tools
+
+Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
+---
+ layers/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt
+index 59e294a07..5d30a9834 100644
+--- a/layers/CMakeLists.txt
++++ b/layers/CMakeLists.txt
+@@ -310,7 +310,7 @@ if(BUILD_LAYERS)
+ target_include_directories(VkLayer_khronos_validation PRIVATE ${ROBIN_HOOD_HASHING_INCLUDE_DIR})
+ endif()
+ target_include_directories(VkLayer_khronos_validation PRIVATE ${SPIRV_HEADERS_INCLUDE_DIR})
+- target_link_libraries(VkLayer_khronos_validation PRIVATE SPIRV-Tools-static SPIRV-Tools-opt)
++ target_link_libraries(VkLayer_khronos_validation PRIVATE SPIRV-Tools SPIRV-Tools-opt)
+
+
+ # The output file needs Unix "/" separators or Windows "\" separators On top of that, Windows separators actually need to be doubled
+
+--
+2.35.1
+
diff --git a/media-libs/vulkan-layers/files/vulkan-layers-1.3.204-Fix-dependency-detection.patch b/media-libs/vulkan-layers/files/vulkan-layers-1.3.204-Fix-dependency-detection.patch
new file mode 100644
index 000000000000..25f3b4bafd27
--- /dev/null
+++ b/media-libs/vulkan-layers/files/vulkan-layers-1.3.204-Fix-dependency-detection.patch
@@ -0,0 +1,90 @@
+From 534810e26e0be782b2c702a97bf726af250b8cd6 Mon Sep 17 00:00:00 2001
+From: Jeremy Gebben <jeremyg@lunarg.com>
+Date: Thu, 17 Feb 2022 15:26:25 -0700
+Subject: [PATCH] build: Handle many permutations of SPIRV-Headers locations
+
+If the SPIRV-Headers package is not found, fall back to looking for
+headers in SPIRV_HEADERS_INSTALL_DIR or SPIRV_HEADERS_INCLUDE_DIR.
+
+Fixes #3765
+---
+ CMakeLists.txt | 19 ++++++++++++++++---
+ layers/CMakeLists.txt | 7 +------
+ tests/CMakeLists.txt | 6 +++---
+ 3 files changed, 20 insertions(+), 12 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d4ca786ca07..58a966f03d6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -256,10 +256,23 @@ if (USE_ROBIN_HOOD_HASHING)
+ endif()
+ endif()
+
+-set(SPIRV_HEADERS_INCLUDE_DIR "" CACHE STRING "")
+ if(BUILD_LAYERS OR BUILD_TESTS)
+- if (SPIRV_HEADERS_INCLUDE_DIR STREQUAL "")
+- find_package(SPIRV-Headers REQUIRED CONFIG)
++ find_package(SPIRV-Headers CONFIG QUIET)
++ if(SPIRV-Headers_FOUND)
++ # pefer the package if found. Note that if SPIRV_HEADERS_INSTALL_DIR points at an 'installed'
++ # version of SPIRV-Headers, the package will be found.
++ get_target_property(SPIRV_HEADERS_INCLUDE_DIR SPIRV-Headers::SPIRV-Headers INTERFACE_INCLUDE_DIRECTORIES)
++ elseif(SPIRV_HEADERS_INCLUDE_DIR)
++ # This is set by SPIRV-Tools (in parent scope!) and also some packages that include VVL with add_subdirectory
++ if (NOT EXISTS "${SPIRV_HEADERS_INCLUDE_DIR}/spirv/unified1/spirv.h")
++ message(FATAL_ERROR "Cannot find SPIRV-Headers from SPIRV_HEADERS_INCLUDE_DIR: ${SPIRV_HEADERS_INCLUDE_DIR}")
++ endif()
++ elseif(SPIRV_HEADERS_INSTALL_DIR)
++ # This is our official variable for setting SPIRV-Headers location, but pointing at the raw source of SPIRV-Headers
++ if (NOT EXISTS "${SPIRV_HEADERS_INSTALL_DIR}/include/spirv/unified1/spirv.h")
++ message(FATAL_ERROR "Cannot find SPIRV-Headers from SPIRV_HEADERS_INSTALL_DIR: ${SPIRV_HEADERS_INSTALL_DIR}")
++ endif()
++ set(SPIRV_HEADERS_INCLUDE_DIR "${SPIRV_HEADERS_INSTALL_DIR}/include")
+ endif()
+ endif()
+
+diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt
+index 6edcf6eb5ab..59e294a0793 100644
+--- a/layers/CMakeLists.txt
++++ b/layers/CMakeLists.txt
+@@ -309,12 +309,7 @@ if(BUILD_LAYERS)
+ if (USE_ROBIN_HOOD_HASHING)
+ target_include_directories(VkLayer_khronos_validation PRIVATE ${ROBIN_HOOD_HASHING_INCLUDE_DIR})
+ endif()
+- if (SPIRV_HEADERS_INCLUDE_DIR STREQUAL "")
+- target_link_libraries(VkLayer_khronos_validation PRIVATE SPIRV-Headers::SPIRV-Headers)
+- else()
+- target_include_directories(VkLayer_khronos_validation PRIVATE ${SPIRV_HEADERS_INCLUDE_DIR})
+- endif()
+-
++ target_include_directories(VkLayer_khronos_validation PRIVATE ${SPIRV_HEADERS_INCLUDE_DIR})
+ target_link_libraries(VkLayer_khronos_validation PRIVATE SPIRV-Tools-static SPIRV-Tools-opt)
+
+
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 2b98d109b7f..780c0538486 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ # ~~~
+-# Copyright (c) 2014-2021 Valve Corporation
+-# Copyright (c) 2014-2021 LunarG, Inc.
++# Copyright (c) 2014-2022 Valve Corporation
++# Copyright (c) 2014-2022 LunarG, Inc.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License");
+ # you may not use this file except in compliance with the License.
+@@ -149,11 +149,11 @@ if (NOT MSVC)
+ target_compile_options(vk_layer_validation_tests PRIVATE "-Wno-sign-compare")
+ endif()
+
++target_include_directories(vk_layer_validation_tests PRIVATE ${SPIRV_HEADERS_INCLUDE_DIR})
+ # Specify target_link_libraries
+ target_link_libraries(vk_layer_validation_tests
+ PRIVATE VkLayer_utils
+ ${GLSLANG_LIBRARIES}
+- SPIRV-Headers::SPIRV-Headers
+ SPIRV-Tools-static SPIRV-Tools-opt
+ GTest::gtest GTest::gtest_main)
+
diff --git a/media-libs/vulkan-layers/vulkan-layers-1.3.204.ebuild b/media-libs/vulkan-layers/vulkan-layers-1.3.204.ebuild
new file mode 100644
index 000000000000..2288a824c1fd
--- /dev/null
+++ b/media-libs/vulkan-layers/vulkan-layers-1.3.204.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PN=Vulkan-ValidationLayers
+CMAKE_ECLASS="cmake"
+PYTHON_COMPAT=( python3_{8,9} )
+inherit cmake-multilib python-any-r1
+
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/KhronosGroup/${MY_PN}.git"
+ EGIT_SUBMODULES=()
+ inherit git-r3
+else
+ SRC_URI="https://github.com/KhronosGroup/${MY_PN}/archive/sdk-${PV}.0.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+ S="${WORKDIR}"/${MY_PN}-sdk-${PV}.0
+fi
+
+DESCRIPTION="Vulkan Validation Layers"
+HOMEPAGE="https://github.com/KhronosGroup/Vulkan-ValidationLayers"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-Fix-dependency-detection.patch
+ "${FILESDIR}"/${P}-Dont-use-static-spirv-tools.patch
+)
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="wayland X"
+
+BDEPEND=">=dev-util/cmake-3.10.2"
+RDEPEND="~dev-util/spirv-tools-${PV}:=[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ >=dev-cpp/robin-hood-hashing-3.11.5
+ ~dev-util/glslang-${PV}:=[${MULTILIB_USEDEP}]
+ ~dev-util/vulkan-headers-${PV}
+ wayland? ( dev-libs/wayland:=[${MULTILIB_USEDEP}] )
+ X? (
+ x11-libs/libX11:=[${MULTILIB_USEDEP}]
+ x11-libs/libXrandr:=[${MULTILIB_USEDEP}]
+ )
+"
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_C_FLAGS="${CFLAGS} -DNDEBUG"
+ -DCMAKE_CXX_FLAGS="${CXXFLAGS} -DNDEBUG"
+ -DCMAKE_SKIP_RPATH=ON
+ -DBUILD_LAYER_SUPPORT_FILES=ON
+ -DBUILD_WSI_WAYLAND_SUPPORT=$(usex wayland)
+ -DBUILD_WSI_XCB_SUPPORT=$(usex X)
+ -DBUILD_WSI_XLIB_SUPPORT=$(usex X)
+ -DBUILD_TESTS=OFF
+ -DGLSLANG_INSTALL_DIR="${ESYSROOT}/usr"
+ -DCMAKE_INSTALL_INCLUDEDIR="${EPREFIX}/usr/include/"
+ )
+ cmake_src_configure
+}
diff --git a/media-libs/vulkan-layers/vulkan-layers-9999.ebuild b/media-libs/vulkan-layers/vulkan-layers-9999.ebuild
index 5beaf4f6dc7a..b4edb5a84d37 100644
--- a/media-libs/vulkan-layers/vulkan-layers-9999.ebuild
+++ b/media-libs/vulkan-layers/vulkan-layers-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -29,7 +29,7 @@ BDEPEND=">=dev-util/cmake-3.10.2"
RDEPEND="~dev-util/spirv-tools-99999999:=[${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}
${PYTHON_DEPS}
- dev-cpp/robin-hood-hashing
+ >=dev-cpp/robin-hood-hashing-3.11.5
~dev-util/glslang-${PV}:=[${MULTILIB_USEDEP}]
~dev-util/vulkan-headers-${PV}
wayland? ( dev-libs/wayland:=[${MULTILIB_USEDEP}] )