2019-05-15 00:00:36 +10:00
|
|
|
# Description: API and commands for processing SPIR-V modules
|
|
|
|
# URL: https://www.khronos.org/vulkan/
|
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
2020-06-07 17:53:19 +10:00
|
|
|
# Depends on: spirv-headers
|
2019-05-15 00:00:36 +10:00
|
|
|
|
|
|
|
name=spirv-tools
|
2020-10-24 01:54:10 +11:00
|
|
|
version=2020.5-b27e039
|
2020-06-07 17:53:19 +10:00
|
|
|
release=1
|
2020-10-24 01:54:10 +11:00
|
|
|
source=(
|
|
|
|
#https://github.com/KhronosGroup/SPIRV-Tools/archive/v$version/SPIRV-Tools-v$version.tar.gz
|
|
|
|
https://github.com/KhronosGroup/SPIRV-Tools/archive/b27e039c68dd9eb959bb9249fcb2c9a54841474b.zip
|
|
|
|
0001-Revert-CMake-Enable-building-with-BUILD_SHARED_LIBS-.patch
|
|
|
|
spirv-tools-soversion.patch
|
|
|
|
0001-CMake-FIx-pkg-config-libdir-with-absolute-CMAKE_INST.patch)
|
2019-05-15 00:00:36 +10:00
|
|
|
|
|
|
|
build() {
|
2020-10-24 01:54:10 +11:00
|
|
|
mv SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b SPIRV-Tools-$version
|
|
|
|
|
2019-05-19 01:24:22 +10:00
|
|
|
local config="
|
2020-07-24 01:18:56 +10:00
|
|
|
-SSPIRV-Tools-$version \
|
2019-05-19 01:24:22 +10:00
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2019-08-30 19:07:30 +10:00
|
|
|
-DSPIRV_WERROR=OFF \
|
|
|
|
-DSPIRV-Headers_SOURCE_DIR=/usr \
|
|
|
|
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
|
2019-08-31 00:43:40 +10:00
|
|
|
-GNinja"
|
2019-05-15 00:00:36 +10:00
|
|
|
|
2020-10-24 01:54:10 +11:00
|
|
|
# https://github.com/KhronosGroup/SPIRV-Tools/issues/3626
|
|
|
|
patch -d SPIRV-Tools-$version -p1 -i $SRC/0001-Revert-CMake-Enable-building-with-BUILD_SHARED_LIBS-.patch
|
|
|
|
patch -d SPIRV-Tools-$version -p1 -i $SRC/spirv-tools-soversion.patch
|
|
|
|
|
|
|
|
# https://github.com/KhronosGroup/SPIRV-Tools/pull/3906
|
|
|
|
patch -d SPIRV-Tools-$version -p1 -i $SRC/0001-CMake-FIx-pkg-config-libdir-with-absolute-CMAKE_INST.patch
|
|
|
|
|
2020-06-07 17:53:19 +10:00
|
|
|
cmake -Bbuild-static $config -DBUILD_SHARED_LIBS=OFF
|
|
|
|
cmake --build build-static
|
2019-05-19 01:24:22 +10:00
|
|
|
|
2020-06-07 17:53:19 +10:00
|
|
|
cmake -Bbuild-shared $config -DBUILD_SHARED_LIBS=ON
|
2020-10-24 01:54:10 +11:00
|
|
|
cmake --build build-shared
|
2019-05-19 01:24:22 +10:00
|
|
|
|
2020-06-07 17:53:19 +10:00
|
|
|
DESTDIR=$PKG cmake --build build-static --target install
|
|
|
|
DESTDIR=$PKG cmake --build build-shared --target install
|
2019-05-15 00:00:36 +10:00
|
|
|
}
|