opt/glslang/Pkgfile

48 lines
1.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
2019-08-30 11:05:50 +02:00
version=7.12.3352
2019-05-09 14:01:42 +02:00
release=1
2019-08-30 11:05:50 +02:00
source=(https://github.com/KhronosGroup/glslang/archive/$version/$name-$version.tar.gz
0001-pkg-config-compatibility.patch)
2019-04-28 05:03:36 +02:00
build() {
cd $name-$version
2019-08-30 11:05:50 +02:00
# Patch to build against system spirv-tools
patch -p1 -i $SRC/0001-pkg-config-compatibility.patch
2019-04-28 05:03:36 +02:00
mkdir -p build-{shared,static}
(cd build-shared
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
2019-08-30 11:05:50 +02:00
-DCMAKE_INSTALL_LIBDIR=lib \
2019-04-28 05:03:36 +02:00
-DCMAKE_BUILD_TYPE=Release \
2019-08-30 11:05:50 +02:00
-GNinja \
2019-04-28 05:03:36 +02:00
-DBUILD_SHARED_LIBS=ON
2019-08-30 11:05:50 +02:00
ninja
2019-04-28 05:03:36 +02:00
)
(cd build-static
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
2019-08-30 11:05:50 +02:00
-DCMAKE_INSTALL_LIBDIR=lib \
2019-04-28 05:03:36 +02:00
-DCMAKE_BUILD_TYPE=Release \
2019-08-30 11:05:50 +02:00
-GNinja \
2019-04-28 05:03:36 +02:00
-DBUILD_SHARED_LIBS=OFF
2019-08-30 11:05:50 +02:00
ninja
2019-04-28 05:03:36 +02:00
)
2019-08-30 11:05:50 +02:00
DESTDIR=$PKG ninja -C build-shared install
DESTDIR=$PKG ninja -C build-static install
2019-04-28 05:03:36 +02:00
cd $PKG/usr/lib
for lib in *.so; do
ln -sf "${lib}" "${lib}.0"
done
}