[arch-commits] Commit in shaderc/repos (testing-x86_64 testing-x86_64/PKGBUILD)

Sven-Hendrik Haase svenstaro at archlinux.org
Wed Feb 24 15:18:18 UTC 2021


    Date: Wednesday, February 24, 2021 @ 15:18:18
  Author: svenstaro
Revision: 408742

archrelease: copy trunk to testing-x86_64

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

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

Copied: shaderc/repos/testing-x86_64/PKGBUILD (from rev 408741, shaderc/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2021-02-24 15:18:18 UTC (rev 408742)
@@ -0,0 +1,53 @@
+# 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.3
+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=('781fe8b891ba91e7044f8c6648604b64f50e57f1f308f8785ec58ad4d5d86f268192a8b58ed4b9d8b2603e6e8cf7b732efeda8d1f2e4e3028cc4849a2931f6b1')
+
+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:


More information about the arch-commits mailing list