import glslang-11.9.0-1.20220202.git2742e95.el9

This commit is contained in:
CentOS Sources 2022-05-17 05:01:49 -04:00 committed by Stepan Oksanichenko
commit 3bafdb5cda
5 changed files with 375 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/glslang-2742e959347ae2fac58acd0d022c92a0ff1f24bf.tar.gz

1
.glslang.metadata Normal file
View File

@ -0,0 +1 @@
53d23bfd3b5684b0736342d06d8bbb0b23f5c2e5 SOURCES/glslang-2742e959347ae2fac58acd0d022c92a0ff1f24bf.tar.gz

View File

@ -0,0 +1,178 @@
diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/CMakeLists.txt.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/CMakeLists.txt
--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/CMakeLists.txt.dma 2021-11-13 00:42:16.000000000 +1000
+++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/CMakeLists.txt 2021-11-23 17:40:46.511754273 +1000
@@ -121,6 +121,13 @@ if(USE_CCACHE)
endif()
endif()
+# using pkg-config to configure include paths and link libraries
+include(FindPkgConfig)
+pkg_check_modules(SPIRV_TOOLS REQUIRED SPIRV-Tools>=2019.2.1)
+if(BUILD_SHARED_LIBS)
+ pkg_check_modules(SPIRV_TOOLS_SHARED REQUIRED SPIRV-Tools-shared>=2019.2.1)
+endif(BUILD_SHARED_LIBS)
+
if(ENABLE_CTEST)
include(CTest)
endif()
@@ -307,11 +314,7 @@ if(BUILD_EXTERNAL AND IS_DIRECTORY ${CMA
add_subdirectory(External)
endif()
-if(NOT TARGET SPIRV-Tools-opt)
- set(ENABLE_OPT OFF)
-endif()
-
-if(ENABLE_OPT)
+if(${SPIRV_TOOLS_FOUND} EQUAL 1)
message(STATUS "optimizer enabled")
add_definitions(-DENABLE_OPT=1)
else()
diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/External/CMakeLists.txt.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/External/CMakeLists.txt
--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/External/CMakeLists.txt.dma 2021-11-13 00:42:16.000000000 +1000
+++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/External/CMakeLists.txt 2021-11-23 17:40:46.512754300 +1000
@@ -68,10 +68,3 @@ if(BUILD_TESTING)
endif()
endif()
-if(ENABLE_OPT AND NOT TARGET SPIRV-Tools-opt)
- if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools)
- set(SPIRV_SKIP_TESTS ON CACHE BOOL "Skip building SPIRV-Tools tests")
- add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools spirv-tools)
- endif()
-endif()
-
diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang/CMakeLists.txt.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang/CMakeLists.txt
--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang/CMakeLists.txt.dma 2021-11-13 00:42:16.000000000 +1000
+++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang/CMakeLists.txt 2021-11-23 17:40:46.513754326 +1000
@@ -211,6 +211,8 @@ if(ENABLE_GLSLANG_INSTALL)
EXPORT glslangTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/glslang.pc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/glslang.pc @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/glslang.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(EXPORT glslangTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang/glslang.pc.cmake.in.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang/glslang.pc.cmake.in
--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang/glslang.pc.cmake.in.dma 2021-11-23 17:40:46.513754326 +1000
+++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/glslang/glslang.pc.cmake.in 2021-11-23 17:40:46.513754326 +1000
@@ -0,0 +1,11 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=@CMAKE_INSTALL_PREFIX@
+ libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+
+ Name: @PROJECT_NAME@
+ Description: OpenGL and OpenGL ES shader front end and validator
+ Requires:
+ Version: @VERSION@
+ Libs: -L${libdir} -lglslang -lOSDependent -lHLSL -lOGLCompiler -lSPVRemapper
+ Cflags: -I${includedir}
\ No newline at end of file
diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/CMakeLists.txt.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/CMakeLists.txt
--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/CMakeLists.txt.dma 2021-11-13 00:42:16.000000000 +1000
+++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/CMakeLists.txt 2021-11-23 17:40:46.514754353 +1000
@@ -77,6 +77,10 @@ target_include_directories(SPIRV PUBLIC
glslang_add_build_info_dependency(SPIRV)
+
+set(SPIRV_NAME spirv)
+set(SPIRV_VERSION 1.3)
+
if (ENABLE_SPVREMAPPER)
add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
set_property(TARGET SPVRemapper PROPERTY FOLDER glslang)
@@ -90,15 +94,21 @@ if(WIN32 AND BUILD_SHARED_LIBS)
endif()
endif()
+target_include_directories(SPIRV PUBLIC ${SPIRV_TOOLS_INCLUDE_DIRS})
+target_compile_options(SPIRV PUBLIC ${SPIRV_TOOLS_CFLAGS_OTHER})
+target_link_libraries(SPIRV ${SPIRV_TOOLS_LIBRARIES})
+if(BUILD_SHARED_LIBS)
+ target_include_directories(SPIRV PUBLIC ${SPIRV_TOOLS_SHARED_INCLUDE_DIRS})
+ target_compile_options(SPIRV PUBLIC ${SPIRV_TOOLS_SHARED_CFLAGS_OTHER})
+ target_link_libraries(SPIRV ${SPIRV_TOOLS_SHARED_LIBRARIES})
+endif(BUILD_SHARED_LIBS)
+
if(ENABLE_OPT)
target_include_directories(SPIRV
PRIVATE ${spirv-tools_SOURCE_DIR}/include
PRIVATE ${spirv-tools_SOURCE_DIR}/source
)
- target_link_libraries(SPIRV PRIVATE MachineIndependent SPIRV-Tools-opt)
- target_include_directories(SPIRV PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
+ target_link_libraries(SPIRV glslang)
else()
target_link_libraries(SPIRV PRIVATE MachineIndependent)
endif()
@@ -133,6 +143,9 @@ if(ENABLE_GLSLANG_INSTALL)
endif()
install(EXPORT SPIRVTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+ # spirv.pc Configuration
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/spirv.pc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/spirv.pc @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/spirv.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/)
endif()
diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/spirv.pc.cmake.in.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/spirv.pc.cmake.in
--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/spirv.pc.cmake.in.dma 2021-11-23 17:40:46.514754353 +1000
+++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/spirv.pc.cmake.in 2021-11-23 17:40:46.514754353 +1000
@@ -0,0 +1,11 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=@CMAKE_INSTALL_PREFIX@
+ libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+
+ Name: @SPIRV_NAME@
+ Description: SPIR-V is a binary intermediate language for representing graphical-shader stages and compute kernels for multiple Khronos APIs, including OpenCL, OpenGL, and Vulkan
+ Requires:
+ Version: @SPIRV_VERSION@
+ Libs: -L${libdir} -lSPIRV
+ Cflags: -I${includedir}
\ No newline at end of file
diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/SpvTools.cpp.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/SpvTools.cpp
--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/SpvTools.cpp.dma 2021-11-13 00:42:16.000000000 +1000
+++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/SPIRV/SpvTools.cpp 2021-11-23 17:40:46.515754380 +1000
@@ -43,7 +43,7 @@
#include <iostream>
#include "SpvTools.h"
-#include "spirv-tools/optimizer.hpp"
+#include <spirv-tools/optimizer.hpp>
namespace glslang {
diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/StandAlone/CMakeLists.txt.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/StandAlone/CMakeLists.txt
--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/StandAlone/CMakeLists.txt.dma 2021-11-23 17:40:36.884497081 +1000
+++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/StandAlone/CMakeLists.txt 2021-11-23 17:40:46.515754380 +1000
@@ -72,6 +72,14 @@ if(ENABLE_SPVREMAPPER)
set(LIBRARIES ${LIBRARIES} SPVRemapper)
endif()
+if(BUILD_SHARED_LIBS)
+ set(LIBRARIES ${LIBRARIES} ${SPIRV_TOOLS_SHARED_LIBRARIES})
+ target_include_directories(glslangValidator PUBLIC ${SPIRV_TOOLS_SHARED_INCLUDE_DIRS})
+else()
+ set(LIBRARIES ${LIBRARIES} ${SPIRV_TOOLS_LIBRARIES})
+ target_include_directories(glslangValidator PUBLIC ${SPIRV_TOOLS_INCLUDE_DIRS})
+endif(BUILD_SHARED_LIBS)
+
if(WIN32)
set(LIBRARIES ${LIBRARIES} psapi)
elseif(UNIX)
@@ -81,9 +89,6 @@ elseif(UNIX)
endif()
target_link_libraries(glslangValidator ${LIBRARIES})
-target_include_directories(glslangValidator PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
if(ENABLE_OPT)
target_include_directories(glslangValidator

View File

@ -0,0 +1,12 @@
diff -up glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/StandAlone/CMakeLists.txt.dma glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/StandAlone/CMakeLists.txt
--- glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/StandAlone/CMakeLists.txt.dma 2021-11-23 17:38:10.022569320 +1000
+++ glslang-c9706bdda0ac22b9856f1aa8261e5b9e15cd20c5/StandAlone/CMakeLists.txt 2021-11-23 17:38:19.087812070 +1000
@@ -47,7 +47,7 @@ add_custom_command(
#add_custom_target(glslangValidator DEPENDS ${GLSLANG_INTRINSIC_H})
-add_library(glslang-default-resource-limits
+add_library(glslang-default-resource-limits STATIC
${CMAKE_CURRENT_SOURCE_DIR}/ResourceLimits.cpp
${CMAKE_CURRENT_SOURCE_DIR}/resource_limits_c.cpp)
set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang)

183
SPECS/glslang.spec Normal file
View File

@ -0,0 +1,183 @@
%global commit 2742e959347ae2fac58acd0d022c92a0ff1f24bf
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commit_date 20220202
%global gitrel .%{commit_date}.git%{shortcommit}
Name: glslang
Version: 11.9.0
Release: 1%{?gitrel}%{?dist}
Summary: OpenGL and OpenGL ES shader front end and validator
License: BSD and GPLv3+ and ASL 2.0
URL: https://github.com/KhronosGroup
Source0: %url/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
Patch1: glslang-default-resource-limits_staticlib.patch
# Patch to build against system spirv-tools (rebased locally)
#Patch3: https://patch-diff.githubusercontent.com/raw/KhronosGroup/glslang/pull/1722.patch#/0001-pkg-config-compatibility.patch
Patch3: 0001-pkg-config-compatibility.patch
BuildRequires: cmake3
BuildRequires: gcc-c++
BuildRequires: ninja-build
BuildRequires: spirv-tools-devel
%description
%{name} is the official reference compiler front end for the OpenGL
ES and OpenGL shading languages. It implements a strict
interpretation of the specifications for these languages.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
%{name} is the official reference compiler front end for the OpenGL
ES and OpenGL shading languages. It implements a strict
interpretation of the specifications for these languages.
%prep
%autosetup -p1 -n %{name}-%{commit}
# Fix rpmlint warning on debuginfo
find . -name '*.h' -or -name '*.cpp' -or -name '*.hpp'| xargs chmod a-x
%build
%cmake3 -DBUILD_SHARED_LIBS=OFF
%cmake_build
%install
%{cmake_install}
# we don't want them in here
rm -rf %{buildroot}%{_includedir}/SPIRV
%ifnarch s390x ppc64
%check
pushd Test
./runtests localResults ../%{_vpath_builddir}/StandAlone/glslangValidator ../%{_vpath_builddir}/StandAlone/spirv-remap
popd
%endif
# Install libglslang-default-resource-limits.a
install -pm 0644 %{_vpath_builddir}/StandAlone/libglslang-default-resource-limits.a %{buildroot}%{_libdir}/
%files
%doc README.md README-spirv-remap.txt
%{_bindir}/glslangValidator
%{_bindir}/spirv-remap
%files devel
%{_includedir}/glslang/
%{_libdir}/libHLSL.a
%{_libdir}/libOGLCompiler.a
%{_libdir}/libOSDependent.a
%{_libdir}/libSPIRV.a
%{_libdir}/libSPVRemapper.a
%{_libdir}/libglslang.a
%{_libdir}/libGenericCodeGen.a
%{_libdir}/libMachineIndependent.a
%{_libdir}/libglslang-default-resource-limits.a
%{_libdir}/pkgconfig/glslang.pc
%{_libdir}/pkgconfig/spirv.pc
%{_libdir}/cmake/*
%changelog
* Fri Feb 25 2022 Dave Airlie <airlied@redhat.com> - 11.9.0-1.20220202.git2742e95
- Latest snapshot used in 1.3.204 sdk
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 11.5.0-2.20210623.gitae2a562
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Jul 30 2021 Dave Airlie <airlied@redhat.com> - 11.5.0-1
- Latest snapshot used in 1.2.182 sdk
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 11.0.0-5.20201208.gitc594de2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Thu Jan 28 2021 Dave Airlie <airlied@redhat.com> - 11.0.0-4.20201208.gitc594de2
- Latest snapshot used in 1.2.162 sdk
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 11.0.0-3.20201104.gitd550beb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Nov 04 2020 Dave Airlie <airlied@redhat.com> - 11.0.0-2
- Latest upstream snapshot
* Wed Aug 05 2020 Dave Airlie <airlied@redhat.com> - 11.0.0-1
- Latest upstream snapshot
* Tue Aug 04 2020 Dave Airlie <airlied@redhat.com> - 8.13.3559-5
- Use cmake macros.
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 8.13.3559-4.2020421.gitc9b28b9
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 8.13.3559-3.2020421.gitc9b28b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Apr 22 2020 Dave Airlie <airlied@redhat.com> - 8.13.3559-2
- Update to latest git snapshot
* Wed Jan 29 2020 Dave Airlie <airlied@redhat.com> - 8.13.3559-1
- Update to latest git snapshot
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.13.3496-3.20191102.git7f77b2e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Dec 19 2019 Leigh Scott <leigh123linux@googlemail.com> - 7.13.3496-2.20191102.git7f77b2e
- Add patch for 'Fix a couple relative header paths in header'
* Wed Nov 13 2019 Dave Airlie <airlied@redhat.com> - 7.13.3496-1
- Latest upstream snapshot for validation layers build
* Sat Aug 03 2019 Dave Airlie <airlied@redhat.com> - 7.11.3214-3
- Latest upstream snapshot for validation layers build
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.11.3214-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Jun 10 01:27:27 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 7.11.3214-1
- Release 7.11.3214
- Add patch to build against system spirv-tools
* Fri Mar 29 2019 Dave Airlie <airlied@redhat.com> - 3.1-0.13.20190329.gite0d59bb
- Update for vulkan 1.1.101.0
* Tue Feb 12 2019 Dave Airlie <airlied@redhat.com> - 3.1-0.12.20190212.git05d12a9
- Update for vulkan 1.1.92.0
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-0.11.20180727.gite99a268
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Aug 07 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.1-0.10.20180727.gite99a268
- Update for vulkan 1.1.82.0
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-0.9.20180416.git3bb4c48
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Apr 23 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.1-0.8.20180416.git3bb4c48
- Update for vulkan 1.1.73.0
* Wed Mar 07 2018 Adam Williamson <awilliam@redhat.com> - 3.1-0.7.20180205.git2651cca
- Rebuild to fix GCC 8 mis-compilation
See https://da.gd/YJVwk ("GCC 8 ABI change on x86_64")
* Fri Feb 09 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.1-0.6.20180205.git2651cca
- Update for vulkan 1.0.68.0
* Fri Feb 09 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.1-0.5.20171028.git715c353
- Use ninja to build
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-0.4.20171028.git715c353
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jan 03 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.1-0.3.20171028.git715c353
- Exclude s390x and ppc64 from check section
* Wed Jan 03 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.1-0.2.20171028.git715c353
- Add check section to run tests
- Split binaries into main package
* Thu Jul 13 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.1-0.1.20171028.git715c353
- First build