# Contributor: Leo # Maintainer: Leo pkgname=spirv-tools _pkgname=SPIRV-Tools pkgver=2019.4 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="6396c0a58736790af30b38e3c4725b110f0b8042cf633c39ac87e0144fc98941bf1931f6945b71c49ab2bffa4934232f3ca3aa3516f136c07411a222b92a5efa spirv-tools-2019.4.tar.gz"