summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Biermann <tbier@posteo.de>2023-01-15 09:59:02 +0000
committerTim Biermann <tbier@posteo.de>2023-01-15 09:59:02 +0000
commit34f656c5e8281624e37937f01a375a356d8c86c2 (patch)
treee180e5d4ec14aa046ee02ce7654332c1b0d29fb2
parent389b59d74570c4fe8c3e8afec9febf37576a7c8e (diff)
downloadopt-34f656c5e8281624e37937f01a375a356d8c86c2.tar.gz
opt-34f656c5e8281624e37937f01a375a356d8c86c2.tar.xz
glslang: 11.13.0 -> 1.3.236.0; unbreak mpv
-rw-r--r--glslang/.footprint2
-rw-r--r--glslang/.signature10
-rw-r--r--glslang/0001-pkg-config-compatibility.patch167
-rw-r--r--glslang/Pkgfile10
4 files changed, 179 insertions, 10 deletions
diff --git a/glslang/.footprint b/glslang/.footprint
index 42a70f9d0..8d83413b8 100644
--- a/glslang/.footprint
+++ b/glslang/.footprint
@@ -105,3 +105,5 @@ drwxr-xr-x root/root usr/lib/cmake/glslang/
lrwxrwxrwx root/root usr/lib/libglslang.so -> libglslang.so.11
lrwxrwxrwx root/root usr/lib/libglslang.so.11 -> libglslang.so.11.13.0
-rwxr-xr-x root/root usr/lib/libglslang.so.11.13.0
+drwxr-xr-x root/root usr/lib/pkgconfig/
+-rw-r--r-- root/root usr/lib/pkgconfig/spirv.pc
diff --git a/glslang/.signature b/glslang/.signature
index 98fe3f943..e49de12a1 100644
--- a/glslang/.signature
+++ b/glslang/.signature
@@ -1,6 +1,6 @@
untrusted comment: verify with /etc/ports/opt.pub
-RWSE3ohX2g5d/d0YpBMByDWf8yTvAmtSitMxbP8vJAYyJFGjEnelveEB7y0pXyqoOjtQ2rAoSx4Z01Xcj7vW+BFFupVlm4uqmgo=
-SHA256 (Pkgfile) = f76a696f842c3ecbe5d41443d98ef1cd8df2cdc13d298b3fb04fedc60c48c22d
-SHA256 (.footprint) = 8709b31659277d0a0934e4bf76811125c60820eb6cb0dbc623c75bf09cd48766
-SHA256 (glslang-11.13.0.tar.gz) = 592c98aeb03b3e81597ddaf83633c4e63068d14b18a766fd11033bad73127162
-SHA256 (glslang-11.13.0-cmake_include_dirs.patch) = 70f08416e447e7c68730186c9fcd629e96896aa9bf780cdceffc2cf9b8efca21
+RWSE3ohX2g5d/e8YVrEYJaod+7cS7H6HaCHMsV+dd601Q579NrKN/QzOaZF/VDnm4I8YkCztCnJgWrBWSw6lx251f/1QamezmAg=
+SHA256 (Pkgfile) = 110d9049282e1e3853c454e672f7a3f5221e4253a94ce4c815b6dc185918133f
+SHA256 (.footprint) = 1acb32d7bc9d4b275bfc21a1698e3866f072fe92952f380e1a28b9aa42e75133
+SHA256 (glslang-sdk-1.3.236.0.tar.gz) = fb6f323a36efcd98766bb72f598008f73c4c92bce69c79fc98ad2b3cdca0c263
+SHA256 (0001-pkg-config-compatibility.patch) = 23e3ffa56bf9f710a5a4ba496eb7413ca06c5e5d25b666b1b0269983a6bf8e03
diff --git a/glslang/0001-pkg-config-compatibility.patch b/glslang/0001-pkg-config-compatibility.patch
new file mode 100644
index 000000000..523c6d97b
--- /dev/null
+++ b/glslang/0001-pkg-config-compatibility.patch
@@ -0,0 +1,167 @@
+diff -up glslang-sdk-1.3.224.0/CMakeLists.txt.dma glslang-sdk-1.3.224.0/CMakeLists.txt
+--- glslang-sdk-1.3.224.0/CMakeLists.txt.dma 2022-08-13 01:32:10.000000000 +1000
++++ glslang-sdk-1.3.224.0/CMakeLists.txt 2022-08-24 11:02:14.557865460 +1000
+@@ -129,6 +129,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()
+@@ -319,11 +326,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-sdk-1.3.224.0/External/CMakeLists.txt.dma glslang-sdk-1.3.224.0/External/CMakeLists.txt
+--- glslang-sdk-1.3.224.0/External/CMakeLists.txt.dma 2022-08-13 01:32:10.000000000 +1000
++++ glslang-sdk-1.3.224.0/External/CMakeLists.txt 2022-08-24 11:02:14.564865557 +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-sdk-1.3.224.0/glslang/glslang.pc.cmake.in.dma glslang-sdk-1.3.224.0/glslang/glslang.pc.cmake.in
+--- glslang-sdk-1.3.224.0/glslang/glslang.pc.cmake.in.dma 2022-08-24 11:02:14.567865599 +1000
++++ glslang-sdk-1.3.224.0/glslang/glslang.pc.cmake.in 2022-08-24 11:02:14.567865599 +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-sdk-1.3.224.0/SPIRV/CMakeLists.txt.dma glslang-sdk-1.3.224.0/SPIRV/CMakeLists.txt
+--- glslang-sdk-1.3.224.0/SPIRV/CMakeLists.txt.dma 2022-08-13 01:32:10.000000000 +1000
++++ glslang-sdk-1.3.224.0/SPIRV/CMakeLists.txt 2022-08-24 11:02:39.022204124 +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()
+@@ -139,6 +149,9 @@ if(ENABLE_GLSLANG_INSTALL)
+ add_library(SPIRV ALIAS glslang::SPIRV)
+ ")
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/SPIRVTargets.cmake" 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-sdk-1.3.224.0/SPIRV/spirv.pc.cmake.in.dma glslang-sdk-1.3.224.0/SPIRV/spirv.pc.cmake.in
+--- glslang-sdk-1.3.224.0/SPIRV/spirv.pc.cmake.in.dma 2022-08-24 11:02:14.569865626 +1000
++++ glslang-sdk-1.3.224.0/SPIRV/spirv.pc.cmake.in 2022-08-24 11:02:14.569865626 +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-sdk-1.3.224.0/SPIRV/SpvTools.cpp.dma glslang-sdk-1.3.224.0/SPIRV/SpvTools.cpp
+--- glslang-sdk-1.3.224.0/SPIRV/SpvTools.cpp.dma 2022-08-13 01:32:10.000000000 +1000
++++ glslang-sdk-1.3.224.0/SPIRV/SpvTools.cpp 2022-08-24 11:02:14.570865640 +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-sdk-1.3.224.0/StandAlone/CMakeLists.txt.dma glslang-sdk-1.3.224.0/StandAlone/CMakeLists.txt
+--- glslang-sdk-1.3.224.0/StandAlone/CMakeLists.txt.dma 2022-08-24 11:01:28.064221842 +1000
++++ glslang-sdk-1.3.224.0/StandAlone/CMakeLists.txt 2022-08-24 11:02:14.571865654 +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
diff --git a/glslang/Pkgfile b/glslang/Pkgfile
index 421344c3f..95f3379f7 100644
--- a/glslang/Pkgfile
+++ b/glslang/Pkgfile
@@ -4,17 +4,17 @@
# Depends on: spirv-tools
name=glslang
-version=11.13.0
+version=1.3.236.0
release=1
-source=(https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.gz
- glslang-11.13.0-cmake_include_dirs.patch)
+source=(https://github.com/KhronosGroup/glslang/archive/sdk-$version/$name-sdk-$version.tar.gz
+ 0001-pkg-config-compatibility.patch)
build() {
- patch -Np1 -d $SRC/$name-$version -i $SRC/glslang-11.13.0-cmake_include_dirs.patch
+ patch -Np1 -d $SRC/$name-sdk-$version -i $SRC/0001-pkg-config-compatibility.patch
local config="
-G Ninja
- -S $name-$version
+ -S $name-sdk-$version
-D CMAKE_INSTALL_PREFIX=/usr
-D CMAKE_INSTALL_LIBDIR=lib
-D CMAKE_BUILD_TYPE=Release

Generated by cgit