mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-19 05:36:38 +02:00
49 lines
1.5 KiB
Text
49 lines
1.5 KiB
Text
# Contributor: Leo <thinkabit.ukim@gmail.com>
|
|
# Maintainer: Simon Zeni <simon@bl4ckb0ne.ca>
|
|
pkgname=spirv-tools
|
|
_pkgname=SPIRV-Tools
|
|
pkgver=1.4.309.0
|
|
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/vulkan-sdk-$pkgver.tar.gz"
|
|
builddir="$srcdir/$_pkgname-vulkan-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
|
|
}
|
|
|
|
package() {
|
|
DESTDIR="$pkgdir" cmake --install build
|
|
}
|
|
|
|
sha512sums="
|
|
aa8163ad79eb5e60b8b373cbb49f1a140426f6346d5cb8e8a9aa2c72d6feaa528a9d690e0c52b44f3e4b2f60206050601441351f777752d6bf6c1b143f55589d spirv-tools-1.4.309.0.tar.gz
|
|
"
|