46 lines
1.1 KiB
Plaintext
46 lines
1.1 KiB
Plaintext
# Description: API and commands for processing SPIR-V modules
|
|
# URL: https://www.khronos.org/vulkan/
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Depends on: python3 spirv-headers
|
|
|
|
name=spirv-tools
|
|
version=2019.4
|
|
commit=3e4abc9ac382b6fc7a88316a700652404b6fb9f7
|
|
release=3
|
|
source=(
|
|
#https://github.com/KhronosGroup/SPIRV-Tools/archive/v$version/SPIRV-Tools-v$version.tar.gz
|
|
https://github.com/KhronosGroup/SPIRV-Tools/archive/$commit.tar.gz#/$name-$commit.tar.gz
|
|
fix-cmake-install.patch
|
|
)
|
|
|
|
build() {
|
|
# cd SPIRV-Tools-$version
|
|
cd SPIRV-Tools-$commit
|
|
|
|
patch -p1 -i $SRC/fix-cmake-install.patch
|
|
|
|
mkdir build-{shared,static}
|
|
|
|
local config="
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DSPIRV_WERROR=OFF \
|
|
-DSPIRV-Headers_SOURCE_DIR=/usr \
|
|
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
|
|
-GNinja"
|
|
|
|
(cd build-static
|
|
cmake .. $config -DBUILD_SHARED_LIBS=OFF
|
|
ninja -j ${JOBS:-1}
|
|
)
|
|
|
|
(cd build-shared
|
|
cmake .. $config -DBUILD_SHARED_LIBS=ON
|
|
ninja -j ${JOBS:-1}
|
|
)
|
|
|
|
DESTDIR=$PKG ninja -C build-static install
|
|
DESTDIR=$PKG ninja -C build-shared install
|
|
}
|