glslang, new recipe (#10172)

This commit is contained in:
Schrijvers Luc
2024-03-02 09:38:27 +01:00
committed by GitHub
parent 0e0b526bc5
commit fa6c563f19

View File

@@ -0,0 +1,108 @@
SUMMARY="OpenGL and OpenGL ES shader front end and validator"
DESCRIPTION="Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator
There are several components:
* Reference Validator and GLSL/ESSL -> AST Front End
An OpenGL GLSL and OpenGL|ES GLSL (ESSL) front-end for reference validation and translation of \
GLSL/ESSL into an internal abstract syntax tree (AST).
Status: Virtually complete, with results carrying similar weight as the specifications.
* HLSL -> AST Front End
An HLSL front-end for translation of an approximation of HLSL to glslang's AST form.
Status: Partially complete. Semantics are not reference quality and input is not validated.
This is in contrast to the DXC project, which receives a much larger investment and attempts to \
have definitive/reference-level semantics.
See issue 362 and issue 701 for current status.
* AST -> SPIR-V Back End
Translates glslang's AST to the Khronos-specified SPIR-V intermediate language.
Status: Virtually complete.
* Reflector
An API for getting reflection information from the AST, reflection types/variables/etc. from the \
HLL source (not the SPIR-V).
Status: There is a large amount of functionality present, but no specification/goal to measure \
completeness against. It is accurate for the input HLL and AST, but only approximate for what would later be emitted for SPIR-V.
* Standalone Wrapper
glslangValidator is command-line tool for accessing the functionality above.
Status: Complete.
Tasks waiting to be done are documented as GitHub issues."
HOMEPAGE="https://github.com/KhronosGroup/glslang"
COPYRIGHT="2014-2020 The Khronos Group Inc"
LICENSE="Apache v2
BSD (2-clause)
BSD (3-clause)
MIT"
REVISION="1"
SOURCE_URI="https://github.com/KhronosGroup/glslang/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="80bbb916a23e94ea9cbfb1acb5d1a44a7e0c9613bcf5b5947c03f2273bdc92b0"
ARCHITECTURES="all x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
glslang$secondaryArchSuffix = $portVersion
cmd:glslang$secondaryArchSuffix = $portVersion
cmd:glslangValidator$secondaryArchSuffix = $portVersion
cmd:spirv_remap$secondaryArchSuffix = $portVersion
lib:libglslang_default_resource_limits$secondaryArchSuffix = $portVersion
lib:libglslang$secondaryArchSuffix = $portVersion
lib:libSPIRV$secondaryArchSuffix = $portVersion
lib:libSPVRemapper$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
glslang${secondaryArchSuffix}_devel = $portVersion
devel:libglslang_default_resource_limits$secondaryArchSuffix = $portVersion
devel:libglslang$secondaryArchSuffix = $portVersion
devel:libSPIRV$secondaryArchSuffix = $portVersion
devel:libSPVRemapper$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
glslang$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:python3
"
BUILD()
{
cmake -Bbuild -S. $cmakeDirArgs \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DENABLE_OPT=OFF \
-DGLSLANG_TESTS=ON
make -Cbuild $jobArgs
}
INSTALL()
{
make -Cbuild install
prepareInstalledDevelLibs \
libglslang-default-resource-limits \
libglslang \
libSPIRV \
libSPVRemapper
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
make -Cbuild test
}