2019-08-30 11:05:50 +02:00
|
|
|
# Description: OpenGL and OpenGL ES shader front end and validator
|
2019-04-28 05:03:36 +02: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
|
2019-11-23 08:47:50 +01:00
|
|
|
version=7.13.3496
|
2019-05-09 14:01:42 +02:00
|
|
|
release=1
|
2019-08-30 11:05:50 +02:00
|
|
|
source=(https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.gz
|
2019-11-23 08:47:50 +01:00
|
|
|
glslang-default-resource-limits_staticlib.patch
|
|
|
|
glslang-lib-install.patch
|
2019-08-30 11:05:50 +02:00
|
|
|
0001-pkg-config-compatibility.patch)
|
2019-04-28 05:03:36 +02:00
|
|
|
|
|
|
|
build() {
|
|
|
|
cd $name-$version
|
|
|
|
|
2019-11-23 08:47:50 +01:00
|
|
|
patch -p1 -i $SRC/glslang-default-resource-limits_staticlib.patch
|
|
|
|
patch -p1 -i $SRC/glslang-lib-install.patch
|
|
|
|
|
2019-08-30 11:05:50 +02:00
|
|
|
# Patch to build against system spirv-tools
|
|
|
|
patch -p1 -i $SRC/0001-pkg-config-compatibility.patch
|
|
|
|
|
2019-04-28 05:03:36 +02:00
|
|
|
mkdir -p build-{shared,static}
|
|
|
|
|
2019-08-30 16:44:47 +02:00
|
|
|
local config="
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-GNinja"
|
|
|
|
|
2019-04-28 05:03:36 +02:00
|
|
|
(cd build-shared
|
2019-08-30 16:44:47 +02:00
|
|
|
cmake .. $config -DBUILD_SHARED_LIBS=ON
|
|
|
|
ninja -j ${JOBS:-1}
|
2019-04-28 05:03:36 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
(cd build-static
|
2019-08-30 16:44:47 +02:00
|
|
|
cmake .. $config -DBUILD_SHARED_LIBS=OFF
|
|
|
|
ninja -j ${JOBS:-1}
|
2019-04-28 05:03:36 +02:00
|
|
|
)
|
|
|
|
|
2019-08-30 11:05:50 +02:00
|
|
|
DESTDIR=$PKG ninja -C build-shared install
|
|
|
|
DESTDIR=$PKG ninja -C build-static install
|
2019-04-28 05:03:36 +02:00
|
|
|
|
|
|
|
cd $PKG/usr/lib
|
|
|
|
for lib in *.so; do
|
|
|
|
ln -sf "${lib}" "${lib}.0"
|
|
|
|
done
|
|
|
|
}
|