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

Sven-Hendrik Haase svenstaro at archlinux.org
Wed Apr 29 14:19:22 UTC 2020


    Date: Wednesday, April 29, 2020 @ 14:19:21
  Author: svenstaro
Revision: 381846

archrelease: copy trunk to testing-x86_64

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

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

Copied: shaderc/repos/testing-x86_64/PKGBUILD (from rev 381845, shaderc/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2020-04-29 14:19:21 UTC (rev 381846)
@@ -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.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=('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}"
+  cmake \
+    -B build \
+    -S ${pkgname}-${pkgver} \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=lib \
+    -DSHADERC_SKIP_TESTS=ON \
+    -GNinja
+  ninja -C build
+
+  cd ${pkgname}-${pkgver}/glslc
+  asciidoctor -b manpage README.asciidoc -o glslc.1
+}
+
+package() {
+  DESTDIR="${pkgdir}" ninja -C build install
+  install -Dm 644 ${pkgname}-${pkgver}/glslc/glslc.1 -t "${pkgdir}/usr/share/man/man1"
+}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list