Blame SPECS/shaderc.spec

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