# Maintainer: Daurnimator <daurnimator@archlinux.org>
# Maintainer: Laurent Carlier <lordheavym@gmail.com>
pkgname=spirv-tools
pkgver=2024.1
pkgrel=1
pkgdesc="API and commands for processing SPIR-V modules"
arch=('armv7h' 'aarch64')
url="https://www.khronos.org/vulkan/"
license=('Apache-2.0')
groups=(vulkan-devel)
depends=('gcc-libs' 'sh')
makedepends=('cmake' 'python' 'ninja' 'spirv-headers')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('137780e2a8b5c722888f9ec0fb553e6e92f38a0a5c7fcdad9b715152448b9d82')
build() {
cd "SPIRV-Tools-${pkgver}"
cmake \
-Bbuild \
-GNinja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=None \
-DSPIRV_WERROR=Off \
-DBUILD_SHARED_LIBS=ON \
-DSPIRV_TOOLS_BUILD_STATIC=OFF \
-DSPIRV-Headers_SOURCE_DIR=/usr
cmake --build build
}
check() {
cd "SPIRV-Tools-${pkgver}"
ninja -C build test
}
package() {
cd "SPIRV-Tools-${pkgver}"
DESTDIR="${pkgdir}" cmake --install build
}