opt/spirv-tools/Pkgfile

36 lines
786 B
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.2
release=3
source=(https://github.com/KhronosGroup/SPIRV-Tools/archive//v$version/SPIRV-Tools-v$version.tar.gz)
build() {
cd SPIRV-Tools-$version
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"
(cd build-static
cmake .. $config -DBUILD_SHARED_LIBS=OFF
make
)
(cd build-shared
cmake .. $config -DBUILD_SHARED_LIBS=ON
make
)
make -C build-static DESTDIR=$PKG install
make -C build-shared DESTDIR=$PKG install
}