diff options
author | Danny Rawlins <monster.romster@gmail.com> | 2019-08-30 19:05:50 +1000 |
---|---|---|
committer | Danny Rawlins <monster.romster@gmail.com> | 2019-08-30 19:13:36 +1000 |
commit | 6b6d21964dda3fe6d80de3ccfddcdca41b82ca5a (patch) | |
tree | 764f23d7527dce5e28072701dc64f7d36aeb7636 /glslang | |
parent | b36f96df5b411664c2c9bb02adc9b77a15265bff (diff) | |
download | opt-6b6d21964dda3fe6d80de3ccfddcdca41b82ca5a.tar.gz opt-6b6d21964dda3fe6d80de3ccfddcdca41b82ca5a.tar.xz |
glslang: 7.11.3214 -> 7.12.3352
Diffstat (limited to 'glslang')
-rw-r--r-- | glslang/.footprint | 3 | ||||
-rw-r--r-- | glslang/.signature | 9 | ||||
-rw-r--r-- | glslang/0001-pkg-config-compatibility.patch | 225 | ||||
-rw-r--r-- | glslang/Pkgfile | 22 |
4 files changed, 248 insertions, 11 deletions
diff --git a/glslang/.footprint b/glslang/.footprint index 0839bba15..41858ee2c 100644 --- a/glslang/.footprint +++ b/glslang/.footprint @@ -73,3 +73,6 @@ lrwxrwxrwx root/root usr/lib/libglslang-default-resource-limits.so.0 -> libglsla -rw-r--r-- root/root usr/lib/libglslang.a -rwxr-xr-x root/root usr/lib/libglslang.so lrwxrwxrwx root/root usr/lib/libglslang.so.0 -> libglslang.so +drwxr-xr-x root/root usr/lib/pkgconfig/ +-rw-r--r-- root/root usr/lib/pkgconfig/glslang.pc +-rw-r--r-- root/root usr/lib/pkgconfig/spirv.pc diff --git a/glslang/.signature b/glslang/.signature index d640181ca..786e0775e 100644 --- a/glslang/.signature +++ b/glslang/.signature @@ -1,5 +1,6 @@ untrusted comment: verify with /etc/ports/opt.pub -RWSE3ohX2g5d/dbiACJdZoYaVOxfRK+iK3vJCmzWocVhn5YqqCERWO+9C/gB1dPRiiFdiDCE8uzH4dn9SxNoWX2wyMB7r19Z4Qk= -SHA256 (Pkgfile) = b9f55fc26c867be00aef4ee60781c983e7ea6b7a6794b9f465cb79340044c76a -SHA256 (.footprint) = 6efc8343d6d8e000bcb8127c467203b1c2938fcc087ab826a00dd97c6f5b51e0 -SHA256 (glslang-7.11.3214.tar.gz) = b30b4668734328d256e30c94037e60d3775b1055743c04d8fd709f2960f302a9 +RWSE3ohX2g5d/YuV3BdLYNX0t6/D9KsUD4fYvKe3YuPHQd1qnSCyFeDUUzZLIpe7vfJyfJefn9b+Yz6DK7TuKbEyP4YH2kAPSAM= +SHA256 (Pkgfile) = dad44f1814ec929b22159294bdc0d312d38679c20b9e1eecc9258004b4f685aa +SHA256 (.footprint) = b90552690b53fdf57ea6da5448d7e9e18ddabc8bba8ff7fd3fcef7b58c1bed1c +SHA256 (glslang-7.12.3352.tar.gz) = 4ecce011b73dd7196a5114f66776d5a4c4c3674fc9bc6f39ad3c1ee15a8abbe1 +SHA256 (0001-pkg-config-compatibility.patch) = efd22887303f1c6cdaacd31d6049438502bc7d699859fd501d075b8ab6f3ae42 diff --git a/glslang/0001-pkg-config-compatibility.patch b/glslang/0001-pkg-config-compatibility.patch new file mode 100644 index 000000000..38592ffea --- /dev/null +++ b/glslang/0001-pkg-config-compatibility.patch @@ -0,0 +1,225 @@ +https://src.fedoraproject.org/rpms/glslang/raw/master/f/0001-pkg-config-compatibility.patch +https://src.fedoraproject.org/rpms/glslang/tree/master +https://github.com/KhronosGroup/glslang/pull/1621 + +From d2a8230cc05d77dad82a60329881244814797e4c Mon Sep 17 00:00:00 2001 +From: Rafael Amador Galvan <rafael.amador@gmail.com> +Date: Fri, 8 Mar 2019 11:39:58 -0600 +Subject: [PATCH 1/2] pkg-config compatibility + +--- + CMakeLists.txt | 13 ++++++++----- + SPIRV/CMakeLists.txt | 19 +++++++++++++++++-- + SPIRV/SpvTools.cpp | 4 ++-- + SPIRV/spirv.pc.cmake.in | 11 +++++++++++ + StandAlone/CMakeLists.txt | 9 ++++++++- + glslang/CMakeLists.txt | 3 +++ + glslang/glslang.pc.cmake.in | 11 +++++++++++ + 7 files changed, 60 insertions(+), 10 deletions(-) + create mode 100644 SPIRV/spirv.pc.cmake.in + create mode 100644 glslang/glslang.pc.cmake.in + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aafa70ed1..21ecef08d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -57,6 +57,13 @@ macro(glslang_pch SRCS PCHCPP) + endmacro(glslang_pch) + + project(glslang) ++ ++# 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) + # make testing optional + include(CTest) + +@@ -117,11 +124,7 @@ endfunction(glslang_set_link_args) + # We depend on these for later projects, so they should come first. + add_subdirectory(External) + +-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 --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt +index 1997e74c3..1760a065b 100644 +--- a/SPIRV/CMakeLists.txt ++++ b/SPIRV/CMakeLists.txt +@@ -48,6 +48,10 @@ set_property(TARGET SPIRV PROPERTY FOLDER glslang) + set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON) + target_include_directories(SPIRV PUBLIC ..) + ++ ++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) +@@ -61,13 +65,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 glslang SPIRV-Tools-opt) +- target_include_directories(SPIRV PUBLIC ../External) ++ target_link_libraries(SPIRV glslang) + else() + target_link_libraries(SPIRV glslang) + endif(ENABLE_OPT) +@@ -96,5 +108,8 @@ if(ENABLE_GLSLANG_INSTALL) + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + ++ # 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}/SPIRV/) + endif(ENABLE_GLSLANG_INSTALL) +diff --git a/SPIRV/SpvTools.cpp b/SPIRV/SpvTools.cpp +index eec06e0ac..723a64452 100644 +--- a/SPIRV/SpvTools.cpp ++++ b/SPIRV/SpvTools.cpp +@@ -43,8 +43,8 @@ + #include <iostream> + + #include "SpvTools.h" +-#include "spirv-tools/optimizer.hpp" +-#include "spirv-tools/libspirv.h" ++#include <spirv-tools/optimizer.hpp> ++#include <spirv-tools/libspirv.h> + + namespace glslang { + +diff --git a/SPIRV/spirv.pc.cmake.in b/SPIRV/spirv.pc.cmake.in +new file mode 100644 +index 000000000..dfcad940b +--- /dev/null ++++ b/SPIRV/spirv.pc.cmake.in +@@ -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 --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt +index 5cea53d9f..89a7da9c4 100644 +--- a/StandAlone/CMakeLists.txt ++++ b/StandAlone/CMakeLists.txt +@@ -23,6 +23,14 @@ set(LIBRARIES + SPVRemapper + glslang-default-resource-limits) + ++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) +@@ -33,7 +41,6 @@ endif(WIN32) + + target_link_libraries(glslangValidator ${LIBRARIES}) + target_link_libraries(spirv-remap ${LIBRARIES}) +-target_include_directories(glslangValidator PUBLIC ../External) + + if(WIN32) + source_group("Source" FILES ${SOURCES}) +diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt +index 5f51476ba..daf717fab 100644 +--- a/glslang/CMakeLists.txt ++++ b/glslang/CMakeLists.txt +@@ -80,6 +80,7 @@ set(HEADERS + # WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + # set(BISON_GLSLParser_OUTPUT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp) + ++set(VERSION 7.11.3113) + glslang_pch(SOURCES MachineIndependent/pch.cpp) + + add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS}) +@@ -113,6 +114,8 @@ if(ENABLE_GLSLANG_INSTALL) + install(TARGETS glslang + 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) + endif(ENABLE_GLSLANG_INSTALL) + + if(ENABLE_GLSLANG_INSTALL) +diff --git a/glslang/glslang.pc.cmake.in b/glslang/glslang.pc.cmake.in +new file mode 100644 +index 000000000..921497eb6 +--- /dev/null ++++ b/glslang/glslang.pc.cmake.in +@@ -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 + +From 0ebd323091567c65be3f2831a3bcac6223b0aa52 Mon Sep 17 00:00:00 2001 +From: Rafael Amador Galvan <rafael.amador@gmail.com> +Date: Fri, 8 Mar 2019 11:50:49 -0600 +Subject: [PATCH 2/2] removed the section belonging to the SPIRV-Tools + dependency + +--- + External/CMakeLists.txt | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/External/CMakeLists.txt b/External/CMakeLists.txt +index 4d9690134..24f03237a 100644 +--- a/External/CMakeLists.txt ++++ b/External/CMakeLists.txt +@@ -34,10 +34,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 --git a/glslang/Pkgfile b/glslang/Pkgfile index ee627ada4..c3398102f 100644 --- a/glslang/Pkgfile +++ b/glslang/Pkgfile @@ -1,36 +1,44 @@ -# Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator +# Description: OpenGL and OpenGL ES shader front end and validator # URL: https://www.khronos.org/opengles/sdk/tools/Reference-Compiler # Maintainer: Danny Rawlins, crux at romster dot me # Depends on: spirv-tools name=glslang -version=7.11.3214 +version=7.12.3352 release=1 -source=(https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.gz) +source=(https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.gz + 0001-pkg-config-compatibility.patch) build() { cd $name-$version + # Patch to build against system spirv-tools + patch -p1 -i $SRC/0001-pkg-config-compatibility.patch + mkdir -p build-{shared,static} (cd build-shared cmake .. \ -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_BUILD_TYPE=Release \ + -GNinja \ -DBUILD_SHARED_LIBS=ON - make + ninja ) (cd build-static cmake .. \ -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_BUILD_TYPE=Release \ + -GNinja \ -DBUILD_SHARED_LIBS=OFF - make + ninja ) - make -C build-shared DESTDIR=$PKG install - make -C build-static DESTDIR=$PKG install + DESTDIR=$PKG ninja -C build-shared install + DESTDIR=$PKG ninja -C build-static install cd $PKG/usr/lib for lib in *.so; do |