summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/spirv-tools/APKBUILD45
1 files changed, 45 insertions, 0 deletions
diff --git a/user/spirv-tools/APKBUILD b/user/spirv-tools/APKBUILD
new file mode 100644
index 000000000..b98a68a43
--- /dev/null
+++ b/user/spirv-tools/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
+# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
+pkgname=spirv-tools
+pkgver=2024.3
+pkgrel=0
+pkgdesc="Utilities for working with SPIR-V modules "
+url="https://github.com/KhronosGroup/SPIRV-Tools"
+arch="all"
+license="Apache-2.0"
+depends=""
+depends_dev="spirv-headers"
+makedepends="$depends_dev cmake python3"
+subpackages="$pkgname-dev"
+source="spirv-tools-$pkgver.tar.gz::https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/v$pkgver.tar.gz
+ remove-copyright-check-test.patch"
+builddir="$srcdir/SPIRV-Tools-$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=RelWithDebugInfo \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ -DSPIRV-Headers_SOURCE_DIR="/usr" \
+ -DSPIRV_TOOLS_BUILD_STATIC=off \
+ ${CMAKE_CROSSOPTS} \
+ .
+ make
+}
+
+check() {
+ CTEST_OUTPUT_ON_FAILURE=TRUE ctest
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="804e2a076025a9afde2d7b0b6950fa7b7289b9aa911348b10aad45cc3515116b7484e886d49b524315f75e8d1a2009c2f26310352c154d1b23a58864e8535324 spirv-tools-2024.3.tar.gz
+a04f1a4d60d6206cbbd5e97dda58ca05689835520617dfe7bdfe29d66ab987f68080fbee85c039aecab554e01d94b16a99acfc2ffd29d9ef5861d3dd2e2dccb1 remove-copyright-check-test.patch"