1 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
3 # Careful when upgrading this package! It usually breaks ABI without bumping
4 # soname. Also, be very mindful of the version of spirv-tools that this links
5 # to. Upstream actually expects the use of the particular commits of
6 # spirv-tools and spirv-headers that are provided in known_good.json. However,
7 # if we went that route, we'd have to vendor the resulting spirv-tools libs
8 # from this glslang build and they would be incompatible with system libs,
9 # resulting in us having to ship both. Instead, I recommend just waiting until
10 # upstream releases a compatible version of spirv-tools, then updating the
11 # spriv-tools system package and only then building glslang against that.
15 pkgdesc='OpenGL and OpenGL ES shader front end and validator'
17 url='https://github.com/KhronosGroup/glslang'
20 makedepends=('cmake' 'ninja' 'git' 'spirv-tools' 'spirv-headers' 'python')
21 options=('staticlibs')
22 # Get the commits from known_good.json for every release
23 source=(${pkgname}-${pkgver}.tar.gz::https://github.com/KhronosGroup/glslang/archive/${pkgver}.tar.gz)
24 sha256sums=('1515e840881d1128fb6d831308433f731808f818f2103881162f3ffd47b15cd5')
27 cd ${pkgname}-${pkgver}
29 # we need fat LTO objects to not break consumers during linking
30 CXXFLAGS+=" -ffat-lto-objects"
34 -DCMAKE_INSTALL_PREFIX=/usr \
35 -DCMAKE_BUILD_TYPE=None \
36 -DBUILD_SHARED_LIBS=ON
41 -DCMAKE_INSTALL_PREFIX=/usr \
42 -DCMAKE_BUILD_TYPE=None \
43 -DBUILD_SHARED_LIBS=OFF
48 cd ${pkgname}-${pkgver}
49 ninja -Cbuild-shared test
53 cd ${pkgname}-${pkgver}
54 DESTDIR="${pkgdir}" ninja -C build-shared install
55 DESTDIR="${pkgdir}" ninja -C build-static install
57 install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
59 cd "${pkgdir}"/usr/lib
61 ln -sf "${lib}" "${lib}.0"