From e737268ed00a3fec737bb1d658b74ffa67f0e9ea Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 06 2019 11:12:35 +0000 Subject: import vulkan-1.1.97.0-1.el7 --- diff --git a/.gitignore b/.gitignore index 524dc08..d815cc0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,8 @@ -SOURCES/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0.tar.gz -SOURCES/glslang-3bb4c48cd95892a5cfcd63df20fcc47fd51c97a0.tar.gz -SOURCES/spirv-headers-12f8de9f04327336b699b1b80aa390ae7f9ddbf4.tar.gz -SOURCES/spirv-tools-26a698c34788bb69123a1f3789970a16cf4d9641.tar.gz +SOURCES/Vulkan-Headers-sdk-1.1.97.0.tar.gz +SOURCES/Vulkan-Loader-sdk-1.1.97.0.tar.gz +SOURCES/Vulkan-Tools-sdk-1.1.97.0.tar.gz +SOURCES/Vulkan-ValidationLayers-sdk-1.1.97.0.tar.gz +SOURCES/cmake-3.4.3.tar.gz +SOURCES/glslang-05d12a9461dd0a76053bdd42f062a37a10d56afb.tar.gz +SOURCES/spirv-headers-8bea0a266ac9b718aa0818d9e3a47c0b77c2cb23.tar.gz +SOURCES/spirv-tools-2019.1.tar.gz diff --git a/.vulkan.metadata b/.vulkan.metadata index 155ee3f..9ae50b2 100644 --- a/.vulkan.metadata +++ b/.vulkan.metadata @@ -1,4 +1,8 @@ -db0d74694881d57b787bf8736a8e7181c2badf5d SOURCES/Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0.tar.gz -e8f61646d04808220e5199e2e2490afb4ae3fe82 SOURCES/glslang-3bb4c48cd95892a5cfcd63df20fcc47fd51c97a0.tar.gz -946721ba9a25f3c6b4fc3f1dde3eaa8ae8ac5eb2 SOURCES/spirv-headers-12f8de9f04327336b699b1b80aa390ae7f9ddbf4.tar.gz -60c2407ffaa104531440f1cd1fec5acd3b74135c SOURCES/spirv-tools-26a698c34788bb69123a1f3789970a16cf4d9641.tar.gz +6690c4d0beb5a5755bab4ee3da33f33ebe158b42 SOURCES/Vulkan-Headers-sdk-1.1.97.0.tar.gz +2b464a75043656a42fccfab29bb35cfc25186b73 SOURCES/Vulkan-Loader-sdk-1.1.97.0.tar.gz +a3d915b98295c3daa8a7b30a94d33ab1eb7a7dc3 SOURCES/Vulkan-Tools-sdk-1.1.97.0.tar.gz +268ea8cda8663f82c596cb957d5821e5566362b5 SOURCES/Vulkan-ValidationLayers-sdk-1.1.97.0.tar.gz +49e4f05d46d4752e514b19ba36bf97d20a7da66a SOURCES/cmake-3.4.3.tar.gz +99fda2cddfb80d15355d8d7a97f6351234bf4132 SOURCES/glslang-05d12a9461dd0a76053bdd42f062a37a10d56afb.tar.gz +b7e356dbe0e362af10f7af41fc4e60a00205cec2 SOURCES/spirv-headers-8bea0a266ac9b718aa0818d9e3a47c0b77c2cb23.tar.gz +d910f817eba72458bbf0701789414d159a859d91 SOURCES/spirv-tools-2019.1.tar.gz diff --git a/SOURCES/0003-layers-Don-t-set-an-rpath.patch b/SOURCES/0003-layers-Don-t-set-an-rpath.patch deleted file mode 100644 index edab110..0000000 --- a/SOURCES/0003-layers-Don-t-set-an-rpath.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/tests/layers/CMakeLists.txt -+++ b/tests/layers/CMakeLists.txt -@@ -4,9 +4,6 @@ - VkLayer_device_profile_api - VkLayer_test - ) -- --set(VK_LAYER_RPATH /usr/lib/x86_64-linux-gnu/vulkan/layer:/usr/lib/i386-linux-gnu/vulkan/layer) --set(CMAKE_INSTALL_RPATH ${VK_LAYER_RPATH}) - - if (WIN32) - if (NOT (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)) - diff --git a/SOURCES/0008-demos-Don-t-build-tri-or-cube.patch b/SOURCES/0008-demos-Don-t-build-tri-or-cube.patch deleted file mode 100644 index 290b9be..0000000 --- a/SOURCES/0008-demos-Don-t-build-tri-or-cube.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff -up Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/demos/CMakeLists.txt.smoke Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/demos/CMakeLists.txt ---- Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/demos/CMakeLists.txt.smoke 2018-05-08 10:00:26.738964106 +1000 -+++ Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/demos/CMakeLists.txt 2018-05-08 10:01:39.240848209 +1000 -@@ -173,54 +173,3 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" - endif() - endif() - --###################################################################################### --# cube -- --if(APPLE) -- include(macOS/cube/cube.cmake) --elseif(NOT WIN32) -- if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR}) -- add_executable(cube cube.c ${PROJECT_SOURCE_DIR}/demos/cube.vert ${PROJECT_SOURCE_DIR}/demos/cube.frag cube.vert.inc cube.frag.inc) -- target_link_libraries(cube ${LIBRARIES}) -- endif() --else() -- if (CMAKE_CL_64) -- set (LIB_DIR "Win64") -- else() -- set (LIB_DIR "Win32") -- endif() -- -- add_executable(cube WIN32 cube.c ${PROJECT_SOURCE_DIR}/demos/cube.vert ${PROJECT_SOURCE_DIR}/demos/cube.frag cube.vert.inc cube.frag.inc) -- target_link_libraries(cube ${LIBRARIES}) --endif() -- --###################################################################################### --# cubepp -- --if(APPLE) -- include(macOS/cubepp/cubepp.cmake) --elseif(NOT WIN32) -- if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR}) -- add_executable(cubepp cube.cpp ${PROJECT_SOURCE_DIR}/demos/cube.vert ${PROJECT_SOURCE_DIR}/demos/cube.frag cube.vert.inc cube.frag.inc) -- target_link_libraries(cubepp ${LIBRARIES}) -- endif() --else() -- if (CMAKE_CL_64) -- set (LIB_DIR "Win64") -- else() -- set (LIB_DIR "Win32") -- endif() -- -- add_executable(cubepp WIN32 cube.cpp ${PROJECT_SOURCE_DIR}/demos/cube.vert ${PROJECT_SOURCE_DIR}/demos/cube.frag cube.vert.inc cube.frag.inc) -- target_link_libraries(cubepp ${LIBRARIES}) --endif() -- --###################################################################################### --# smoke -- --if ((${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})) -- if ((DEMOS_WSI_SELECTION STREQUAL "XCB") OR (DEMOS_WSI_SELECTION STREQUAL "WAYLAND") OR WIN32 OR -- (CMAKE_SYSTEM_NAME STREQUAL "Android") OR (CMAKE_SYSTEM_NAME STREQUAL "Darwin")) -- add_subdirectory(smoke) -- endif() --endif() diff --git a/SOURCES/cmake_spirv_tools_commit.patch b/SOURCES/cmake_spirv_tools_commit.patch deleted file mode 100644 index 047acf3..0000000 --- a/SOURCES/cmake_spirv_tools_commit.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -380,9 +380,6 @@ - run_vk_xml_generate(helper_file_generator.py vk_object_types.h) - run_vk_xml_generate(helper_file_generator.py vk_extension_helper.h) - run_vk_xml_generate(helper_file_generator.py vk_typemap_helper.h) --if(BUILD_LAYERS) -- run_external_revision_generate(${EXTERNAL_SOURCE_ROOT}/glslang/External/spirv-tools SPIRV_TOOLS_COMMIT_ID spirv_tools_commit_id.h) --endif() - - - diff --git a/SOURCES/fix_shared.patch b/SOURCES/fix_shared.patch new file mode 100644 index 0000000..8082da8 --- /dev/null +++ b/SOURCES/fix_shared.patch @@ -0,0 +1,12 @@ +diff -up Vulkan-ValidationLayers-sdk-1.1.92.0/CMakeLists.txt.dma Vulkan-ValidationLayers-sdk-1.1.92.0/CMakeLists.txt +--- Vulkan-ValidationLayers-sdk-1.1.92.0/CMakeLists.txt.dma 2019-02-13 09:20:44.590959278 +1000 ++++ Vulkan-ValidationLayers-sdk-1.1.92.0/CMakeLists.txt 2019-02-13 09:21:29.178151673 +1000 +@@ -294,7 +294,7 @@ set_target_properties(generate_helper_fi + # files directly in layers. + + add_library(VkLayer_utils +- STATIC ++ SHARED + layers/vk_layer_config.cpp + layers/vk_layer_extension_utils.cpp + layers/vk_layer_utils.cpp diff --git a/SOURCES/hacked-python2.patch b/SOURCES/hacked-python2.patch deleted file mode 100644 index 255767d..0000000 --- a/SOURCES/hacked-python2.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -up Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/CMakeLists.txt.da Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/CMakeLists.txt ---- Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/CMakeLists.txt.da 2018-04-20 08:07:56.000000000 +1000 -+++ Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/CMakeLists.txt 2018-05-08 07:50:10.179958598 +1000 -@@ -17,7 +17,6 @@ set(MAJOR "1") - string(TOLOWER ${API_NAME} API_LOWERCASE) - - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake") --find_package(PythonInterp 3 REQUIRED) - - option(USE_CCACHE "Use ccache" OFF) - if (USE_CCACHE) -diff -up Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/scripts/lvl_genvk.py.da Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/scripts/lvl_genvk.py ---- Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/scripts/lvl_genvk.py.da 2018-04-20 08:07:56.000000000 +1000 -+++ Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/scripts/lvl_genvk.py 2018-05-08 07:50:10.179958598 +1000 -@@ -1,4 +1,4 @@ --#!/usr/bin/python3 -+#!/usr/bin/python - # - # Copyright (c) 2013-2018 The Khronos Group Inc. - # -diff -up Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/scripts/object_tracker_generator.py.da Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/scripts/object_tracker_generator.py ---- Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/scripts/object_tracker_generator.py.da 2018-04-20 08:07:56.000000000 +1000 -+++ Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/scripts/object_tracker_generator.py 2018-05-08 07:50:10.180958624 +1000 -@@ -263,7 +263,7 @@ class ObjectTrackerOutputGenerator(Outpu - ] - for vuid_filename in vuid_filename_locations: - if os.path.isfile(vuid_filename): -- self.vuid_file = open(vuid_filename, "r", encoding="utf8") -+ self.vuid_file = open(vuid_filename, "r") - break - if self.vuid_file == None: - print("Error: Could not find vk_validation_error_messages.h") -diff -up Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/scripts/parameter_validation_generator.py.da Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/scripts/parameter_validation_generator.py ---- Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/scripts/parameter_validation_generator.py.da 2018-04-20 08:07:56.000000000 +1000 -+++ Vulkan-LoaderAndValidationLayers-sdk-1.1.73.0/scripts/parameter_validation_generator.py 2018-05-08 07:50:10.180958624 +1000 -@@ -195,7 +195,7 @@ class ParameterValidationOutputGenerator - ] - for vuid_filename in vuid_filename_locations: - if os.path.isfile(vuid_filename): -- self.vuid_file = open(vuid_filename, "r", encoding="utf8") -+ self.vuid_file = open(vuid_filename, "r") - break - if self.vuid_file == None: - print("Error: Could not find vk_validation_error_messages.h") diff --git a/SOURCES/layers-no-rpath.patch b/SOURCES/layers-no-rpath.patch new file mode 100644 index 0000000..4b923ff --- /dev/null +++ b/SOURCES/layers-no-rpath.patch @@ -0,0 +1,13 @@ +diff -up Vulkan-ValidationLayers-sdk-1.1.97.0/tests/layers/CMakeLists.txt.dma Vulkan-ValidationLayers-sdk-1.1.97.0/tests/layers/CMakeLists.txt +--- Vulkan-ValidationLayers-sdk-1.1.97.0/tests/layers/CMakeLists.txt.dma 2019-02-26 09:09:22.661039052 +1000 ++++ Vulkan-ValidationLayers-sdk-1.1.97.0/tests/layers/CMakeLists.txt 2019-02-26 09:09:25.906125123 +1000 +@@ -17,9 +17,6 @@ + + set(TEST_LAYER_NAME VkLayer_device_profile_api) + +-set(VK_LAYER_RPATH /usr/lib/x86_64-linux-gnu/vulkan/layer:/usr/lib/i386-linux-gnu/vulkan/layer) +-set(CMAKE_INSTALL_RPATH ${VK_LAYER_RPATH}) +- + if(WIN32) + if(NOT (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)) + file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/windows/${TEST_LAYER_NAME}.json src_json) diff --git a/SOURCES/spirv-tools-fix.patch b/SOURCES/spirv-tools-fix.patch new file mode 100644 index 0000000..e408759 --- /dev/null +++ b/SOURCES/spirv-tools-fix.patch @@ -0,0 +1,20 @@ +diff -up SPIRV-Tools-2019.1/tools/io.h.dm SPIRV-Tools-2019.1/tools/io.h +--- SPIRV-Tools-2019.1/tools/io.h.dm 2019-02-18 14:14:46.362572748 +1000 ++++ SPIRV-Tools-2019.1/tools/io.h 2019-02-18 14:15:12.446271338 +1000 +@@ -34,13 +34,14 @@ bool ReadFile(const char* filename, cons + while (size_t len = fread(buf, sizeof(T), buf_size, fp)) { + data->insert(data->end(), buf, buf + len); + } +- if (ftell(fp) == -1L) { ++ long _pos = ftell(fp); ++ if (_pos == -1L) { + if (ferror(fp)) { + fprintf(stderr, "error: error reading file '%s'\n", filename); + return false; + } + } else { +- if (sizeof(T) != 1 && (ftell(fp) % sizeof(T))) { ++ if (sizeof(T) != 1 && (_pos % sizeof(T))) { + fprintf( + stderr, + "error: file size should be a multiple of %zd; file '%s' corrupt\n", diff --git a/SPECS/vulkan.spec b/SPECS/vulkan.spec index 51f43c4..f7cb471 100644 --- a/SPECS/vulkan.spec +++ b/SPECS/vulkan.spec @@ -1,44 +1,40 @@ -%global use_git 0 -%global commit d4cd34fd49caa759cf01cafa5fa271401b17c3b9 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global srcname Vulkan-LoaderAndValidationLayers +%global srcname Vulkan-Loader -%global commit1 3bb4c48cd95892a5cfcd63df20fcc47fd51c97a0 +%global commit1 05d12a9461dd0a76053bdd42f062a37a10d56afb %global srcname1 glslang -%global commit2 12f8de9f04327336b699b1b80aa390ae7f9ddbf4 +%global commit2 8bea0a266ac9b718aa0818d9e3a47c0b77c2cb23 %global srcname2 spirv-headers -%global commit3 26a698c34788bb69123a1f3789970a16cf4d9641 +%global ver3 2019.1 %global srcname3 spirv-tools +%global srcname4 Vulkan-Headers +%global srcname5 Vulkan-ValidationLayers +%global srcname6 Vulkan-Tools + Name: vulkan -Version: 1.1.73.0 -%if 0%{?use_git} -Release: 0.1.git%{shortcommit}%{?dist} -%else +Version: 1.1.97.0 Release: 1%{?dist} -%endif Summary: Vulkan loader and validation layers License: ASL 2.0 URL: https://github.com/KhronosGroup -%if 0%{?use_git} -Source0: %url/%{srcname}/archive/%{commit}.tar.gz#/%{srcname}-%{commit}.tar.gz -%else Source0: %url/%{srcname}/archive/sdk-%{version}.tar.gz#/%{srcname}-sdk-%{version}.tar.gz -%endif Source1: %url/%{srcname1}/archive/%{commit1}.tar.gz#/%{srcname1}-%{commit1}.tar.gz Source2: %url/%{srcname2}/archive/%{commit2}.tar.gz#/%{srcname2}-%{commit2}.tar.gz -Source3: %url/%{srcname3}/archive/%{commit3}.tar.gz#/%{srcname3}-%{commit3}.tar.gz -Source4: spirv_tools_commit_id.h +Source3: %url/%{srcname3}/archive/%{ver3}.tar.gz#/%{srcname3}-%{ver3}.tar.gz +Source4: %url/%{srcname4}/archive/sdk-%{version}.tar.gz#/%{srcname4}-sdk-%{version}.tar.gz +Source5: %url/%{srcname5}/archive/sdk-%{version}.tar.gz#/%{srcname5}-sdk-%{version}.tar.gz +Source6: %url/%{srcname6}/archive/sdk-%{version}.tar.gz#/%{srcname6}-sdk-%{version}.tar.gz +Source7: spirv_tools_commit_id.h +Source8: cmake-3.4.3.tar.gz -Patch0: cmake_spirv_tools_commit.patch -Patch1: 0003-layers-Don-t-set-an-rpath.patch -Patch2: 0008-demos-Don-t-build-tri-or-cube.patch -Patch3: hacked-python2.patch +Patch0: fix_shared.patch +Patch1: spirv-tools-fix.patch +Patch2: layers-no-rpath.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -49,13 +45,13 @@ BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(pciaccess) %if 0%{?fedora} BuildRequires: python3 +%else +BuildRequires: rh-python36-python +%endif BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-cursor) BuildRequires: pkgconfig(wayland-server) BuildRequires: pkgconfig(wayland-egl) -%else -BuildRequires: python -%endif BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xrandr) @@ -89,69 +85,149 @@ BuildArch: noarch Filesystem for Vulkan. %prep -%if 0%{?use_git} -%autosetup -p1 -n %{srcname}-%{commit} -%else -%autosetup -p1 -n %{srcname}-sdk-%{version} -%endif +%setup -T -D -b 0 -n %{srcname}-sdk-%{version} +%setup -T -D -b 8 -n cmake-3.4.3 +%setup -T -D -b 2 -n SPIRV-Headers-%{commit2} +%setup -T -D -b 3 -n SPIRV-Tools-%{ver3} +%patch1 -p1 +%setup -T -D -b 1 -n glslang-%{commit1} +%setup -T -D -b 4 -n %{srcname4}-sdk-%{version} +%setup -T -D -b 5 -n %{srcname5}-sdk-%{version} +%patch0 -p1 +%patch2 -p1 +%setup -T -D -b 6 -n %{srcname6}-sdk-%{version} +cd - + +%build -mkdir -p build/ external/glslang/build/install external/spirv-tools/build/ external/spirv-tools/external/spirv-headers external/glslang/External/spirv-tools/external/spirv-headers -tar -xf %{SOURCE1} -C external/glslang --strip 1 -tar -xf %{SOURCE2} -C external/glslang/External/spirv-tools/external/spirv-headers --strip 1 -tar -xf %{SOURCE3} -C external/glslang/External/spirv-tools --strip 1 -# fix spurious-executable-perm -chmod 0644 README.md -chmod 0644 external/glslang/SPIRV/spirv.hpp -chmod +x scripts/lvl_genvk.py -# fix wrong-script-end-of-line-encoding -sed -i 's/\r//' README.md +# enable python 3.6 +set +e +source scl_source enable rh-python36 +set -e -# sigh inttypes -sed -i 's/inttypes.h/cinttypes/' layers/*.{cpp,h} +cd ../cmake-3.4.3 +BUILD_DIR=`pwd`/cmake_build +cmake . -DCMAKE_INSTALL_PREFIX=$BUILD_DIR +make +make install +cd - + +export PATH=$BUILD_DIR/bin:$PATH +%global __cmake $BUILD_DIR/bin/cmake + +# install into somewhere outside the buildroot temporarily +export DESTDIR=../../install +export USRDIR=$PWD/../install/usr +cd .. +pushd %{srcname4}-sdk-%{version} +mkdir -p build +cd build +%cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. +%make_build +make install +cd - +popd -%build -pushd external/glslang/build/ -CFLAGS="$RPM_OPT_FLAGS" ; export CFLAGS ; -CXXFLAGS="$RPM_OPT_FLAGS" ; export CXXFLAGS ; -LDFLAGS="$RPM_LD_FLAGS" ; export LDFLAGS ; -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. +pushd SPIRV-Headers-%{commit2} +mkdir -p build +cd build +%cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. +%make_build +make install +cd - +popd + +pushd SPIRV-Tools-%{ver3} +mkdir -p build +cd build +%cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. -DSPIRV-Headers_SOURCE_DIR=$USRDIR +%make_build +make install +cd - +popd + +pushd %{srcname}-sdk-%{version} +mkdir -p build +cd build +%cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. -DVULKAN_HEADERS_INSTALL_DIR=$USRDIR +%make_build +make install +cd - +popd + +pushd glslang-%{commit1} +mkdir -p build +cd build +%cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. -DVULKAN_HEADERS_INSTALL_DIR=$USRDIR -DCMAKE_INSTALL_LIBDIR=%{_libdir} -DCMAKE_SKIP_RPATH:BOOL=yes -DBUILD_SHARED_LIBS=OFF %make_build make install +cd - popd # hack to avoid running of memory on aarch64 and i686 build -%global _smp_mflags -j1 %ifarch %{ix86} aarch64 # Decrease debuginfo verbosity to reduce memory consumption even more %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') %endif -cp %{SOURCE4} . -pushd build/ -%cmake -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_SKIP_INSTALL_RPATH:BOOL=yes \ - -DCMAKE_SKIP_RPATH:BOOL=yes \ - -DBUILD_VKJSON=OFF \ - -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_datadir} \ - -DBUILD_WSI_MIR_SUPPORT=OFF \ - -DBUILD_TESTS=OFF \ -%if 0%{?rhel} - -DBUILD_WSI_WAYLAND_SUPPORT=OFF \ -%endif - .. -cp %{SOURCE4} . + +pushd %{srcname5}-sdk-%{version} +mkdir -p build +cd build +%cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. -DVULKAN_HEADERS_INSTALL_DIR=$USRDIR -DGLSLANG_INSTALL_DIR=$USRDIR +%make_build +cd - +popd + +pushd %{srcname6}-sdk-%{version} +mkdir -p build +cd build +%cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. -DVULKAN_HEADERS_INSTALL_DIR=$USRDIR -DGLSLANG_INSTALL_DIR=$USRDIR -DBUILD_CUBE:BOOL=OFF %make_build +cd - popd %install -pushd build/ + +cd .. +pushd %{srcname4}-sdk-%{version}/build %{make_install} popd +pushd %{srcname}-sdk-%{version}/build +%{make_install} +popd + +pushd SPIRV-Tools-%{ver3}/build +%{make_install} +popd + +pushd %{srcname5}-sdk-%{version}/build +# this doesn't use the macro as we don't want to trigger cmake rebuilds here +DESTDIR=$RPM_BUILD_ROOT cmake -P cmake_install.cmake +popd + +pushd %{srcname6}-sdk-%{version}/build +# this doesn't use the macro as we don't want to trigger cmake rebuilds here +DESTDIR=$RPM_BUILD_ROOT cmake -P cmake_install.cmake +popd +cd - # create the filesystem mkdir -p %{buildroot}%{_sysconfdir}/vulkan/{explicit,implicit}_layer.d/ \ %{buildroot}%{_datadir}/vulkan/{explicit,implicit}_layer.d/ \ %{buildroot}{%{_sysconfdir},%{_datadir}}/vulkan/icd.d +# don't want spirv-tools +rm -f %{buildroot}%{_bindir}/spirv-* +rm -f %{buildroot}%{_libdir}/pkgconfig/SPIRV* +rm -rf %{buildroot}%{_includedir}/spirv-tools +rm -f %{buildroot}%{_libdir}/libSPIRV-Tools-link.so +rm -f %{buildroot}%{_libdir}/libSPIRV-Tools-reduce.so +rm -f %{buildroot}%{_libdir}/libSPIRV-Tools-shared.so + +# remove unused includes and registry +rm -rf %{buildroot}%{_datadir}/vulkan/registry +rm -f %{buildroot}%{_includedir}/vk*.h %{buildroot}%{_includedir}/hash*.h %{buildroot}%{_includedir}/*.cpp + # remove RPATH chrpath -d %{buildroot}%{_bindir}/vulkaninfo @@ -159,12 +235,13 @@ chrpath -d %{buildroot}%{_bindir}/vulkaninfo %postun -p /sbin/ldconfig %files -%license LICENSE.txt COPYRIGHT.txt +%license LICENSE.txt %doc README.md CONTRIBUTING.md %{_bindir}/vulkaninfo %{_datadir}/vulkan/explicit_layer.d/*.json %{_libdir}/libVkLayer_*.so %{_libdir}/libvulkan.so.* +%{_libdir}/libSPIRV*so %files devel %{_includedir}/vulkan/ @@ -182,6 +259,10 @@ chrpath -d %{buildroot}%{_bindir}/vulkaninfo %dir %{_datadir}/vulkan/implicit_layer.d/ %changelog +* Tue Feb 19 2019 Dave Airlie 1.1.97.0-1 +- Update to 1.1.97.0 +- rework spec for new upstream layout + * Tue May 08 2018 Dave Airlie 1.1.73.0-1 - Update to 1.1.73.0 release - fixup spec for spirv-tools etc