Blame SPECS/shaderc.spec

098160
# Force out of source build
098160
%undefine __cmake_in_source_build
098160
098160
# Release 1.3.204.0 sdk
098160
%global commit          1bbf43f210941ba69a2cd05cf3529063f1ff5bb9
098160
%global shortcommit     %(c=%{commit}; echo ${c:0:7})
098160
%global snapshotdate    20220202
098160
098160
# Glslang revision from packaged version
098160
%global glslang_version 0c4c93bf615b51be9ec057ba830c0207bdedae80
098160
098160
Name:           shaderc
098160
Version:        2022.1
098160
Release:        1%{?dist}
098160
Summary:        A collection of tools, libraries, and tests for Vulkan shader compilation
098160
098160
License:        ASL 2.0
098160
URL:            https://github.com/google/shaderc
098160
Source0:        %url/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
098160
# Patch to unbundle 3rd party code
098160
Patch1:         0001-Drop-third-party-code-in-CMakeLists.txt.patch
098160
Patch2:         glslang_linker_flags.patch
098160
098160
BuildRequires:  cmake3
098160
BuildRequires:  gcc-c++
098160
BuildRequires:  ninja-build
098160
BuildRequires:  python3-devel
098160
BuildRequires:  glslang-devel
098160
BuildRequires:  spirv-headers-devel
098160
BuildRequires:  spirv-tools
098160
BuildRequires:  spirv-tools-devel
098160
098160
%description
098160
A collection of tools, libraries and tests for shader compilation.
098160
098160
Shaderc aims to to provide:
098160
 - a command line compiler with GCC- and Clang-like usage, for better
098160
   integration with build systems
098160
 - an API where functionality can be added without breaking existing clients
098160
 - an API supporting standard concurrency patterns across multiple
098160
   operating systems
098160
 - increased functionality such as file #include support
098160
098160
%package    -n  glslc
098160
Summary:        A command line compiler for GLSL/HLSL to SPIR-V
098160
098160
%description -n glslc
098160
A command line compiler for GLSL/HLSL to SPIR-V.
098160
098160
%package    -n  libshaderc
098160
Summary:        A library for compiling shader strings into SPIR-V
098160
098160
%description -n libshaderc
098160
A library for compiling shader strings into SPIR-V.
098160
098160
%package -n     libshaderc-devel
098160
Summary:        Development files for libshaderc
098160
Requires:       libshaderc%{?_isa} = %{version}-%{release}
098160
098160
%description -n libshaderc-devel
098160
A library for compiling shader strings into SPIR-V.
098160
098160
Development files for libshaderc.
098160
098160
%package -n     libshaderc-static
098160
Summary:        A library for compiling shader strings into SPIR-V (static libraries)
098160
098160
%description -n libshaderc-static
098160
A library for compiling shader strings into SPIR-V.
098160
098160
Static libraries for libshaderc.
098160
098160
%prep
098160
%autosetup -p1 -n %{name}-%{commit}
098160
098160
rm -rf third_party
098160
098160
# Stolen from Gentoo
098160
# Create build-version.inc since we want to use our packaged
098160
# SPIRV-Tools and glslang
098160
echo \"shaderc $(grep -m1 -o '^v[[:digit:]]\{4\}\.[[:digit:]]\(-dev\)\? [[:digit:]]\{4\}-[[:digit:]]\{2\}-[[:digit:]]\{2\}$' CHANGES)\" \
098160
        > glslc/src/build-version.inc
098160
echo \"spirv-tools $(grep -m1 -o '^v[[:digit:]]\{4\}\.[[:digit:]]\(-dev\)\? [[:digit:]]\{4\}-[[:digit:]]\{2\}-[[:digit:]]\{2\}$' /usr/share/doc/spirv-tools/CHANGES)\" \
098160
        >> glslc/src/build-version.inc
098160
echo \"glslang %{glslang_version}\" >> glslc/src/build-version.inc
098160
098160
# Point to correct include
098160
sed -i 's|SPIRV/GlslangToSpv.h|glslang/SPIRV/GlslangToSpv.h|' libshaderc_util/src/compiler.cc
098160
098160
%build
098160
# We disable the tests because they don't work with our unbundling of 3rd party.
098160
# See https://github.com/google/shaderc/issues/470
098160
%cmake3 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
098160
        -DCMAKE_SKIP_RPATH=True \
098160
        -DSHADERC_SKIP_TESTS=True \
098160
        -DPYTHON_EXE=%{__python3} \
098160
        -GNinja
098160
%cmake3_build
098160
098160
%install
098160
%cmake3_install
098160
098160
%check
098160
%ctest3
098160
098160
%files -n glslc
098160
%doc glslc/README.asciidoc
098160
%license LICENSE
098160
%{_bindir}/glslc
098160
098160
%files -n libshaderc
098160
%doc AUTHORS CHANGES CONTRIBUTORS README.md
098160
%license LICENSE
098160
%{_libdir}/libshaderc_shared.so.1*
098160
098160
%files -n libshaderc-devel
098160
%{_includedir}/%{name}/
098160
%{_libdir}/libshaderc_shared.so
098160
%{_libdir}/pkgconfig/shaderc.pc
098160
098160
%files -n libshaderc-static
098160
%license LICENSE
098160
%{_libdir}/libshaderc.a
098160
%{_libdir}/libshaderc_combined.a
098160
%{_libdir}/pkgconfig/shaderc_static.pc
098160
%{_libdir}/pkgconfig/shaderc_combined.pc
098160
098160
%changelog
098160
* Mon Feb 28 2022 Dave Airlie <airlied@redhat.com> - 2022.1-1
098160
- Update for 1.3.204.0 sdk release
098160
098160
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2020.5-4
098160
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
098160
  Related: rhbz#1991688
098160
098160
* Fri Jul 30 2021 Dave Airlie <airlied@redhat.com> - 2020.5-3
098160
- Update for 1.2.182.0 sdk release
098160
098160
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2020.5-2
098160
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
098160
098160
* Fri Mar  5 13:43:44 CET 2021 Robert-André Mauchin <zebob.m@gmail.com> - 2020.5-1
098160
- Update to 2020.5
098160
- Close: rhbz#1931006
098160
098160
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2020.4-2
098160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
098160
098160
* Sat Dec 26 15:21:39 CET 2020 Robert-André Mauchin <zebob.m@gmail.com> - 2020.4-1
098160
- Update to 2020.4
098160
- Close: rhbz#1906260
098160
098160
* Sat Dec 05 2020 Robert-André Mauchin <zebob.m@gmail.com> - 2020.3-1
098160
- Update to 2020.3
098160
- Close: rhbz#1875183
098160
098160
* Sat Aug 08 2020 Robert-André Mauchin <zebob.m@gmail.com> - 2020.2-1
098160
- Update to 2020.2
098160
098160
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2020.1-3
098160
- Second attempt - Rebuilt for
098160
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
098160
098160
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2020.1-2
098160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
098160
098160
* Wed Jun 17 20:15:27 CEST 2020 Robert-André Mauchin <zebob.m@gmail.com> - 2020.1-1
098160
- Update to 2020.1
098160
098160
* Sun Feb 02 20:53:01 CET 2020 Robert-André Mauchin <zebob.m@gmail.com> - 2019.1-1
098160
- Update to 2019.1
098160
098160
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2019.0-3
098160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
098160
098160
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2019.0-2
098160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
098160
098160
* Mon Jun 10 00:18:18 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 2019.0-1
098160
- Release 2019.0
098160
098160
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2018.0-2
098160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
098160
098160
* Wed Oct 03 2018 Robert-André Mauchin <zebob.m@gmail.com> - 2018.0-1
098160
- Release 2018.0
098160
098160
* Mon Sep 24 2018 Robert-André Mauchin <zebob.m@gmail.com> - 2017.2-1
098160
- Initial build
098160