mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-18 12:13:42 +02:00
50 lines
1.5 KiB
Plaintext
50 lines
1.5 KiB
Plaintext
# Contributor: Leo <thinkabit.ukim@gmail.com>
|
|
# Maintainer: Simon Zeni <simon@bl4ckb0ne.ca>
|
|
pkgname=spirv-tools
|
|
_pkgname=SPIRV-Tools
|
|
pkgver=1.3.261.1
|
|
pkgrel=0
|
|
pkgdesc="API and commands for processing SPIR-V modules"
|
|
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 samurai python3"
|
|
subpackages="$pkgname-dev $pkgname-dbg"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/KhronosGroup/SPIRV-tools/archive/refs/tags/sdk-$pkgver.tar.gz"
|
|
builddir="$srcdir/$_pkgname-sdk-$pkgver"
|
|
|
|
build() {
|
|
if [ "$CBUILD" != "$CHOST" ]; then
|
|
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
|
|
fi
|
|
|
|
# reduce size of debug syms, lto
|
|
CXXFLAGS="$CXXFLAGS -g1 -flto=auto" \
|
|
cmake -B build -G Ninja \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DSPIRV_WERROR=OFF \
|
|
-DSPIRV-Headers_SOURCE_DIR=/usr \
|
|
-DSPIRV_TOOLS_BUILD_STATIC=OFF \
|
|
$CMAKE_CROSSOPTS
|
|
cmake --build build
|
|
}
|
|
|
|
check() {
|
|
# Not all test are enabled, because they rely on googletest source
|
|
# folder. While it is easy to add, the (extra) tests then also need
|
|
# effcee and re2 as well.
|
|
ctest --test-dir build --output-on-failure
|
|
}
|
|
|
|
package() {
|
|
DESTDIR="$pkgdir" cmake --install build
|
|
}
|
|
|
|
sha512sums="
|
|
cb356885d105083744abf97a88aebd0d3c462eaa9cbb7e556afcab5d574546a2156ef212b91c317767ccd0006b6020a5accc10ffcccb56cadcabadc98af82521 spirv-tools-1.3.261.1.tar.gz
|
|
"
|