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
|
2023-07-22 13:36:01 +02:00
|
|
|
# Maintainer: CRUX System Team, core-ports at crux dot nu
|
2022-05-22 20:14:42 +10:00
|
|
|
# Depends on: spirv-tools
|
2019-04-28 13:03:36 +10:00
|
|
|
|
|
|
|
name=glslang
|
2023-08-26 10:19:32 +02:00
|
|
|
version=13.0.0
|
|
|
|
release=1
|
|
|
|
source=(https://github.com/KhronosGroup/glslang/archive/$version/$name-sdk-$version.tar.gz)
|
2019-04-28 13:03:36 +10:00
|
|
|
|
|
|
|
build() {
|
2019-08-31 00:44:47 +10:00
|
|
|
local config="
|
2022-10-22 15:38:49 +02:00
|
|
|
-G Ninja
|
2023-01-21 12:09:12 +00:00
|
|
|
-S $name-$version
|
2021-04-05 15:21:56 +10:00
|
|
|
-D CMAKE_INSTALL_PREFIX=/usr
|
|
|
|
-D CMAKE_INSTALL_LIBDIR=lib
|
|
|
|
-D CMAKE_BUILD_TYPE=Release
|
2022-05-22 20:14:42 +10:00
|
|
|
-D CMAKE_SKIP_RPATH=yes
|
2023-02-25 15:02:30 +01:00
|
|
|
-D ENABLE_PCH=OFF
|
2023-07-22 13:36:01 +02:00
|
|
|
-D BUILD_EXTERNAL=OFF
|
|
|
|
-D ENABLE_PCH=OFF
|
2021-04-05 15:21:56 +10:00
|
|
|
-Wno-dev"
|
|
|
|
|
|
|
|
cmake -B build-static $config $PKGMK_GLSLANG \
|
|
|
|
-D BUILD_SHARED_LIBS=OFF \
|
2022-05-22 20:14:42 +10:00
|
|
|
-D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS} -ffat-lto-objects"
|
2020-06-07 17:59:41 +10:00
|
|
|
cmake --build build-static
|
2021-04-05 15:21:56 +10:00
|
|
|
|
|
|
|
cmake -B build-shared $config $PKGMK_GLSLANG \
|
|
|
|
-D BUILD_SHARED_LIBS=ON \
|
2022-05-22 20:14:42 +10:00
|
|
|
-D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS} -ffat-lto-objects" \
|
2021-04-05 15:21:56 +10:00
|
|
|
-D CMAKE_SHARED_LINKER_FLAGS='-Wl,--no-undefined'
|
2020-06-07 17:59:41 +10:00
|
|
|
cmake --build build-shared
|
2021-04-05 15:21:56 +10:00
|
|
|
|
2020-06-07 17:59:41 +10:00
|
|
|
DESTDIR=$PKG cmake --build build-static --target install
|
|
|
|
DESTDIR=$PKG cmake --build build-shared --target install
|
2019-04-28 13:03:36 +10:00
|
|
|
}
|