44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
# 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=8.13.3743
|
|
release=1
|
|
source=(https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.gz
|
|
glslang-default-resource-limits_staticlib.patch
|
|
0001-pkg-config-compatibility.patch)
|
|
|
|
build() {
|
|
patch -d $name-$version -p1 -i $SRC/glslang-default-resource-limits_staticlib.patch
|
|
|
|
# Patch to build against system spirv-tools
|
|
patch -d $name-$version -p1 -i $SRC/0001-pkg-config-compatibility.patch
|
|
|
|
local config="
|
|
-S$name-$version \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_SKIP_RPATH:BOOL=yes \
|
|
-GNinja"
|
|
|
|
cmake -Bbuild-static $config -DBUILD_SHARED_LIBS=OFF
|
|
cmake --build build-static
|
|
|
|
cmake -Bbuild-shared $config -DBUILD_SHARED_LIBS=ON
|
|
cmake --build build-shared
|
|
|
|
DESTDIR=$PKG cmake --build build-static --target install
|
|
DESTDIR=$PKG cmake --build build-shared --target install
|
|
|
|
# we don't want them in here
|
|
rm -rf $PKG/usr/include/SPIRV
|
|
|
|
cd $PKG/usr/lib
|
|
for lib in *.so; do
|
|
ln -sf "${lib}" "${lib}.0"
|
|
done
|
|
}
|