Date: Wednesday, May 12, 2021 @ 07:10:23
  Author: lcarlier
Revision: 415006

archrelease: copy trunk to testing-x86_64

Added:
  shaderc/repos/testing-x86_64/
  shaderc/repos/testing-x86_64/PKGBUILD
    (from rev 415005, shaderc/trunk/PKGBUILD)

----------+
 PKGBUILD |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

Copied: shaderc/repos/testing-x86_64/PKGBUILD (from rev 415005, 
shaderc/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD                             (rev 0)
+++ testing-x86_64/PKGBUILD     2021-05-12 07:10:23 UTC (rev 415006)
@@ -0,0 +1,53 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Daniel M. Capella <polyciti...@gmail.com>
+# Contributor: Bin Jin <b...@ctrl-d.org>
+
+pkgname=shaderc
+pkgver=2021.0
+pkgrel=1
+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=('a593e68550d18ff9cbc552146a74e84867f79704d412de25b4fc5bc7d007e4d12db6568e7fa11c46a6447eba25ca5f4f38c80e9088ad6c5bb23410eea8e9fe72')
+
+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() {
+  cd ${pkgname}-${pkgver}
+  cmake \
+    -B build \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib \
+    -DSHADERC_SKIP_TESTS=ON \
+    -Dglslang_SOURCE_DIR=/usr/include/glslang \
+    -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:

Reply via email to