Jan Engelhardt 2020-08-29 08:12:24 +00:00 committed by Git OBS Bridge
parent 2c4d57bc00
commit e8f8ddd0b3
3 changed files with 55 additions and 4 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Aug 29 08:12:15 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Add xxhash.diff.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Aug 20 16:08:36 UTC 2020 - Jan Engelhardt <jengelh@inai.de> Thu Aug 20 16:08:36 UTC 2020 - Jan Engelhardt <jengelh@inai.de>

View File

@ -28,6 +28,7 @@ URL: https://github.com/KhronosGroup/Vulkan-ValidationLayers
Source: https://github.com/KhronosGroup/Vulkan-ValidationLayers/archive/v%version.tar.gz Source: https://github.com/KhronosGroup/Vulkan-ValidationLayers/archive/v%version.tar.gz
Source9: %name-rpmlintrc Source9: %name-rpmlintrc
Patch1: ver.diff Patch1: ver.diff
Patch2: xxhash.diff
BuildRequires: cmake >= 3.4 BuildRequires: cmake >= 3.4
BuildRequires: gcc-c++ >= 4.8 BuildRequires: gcc-c++ >= 4.8
BuildRequires: glslang-devel >= 8.13.3727 BuildRequires: glslang-devel >= 8.13.3727
@ -35,6 +36,7 @@ BuildRequires: pkg-config
BuildRequires: python3-base BuildRequires: python3-base
BuildRequires: spirv-headers BuildRequires: spirv-headers
BuildRequires: spirv-tools-devel >= 2020.2 BuildRequires: spirv-tools-devel >= 2020.2
BuildRequires: xxhash-devel
BuildRequires: pkgconfig(vulkan) >= 1.2.130 BuildRequires: pkgconfig(vulkan) >= 1.2.130
BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xcb)
@ -59,6 +61,7 @@ This package contains a utility library.
Summary: Vulkan validation layer support files Summary: Vulkan validation layer support files
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %lname = %version Requires: %lname = %version
Requires: xxhash-devel
%description devel %description devel
Vulkan is a 3D graphics and compute API. Vulkan is a 3D graphics and compute API.
@ -66,7 +69,7 @@ Vulkan is a 3D graphics and compute API.
This package contains support files for the VkLayer utility library. This package contains support files for the VkLayer utility library.
%prep %prep
%autosetup -n Vulkan-ValidationLayers-%version %autosetup -n Vulkan-ValidationLayers-%version -p1
perl -i -pe 's{\@PACKAGE_VERSION\@}{%version}' CMakeLists.txt perl -i -pe 's{\@PACKAGE_VERSION\@}{%version}' CMakeLists.txt
%build %build
@ -77,9 +80,9 @@ make %{?_smp_mflags}
%install %install
%cmake_install %cmake_install
# no header files b="%buildroot"
#rm -f "%buildroot/%_libdir"/*.a ln -sv "libVkLayer_utils-%version.so" "$b/%_libdir/libVkLayer_utils.so"
ln -sv libVkLayer_utils-%version.so "%buildroot/%_libdir/libVkLayer_utils.so" rm -f "$b/%_includedir"/xxhash.*
%post -n %lname -p /sbin/ldconfig %post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig

43
xxhash.diff Normal file
View File

@ -0,0 +1,43 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2020-08-29 10:10:12.022296526 +0200
Avoid the installation of a custom xxhash.h header. Since vk_*.h header files
still include xxhash.h (and now would source the system xxhash instead of the
bundled one), it makes sense to build ValidationLayers itself with the system
xxhash as well, so that the ABI matches.
---
layers/CMakeLists.txt | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Index: Vulkan-ValidationLayers/layers/CMakeLists.txt
===================================================================
--- Vulkan-ValidationLayers.orig/layers/CMakeLists.txt
+++ Vulkan-ValidationLayers/layers/CMakeLists.txt
@@ -61,8 +61,6 @@ if(BUILD_LAYER_SUPPORT_FILES)
vk_layer_utils.h
vk_layer_utils.cpp
vk_loader_platform.h
- xxhash.h
- xxhash.c
generated/vk_validation_error_messages.h
generated/vk_layer_dispatch_table.h
generated/vk_dispatch_table_helper.h
@@ -195,7 +193,7 @@ set(CORE_VALIDATION_LIBRARY_FILES
shader_validation.cpp
shader_validation.h
gpu_validation.cpp
- xxhash.c)
+)
set(OBJECT_LIFETIMES_LIBRARY_FILES
generated/object_tracker.cpp
@@ -253,7 +251,7 @@ if(BUILD_LAYERS)
target_include_directories(VkLayer_khronos_validation PRIVATE ${GLSLANG_SPIRV_INCLUDE_DIR})
target_include_directories(VkLayer_khronos_validation PRIVATE ${SPIRV_TOOLS_INCLUDE_DIR})
target_include_directories(VkLayer_khronos_validation PRIVATE ${SPIRV_HEADERS_INCLUDE_DIR})
- target_link_libraries(VkLayer_khronos_validation PRIVATE ${SPIRV_TOOLS_LIBRARIES})
+ target_link_libraries(VkLayer_khronos_validation PRIVATE ${SPIRV_TOOLS_LIBRARIES} -lxxhash)
# The output file needs Unix "/" separators or Windows "\" separators On top of that, Windows separators actually need to be doubled
# because the json format uses backslash escapes