2016-06-13 12:20:39 +02:00
|
|
|
#
|
|
|
|
# spec file for package spirv-tools
|
|
|
|
#
|
2022-01-26 21:59:15 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2016-06-13 12:20:39 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-11-10 13:25:08 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-06-13 12:20:39 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2020-12-08 14:32:21 +01:00
|
|
|
%define _lto_cflags %nil
|
2022-12-23 09:13:46 +01:00
|
|
|
%define lname libSPIRV-Tools-2022_4_sdk236
|
2016-06-13 12:20:39 +02:00
|
|
|
|
|
|
|
Name: spirv-tools
|
2022-12-24 08:55:44 +01:00
|
|
|
Version: 2022.4+sdk236
|
2016-06-13 12:20:39 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: API and commands for processing SPIR-V modules
|
2017-02-02 12:04:34 +01:00
|
|
|
License: Apache-2.0
|
2016-06-13 12:20:39 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2019-08-21 10:06:34 +02:00
|
|
|
URL: https://github.com/KhronosGroup/SPIRV-Tools
|
2022-12-23 09:13:46 +01:00
|
|
|
#Source: https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/v%version.tar.gz
|
|
|
|
Source: https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/sdk-1.3.236.0.tar.gz
|
2017-02-20 16:57:16 +01:00
|
|
|
Source9: baselibs.conf
|
2016-06-13 12:20:39 +02:00
|
|
|
Patch1: ver.diff
|
|
|
|
BuildRequires: bison
|
2016-06-13 14:55:12 +02:00
|
|
|
BuildRequires: cmake >= 2.8.12
|
2016-06-13 12:20:39 +02:00
|
|
|
BuildRequires: gcc-c++
|
2019-01-07 23:00:25 +01:00
|
|
|
BuildRequires: pkg-config
|
2021-05-05 11:59:43 +02:00
|
|
|
BuildRequires: python3-base
|
2018-01-16 22:49:25 +01:00
|
|
|
BuildRequires: python3-xml
|
2022-12-24 08:55:44 +01:00
|
|
|
BuildRequires: spirv-headers >= 1.6.1+sdk236
|
2016-06-13 12:20:39 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
The package includes an assembler, binary module parser,
|
|
|
|
disassembler, and validator for SPIR-V.
|
|
|
|
|
|
|
|
%package -n %lname
|
|
|
|
Summary: SPIR-V tool component library
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %lname
|
|
|
|
The SPIR-V Tool library contains all of the implementation details
|
|
|
|
driving the SPIR-V assembler, binary module parser, disassembler and
|
|
|
|
validator, and is used in the standalone tools whilst also enabling
|
|
|
|
integration into other code bases directly.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development headers for the SPIR-V tool library
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %lname = %version
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
The SPIR-V Tool library contains all of the implementation details
|
|
|
|
driving the SPIR-V assembler, binary module parser, disassembler and
|
|
|
|
validator, and is used in the standalone tools whilst also enabling
|
|
|
|
integration into other code bases directly.
|
|
|
|
|
|
|
|
%prep
|
2022-12-23 09:13:46 +01:00
|
|
|
%define slibv 2022.4.sdk236
|
|
|
|
%autosetup -p1 -n SPIRV-Tools-sdk-1.3.236.0
|
2022-06-16 17:59:30 +02:00
|
|
|
find . -type f -name CMakeLists.txt -exec \
|
2022-12-23 09:13:46 +01:00
|
|
|
perl -i -pe 's{\@PACKAGE_VERSION\@}{%slibv}' CMakeLists.txt {} +
|
2016-06-13 12:20:39 +02:00
|
|
|
|
|
|
|
%build
|
2020-12-08 14:32:21 +01:00
|
|
|
%cmake -DSPIRV-Headers_SOURCE_DIR="%_prefix" \
|
|
|
|
-DSPIRV_TOOLS_BUILD_STATIC:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=ON
|
|
|
|
%cmake_build
|
2016-06-13 12:20:39 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
%cmake_install
|
2021-09-06 08:24:57 +02:00
|
|
|
perl -i -lpe 's{^#!/usr/bin/env sh$}{#!/bin/sh}' "%buildroot/%_bindir/spirv-lesspipe.sh"
|
2022-06-16 17:59:30 +02:00
|
|
|
for i in "" "-diff" "-link" "-lint" "-opt" "-reduce" "-shared"; do
|
2022-12-23 09:13:46 +01:00
|
|
|
ln -s "libSPIRV-Tools$i-%slibv.so" "%buildroot/%_libdir/libSPIRV-Tools$i.so"
|
2022-06-16 17:59:30 +02:00
|
|
|
done
|
2016-06-13 12:20:39 +02:00
|
|
|
|
|
|
|
%post -n %lname -p /sbin/ldconfig
|
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%_bindir/spirv-*
|
|
|
|
%doc LICENSE
|
|
|
|
|
|
|
|
%files -n %lname
|
2022-06-16 17:59:30 +02:00
|
|
|
%_libdir/libSPIRV-Tools-*2*.so
|
2016-06-13 12:20:39 +02:00
|
|
|
|
|
|
|
%files devel
|
2019-12-12 22:56:29 +01:00
|
|
|
%_libdir/cmake/
|
2017-02-02 12:04:34 +01:00
|
|
|
%_libdir/libSPIRV-Tools.so
|
2022-04-19 01:41:31 +02:00
|
|
|
%_libdir/libSPIRV-Tools-diff.so
|
2017-11-17 14:56:14 +01:00
|
|
|
%_libdir/libSPIRV-Tools-link.so
|
2021-09-06 08:24:57 +02:00
|
|
|
%_libdir/libSPIRV-Tools-lint.so
|
2017-02-02 12:04:34 +01:00
|
|
|
%_libdir/libSPIRV-Tools-opt.so
|
2019-01-07 23:00:25 +01:00
|
|
|
%_libdir/libSPIRV-Tools-reduce.so
|
2018-03-08 01:36:56 +01:00
|
|
|
%_libdir/libSPIRV-Tools-shared.so
|
2018-02-07 23:32:50 +01:00
|
|
|
%_libdir/pkgconfig/SPIRV-Tools.pc
|
2018-03-08 01:36:56 +01:00
|
|
|
%_libdir/pkgconfig/SPIRV-Tools-shared.pc
|
2016-06-13 12:20:39 +02:00
|
|
|
%_includedir/spirv-tools/
|
|
|
|
|
|
|
|
%changelog
|