2020-06-17 19:21:06 +00:00
|
|
|
# Release 2020.1
|
|
|
|
%global commit 7c2aa93903558f017f31b35df163bce5fe849f45
|
2018-10-02 16:08:23 +00:00
|
|
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
2020-06-17 19:21:06 +00:00
|
|
|
%global snapshotdate 20200617
|
2018-10-02 16:08:23 +00:00
|
|
|
|
2020-06-17 19:21:06 +00:00
|
|
|
# Glslang revision from packaged version
|
|
|
|
%global glslang_version SDK-candidate-2-11-gc9b28b9f
|
2018-10-02 16:08:23 +00:00
|
|
|
|
|
|
|
Name: shaderc
|
2020-06-17 19:21:06 +00:00
|
|
|
Version: 2020.1
|
2020-08-01 09:02:43 +00:00
|
|
|
Release: 3%{?dist}
|
2018-10-02 16:08:23 +00:00
|
|
|
Summary: A collection of tools, libraries, and tests for Vulkan shader compilation
|
|
|
|
|
|
|
|
License: ASL 2.0
|
|
|
|
URL: https://github.com/google/shaderc
|
|
|
|
Source0: %url/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
|
|
|
|
|
|
|
|
# https://github.com/google/shaderc/pull/463
|
|
|
|
Patch0: https://patch-diff.githubusercontent.com/raw/google/shaderc/pull/463.patch#/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch
|
|
|
|
# Patch to unbundle 3rd party code
|
2018-10-03 16:10:23 +00:00
|
|
|
Patch1: 0001-Drop-third-party-code-in-CMakeLists.txt.patch
|
2020-06-17 19:21:06 +00:00
|
|
|
# Fix bug in latest version (to drop in next version)
|
|
|
|
Patch2: 0001-Rolling-5-dependencies-and-fixing-build.patch
|
2018-10-02 16:08:23 +00:00
|
|
|
|
|
|
|
BuildRequires: cmake3
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: ninja-build
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: glslang-devel
|
|
|
|
BuildRequires: spirv-headers-devel
|
|
|
|
BuildRequires: spirv-tools
|
|
|
|
BuildRequires: spirv-tools-devel
|
|
|
|
|
|
|
|
%description
|
2019-06-10 15:51:37 +00:00
|
|
|
A collection of tools, libraries and tests for shader compilation.
|
2018-10-02 16:08:23 +00:00
|
|
|
|
|
|
|
Shaderc aims to to provide:
|
2019-06-10 15:51:37 +00:00
|
|
|
- a command line compiler with GCC- and Clang-like usage, for better
|
2018-10-02 16:08:23 +00:00
|
|
|
integration with build systems
|
|
|
|
- an API where functionality can be added without breaking existing clients
|
2019-06-10 15:51:37 +00:00
|
|
|
- an API supporting standard concurrency patterns across multiple
|
2018-10-02 16:08:23 +00:00
|
|
|
operating systems
|
|
|
|
- increased functionality such as file #include support
|
|
|
|
|
|
|
|
%package -n glslc
|
|
|
|
Summary: A command line compiler for GLSL/HLSL to SPIR-V
|
|
|
|
|
|
|
|
%description -n glslc
|
|
|
|
A command line compiler for GLSL/HLSL to SPIR-V.
|
|
|
|
|
|
|
|
%package -n libshaderc
|
|
|
|
Summary: A library for compiling shader strings into SPIR-V
|
|
|
|
|
|
|
|
%description -n libshaderc
|
|
|
|
A library for compiling shader strings into SPIR-V.
|
|
|
|
|
|
|
|
%package -n libshaderc-devel
|
|
|
|
Summary: Development files for libshaderc
|
|
|
|
Requires: libshaderc%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n libshaderc-devel
|
|
|
|
A library for compiling shader strings into SPIR-V.
|
|
|
|
|
|
|
|
Development files for libshaderc.
|
|
|
|
|
|
|
|
%package -n libshaderc-static
|
|
|
|
Summary: A library for compiling shader strings into SPIR-V (static libraries)
|
|
|
|
|
|
|
|
%description -n libshaderc-static
|
|
|
|
A library for compiling shader strings into SPIR-V.
|
|
|
|
|
|
|
|
Static libraries for libshaderc.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -p1 -n %{name}-%{commit}
|
|
|
|
|
|
|
|
rm -rf third_party
|
|
|
|
|
|
|
|
# Stolen from Gentoo
|
2019-06-10 15:51:37 +00:00
|
|
|
# Create build-version.inc since we want to use our packaged
|
2018-10-02 16:08:23 +00:00
|
|
|
# SPIRV-Tools and glslang
|
2020-06-17 19:21:06 +00:00
|
|
|
echo \"shaderc $(grep -m1 -o '^v[[:digit:]]\{4\}\.[[:digit:]]\(-dev\)\? [[:digit:]]\{4\}-[[:digit:]]\{2\}-[[:digit:]]\{2\}$' CHANGES)\" \
|
2018-10-02 16:08:23 +00:00
|
|
|
> glslc/src/build-version.inc
|
2020-06-17 19:21:06 +00:00
|
|
|
echo \"spirv-tools $(grep -m1 -o '^v[[:digit:]]\{4\}\.[[:digit:]]\(-dev\)\? [[:digit:]]\{4\}-[[:digit:]]\{2\}-[[:digit:]]\{2\}$' /usr/share/doc/spirv-tools/CHANGES)\" \
|
2018-10-02 16:08:23 +00:00
|
|
|
>> glslc/src/build-version.inc
|
2020-06-17 19:21:06 +00:00
|
|
|
echo \"glslang %{glslang_version}\" >> glslc/src/build-version.inc
|
|
|
|
|
|
|
|
# Point to correct include
|
|
|
|
sed -i 's|SPIRV/GlslangToSpv.h|glslang/SPIRV/GlslangToSpv.h|' libshaderc_util/src/compiler.cc
|
2018-10-02 16:08:23 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
mkdir %_target_platform
|
|
|
|
cd %_target_platform
|
|
|
|
# We disable the tests because they don't work with our unbundling of 3rd party.
|
|
|
|
# See https://github.com/google/shaderc/issues/470
|
|
|
|
%cmake3 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
|
|
-DCMAKE_SKIP_RPATH=True \
|
|
|
|
-DSHADERC_SKIP_TESTS=True \
|
|
|
|
-DPYTHON_EXE=%{__python3} \
|
|
|
|
-GNinja ..
|
|
|
|
%ninja_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%ninja_install -C %_target_platform
|
|
|
|
|
|
|
|
%check
|
|
|
|
ctest -V
|
|
|
|
|
|
|
|
%files -n glslc
|
|
|
|
%doc glslc/README.asciidoc
|
|
|
|
%license LICENSE
|
|
|
|
%{_bindir}/glslc
|
|
|
|
|
|
|
|
%files -n libshaderc
|
|
|
|
%doc AUTHORS CHANGES CONTRIBUTORS README.md
|
|
|
|
%license LICENSE
|
|
|
|
%{_libdir}/libshaderc_shared.so.1*
|
|
|
|
|
|
|
|
%files -n libshaderc-devel
|
|
|
|
%{_includedir}/%{name}/
|
|
|
|
%{_libdir}/libshaderc_shared.so
|
2019-06-10 15:51:37 +00:00
|
|
|
%{_libdir}/pkgconfig/shaderc.pc
|
2018-10-02 16:08:23 +00:00
|
|
|
|
|
|
|
%files -n libshaderc-static
|
|
|
|
%license LICENSE
|
|
|
|
%{_libdir}/libshaderc.a
|
|
|
|
%{_libdir}/libshaderc_combined.a
|
2019-06-10 15:51:37 +00:00
|
|
|
%{_libdir}/pkgconfig/shaderc_static.pc
|
|
|
|
%{_libdir}/pkgconfig/shaderc_combined.pc
|
|
|
|
|
2018-10-02 16:08:23 +00:00
|
|
|
%changelog
|
2020-08-01 09:02:43 +00:00
|
|
|
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2020.1-3
|
|
|
|
- Second attempt - Rebuilt for
|
|
|
|
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
2020-07-29 10:37:34 +00:00
|
|
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2020.1-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
2020-06-17 19:21:06 +00:00
|
|
|
* Wed Jun 17 20:15:27 CEST 2020 Robert-André Mauchin <zebob.m@gmail.com> - 2020.1-1
|
|
|
|
- Update to 2020.1
|
|
|
|
|
2020-02-02 22:26:12 +00:00
|
|
|
* Sun Feb 02 20:53:01 CET 2020 Robert-André Mauchin <zebob.m@gmail.com> - 2019.1-1
|
|
|
|
- Update to 2019.1
|
|
|
|
|
2020-01-30 23:20:15 +00:00
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2019.0-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
2019-07-26 23:10:28 +00:00
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2019.0-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
2019-06-10 15:51:37 +00:00
|
|
|
* Mon Jun 10 00:18:18 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 2019.0-1
|
|
|
|
- Release 2019.0
|
|
|
|
|
2019-02-02 15:17:10 +00:00
|
|
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2018.0-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
2018-10-03 16:10:23 +00:00
|
|
|
* Wed Oct 03 2018 Robert-André Mauchin <zebob.m@gmail.com> - 2018.0-1
|
|
|
|
- Release 2018.0
|
|
|
|
|
2018-10-02 16:08:23 +00:00
|
|
|
* Mon Sep 24 2018 Robert-André Mauchin <zebob.m@gmail.com> - 2017.2-1
|
|
|
|
- Initial build
|
|
|
|
|