2022-07-01 20:17:33 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
# Copyright (C) 2021-present Frank Hartung (supervisedthinking (@) gmail.com)
|
|
|
|
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
|
|
|
|
|
|
|
PKG_NAME="glslang"
|
2022-12-30 21:35:48 +00:00
|
|
|
# The SPIRV-Tools & SPIRV-Headers pkg_version/s need to match the compatible (known_good) glslang pkg_version.
|
2022-07-01 20:17:33 +00:00
|
|
|
# https://raw.githubusercontent.com/KhronosGroup/glslang/${PKG_VERSION}/known_good.json
|
2022-12-30 21:35:48 +00:00
|
|
|
# When updating glslang pkg_version please update to the known_good spirv-tools & spirv-headers pkg_version/s.
|
2023-08-24 09:53:35 +00:00
|
|
|
PKG_VERSION="12.3.1"
|
2022-07-01 20:17:33 +00:00
|
|
|
PKG_LICENSE="Apache-2.0"
|
|
|
|
PKG_SITE="https://github.com/KhronosGroup/glslang"
|
|
|
|
PKG_URL="https://github.com/KhronosGroup/glslang/archive/${PKG_VERSION}.tar.gz"
|
2022-12-30 21:35:48 +00:00
|
|
|
PKG_DEPENDS_HOST="toolchain:host Python3:host"
|
|
|
|
PKG_DEPENDS_TARGET="toolchain Python3"
|
2022-07-01 20:17:33 +00:00
|
|
|
PKG_LONGDESC="Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator."
|
2022-12-30 21:35:48 +00:00
|
|
|
PKG_DEPENDS_UNPACK="spirv-headers spirv-tools"
|
2022-07-01 20:17:33 +00:00
|
|
|
|
2022-12-30 21:35:48 +00:00
|
|
|
PKG_CMAKE_OPTS_COMMON="-DBUILD_EXTERNAL=ON \
|
2022-07-01 20:17:33 +00:00
|
|
|
-DENABLE_SPVREMAPPER=OFF \
|
|
|
|
-DENABLE_GLSLANG_JS=OFF \
|
|
|
|
-DENABLE_RTTI=OFF \
|
|
|
|
-DENABLE_EXCEPTIONS=OFF \
|
|
|
|
-DENABLE_OPT=ON \
|
|
|
|
-DENABLE_PCH=ON \
|
|
|
|
-DENABLE_CTEST=OFF \
|
2022-12-30 21:35:48 +00:00
|
|
|
-DUSE_CCACHE=ON \
|
2022-07-01 20:17:33 +00:00
|
|
|
-Wno-dev"
|
|
|
|
|
2022-12-30 21:35:48 +00:00
|
|
|
post_unpack() {
|
|
|
|
# Enables SPIR-V optimzer capability needed for ENABLE_OPT CMake build option
|
2022-07-01 20:17:33 +00:00
|
|
|
mkdir -p ${PKG_BUILD}/External/spirv-tools/external/spirv-headers
|
|
|
|
cp -R $(get_build_dir spirv-tools)/* ${PKG_BUILD}/External/spirv-tools
|
|
|
|
cp -R $(get_build_dir spirv-headers)/* ${PKG_BUILD}/External/spirv-tools/external/spirv-headers
|
|
|
|
}
|
2022-12-30 21:35:48 +00:00
|
|
|
|
|
|
|
pre_configure_host() {
|
|
|
|
PKG_CMAKE_OPTS_HOST+="${PKG_CMAKE_OPTS_COMMON} \
|
|
|
|
-DBUILD_SHARED_LIBS=OFF"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
pre_configure_target() {
|
|
|
|
PKG_CMAKE_OPTS_TARGET+="${PKG_CMAKE_OPTS_COMMON} \
|
|
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
|
|
-DENABLE_GLSLANG_BINARIES=OFF"
|
|
|
|
}
|