51 lines
1.3 KiB
Plaintext
51 lines
1.3 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=7.13.3496
|
|
release=2
|
|
source=(https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.gz
|
|
glslang-default-resource-limits_staticlib.patch
|
|
glslang-lib-install.patch
|
|
0001-pkg-config-compatibility.patch
|
|
glslang-7.12.3353_pre20191027-fix-relative-includes.patch)
|
|
|
|
build() {
|
|
cd $name-$version
|
|
|
|
patch -p1 -i $SRC/glslang-default-resource-limits_staticlib.patch
|
|
patch -p1 -i $SRC/glslang-lib-install.patch
|
|
patch -p1 -i $SRC/glslang-7.12.3353_pre20191027-fix-relative-includes.patch
|
|
|
|
# Patch to build against system spirv-tools
|
|
patch -p1 -i $SRC/0001-pkg-config-compatibility.patch
|
|
|
|
mkdir -p build-{shared,static}
|
|
|
|
local config="
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-GNinja"
|
|
|
|
(cd build-shared
|
|
cmake .. $config -DBUILD_SHARED_LIBS=ON
|
|
ninja -j ${JOBS:-1}
|
|
)
|
|
|
|
(cd build-static
|
|
cmake .. $config -DBUILD_SHARED_LIBS=OFF
|
|
ninja -j ${JOBS:-1}
|
|
)
|
|
|
|
DESTDIR=$PKG ninja -C build-shared install
|
|
DESTDIR=$PKG ninja -C build-static install
|
|
|
|
cd $PKG/usr/lib
|
|
for lib in *.so; do
|
|
ln -sf "${lib}" "${lib}.0"
|
|
done
|
|
}
|