2019-08-30 19:05:50 +10:00
|
|
|
# Description: OpenGL and OpenGL ES shader front end and validator
|
2019-04-28 13:03:36 +10:00
|
|
|
# URL: https://www.khronos.org/opengles/sdk/tools/Reference-Compiler
|
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
|
|
# Depends on: spirv-tools
|
|
|
|
|
|
|
|
name=glslang
|
2020-07-24 01:21:58 +10:00
|
|
|
version=8.13.3743
|
2020-06-07 17:59:41 +10:00
|
|
|
release=1
|
2020-07-24 01:21:58 +10:00
|
|
|
source=(https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.gz
|
2019-11-23 18:47:50 +11:00
|
|
|
glslang-default-resource-limits_staticlib.patch
|
2020-06-07 17:59:41 +10:00
|
|
|
0001-pkg-config-compatibility.patch)
|
2019-04-28 13:03:36 +10:00
|
|
|
|
|
|
|
build() {
|
2020-07-24 01:21:58 +10:00
|
|
|
patch -d $name-$version -p1 -i $SRC/glslang-default-resource-limits_staticlib.patch
|
2019-11-23 18:47:50 +11:00
|
|
|
|
2019-08-30 19:05:50 +10:00
|
|
|
# Patch to build against system spirv-tools
|
2020-07-24 01:21:58 +10:00
|
|
|
patch -d $name-$version -p1 -i $SRC/0001-pkg-config-compatibility.patch
|
2019-04-28 13:03:36 +10:00
|
|
|
|
2019-08-31 00:44:47 +10:00
|
|
|
local config="
|
2020-07-24 01:21:58 +10:00
|
|
|
-S$name-$version \
|
2019-08-31 00:44:47 +10:00
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2020-06-07 17:59:41 +10:00
|
|
|
-DCMAKE_SKIP_RPATH:BOOL=yes \
|
2019-08-31 00:44:47 +10:00
|
|
|
-GNinja"
|
|
|
|
|
2020-06-07 17:59:41 +10:00
|
|
|
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
|
2019-04-28 13:03:36 +10:00
|
|
|
|
|
|
|
cd $PKG/usr/lib
|
|
|
|
for lib in *.so; do
|
|
|
|
ln -sf "${lib}" "${lib}.0"
|
|
|
|
done
|
|
|
|
}
|