summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Sarnie <sarnex@gentoo.org>2022-02-19 16:58:18 -0500
committerNick Sarnie <sarnex@gentoo.org>2022-02-19 21:09:04 -0500
commita09c70e699b3a2abdf6b222d79f7db916690d96e (patch)
treeaffcfd47a735d3c3473cfd0a9bc0c51786cd5c70 /media-libs/vulkan-layers
parentmedia-libs/vulkan-loader: Version bump (diff)
downloadgentoo-a09c70e699b3a2abdf6b222d79f7db916690d96e.tar.gz
gentoo-a09c70e699b3a2abdf6b222d79f7db916690d96e.tar.bz2
gentoo-a09c70e699b3a2abdf6b222d79f7db916690d96e.zip
media-libs/vulkan-layers: Version bump
Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
Diffstat (limited to 'media-libs/vulkan-layers')
-rw-r--r--media-libs/vulkan-layers/Manifest1
-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, 181 insertions, 2 deletions
diff --git a/media-libs/vulkan-layers/Manifest b/media-libs/vulkan-layers/Manifest
index 53a0a76e7a55..246391f920ad 100644
--- a/media-libs/vulkan-layers/Manifest
+++ b/media-libs/vulkan-layers/Manifest
@@ -1 +1,2 @@
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
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}] )