blob: 33523f04abd8a0861100b924b765f0f248a428a2 (
plain)
1 # Description: OpenGL and OpenGL ES shader front end and validator
2 # URL: https://www.khronos.org/opengles/sdk/tools/Reference-Compiler
3 # Maintainer: Danny Rawlins, crux at romster dot me
4 # Depends on: spirv-tools
5
6 name=glslang
7 version=8.13.3559
8 commit=c9b28b9f3388c607ea5506f5e6197b7150238ad3
9 release=1
10 source=(
11 #https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.gz
12 https://github.com/KhronosGroup/glslang/archive/$commit.tar.gz#/$name-$commit.tar.gz
13 glslang-default-resource-limits_staticlib.patch
14 0001-pkg-config-compatibility.patch)
15
16 build() {
17 patch -d $name-$commit -p1 -i $SRC/glslang-default-resource-limits_staticlib.patch
18
19 # Patch to build against system spirv-tools
20 patch -d $name-$commit -p1 -i $SRC/0001-pkg-config-compatibility.patch
21
22 local config="
23 -S$name-$commit \
24 -DCMAKE_INSTALL_PREFIX=/usr \
25 -DCMAKE_INSTALL_LIBDIR=lib \
26 -DCMAKE_BUILD_TYPE=Release \
27 -DCMAKE_SKIP_RPATH:BOOL=yes \
28 -GNinja"
29
30 cmake -Bbuild-static $config -DBUILD_SHARED_LIBS=OFF
31 cmake --build build-static
32
33 cmake -Bbuild-shared $config -DBUILD_SHARED_LIBS=ON
34 cmake --build build-shared
35
36 DESTDIR=$PKG cmake --build build-static --target install
37 DESTDIR=$PKG cmake --build build-shared --target install
38
39 # we don't want them in here
40 rm -rf $PKG/usr/include/SPIRV
41
42 cd $PKG/usr/lib
43 for lib in *.so; do
44 ln -sf "${lib}" "${lib}.0"
45 done
46 }
|