commit c0d88dff1bc803ee2e6b75dc4248a36ca0b66d55 Author: xhaa123 Date: Mon Apr 15 22:17:28 2024 +0800 glslang 14.1.0-1 diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..f8d2093 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Future Linux Team + +pkgname=glslang +pkgver=14.1.0 +pkgrel=1 +pkgdesc="OpenGL and OpenGL ES shader front end and validator" +arch=('x86_64') +url="https://github.com/KhronosGroup/glslang" +license=('BSD-3-Clause') +depends=('gcc-libs' 'spirv-tools') +makedepends=('cmake' 'ninja' 'python') +options=('!staticlibs') +source=(https://github.com/KhronosGroup/glslang/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz) +sha256sums=(b5e4c36d60eda7613f36cfee3489c6f507156829c707e1ecd7f48ca45b435322) + +build() { + cd ${pkgname}-${pkgver} + + export CXXFLAGS+=" -ffat-lto-objects" + + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib64 \ + -DCMAKE_BUILD_TYPE=Release \ + -DALLOW_EXTERNAL_SPIRV_TOOLS=ON \ + -DBUILD_SHARED_LIBS=ON \ + -DGLSLANG_TESTS=ON \ + -GNinja -Bbuild + + ninja -C build +} + +package() { + cd ${pkgname}-${pkgver} + + DESTDIR=${pkgdir} ninja -C build install +}