blob: 421344c3f4a026464455d936ab3575136c06f724 (
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.13.0
8 release=1
9 source=(https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.gz
10 glslang-11.13.0-cmake_include_dirs.patch)
11
12 build() {
13 patch -Np1 -d $SRC/$name-$version -i $SRC/glslang-11.13.0-cmake_include_dirs.patch
14
15 local config="
16 -G Ninja
17 -S $name-$version
18 -D CMAKE_INSTALL_PREFIX=/usr
19 -D CMAKE_INSTALL_LIBDIR=lib
20 -D CMAKE_BUILD_TYPE=Release
21 -D CMAKE_SKIP_RPATH=yes
22 -Wno-dev"
23
24 cmake -B build-static $config $PKGMK_GLSLANG \
25 -D BUILD_SHARED_LIBS=OFF \
26 -D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS} -ffat-lto-objects"
27 cmake --build build-static
28
29 cmake -B build-shared $config $PKGMK_GLSLANG \
30 -D BUILD_SHARED_LIBS=ON \
31 -D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS} -ffat-lto-objects" \
32 -D CMAKE_SHARED_LINKER_FLAGS='-Wl,--no-undefined'
33 cmake --build build-shared
34
35 DESTDIR=$PKG cmake --build build-static --target install
36 DESTDIR=$PKG cmake --build build-shared --target install
37 }
|