1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Daniel M. Capella <polycitizen@gmail.com>
3 # Contributor: Bin Jin <bjin@ctrl-d.org>
8 pkgdesc='Collection of tools, libraries and tests for shader compilation'
9 url='https://github.com/google/shaderc'
12 depends=('glibc' 'gcc-libs' 'glslang' 'spirv-tools')
13 makedepends=('asciidoctor' 'cmake' 'ninja' 'python' 'spirv-headers')
14 provides=('libshaderc_shared.so')
15 source=(${pkgname}-${pkgver}.tar.gz::https://github.com/google/shaderc/archive/v${pkgver}.tar.gz)
16 sha512sums=('21c2462cb434d94da87c71ba660f6cd5b161450d7faeff8789b41db25e64f2baa7c560e78aa856d128c5a73699215d6b1085b5ca19a4640237adf194793ad44b')
19 cd ${pkgname}-${pkgver}
21 # de-vendor libs and disable git versioning
22 sed '/examples/d;/third_party/d' -i CMakeLists.txt
23 sed '/build-version/d' -i glslc/CMakeLists.txt
24 cat <<- EOF > glslc/src/build-version.inc
26 "$(pacman -Q spirv-tools|cut -d \ -f 2|sed 's/-.*//')\\n"
27 "$(pacman -Q glslang|cut -d \ -f 2|sed 's/-.*//')\\n"
32 cd ${pkgname}-${pkgver}
35 -DCMAKE_BUILD_TYPE=Release \
36 -DCMAKE_INSTALL_PREFIX=/usr \
37 -DCMAKE_CXX_FLAGS="$CXXFLAGS -ffat-lto-objects" \
38 -DSHADERC_SKIP_TESTS=ON \
39 -Dglslang_SOURCE_DIR=/usr/include/glslang \
44 asciidoctor -b manpage README.asciidoc -o glslc.1
48 cd ${pkgname}-${pkgver}
49 DESTDIR="${pkgdir}" ninja -C build install
50 install -Dm 644 glslc/glslc.1 -t "${pkgdir}/usr/share/man/man1"