blob: 57df376afea84101a962e15ec7afd74f9929059b (
plain)
1 # Description: API and commands for processing SPIR-V modules
2 # URL: https://www.khronos.org/vulkan/
3 # Maintainer: Danny Rawlins, crux at romster dot me
4 # Depends on: spirv-headers
5
6 name=spirv-tools
7 version=1.3.236.0
8 release=1
9 source=(https://github.com/KhronosGroup/SPIRV-Tools/archive/sdk-$version/SPIRV-Tools-v$version.tar.gz)
10
11 build() {
12 PKGMK_SPIRV_TOOLS+=" \
13 -G Ninja \
14 -S SPIRV-Tools-sdk-$version \
15 -D CMAKE_INSTALL_PREFIX=/usr \
16 -D CMAKE_INSTALL_LIBDIR=lib \
17 -D CMAKE_BUILD_TYPE=Release \
18 -D SPIRV_WERROR=OFF \
19 -D SPIRV-Headers_SOURCE_DIR=/usr \
20 -D PYTHON_EXECUTABLE=/usr/bin/python3 \
21 -Wno-dev"
22
23 cmake -B build-static $PKGMK_SPIRV_TOOLS \
24 -D CMAKE_C_FLAGS_RELEASE="${CFLAGS} -ffat-lto-objects" \
25 -D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS} -ffat-lto-objects" \
26 -D BUILD_SHARED_LIBS=OFF
27 cmake --build build-static
28
29 cmake -B build-shared $PKGMK_SPIRV_TOOLS \
30 -D CMAKE_C_FLAGS_RELEASE="${CFLAGS} -ffat-lto-objects" \
31 -D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS} -ffat-lto-objects" \
32 -D BUILD_SHARED_LIBS=ON
33 cmake --build build-shared
34
35 DESTDIR=$PKG cmake --build build-static --target install
36 DESTDIR=$PKG cmake --build build-shared --target install
37 }
|