Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:aevseev:desktop
glslang
glslang.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File glslang.spec of Package glslang
%define realname glslang %define realver 1.3.231.1 %define srcext tar.gz # See known_good.json %define spirv_tools_ref eb0a36633d2acf4de82588504f951ad0f2cecacb %define spirv_headers_ref 85a1ed200d50660786c1a88d9166e871123cce39 %bcond_with shared %define so_ver 11 # Common info Name: %{realname} Version: %{realver} Release: wiz%{?extraver:0.}1%{?dist} License: BSD-3-Clause Group: System/Libraries URL: https://github.com/KhronosGroup/glslang Summary: Front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator BuildRequires: cmake >= 2.8.12 BuildRequires: ninja BuildRequires: gcc-c++ BuildRequires: python3%{?suse_version:-base} BuildRoot: %{_tmppath}/%{name}-root Source0: https://github.com/KhronosGroup/glslang/archive/refs/tags/sdk-%{realver}%{?extraver}.%{srcext}#/%{realname}-%{realver}%{?extraver}.%{srcext} # External projects Source11: https://github.com/KhronosGroup/SPIRV-Tools/archive/%{spirv_tools_ref}.%{srcext} Source12: https://github.com/KhronosGroup/SPIRV-Headers/archive/%{spirv_headers_ref}.%{srcext} %description Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator. %if %{with shared} %package -n lib%{realname}%{so_ver} Group: System/Libraries Summary: Front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator %description -n lib%{realname}%{so_ver} Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator. %files -n lib%{realname}%{so_ver} %defattr(-,root,root) %license LICENSE.txt %{_libdir}/*.so.%{?so_ver}* %post -n lib%{realname}%{so_ver} -p /sbin/ldconfig %postun -n lib%{realname}%{so_ver} -p /sbin/ldconfig %endif %package devel Group: Development/Languages/C and C++ Summary: Development files for %{name} Provides: lib%{realname}-devel = %{version}-%{release} %if %{with shared} Provides: lib%{realname}%{so_ver}-devel = %{version}-%{release} Requires: lib%{realname}%{so_ver} = %{version}-%{release} %endif %description devel Development files for %{name} # Preparation step (unpackung and patching if necessary) %prep %setup -q -n %{realname}-sdk-%{realver}%{?extraver} -a11 -a12 %{__ln_s} -fn ../../SPIRV-Headers-%{spirv_headers_ref} SPIRV-Tools-%{spirv_tools_ref}/external/spirv-headers %{__ln_s} -fn ../SPIRV-Tools-%{spirv_tools_ref} External/spirv-tools %build _CFLAGS='%{optflags} %{?gcc_lto:%{gcc_lto}%{!?with_shared: -ffat-lto-objects}}' _LDFLAGS='-Wl,--as-needed -Wl,--strip-all -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro %{?gcc_lto:%{gcc_lto}%{!?with_shared: -ffat-lto-objects}}' _CMAKE_ARGS=( -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_FLAGS_RELEASE="$_CFLAGS" -DCMAKE_EXE_LINKER_FLAGS_RELEASE="$_LDFLAGS" -DCMAKE_MODULE_LINKER_FLAGS_RELEASE="$_LDFLAGS" -DCMAKE_SHARED_LINKER_FLAGS_RELEASE="$_LDFLAGS" -DCMAKE_VERBOSE_MAKEFILE=YES ) %{__mkdir} build cd build cmake .. \ -G Ninja \ "${_CMAKE_ARGS[@]}" \ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ \ %if %{with shared} -DBUILD_SHARED_LIBS=YES \ %endif -DENABLE_CTEST=NO ninja -v %{?_smp_mflags} %install DESTDIR=%{buildroot} ninja -v -C build install %{__rm} -rf %{buildroot}%{_includedir}/SPIRV %{__ln_s} -fn glslang/SPIRV %{buildroot}%{_includedir}/ # Fix shebang [ "%{buildroot}" != "/" ] && %{__sed} -ri '1 s|/usr/bin/env sh|/bin/sh|' %{buildroot}%{_bindir}/spirv-lesspipe.sh %clean [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} # Files %files %defattr(-,root,root) %license LICENSE.txt %doc CODE_OF_CONDUCT.md README-spirv-remap.txt README.md %{_bindir}/glslangValidator %{_bindir}/spirv-* # Development stuff %files devel %defattr(-,root,root) %license LICENSE.txt %doc CODE_OF_CONDUCT.md README-spirv-remap.txt README.md %{_includedir}/%{realname} %{_includedir}/SPIRV %dir %{_libdir}/cmake/glslang %dir %{_libdir}/cmake %{_libdir}/cmake/glslang/*.cmake %if %{with shared} %{_libdir}/*.so %else %dir %{_libdir}/cmake %{_libdir}/cmake/*.cmake %{_libdir}/*.a %endif %exclude %{_includedir}/spirv-tools/ %exclude %{_libdir}/cmake/SPIRV-Tools*/ %exclude %{_libdir}/libSPIRV-Tools-shared.so %exclude %{_libdir}/pkgconfig/SPIRV-Tools*.pc %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor