blob: 87d9654f8d224a39baf0b120f53efdd6042d9f5a (
plain)
1 # Description: API and commands for processing SPIR-V modules
2 # URL: https://www.khronos.org/vulkan/
3 # Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
4 # Depends on: spirv-tools
5
6 name=spirv-tools-32
7 version=2022.4
8 release=1
9 source=(https://github.com/KhronosGroup/SPIRV-Tools/archive/v$version/SPIRV-Tools-v$version.tar.gz)
10
11 build() {
12 prt-get isinst ninja && PKGMK_SPIRV_TOOLS+=' -G Ninja'
13
14 PKGMK_SPIRV_TOOLS+=" \
15 -S SPIRV-Tools-$version \
16 -D CMAKE_INSTALL_PREFIX=/usr \
17 -D CMAKE_INSTALL_LIBDIR=lib32 \
18 -D CMAKE_BUILD_TYPE=Release \
19 -D SPIRV_WERROR=OFF \
20 -D SPIRV-Headers_SOURCE_DIR=/usr \
21 -D PYTHON_EXECUTABLE=/usr/bin/python3 \
22 -Wno-dev"
23
24 cmake -B build-static $PKGMK_SPIRV_TOOLS \
25 -D CMAKE_C_FLAGS_RELEASE="${CFLAGS}" \
26 -D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS}" \
27 -D BUILD_SHARED_LIBS=OFF
28 cmake --build build-static
29
30 cmake -B build-shared $PKGMK_SPIRV_TOOLS \
31 -D CMAKE_C_FLAGS_RELEASE="${CFLAGS}" \
32 -D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS}" \
33 -D BUILD_SHARED_LIBS=ON
34 cmake --build build-shared
35
36 DESTDIR=$PKG cmake --build build-static --target install
37 DESTDIR=$PKG cmake --build build-shared --target install
38
39 rm -r $PKG/usr/{bin,include}
40 }
|