forked from pool/spirv-tools
Replace -suseN SO versioning with %version-based (cf. vulkan-validationlayers)
OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/spirv-tools?expand=0&rev=82
This commit is contained in:
parent
c273689cf7
commit
70105fa368
@ -1,4 +1,4 @@
|
|||||||
libSPIRV-Tools-suse26
|
libSPIRV-Tools-2022_3_sdk216
|
||||||
spirv-tools-devel
|
spirv-tools-devel
|
||||||
requires -spirv-tools-<targettype>
|
requires -spirv-tools-<targettype>
|
||||||
requires "libSPIRV-Tools-suse26-<targettype> = <version>"
|
requires "libSPIRV-Tools-2022_3_sdk216-<targettype> = <version>"
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
%define _lto_cflags %nil
|
%define _lto_cflags %nil
|
||||||
%define lname libSPIRV-Tools-suse26
|
%define lname libSPIRV-Tools-2022_3_sdk216
|
||||||
|
|
||||||
Name: spirv-tools
|
Name: spirv-tools
|
||||||
Version: 2022.3~sdk216
|
Version: 2022.3~sdk216
|
||||||
@ -67,6 +67,8 @@ integration into other code bases directly.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n SPIRV-Tools-sdk-1.3.216.0
|
%autosetup -p1 -n SPIRV-Tools-sdk-1.3.216.0
|
||||||
|
find . -type f -name CMakeLists.txt -exec \
|
||||||
|
perl -i -pe 's{\@PACKAGE_VERSION\@}{%version}' CMakeLists.txt {} +
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?suse_version} >= 1550
|
%if 0%{?suse_version} >= 1550
|
||||||
@ -79,6 +81,9 @@ integration into other code bases directly.
|
|||||||
%install
|
%install
|
||||||
%cmake_install
|
%cmake_install
|
||||||
perl -i -lpe 's{^#!/usr/bin/env sh$}{#!/bin/sh}' "%buildroot/%_bindir/spirv-lesspipe.sh"
|
perl -i -lpe 's{^#!/usr/bin/env sh$}{#!/bin/sh}' "%buildroot/%_bindir/spirv-lesspipe.sh"
|
||||||
|
for i in "" "-diff" "-link" "-lint" "-opt" "-reduce" "-shared"; do
|
||||||
|
ln -s "libSPIRV-Tools$i-%version.so" "%buildroot/%_libdir/libSPIRV-Tools$i.so"
|
||||||
|
done
|
||||||
|
|
||||||
%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,13 +93,7 @@ perl -i -lpe 's{^#!/usr/bin/env sh$}{#!/bin/sh}' "%buildroot/%_bindir/spirv-less
|
|||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
|
|
||||||
%files -n %lname
|
%files -n %lname
|
||||||
%_libdir/libSPIRV-Tools.so.*
|
%_libdir/libSPIRV-Tools-*2*.so
|
||||||
%_libdir/libSPIRV-Tools-diff.so.*
|
|
||||||
%_libdir/libSPIRV-Tools-link.so.*
|
|
||||||
%_libdir/libSPIRV-Tools-lint.so.*
|
|
||||||
%_libdir/libSPIRV-Tools-opt.so.*
|
|
||||||
%_libdir/libSPIRV-Tools-reduce.so.*
|
|
||||||
%_libdir/libSPIRV-Tools-shared.so.*
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%_libdir/cmake/
|
%_libdir/cmake/
|
||||||
|
80
ver.diff
80
ver.diff
@ -4,114 +4,104 @@ Date: 2016-06-13 11:46:16.846841814 +0200
|
|||||||
Unversioned libraries suck!
|
Unversioned libraries suck!
|
||||||
|
|
||||||
---
|
---
|
||||||
source/CMakeLists.txt | 3 +++
|
source/CMakeLists.txt | 2 ++
|
||||||
source/diff/CMakeLists.txt | 2 ++
|
source/diff/CMakeLists.txt | 1 +
|
||||||
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/lint/CMakeLists.txt | 1 +
|
||||||
source/opt/CMakeLists.txt | 1 +
|
source/opt/CMakeLists.txt | 1 +
|
||||||
source/reduce/CMakeLists.txt | 1 +
|
source/reduce/CMakeLists.txt | 1 +
|
||||||
7 files changed, 10 insertions(+)
|
7 files changed, 8 insertions(+)
|
||||||
|
|
||||||
Index: SPIRV-Tools-2022.2/source/CMakeLists.txt
|
Index: SPIRV-Tools-sdk-1.3.216.0/source/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- SPIRV-Tools-2022.2.orig/source/CMakeLists.txt
|
--- SPIRV-Tools-sdk-1.3.216.0.orig/source/CMakeLists.txt
|
||||||
+++ SPIRV-Tools-2022.2/source/CMakeLists.txt
|
+++ SPIRV-Tools-sdk-1.3.216.0/source/CMakeLists.txt
|
||||||
@@ -377,6 +377,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)
|
||||||
+set_target_properties(${SPIRV_TOOLS}-shared PROPERTIES SOVERSION suse26)
|
+set_target_properties(${SPIRV_TOOLS}-shared PROPERTIES OUTPUT_NAME "${SPIRV_TOOLS}-shared-@PACKAGE_VERSION@")
|
||||||
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
|
||||||
@@ -387,6 +388,7 @@ if(SPIRV_TOOLS_BUILD_STATIC)
|
@@ -399,6 +400,7 @@ if(SPIRV_TOOLS_BUILD_STATIC)
|
||||||
spirv_tools_default_target_options(${SPIRV_TOOLS}-static)
|
|
||||||
# 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 SOVERSION suse26)
|
|
||||||
|
|
||||||
# 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.
|
|
||||||
@@ -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})
|
||||||
+ set_target_properties(${SPIRV_TOOLS} PROPERTIES SOVERSION suse26)
|
+ set_target_properties(${SPIRV_TOOLS} PROPERTIES OUTPUT_NAME "${SPIRV_TOOLS}-@PACKAGE_VERSION@")
|
||||||
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-2022.2/source/diff/CMakeLists.txt
|
Index: SPIRV-Tools-sdk-1.3.216.0/source/diff/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- SPIRV-Tools-2022.2.orig/source/diff/CMakeLists.txt
|
--- SPIRV-Tools-sdk-1.3.216.0.orig/source/diff/CMakeLists.txt
|
||||||
+++ SPIRV-Tools-2022.2/source/diff/CMakeLists.txt
|
+++ SPIRV-Tools-sdk-1.3.216.0/source/diff/CMakeLists.txt
|
||||||
@@ -35,7 +35,9 @@ target_link_libraries(SPIRV-Tools-diff
|
@@ -36,6 +36,7 @@ target_link_libraries(SPIRV-Tools-diff
|
||||||
target_link_libraries(SPIRV-Tools-diff
|
|
||||||
PUBLIC SPIRV-Tools-opt)
|
PUBLIC SPIRV-Tools-opt)
|
||||||
|
|
||||||
+
|
|
||||||
set_property(TARGET SPIRV-Tools-diff PROPERTY FOLDER "SPIRV-Tools libraries")
|
set_property(TARGET SPIRV-Tools-diff PROPERTY FOLDER "SPIRV-Tools libraries")
|
||||||
+set_target_properties(SPIRV-Tools-diff PROPERTIES SOVERSION suse26)
|
+set_target_properties(SPIRV-Tools-diff PROPERTIES OUTPUT_NAME "SPIRV-Tools-diff-@PACKAGE_VERSION@")
|
||||||
spvtools_check_symbol_exports(SPIRV-Tools-diff)
|
spvtools_check_symbol_exports(SPIRV-Tools-diff)
|
||||||
|
|
||||||
if(ENABLE_SPIRV_TOOLS_INSTALL)
|
if(ENABLE_SPIRV_TOOLS_INSTALL)
|
||||||
Index: SPIRV-Tools-2022.2/source/fuzz/CMakeLists.txt
|
Index: SPIRV-Tools-sdk-1.3.216.0/source/fuzz/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- SPIRV-Tools-2022.2.orig/source/fuzz/CMakeLists.txt
|
--- SPIRV-Tools-sdk-1.3.216.0.orig/source/fuzz/CMakeLists.txt
|
||||||
+++ SPIRV-Tools-2022.2/source/fuzz/CMakeLists.txt
|
+++ SPIRV-Tools-sdk-1.3.216.0/source/fuzz/CMakeLists.txt
|
||||||
@@ -439,6 +439,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})
|
||||||
+ set_target_properties(SPIRV-Tools-fuzz PROPERTIES SOVERSION suse26)
|
+ set_target_properties(SPIRV-Tools-fuzz PROPERTIES OUTPUT_NAME "SPIRV-Tools-fuzz-@PACKAGE_VERSION@")
|
||||||
|
|
||||||
spvtools_default_compile_options(SPIRV-Tools-fuzz)
|
spvtools_default_compile_options(SPIRV-Tools-fuzz)
|
||||||
|
|
||||||
Index: SPIRV-Tools-2022.2/source/link/CMakeLists.txt
|
Index: SPIRV-Tools-sdk-1.3.216.0/source/link/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- SPIRV-Tools-2022.2.orig/source/link/CMakeLists.txt
|
--- SPIRV-Tools-sdk-1.3.216.0.orig/source/link/CMakeLists.txt
|
||||||
+++ SPIRV-Tools-2022.2/source/link/CMakeLists.txt
|
+++ SPIRV-Tools-sdk-1.3.216.0/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
|
||||||
)
|
)
|
||||||
+set_target_properties(SPIRV-Tools-link PROPERTIES SOVERSION suse26)
|
+set_target_properties(SPIRV-Tools-link PROPERTIES OUTPUT_NAME "SPIRV-Tools-link-@PACKAGE_VERSION@")
|
||||||
|
|
||||||
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-2022.2/source/lint/CMakeLists.txt
|
Index: SPIRV-Tools-sdk-1.3.216.0/source/lint/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- SPIRV-Tools-2022.2.orig/source/lint/CMakeLists.txt
|
--- SPIRV-Tools-sdk-1.3.216.0.orig/source/lint/CMakeLists.txt
|
||||||
+++ SPIRV-Tools-2022.2/source/lint/CMakeLists.txt
|
+++ SPIRV-Tools-sdk-1.3.216.0/source/lint/CMakeLists.txt
|
||||||
@@ -27,6 +27,7 @@ endif()
|
@@ -27,6 +27,7 @@ endif()
|
||||||
|
|
||||||
add_library(SPIRV-Tools-lint ${SPIRV_TOOLS_LIBRARY_TYPE} ${SPIRV_TOOLS_LINT_SOURCES})
|
add_library(SPIRV-Tools-lint ${SPIRV_TOOLS_LIBRARY_TYPE} ${SPIRV_TOOLS_LINT_SOURCES})
|
||||||
|
|
||||||
+set_target_properties(SPIRV-Tools-lint PROPERTIES SOVERSION suse26)
|
+set_target_properties(SPIRV-Tools-lint PROPERTIES OUTPUT_NAME "SPIRV-Tools-lint-@PACKAGE_VERSION@")
|
||||||
spvtools_default_compile_options(SPIRV-Tools-lint)
|
spvtools_default_compile_options(SPIRV-Tools-lint)
|
||||||
target_include_directories(SPIRV-Tools-lint
|
target_include_directories(SPIRV-Tools-lint
|
||||||
PUBLIC
|
PUBLIC
|
||||||
Index: SPIRV-Tools-2022.2/source/opt/CMakeLists.txt
|
Index: SPIRV-Tools-sdk-1.3.216.0/source/opt/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- SPIRV-Tools-2022.2.orig/source/opt/CMakeLists.txt
|
--- SPIRV-Tools-sdk-1.3.216.0.orig/source/opt/CMakeLists.txt
|
||||||
+++ SPIRV-Tools-2022.2/source/opt/CMakeLists.txt
|
+++ SPIRV-Tools-sdk-1.3.216.0/source/opt/CMakeLists.txt
|
||||||
@@ -245,6 +245,7 @@ spvtools_pch(SPIRV_TOOLS_OPT_SOURCES pch
|
@@ -249,6 +249,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})
|
||||||
|
|
||||||
+set_target_properties(SPIRV-Tools-opt PROPERTIES SOVERSION suse26)
|
+set_target_properties(SPIRV-Tools-opt PROPERTIES OUTPUT_NAME "SPIRV-Tools-opt-@PACKAGE_VERSION@")
|
||||||
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-2022.2/source/reduce/CMakeLists.txt
|
Index: SPIRV-Tools-sdk-1.3.216.0/source/reduce/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- SPIRV-Tools-2022.2.orig/source/reduce/CMakeLists.txt
|
--- SPIRV-Tools-sdk-1.3.216.0.orig/source/reduce/CMakeLists.txt
|
||||||
+++ SPIRV-Tools-2022.2/source/reduce/CMakeLists.txt
|
+++ SPIRV-Tools-sdk-1.3.216.0/source/reduce/CMakeLists.txt
|
||||||
@@ -92,6 +92,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}
|
||||||
)
|
)
|
||||||
+set_target_properties(SPIRV-Tools-reduce PROPERTIES SOVERSION suse26)
|
+set_target_properties(SPIRV-Tools-reduce PROPERTIES OUTPUT_NAME "SPIRV-Tools-reduce-@PACKAGE_VERSION@")
|
||||||
# The reducer reuses a lot of functionality from the SPIRV-Tools library.
|
# The reducer reuses a lot of functionality from the SPIRV-Tools library.
|
||||||
target_link_libraries(SPIRV-Tools-reduce
|
target_link_libraries(SPIRV-Tools-reduce
|
||||||
PUBLIC ${SPIRV_TOOLS_FULL_VISIBILITY}
|
PUBLIC ${SPIRV_TOOLS_FULL_VISIBILITY}
|
||||||
|
Loading…
Reference in New Issue
Block a user