[arch-commits] Commit in shaderc/repos (staging-x86_64 staging-x86_64/PKGBUILD)
Sven-Hendrik Haase
svenstaro at archlinux.org
Wed Nov 4 00:42:22 UTC 2020
Date: Wednesday, November 4, 2020 @ 00:42:22
Author: svenstaro
Revision: 399233
archrelease: copy trunk to staging-x86_64
Added:
shaderc/repos/staging-x86_64/
shaderc/repos/staging-x86_64/PKGBUILD
(from rev 399232, shaderc/trunk/PKGBUILD)
----------+
PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
Copied: shaderc/repos/staging-x86_64/PKGBUILD (from rev 399232, shaderc/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2020-11-04 00:42:22 UTC (rev 399233)
@@ -0,0 +1,54 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Daniel M. Capella <polycitizen at gmail.com>
+# Contributor: Bin Jin <bjin at ctrl-d.org>
+
+pkgname=shaderc
+pkgver=2020.0
+pkgrel=2
+pkgdesc='Collection of tools, libraries and tests for shader compilation'
+url='https://github.com/google/shaderc'
+arch=('x86_64')
+license=('Apache')
+depends=('glibc' 'gcc-libs' 'glslang' 'spirv-tools')
+makedepends=('asciidoctor' 'cmake' 'ninja' 'python' 'spirv-headers')
+provides=('libshaderc_shared.so')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/google/shaderc/archive/v${pkgver}.tar.gz)
+sha512sums=('1971673d7a5fe77ef827c29db14112d4935c573c7c4f3b00fff3729334284d11640ee40c9e97ebcb2a14c6d5c6db0cf5e2ef6b2dfb59c759d1322c6d38624eb4')
+
+prepare() {
+ cd ${pkgname}-${pkgver}
+
+ # de-vendor libs and disable git versioning
+ sed '/examples/d;/third_party/d' -i CMakeLists.txt
+ sed '/build-version/d' -i glslc/CMakeLists.txt
+ cat <<- EOF > glslc/src/build-version.inc
+"${pkgver}\\n"
+"$(pacman -Q spirv-tools|cut -d \ -f 2|sed 's/-.*//')\\n"
+"$(pacman -Q glslang|cut -d \ -f 2|sed 's/-.*//')\\n"
+EOF
+}
+
+build() {
+ export CFLAGS+=" ${CPPFLAGS}"
+ export CXXFLAGS+=" ${CPPFLAGS}"
+ cd ${pkgname}-${pkgver}
+ cmake \
+ -B build \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DSHADERC_SKIP_TESTS=ON \
+ -GNinja
+ ninja -C build
+
+ cd glslc
+ asciidoctor -b manpage README.asciidoc -o glslc.1
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ DESTDIR="${pkgdir}" ninja -C build install
+ install -Dm 644 glslc/glslc.1 -t "${pkgdir}/usr/share/man/man1"
+}
+
+# vim: ts=2 sw=2 et:
More information about the arch-commits
mailing list