2019-04-21 12:51:45 +10:00
|
|
|
# Description: API and commands for processing SPIR-V modules
|
|
|
|
# URL: https://www.khronos.org/vulkan/
|
|
|
|
# Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
|
|
|
|
# Depends on: spirv-tools
|
|
|
|
|
|
|
|
name=spirv-tools-32
|
2021-09-01 22:47:06 +10:00
|
|
|
version=2021.2
|
|
|
|
_spirv_headers=07f259e68af3a540038fa32df522554e74f53ed5
|
2020-07-24 18:35:06 +10:00
|
|
|
release=1
|
2021-04-11 01:36:09 +10:00
|
|
|
source=(https://github.com/KhronosGroup/SPIRV-Tools/archive/v$version/SPIRV-Tools-v$version.tar.gz
|
|
|
|
https://github.com/KhronosGroup/SPIRV-Headers/archive/$_spirv_headers/SPIRV-Headers-$_spirv_headers.tar.gz)
|
2019-04-21 12:51:45 +10:00
|
|
|
|
|
|
|
build() {
|
2021-04-11 01:36:09 +10:00
|
|
|
mv SPIRV-Headers-$_spirv_headers SPIRV-Headers
|
|
|
|
prt-get isinst ninja && PKGMK_SPIRV_TOOLS+=' -G Ninja'
|
|
|
|
|
|
|
|
PKGMK_SPIRV_TOOLS+=" \
|
|
|
|
-S SPIRV-Tools-$version \
|
|
|
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-D CMAKE_INSTALL_LIBDIR=lib32 \
|
|
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
|
|
-D SPIRV_WERROR=OFF \
|
|
|
|
-D SPIRV-Headers_SOURCE_DIR=/usr \
|
|
|
|
-D PYTHON_EXECUTABLE=/usr/bin/python3 \
|
|
|
|
-D SPIRV-Headers_SOURCE_DIR="${SRC}"/SPIRV-Headers \
|
|
|
|
-Wno-dev"
|
|
|
|
|
|
|
|
cmake -B build-static $PKGMK_SPIRV_TOOLS \
|
|
|
|
-D CMAKE_C_FLAGS_RELEASE="${CFLAGS}" \
|
|
|
|
-D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS}" \
|
|
|
|
-D BUILD_SHARED_LIBS=OFF
|
2020-11-01 16:47:07 +11:00
|
|
|
cmake --build build-static
|
|
|
|
|
2021-04-11 01:36:09 +10:00
|
|
|
cmake -B build-shared $PKGMK_SPIRV_TOOLS \
|
|
|
|
-D CMAKE_C_FLAGS_RELEASE="${CFLAGS}" \
|
|
|
|
-D CMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS}" \
|
|
|
|
-D BUILD_SHARED_LIBS=ON
|
2020-11-01 16:47:07 +11:00
|
|
|
cmake --build build-shared
|
|
|
|
|
|
|
|
DESTDIR=$PKG cmake --build build-static --target install
|
|
|
|
DESTDIR=$PKG cmake --build build-shared --target install
|
2019-08-30 19:21:51 +10:00
|
|
|
|
|
|
|
rm -r $PKG/usr/{bin,include}
|
2019-04-21 12:51:45 +10:00
|
|
|
}
|