commit: 4c2467c716fd7ee60423fed9f73c8ebe2c7a7623 Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org> AuthorDate: Tue Nov 1 23:08:34 2022 +0000 Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org> CommitDate: Wed Nov 2 00:20:29 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c2467c7
media-libs/vulkan-layers: add 1.3.231 Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org> media-libs/vulkan-layers/Manifest | 1 + ...231-cmake-Cleanup-find_package-SPIRV-code.patch | 101 +++++++++++++++++++++ ...rs-9999.ebuild => vulkan-layers-1.3.231.ebuild} | 7 +- media-libs/vulkan-layers/vulkan-layers-9999.ebuild | 3 +- 4 files changed, 107 insertions(+), 5 deletions(-) diff --git a/media-libs/vulkan-layers/Manifest b/media-libs/vulkan-layers/Manifest index ebc9df448199..1c33d034ff28 100644 --- a/media-libs/vulkan-layers/Manifest +++ b/media-libs/vulkan-layers/Manifest @@ -1 +1,2 @@ DIST vulkan-layers-1.3.224.tar.gz 4193501 BLAKE2B 84982d63339a2ef101cf9e1e9038e94415326a4a8a46b47d0a913bd0d35fa333dd35579f96536c6e147bf37ccdee0a8de12c1c13b74d3529f34645f8e10f0fa2 SHA512 c7d4f6df4bf0cbb970b36cff9197306769bf3f86ea98496b93e8c1779a905966f6b2303b04ba84099ce9c12e828633e2e0db22e49060393335312508b3540488 +DIST vulkan-layers-1.3.231.tar.gz 4408601 BLAKE2B 9b777559a540c34c5f86a93b15c42a223b8b7fd517f06e28d7bd0ba0fdc938063fd86126f7cdb43e692f3cc22296b5f8df924c2f39e3ead38325b2e1442bf3a6 SHA512 550ff2f5d718ab1a272977f3beb89f653107a7a2b89209408233cb3b969206d1d9383e0e8933343bc71fc920dd80e0cf62ad3baa588b671f24ce04cb93d4b606 diff --git a/media-libs/vulkan-layers/files/vulkan-layers-1.3.231-cmake-Cleanup-find_package-SPIRV-code.patch b/media-libs/vulkan-layers/files/vulkan-layers-1.3.231-cmake-Cleanup-find_package-SPIRV-code.patch new file mode 100644 index 000000000000..bd17c69315e0 --- /dev/null +++ b/media-libs/vulkan-layers/files/vulkan-layers-1.3.231-cmake-Cleanup-find_package-SPIRV-code.patch @@ -0,0 +1,101 @@ +From 836a09267fe034ce783570e6920e1b638c0bd212 Mon Sep 17 00:00:00 2001 +From: Juan Ramos <[email protected]> +Date: Fri, 21 Oct 2022 17:43:23 -0600 +Subject: [PATCH] cmake: Cleanup find_package SPIRV code + +- Use get_target_property instead of relying on passed in var +- Remove unused var +- Cleanup find_package(SPIRV-* code +--- + CMakeLists.txt | 55 +++++++++---------------------- + cmake/VVLGenerateSourceCode.cmake | 5 ++- + 2 files changed, 19 insertions(+), 41 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a7f01081415..23de46a1a22 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -204,52 +204,27 @@ if (USE_ROBIN_HOOD_HASHING) + endif() + + if(BUILD_LAYERS OR BUILD_TESTS) +- find_package(SPIRV-Headers CONFIG QUIET) +- if(SPIRV-Headers_FOUND) +- # Prefer 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() ++ find_package(SPIRV-Headers REQUIRED CONFIG QUIET) + +- # VVLGenerateSourceCode depends on spirv/unified1 + include(VVLGenerateSourceCode) + +- if (NOT TARGET SPIRV-Tools-opt) +- find_package(SPIRV-Tools-opt REQUIRED CONFIG) +- endif() +- +- if (NOT TARGET SPIRV-Tools) +- find_package(SPIRV-Tools REQUIRED CONFIG) +- # See https://github.com/KhronosGroup/SPIRV-Tools/issues/3909 for background on this. +- # The targets available from SPIRV-Tools change depending on how SPIRV_TOOLS_BUILD_STATIC is set. +- # Try to handle all possible combinations so that we work with externally built packages. +- if (TARGET SPIRV-Tools) +- set(SPIRV_TOOLS_TARGET "SPIRV-Tools") +- elseif(TARGET SPIRV-Tools-static) +- set(SPIRV_TOOLS_TARGET "SPIRV-Tools-static") +- elseif(TARGET SPIRV-Tools-shared) +- set(SPIRV_TOOLS_TARGET "SPIRV-Tools-shared") +- else() +- message(FATAL_ERROR "Cannot determine SPIRV-Tools target name") +- endif() ++ find_package(SPIRV-Tools-opt REQUIRED CONFIG QUIET) ++ ++ find_package(SPIRV-Tools REQUIRED CONFIG QUIET) ++ # See https://github.com/KhronosGroup/SPIRV-Tools/issues/3909 for background on this. ++ # The targets available from SPIRV-Tools change depending on how SPIRV_TOOLS_BUILD_STATIC is set. ++ # Try to handle all possible combinations so that we work with externally built packages. ++ if (TARGET SPIRV-Tools) ++ set(SPIRV_TOOLS_TARGET "SPIRV-Tools") ++ elseif(TARGET SPIRV-Tools-static) ++ set(SPIRV_TOOLS_TARGET "SPIRV-Tools-static") ++ elseif(TARGET SPIRV-Tools-shared) ++ set(SPIRV_TOOLS_TARGET "SPIRV-Tools-shared") ++ else() ++ message(FATAL_ERROR "Cannot determine SPIRV-Tools target name") + endif() + endif() + +-# Generate dependent helper files ------------------------------------------------------------------------------------------------ +- +-set(SCRIPTS_DIR "${PROJECT_SOURCE_DIR}/scripts") +- + # VkLayer_utils library ---------------------------------------------------------------------------------------------------------- + # For Windows, we use a static lib because the Windows loader has a fairly restrictive loader search path that can't be easily + # modified to point it to the same directory that contains the layers. TODO: This should not be a library -- in future, include +diff --git a/cmake/VVLGenerateSourceCode.cmake b/cmake/VVLGenerateSourceCode.cmake +index 43efdb8201c..13c81e38aca 100644 +--- a/cmake/VVLGenerateSourceCode.cmake ++++ b/cmake/VVLGenerateSourceCode.cmake +@@ -20,7 +20,10 @@ if(PYTHONINTERP_FOUND) + message(FATAL_ERROR "Unable to find vk.xml") + endif() + +- set(spirv_unified_include_dir "${SPIRV_HEADERS_INSTALL_DIR}/include/spirv/unified1/") ++ # Get the include directory of the SPIRV-Headers ++ get_target_property(SPIRV_HEADERS_INCLUDE_DIR SPIRV-Headers::SPIRV-Headers INTERFACE_INCLUDE_DIRECTORIES) ++ ++ set(spirv_unified_include_dir "${SPIRV_HEADERS_INCLUDE_DIR}/spirv/unified1/") + if (NOT IS_DIRECTORY ${spirv_unified_include_dir}) + message(FATAL_ERROR "Unable to find spirv/unified1") + endif() diff --git a/media-libs/vulkan-layers/vulkan-layers-9999.ebuild b/media-libs/vulkan-layers/vulkan-layers-1.3.231.ebuild similarity index 87% copy from media-libs/vulkan-layers/vulkan-layers-9999.ebuild copy to media-libs/vulkan-layers/vulkan-layers-1.3.231.ebuild index c71475bdd661..472f1a4f3a2f 100644 --- a/media-libs/vulkan-layers/vulkan-layers-9999.ebuild +++ b/media-libs/vulkan-layers/vulkan-layers-1.3.231.ebuild @@ -24,8 +24,10 @@ LICENSE="Apache-2.0" SLOT="0" IUSE="wayland X" +PATCHES=( "${FILESDIR}/${P}-cmake-Cleanup-find_package-SPIRV-code.patch" ) + BDEPEND=">=dev-util/cmake-3.10.2" -RDEPEND="~dev-util/spirv-tools-99999999:=[${MULTILIB_USEDEP}]" +RDEPEND="~dev-util/spirv-tools-${PV}:=[${MULTILIB_USEDEP}]" DEPEND="${RDEPEND} ${PYTHON_DEPS} >=dev-cpp/robin-hood-hashing-3.11.5 @@ -48,8 +50,7 @@ multilib_src_configure() { -DBUILD_WSI_XCB_SUPPORT=$(usex X) -DBUILD_WSI_XLIB_SUPPORT=$(usex X) -DBUILD_TESTS=OFF - -DCMAKE_INSTALL_INCLUDEDIR="${EPREFIX}/usr/include/" - -DSPIRV_HEADERS_INSTALL_DIR="${ESYSROOT}/usr/include/spirv" + -DVulkanRegistry_DIR="${ESYSROOT}/usr/share/vulkan/registry" ) cmake_src_configure } diff --git a/media-libs/vulkan-layers/vulkan-layers-9999.ebuild b/media-libs/vulkan-layers/vulkan-layers-9999.ebuild index c71475bdd661..af73de9264b5 100644 --- a/media-libs/vulkan-layers/vulkan-layers-9999.ebuild +++ b/media-libs/vulkan-layers/vulkan-layers-9999.ebuild @@ -48,8 +48,7 @@ multilib_src_configure() { -DBUILD_WSI_XCB_SUPPORT=$(usex X) -DBUILD_WSI_XLIB_SUPPORT=$(usex X) -DBUILD_TESTS=OFF - -DCMAKE_INSTALL_INCLUDEDIR="${EPREFIX}/usr/include/" - -DSPIRV_HEADERS_INSTALL_DIR="${ESYSROOT}/usr/include/spirv" + -DVulkanRegistry_DIR="${ESYSROOT}/usr/share/vulkan/registry" ) cmake_src_configure }
