1 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
3 # Careful when upgrading this package! It usually breaks ABI without bumping soname.
7 pkgdesc='OpenGL and OpenGL ES shader front end and validator'
9 url='https://github.com/KhronosGroup/glslang'
12 makedepends=('cmake' 'ninja' 'git' 'python')
13 options=('staticlibs')
14 # Get the commits from known_good.json for every release
15 source=(${pkgname}-${pkgver}.tar.gz::https://github.com/KhronosGroup/glslang/archive/${pkgver}.tar.gz
16 git+https://github.com/KhronosGroup/SPIRV-Tools#commit=1fbed83c8aab8517d821fcb4164c08567951938f
17 git+https://github.com/KhronosGroup/SPIRV-Headers#commit=449bc986ba6f4c5e10e32828783f9daef2a77644)
18 sha256sums=('ab2e2ddc507bb418b9227cbe6f443eb06e89e2387944f42026d82c0b4ef79b0a'
23 # Sadly, glslang requires super specific versions of SPIRV headers and
24 # spirv-tools and so I'm afraid that for the time being we'll have to use
25 # their vendored version until we figure out a good way to use system
27 cp -r SPIRV-Tools ${pkgname}-${pkgver}/External/spirv-tools
28 cp -r SPIRV-Headers ${pkgname}-${pkgver}/External/spirv-tools/external/spirv-headers
32 cd ${pkgname}-${pkgver}
36 -DCMAKE_INSTALL_PREFIX=/usr \
37 -DCMAKE_BUILD_TYPE=Release \
38 -DBUILD_SHARED_LIBS=ON
43 -DCMAKE_INSTALL_PREFIX=/usr \
44 -DCMAKE_BUILD_TYPE=Release \
45 -DBUILD_SHARED_LIBS=OFF
50 cd ${pkgname}-${pkgver}
51 DESTDIR="${pkgdir}" ninja -C build-shared install
52 DESTDIR="${pkgdir}" ninja -C build-static install
54 install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
56 cd "${pkgdir}"/usr/lib
58 ln -sf "${lib}" "${lib}.0"
61 # Delete the stuff that's been vendored in. It's not ideal but that's we'll deal with for now.
62 mv "${pkgdir}"/usr/bin/spirv-remap .
63 rm -r "${pkgdir}"/usr/{bin/spirv*,include/spirv-tools,lib/cmake/SPIRV-Tools*,lib/libSPIRV-*,lib/pkgconfig}
64 mv spirv-remap "${pkgdir}"/usr/bin/spirv-remap