9 Star 0 Fork 2

src-openEuler/shaderc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
shaderc.spec 3.67 KB
一键复制 编辑 原始数据 按行查看 历史
Venland 提交于 2024-03-07 15:22 . init package
# Glslang revision from packaged version
%global glslang_version 14.3.0
Name: shaderc
Version: 2024.3
Release: 1
Summary: Collection of tools, libraries, and tests for Vulkan shader compilation
License: Apache-2.0
URL: https://github.com/google/shaderc
Source: %{url}/archive/v%{version}.tar.gz
# Patch to unbundle 3rd party code
Patch: 0001-Drop-third-party-code-in-CMakeLists.txt.patch
Patch: glslang_linker_flags.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: ninja-build
BuildRequires: sed
BuildRequires: spirv-tools
BuildRequires: glslang-devel
BuildRequires: python3-devel
BuildRequires: spirv-headers-devel
BuildRequires: spirv-tools-devel
%description
A collection of tools, libraries and tests for shader compilation.
Shaderc aims to to provide:
- a command line compiler with GCC- and Clang-like usage, for better
integration with build systems
- an API where functionality can be added without breaking existing clients
- an API supporting standard concurrency patterns across multiple
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
rm -r third_party
# Stolen from Gentoo
# Create build-version.inc since we want to use our packaged
# SPIRV-Tools and glslang
sed -i -e '/build-version/d' glslc/CMakeLists.txt
echo \"shaderc $(grep -m1 -o '^v[[:digit:]]\{4\}\.[[:digit:]]\(-dev\)\? [[:digit:]]\{4\}-[[:digit:]]\{2\}-[[:digit:]]\{2\}$' CHANGES)\" \
> glslc/src/build-version.inc
echo \"spirv-tools $(grep -m1 -o '^v[[:digit:]]\{4\}\.[[:digit:]]\(-dev\)\? [[:digit:]]\{4\}-[[:digit:]]\{2\}-[[:digit:]]\{2\}$' /usr/share/doc/spirv-tools/CHANGES)\" \
>> glslc/src/build-version.inc
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
%build
# We disable the tests because they don't work with our unbundling of 3rd party.
# See https://github.com/google/shaderc/issues/470
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_SKIP_RPATH=True \
-DSHADERC_SKIP_TESTS=True \
-DPYTHON_EXECUTABLE=%{python3} \
-GNinja
%ninja_build
%install
%ninja_install
%check
%ninja_test
%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
%{_libdir}/pkgconfig/shaderc.pc
%files -n libshaderc-static
%license LICENSE
%{_libdir}/libshaderc.a
%{_libdir}/libshaderc_combined.a
%{_libdir}/pkgconfig/shaderc_static.pc
%{_libdir}/pkgconfig/shaderc_combined.pc
%changelog
* Wed Sep 25 2024 liweigang <liweigang.lwg@gmail.com> - 2024.3-1
- init package.
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/shaderc.git
git@gitee.com:src-openeuler/shaderc.git
src-openeuler
shaderc
shaderc
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385