blob: 741b6fd96af8ded8e208f5ed486aaae61170a934 (
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=11.0.0-bacaef3
8 release=1
9 source=(
10 #https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.gz
11 https://github.com/KhronosGroup/glslang/archive/bacaef3237c515e40d1a24722be48c0a0b30f75f.zip
12 0001-CMake-Allow-linking-against-system-installed-SPIRV-T.patch
13 0001-CMake-Make-glslang-default-resource-limits-STATIC.patch
14 0002-CMake-Use-VERSION-SOVERSION-for-all-shared-libs.patch
15 0001-glslang-Rename-and-move-cmake-export.patch
16 0002-cmake-Use-the-same-export-config-for-all-installed-t.patch)
17
18 build() {
19 mv $name-bacaef3237c515e40d1a24722be48c0a0b30f75f $name-$version
20
21 # https://github.com/KhronosGroup/glslang/pull/1621
22 patch -d $name-$version -p1 -i $SRC/0001-CMake-Allow-linking-against-system-installed-SPIRV-T.patch
23
24 # https://github.com/KhronosGroup/glslang/pull/2419
25 patch -d $name-$version -p1 -i $SRC/0001-CMake-Make-glslang-default-resource-limits-STATIC.patch
26 patch -d $name-$version -p1 -i $SRC/0002-CMake-Use-VERSION-SOVERSION-for-all-shared-libs.patch
27
28 # https://github.com/KhronosGroup/glslang/pull/1978
29 patch -d $name-$version -p1 -i $SRC/0001-glslang-Rename-and-move-cmake-export.patch
30 patch -d $name-$version -p1 -i $SRC/0002-cmake-Use-the-same-export-config-for-all-installed-t.patch
31
32 local config="
33 -S$name-$version \
34 -DCMAKE_INSTALL_PREFIX=/usr \
35 -DCMAKE_INSTALL_LIBDIR=lib \
36 -DCMAKE_BUILD_TYPE=Release \
37 -DCMAKE_SKIP_RPATH:BOOL=yes \
38 -GNinja"
39
40 cmake -Bbuild-static $config -DBUILD_SHARED_LIBS=OFF
41 cmake --build build-static
42
43 # https://github.com/KhronosGroup/glslang/issues/1484 -Wl,--no-undefined
44 cmake -Bbuild-shared $config -DBUILD_SHARED_LIBS=ON -DCMAKE_SHARED_LINKER_FLAGS='-Wl,--no-undefined'
45 cmake --build build-shared
46
47 DESTDIR=$PKG cmake --build build-static --target install
48 DESTDIR=$PKG cmake --build build-shared --target install
49 }
|