# # spec file for package shaderc # # Copyright (c) 2024 SUSE LLC # # 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. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # # Remember to bump in baselibs.conf %define lname libshaderc_shared1 Name: shaderc Version: 2024.1 Release: 1.3 Summary: A collection of tools, libraries and tests for shader compilation License: Apache-2.0 Group: Development/Tools/Other URL: https://github.com/google/shaderc #Git-Clone: https://github.com/google/shaderc Source: https://github.com/google/shaderc/archive/v%version.tar.gz Source99: baselibs.conf Patch1: 0001-Use-system-third-party-libs.patch BuildRequires: c++_compiler BuildRequires: cmake >= 2.8.12 BuildRequires: glslang-devel >= 14.1.0 BuildRequires: glslang-nonstd-devel BuildRequires: python3-base BuildRequires: spirv-headers >= 1.6.1~sdk280 BuildRequires: spirv-tools-devel >= 2024.1~rc1 %description A collection of tools, libraries and tests for shader compilation. Included are: * glslc, a command line compiler for GLSL/HLSL to SPIR-V, and * libshaderc, a library API for doing the same. Shaderc wraps around core functionality in glslang and SPIRV-Tools. %package -n %lname Summary: SPIR-V shader compiler library Group: System/Libraries %description -n %lname A compiler library for GLSL/HLSL to SPIR-V. Shaderc wraps around core functionality in glslang and SPIRV-Tools %package devel Summary: Header files for the shaderc library Group: Development/Libraries/C and C++ Requires: %lname = %version %description devel A compiler library for GLSL/HLSL to SPIR-V. Shaderc wraps around core functionality in glslang and SPIRV-Tools %prep %autosetup -p1 chmod a+x utils/update_build_version.sh echo "\"%version\"" >glslc/src/build-version.inc find . -type f -exec grep -l '#!/usr/bin/env python' {} + | xargs perl -i -lpe 's{/env python\w*}{/python3}g' %build export CXXFLAGS="%{optflags} -I%_includedir/External" %cmake -DSHADERC_SKIP_TESTS=ON %cmake_build %install %cmake_install # Remove static libraries and their pkgconfig files rm %buildroot/%_libdir/*.a rm %buildroot/%_libdir/pkgconfig/shaderc_{static,combined}.pc %ldconfig_scriptlets -n %lname %files %license LICENSE %_bindir/glslc %files -n %lname %_libdir/libshaderc_shared.so.1* %files devel %_includedir/shaderc/ %_libdir/libshaderc_shared.so %_libdir/pkgconfig/shaderc.pc %changelog * Thu May 16 2024 Jan Engelhardt - Update to release 2024.1 * No changelog was provided * Fri Apr 12 2024 Jan Engelhardt - Update to release 2024.0 * Explicitly use python3 in shebangs/scripts * Fri Jan 19 2024 Jan Engelhardt - Update to release 2023.8 * API: Expose rlaxed Vulkan rules from glslang * Thu Nov 9 2023 Dominique Leuenberger - Fix previous change: export to CXXFLAGS instead of CPPFLAGS so that it's actually picked up. Add optflags to CXXFLAGS to ensure it's not lost. * Thu Nov 2 2023 Jan Engelhardt - Adjust for glslang-nonstd-devel switching paths * Fri Oct 20 2023 Jan Engelhardt - Update to release 2023.7 * Adapt a test to different error message from SPIRV-Tools * Wed Sep 6 2023 Jan Engelhardt - Update to release 2023.6 * Build system updates only * Mon May 29 2023 Jan Engelhardt - Update to release 2023.4 * Add option to preserve bindings * Add options to control mesh shading limits * Tue Mar 28 2023 Jan Engelhardt - Update to release 2023.2 * Fix C++20 compatibility: explicitly construct string_piece when comparing to `char *` * Sun Dec 4 2022 Dirk Müller - update to 2022.4: * Add Cmake BUNDLE DESTINATION option for target install * Fri Nov 25 2022 Ferdinand Thiessen - Drop pkgconfig files for not provided static libraries * Mon Oct 24 2022 Jan Engelhardt - Update to release 2022.3 * Implement default builtin constants needed for GL_EXT_mesh_shader. * Mon Aug 22 2022 Jan Engelhardt - Update to release 2022.2 * Add support for 16b-bit types in HLSL * Mon Aug 8 2022 Stephan Kulow - Remove old python(2)-xml build dependency - build requires python3 * Mon Apr 18 2022 Jan Engelhardt - Update to release 2022.1 * Validator handles Nontemporal image operand * Optimizer handles RayQueryKHR type * Mon Mar 28 2022 Bjørn Lie - Add baselibs.conf, containing libshaderc_shared1 (the shared lib). * Sun Jan 30 2022 Enrico Belleri - Update to release 2022.0 * Update to Glslang 11.8.0 * Support Vulkan 1.3 * Support targeting SPIR-V 1.6, which is the default for Vulkan 1.3 * Thu Nov 11 2021 Jan Engelhardt - Update to release 2021.3 * No user-visible changes * Thu Jun 24 2021 Ferdinand Thiessen - Update to release 2021.1 * Add -fauto-combined-image-sampler option to glslc * Disable deprecated --target-env=opengl_compat with an explicit error message * Wed May 5 2021 Jan Engelhardt - Upddate to release 2021.0 * No user-visible changes * Mon Mar 1 2021 Jan Engelhardt - Update to release 2020.5 * Support newer glslang * Mon Jan 11 2021 Dirk Müller - update to 2020.4: - Removed svpc - Fixed issues with embedders getting duplicate symbols - Converted C-style casts to static_cast - Rolled ahead to fix/pickup Vulkan Raytracing support * Fri Sep 4 2020 Jan Engelhardt - Update to release 2020.3: * spvc: added support for Dawn using deprecated Options constructor * spvc: added support for the additional fixed sample mask in MSL * Mon Aug 17 2020 malcolmlewis@opensuse.org - Updated to release 2020.2: * Support both posix and non-posix MinGW toolchains. * Support optionally building Tint tooling for WGSL. * Add -h option to glslc, spvc; same as --help. * Update to Glslang generator 9. * Add interface to support 16-bit types in HLSL * Add glslc hidden experimental option -mfmt=wgsl; requires Tint. * Add minimum buffer size for Dawn reflection. - Changes from release 2020.1: * Added warning signs about unsupported downloads. * Removed Singleton pattern around access to glslang. * Added concept of comparison sampler to API. * Added support for options.hlsl.nonwritable_uav_texture_as_srv. * Support forcing storage buffers to be always declared as UAV. - Rebase 0001-Use-system-third-party-libs.patch. * Wed Apr 8 2020 Jan Engelhardt - Update to release 2020.0 * Added support for new Glslang profile enum, EProfileCount. * Add documentation for Vulkan 1.2 and SPIR-V 1.5. * Added support for generating WebGPU SPIR-V to libshaderc. * Mon Feb 17 2020 Jan Engelhardt - Update to release 2019.1 * Vulkan 1.2 support * Add spvc parser support for a number of ops - Drop 0001-Force-Glslang-to-support-HLSL-in-its-interface-784.patch * Tue Nov 19 2019 Jan Engelhardt - Add 0001-Force-Glslang-to-support-HLSL-in-its-interface-784.patch * Wed Jun 5 2019 Jan Engelhardt - Update to new upstream release 2019.0 * Add optional spvc, libshaderc_spvc as wrapper around SPIRV-Cross. * Support NV extensions for shader stages. * spvc: Added option to specify source environment. Spvc will transform from source to target environment if they are different. This only works for WebGPU0 and Vulkan 1.1. * Fri Dec 14 2018 Jan Engelhardt - Update to new upstream release 2018.0 * Support -fhlsl_functionality1 (also -fhlsl-functionality1) * Support NVIDIA Turing extensions. Requires updated Glslang and SPIRV-Tools. * Use SPIR-V optimization and HLSL legalization recipes from SPIRV-Tools. * Pass target environment into SPIRV-Tools code, e.g. from - -target-env vulkan1.1 . * Sat Mar 31 2018 9+suse@cirno.systems - Update to version 20180329.g2a0f3a3: * Use standard SPIRV-Tools transformation recipes * Locate clang for Linux buildbots. (#446) * Support setting target environment version, e.g. Vulkan 1.1 * Re-enable the Windows continuous Debug builds. (#444) * Add build result badges to README. (#439) * Glslang generator version 6 * Glslang generator version 5 * Update glslc README for -fauto-map-locations * Add glslc tests for -fauto-map-locations * Fix setting of debug DLL name for AppVeyor * Adding kokoro build configurations. (#429) * AppVeyor packaging: debug DLL name no longer has extra "d" * Start v2018.0-dev * Finalize v2017.2 * copyright check: Skip auto-generated CMakeFiles * Update CHANGES for -fauto-map-locations * Glslang now requires bindings on resources * Add -fauto-map-locations option * Fri Feb 23 2018 9+suse@cirno.systems - Update to version 20180207.g563bc6e: * Add a virtual destructor, otherwise Clang 6.0complains about delete being called on an abstract class. * Skip Debug builds for VS 2013 and VS 2015 * Glslang updated its generator version number to 4 * Android.mk: add glslang/MachineIndependent/attribute.cpp * Make tests resilient to better SPIR-V optimizations * Travis CI: install pip and set clone depth to 1 * Adapt to Glslang codegen version update * Thu Nov 23 2017 9@cirno.systems - Update to version 20171030.g98ab88b: * glslc tests: Relax version word check * Avoid -fPIC for MinGW builds * Allow override of SPVTOOLS_LOCAL_PATH * Move spirv-tools build from third_party/Android.mk * Update CHANGES * Adapt to Glslang generator version number change * Travis CI: use make to build * Add HLSL legalization passes to compiler.cc * Add SPIRV-Tools optimizer files for linker * Added more opt passes to PassId enum * Wed Nov 22 2017 9@cirno.systems - Re-add explicit version dependencies * Mon Nov 20 2017 9@cirno.systems - Drop explicit version dependency on spirv-tools * Fri Nov 3 2017 9@cirno.systems - init