opt/spirv-tools/Pkgfile

38 lines
1.0 KiB
Plaintext
Raw Normal View History

2019-05-14 16:00:36 +02: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 09:53:19 +02:00
# Depends on: spirv-headers
2019-05-14 16:00:36 +02:00
name=spirv-tools
2020-06-07 09:53:19 +02:00
version=2019.5
commit=67f4838659f475d618c120e13d1a196d7e00ba4b
release=1
2019-08-30 11:07:30 +02:00
source=(
#https://github.com/KhronosGroup/SPIRV-Tools/archive/v$version/SPIRV-Tools-v$version.tar.gz
2019-11-23 08:17:52 +01:00
https://github.com/KhronosGroup/SPIRV-Tools/archive/$commit.tar.gz#/$name-$commit.tar.gz
2019-08-30 11:07:30 +02:00
)
2019-05-14 16:00:36 +02:00
build() {
2019-08-30 11:07:30 +02:00
# cd SPIRV-Tools-$version
2020-06-07 09:53:19 +02:00
# cd SPIRV-Tools-$commit
2019-05-14 16:00:36 +02:00
local config="
2020-06-07 09:53:19 +02:00
-SSPIRV-Tools-$commit \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
2019-08-30 11:07:30 +02:00
-DSPIRV_WERROR=OFF \
-DSPIRV-Headers_SOURCE_DIR=/usr \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
-GNinja"
2019-05-14 16:00:36 +02:00
2020-06-07 09:53:19 +02:00
cmake -Bbuild-static $config -DBUILD_SHARED_LIBS=OFF
cmake --build build-static
2020-06-07 09:53:19 +02:00
cmake -Bbuild-shared $config -DBUILD_SHARED_LIBS=ON
cmake --build build-static
2020-06-07 09:53:19 +02:00
DESTDIR=$PKG cmake --build build-static --target install
DESTDIR=$PKG cmake --build build-shared --target install
2019-05-14 16:00:36 +02:00
}