# Contributor: Leo # Maintainer: Leo pkgname=spirv-tools _pkgname=SPIRV-Tools pkgver=2019.5 pkgrel=0 pkgdesc="API and commands for processing SPIR-V modules" options="!check" # Requires git checkout of gtest in external/ url="https://github.com/KhronosGroup/SPIRV-Tools" arch="all" license="Apache-2.0" depends_dev="spirv-headers $pkgname=$pkgver-r$pkgrel" makedepends="$depends_dev cmake python3" subpackages="$pkgname-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/KhronosGroup/$_pkgname/archive/v$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" build() { if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi cmake \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_SHARED_LIBS=True \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ -DCMAKE_C_FLAGS="$CFLAGS" \ -DSPIRV_WERROR=OFF \ -DSPIRV_SKIP_TESTS=ON \ -DSPIRV-Headers_SOURCE_DIR=/usr \ ${CMAKE_CROSSOPTS} . make } check() { make check } package() { make DESTDIR="$pkgdir" install } sha512sums="b351637fcee7f19b0ffd87f1bb546ee98a8564b7a4bfe2bcb07dd4ef8c8135b680e3137202fd915ee10d229116b5ddf58dc4220fd7671cfe20f532b77d00d02b spirv-tools-2019.5.tar.gz"