opt/glslang/Pkgfile

50 lines
2.0 KiB
Plaintext
Raw Normal View History

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
2020-10-23 16:56:02 +02:00
version=11.0.0-bacaef3
2020-06-07 09:59:41 +02:00
release=1
2020-10-23 16:56:02 +02:00
source=(
#https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.gz
https://github.com/KhronosGroup/glslang/archive/bacaef3237c515e40d1a24722be48c0a0b30f75f.zip
0001-CMake-Allow-linking-against-system-installed-SPIRV-T.patch
0001-CMake-Make-glslang-default-resource-limits-STATIC.patch
0002-CMake-Use-VERSION-SOVERSION-for-all-shared-libs.patch
0001-glslang-Rename-and-move-cmake-export.patch
0002-cmake-Use-the-same-export-config-for-all-installed-t.patch)
2019-04-28 05:03:36 +02:00
build() {
2020-10-23 16:56:02 +02:00
mv $name-bacaef3237c515e40d1a24722be48c0a0b30f75f $name-$version
2019-11-23 08:47:50 +01:00
2020-10-23 16:56:02 +02:00
# https://github.com/KhronosGroup/glslang/pull/1621
patch -d $name-$version -p1 -i $SRC/0001-CMake-Allow-linking-against-system-installed-SPIRV-T.patch
# https://github.com/KhronosGroup/glslang/pull/2419
patch -d $name-$version -p1 -i $SRC/0001-CMake-Make-glslang-default-resource-limits-STATIC.patch
patch -d $name-$version -p1 -i $SRC/0002-CMake-Use-VERSION-SOVERSION-for-all-shared-libs.patch
# https://github.com/KhronosGroup/glslang/pull/1978
patch -d $name-$version -p1 -i $SRC/0001-glslang-Rename-and-move-cmake-export.patch
patch -d $name-$version -p1 -i $SRC/0002-cmake-Use-the-same-export-config-for-all-installed-t.patch
2019-04-28 05:03:36 +02:00
local config="
2020-07-23 17:21:58 +02:00
-S$name-$version \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
2020-06-07 09:59:41 +02:00
-DCMAKE_SKIP_RPATH:BOOL=yes \
-GNinja"
2020-06-07 09:59:41 +02:00
cmake -Bbuild-static $config -DBUILD_SHARED_LIBS=OFF
cmake --build build-static
2020-10-23 16:56:02 +02:00
# https://github.com/KhronosGroup/glslang/issues/1484 -Wl,--no-undefined
cmake -Bbuild-shared $config -DBUILD_SHARED_LIBS=ON -DCMAKE_SHARED_LINKER_FLAGS='-Wl,--no-undefined'
2020-06-07 09:59:41 +02:00
cmake --build build-shared
DESTDIR=$PKG cmake --build build-static --target install
DESTDIR=$PKG cmake --build build-shared --target install
2019-04-28 05:03:36 +02:00
}