Jan Engelhardt 2021-09-06 06:24:57 +00:00 committed by Git OBS Bridge
parent 746f10296c
commit 8a8ec3f41b
2 changed files with 38 additions and 22 deletions

View File

@ -77,6 +77,7 @@ export CXXFLAGS="%optflags -Wno-error=stringop-truncation"
%install %install
%cmake_install %cmake_install
perl -i -lpe 's{^#!/usr/bin/env sh$}{#!/bin/sh}' "%buildroot/%_bindir/spirv-lesspipe.sh"
%post -n %lname -p /sbin/ldconfig %post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig
@ -88,6 +89,7 @@ export CXXFLAGS="%optflags -Wno-error=stringop-truncation"
%files -n %lname %files -n %lname
%_libdir/libSPIRV-Tools.so.* %_libdir/libSPIRV-Tools.so.*
%_libdir/libSPIRV-Tools-link.so.* %_libdir/libSPIRV-Tools-link.so.*
%_libdir/libSPIRV-Tools-lint.so.*
%_libdir/libSPIRV-Tools-opt.so.* %_libdir/libSPIRV-Tools-opt.so.*
%_libdir/libSPIRV-Tools-reduce.so.* %_libdir/libSPIRV-Tools-reduce.so.*
%_libdir/libSPIRV-Tools-shared.so.* %_libdir/libSPIRV-Tools-shared.so.*
@ -96,6 +98,7 @@ export CXXFLAGS="%optflags -Wno-error=stringop-truncation"
%_libdir/cmake/ %_libdir/cmake/
%_libdir/libSPIRV-Tools.so %_libdir/libSPIRV-Tools.so
%_libdir/libSPIRV-Tools-link.so %_libdir/libSPIRV-Tools-link.so
%_libdir/libSPIRV-Tools-lint.so
%_libdir/libSPIRV-Tools-opt.so %_libdir/libSPIRV-Tools-opt.so
%_libdir/libSPIRV-Tools-reduce.so %_libdir/libSPIRV-Tools-reduce.so
%_libdir/libSPIRV-Tools-shared.so %_libdir/libSPIRV-Tools-shared.so

View File

@ -7,15 +7,16 @@ Unversioned libraries suck!
source/CMakeLists.txt | 3 +++ source/CMakeLists.txt | 3 +++
source/fuzz/CMakeLists.txt | 1 + source/fuzz/CMakeLists.txt | 1 +
source/link/CMakeLists.txt | 1 + source/link/CMakeLists.txt | 1 +
source/lint/CMakeLists.txt | 1 +
source/opt/CMakeLists.txt | 1 + source/opt/CMakeLists.txt | 1 +
source/reduce/CMakeLists.txt | 1 + source/reduce/CMakeLists.txt | 1 +
5 files changed, 7 insertions(+) 6 files changed, 8 insertions(+)
Index: SPIRV-Tools-2020.6/source/CMakeLists.txt Index: SPIRV-Tools-2021.3/source/CMakeLists.txt
=================================================================== ===================================================================
--- SPIRV-Tools-2020.6.orig/source/CMakeLists.txt --- SPIRV-Tools-2021.3.orig/source/CMakeLists.txt
+++ SPIRV-Tools-2020.6/source/CMakeLists.txt +++ SPIRV-Tools-2021.3/source/CMakeLists.txt
@@ -367,6 +367,7 @@ endfunction() @@ -377,6 +377,7 @@ endfunction()
add_library(${SPIRV_TOOLS}-shared SHARED ${SPIRV_SOURCES}) add_library(${SPIRV_TOOLS}-shared SHARED ${SPIRV_SOURCES})
spirv_tools_default_target_options(${SPIRV_TOOLS}-shared) spirv_tools_default_target_options(${SPIRV_TOOLS}-shared)
set_target_properties(${SPIRV_TOOLS}-shared PROPERTIES CXX_VISIBILITY_PRESET hidden) set_target_properties(${SPIRV_TOOLS}-shared PROPERTIES CXX_VISIBILITY_PRESET hidden)
@ -23,7 +24,7 @@ Index: SPIRV-Tools-2020.6/source/CMakeLists.txt
target_compile_definitions(${SPIRV_TOOLS}-shared target_compile_definitions(${SPIRV_TOOLS}-shared
PRIVATE SPIRV_TOOLS_IMPLEMENTATION PRIVATE SPIRV_TOOLS_IMPLEMENTATION
PUBLIC SPIRV_TOOLS_SHAREDLIB PUBLIC SPIRV_TOOLS_SHAREDLIB
@@ -377,6 +378,7 @@ if(SPIRV_TOOLS_BUILD_STATIC) @@ -387,6 +388,7 @@ if(SPIRV_TOOLS_BUILD_STATIC)
spirv_tools_default_target_options(${SPIRV_TOOLS}-static) spirv_tools_default_target_options(${SPIRV_TOOLS}-static)
# The static target does not have the '-static' suffix. # The static target does not have the '-static' suffix.
set_target_properties(${SPIRV_TOOLS}-static PROPERTIES OUTPUT_NAME "${SPIRV_TOOLS}") set_target_properties(${SPIRV_TOOLS}-static PROPERTIES OUTPUT_NAME "${SPIRV_TOOLS}")
@ -31,7 +32,7 @@ Index: SPIRV-Tools-2020.6/source/CMakeLists.txt
# Create the "${SPIRV_TOOLS}" target as an alias to either "${SPIRV_TOOLS}-static" # Create the "${SPIRV_TOOLS}" target as an alias to either "${SPIRV_TOOLS}-static"
# or "${SPIRV_TOOLS}-shared" depending on the value of BUILD_SHARED_LIBS. # or "${SPIRV_TOOLS}-shared" depending on the value of BUILD_SHARED_LIBS.
@@ -389,6 +391,7 @@ if(SPIRV_TOOLS_BUILD_STATIC) @@ -399,6 +401,7 @@ if(SPIRV_TOOLS_BUILD_STATIC)
set(SPIRV_TOOLS_TARGETS ${SPIRV_TOOLS}-static ${SPIRV_TOOLS}-shared) set(SPIRV_TOOLS_TARGETS ${SPIRV_TOOLS}-static ${SPIRV_TOOLS}-shared)
else() else()
add_library(${SPIRV_TOOLS} ${SPIRV_TOOLS_LIBRARY_TYPE} ${SPIRV_SOURCES}) add_library(${SPIRV_TOOLS} ${SPIRV_TOOLS_LIBRARY_TYPE} ${SPIRV_SOURCES})
@ -39,11 +40,11 @@ Index: SPIRV-Tools-2020.6/source/CMakeLists.txt
spirv_tools_default_target_options(${SPIRV_TOOLS}) spirv_tools_default_target_options(${SPIRV_TOOLS})
set(SPIRV_TOOLS_TARGETS ${SPIRV_TOOLS} ${SPIRV_TOOLS}-shared) set(SPIRV_TOOLS_TARGETS ${SPIRV_TOOLS} ${SPIRV_TOOLS}-shared)
endif() endif()
Index: SPIRV-Tools-2020.6/source/fuzz/CMakeLists.txt Index: SPIRV-Tools-2021.3/source/fuzz/CMakeLists.txt
=================================================================== ===================================================================
--- SPIRV-Tools-2020.6.orig/source/fuzz/CMakeLists.txt --- SPIRV-Tools-2021.3.orig/source/fuzz/CMakeLists.txt
+++ SPIRV-Tools-2020.6/source/fuzz/CMakeLists.txt +++ SPIRV-Tools-2021.3/source/fuzz/CMakeLists.txt
@@ -425,6 +425,7 @@ if(SPIRV_BUILD_FUZZER) @@ -439,6 +439,7 @@ if(SPIRV_BUILD_FUZZER)
spvtools_pch(SPIRV_TOOLS_FUZZ_SOURCES pch_source_fuzz) spvtools_pch(SPIRV_TOOLS_FUZZ_SOURCES pch_source_fuzz)
add_library(SPIRV-Tools-fuzz ${SPIRV_TOOLS_FUZZ_SOURCES}) add_library(SPIRV-Tools-fuzz ${SPIRV_TOOLS_FUZZ_SOURCES})
@ -51,10 +52,10 @@ Index: SPIRV-Tools-2020.6/source/fuzz/CMakeLists.txt
spvtools_default_compile_options(SPIRV-Tools-fuzz) spvtools_default_compile_options(SPIRV-Tools-fuzz)
Index: SPIRV-Tools-2020.6/source/link/CMakeLists.txt Index: SPIRV-Tools-2021.3/source/link/CMakeLists.txt
=================================================================== ===================================================================
--- SPIRV-Tools-2020.6.orig/source/link/CMakeLists.txt --- SPIRV-Tools-2021.3.orig/source/link/CMakeLists.txt
+++ SPIRV-Tools-2020.6/source/link/CMakeLists.txt +++ SPIRV-Tools-2021.3/source/link/CMakeLists.txt
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
add_library(SPIRV-Tools-link ${SPIRV_TOOLS_LIBRARY_TYPE} add_library(SPIRV-Tools-link ${SPIRV_TOOLS_LIBRARY_TYPE}
linker.cpp linker.cpp
@ -63,11 +64,23 @@ Index: SPIRV-Tools-2020.6/source/link/CMakeLists.txt
spvtools_default_compile_options(SPIRV-Tools-link) spvtools_default_compile_options(SPIRV-Tools-link)
target_include_directories(SPIRV-Tools-link target_include_directories(SPIRV-Tools-link
Index: SPIRV-Tools-2020.6/source/opt/CMakeLists.txt Index: SPIRV-Tools-2021.3/source/lint/CMakeLists.txt
=================================================================== ===================================================================
--- SPIRV-Tools-2020.6.orig/source/opt/CMakeLists.txt --- SPIRV-Tools-2021.3.orig/source/lint/CMakeLists.txt
+++ SPIRV-Tools-2020.6/source/opt/CMakeLists.txt +++ SPIRV-Tools-2021.3/source/lint/CMakeLists.txt
@@ -234,6 +234,7 @@ spvtools_pch(SPIRV_TOOLS_OPT_SOURCES pch @@ -25,6 +25,7 @@ endif()
add_library(SPIRV-Tools-lint ${SPIRV_TOOLS_LIBRARY_TYPE} ${SPIRV_TOOLS_LINT_SOURCES})
+set_target_properties(SPIRV-Tools-lint PROPERTIES SOVERSION suse22)
spvtools_default_compile_options(SPIRV-Tools-lint)
target_include_directories(SPIRV-Tools-lint
PUBLIC
Index: SPIRV-Tools-2021.3/source/opt/CMakeLists.txt
===================================================================
--- SPIRV-Tools-2021.3.orig/source/opt/CMakeLists.txt
+++ SPIRV-Tools-2021.3/source/opt/CMakeLists.txt
@@ -235,6 +235,7 @@ spvtools_pch(SPIRV_TOOLS_OPT_SOURCES pch
add_library(SPIRV-Tools-opt ${SPIRV_TOOLS_LIBRARY_TYPE} ${SPIRV_TOOLS_OPT_SOURCES}) add_library(SPIRV-Tools-opt ${SPIRV_TOOLS_LIBRARY_TYPE} ${SPIRV_TOOLS_OPT_SOURCES})
@ -75,11 +88,11 @@ Index: SPIRV-Tools-2020.6/source/opt/CMakeLists.txt
spvtools_default_compile_options(SPIRV-Tools-opt) spvtools_default_compile_options(SPIRV-Tools-opt)
target_include_directories(SPIRV-Tools-opt target_include_directories(SPIRV-Tools-opt
PUBLIC PUBLIC
Index: SPIRV-Tools-2020.6/source/reduce/CMakeLists.txt Index: SPIRV-Tools-2021.3/source/reduce/CMakeLists.txt
=================================================================== ===================================================================
--- SPIRV-Tools-2020.6.orig/source/reduce/CMakeLists.txt --- SPIRV-Tools-2021.3.orig/source/reduce/CMakeLists.txt
+++ SPIRV-Tools-2020.6/source/reduce/CMakeLists.txt +++ SPIRV-Tools-2021.3/source/reduce/CMakeLists.txt
@@ -88,6 +88,7 @@ target_include_directories(SPIRV-Tools-r @@ -92,6 +92,7 @@ target_include_directories(SPIRV-Tools-r
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
PRIVATE ${spirv-tools_BINARY_DIR} PRIVATE ${spirv-tools_BINARY_DIR}
) )