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
|
2019-08-30 19:07:30 +10:00
|
|
|
# Depends on: python3 spirv-headers ninja
|
2019-05-15 00:00:36 +10:00
|
|
|
|
|
|
|
name=spirv-tools
|
2019-08-30 19:07:30 +10:00
|
|
|
version=2019.4
|
|
|
|
commit=aa9e8f538041db3055ea443080e0ccc315fa114f
|
|
|
|
release=1
|
|
|
|
source=(
|
|
|
|
#https://github.com/KhronosGroup/SPIRV-Tools/archive/v$version/SPIRV-Tools-v$version.tar.gz
|
|
|
|
https://codeload.github.com/KhronosGroup/SPIRV-Tools/zip/$commit
|
|
|
|
)
|
2019-05-15 00:00:36 +10:00
|
|
|
|
|
|
|
build() {
|
2019-08-30 19:07:30 +10:00
|
|
|
mv $commit SPIRV-Tools-$commit.zip
|
|
|
|
bsdtar -xf SPIRV-Tools-$commit.zip
|
|
|
|
|
|
|
|
# cd SPIRV-Tools-$version
|
|
|
|
cd SPIRV-Tools-$commit
|
2019-05-15 00:00:36 +10:00
|
|
|
|
2019-05-19 01:24:22 +10:00
|
|
|
mkdir build-{shared,static}
|
2019-05-15 00:00:36 +10:00
|
|
|
|
2019-05-19 01:24:22 +10:00
|
|
|
local config="
|
|
|
|
-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 \
|
|
|
|
-G Ninja"
|
2019-05-15 00:00:36 +10:00
|
|
|
|
2019-05-19 01:24:22 +10:00
|
|
|
(cd build-static
|
|
|
|
cmake .. $config -DBUILD_SHARED_LIBS=OFF
|
2019-08-30 19:07:30 +10:00
|
|
|
ninja
|
2019-05-19 01:24:22 +10:00
|
|
|
)
|
|
|
|
|
|
|
|
(cd build-shared
|
|
|
|
cmake .. $config -DBUILD_SHARED_LIBS=ON
|
2019-08-30 19:07:30 +10:00
|
|
|
ninja
|
2019-05-19 01:24:22 +10:00
|
|
|
)
|
|
|
|
|
2019-08-30 19:07:30 +10:00
|
|
|
DESTDIR=$PKG ninja -C build-static install
|
|
|
|
DESTDIR=$PKG ninja -C build-shared install
|
2019-05-15 00:00:36 +10:00
|
|
|
}
|