30 lines
1.1 KiB
Plaintext
30 lines
1.1 KiB
Plaintext
# Description: A tool and a library for bi-directional translation between SPIR-V and LLVM IR
|
|
# URL: https://github.com/KhronosGroup/SPIRV-LLVM-Translator
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
|
# Depends on: llvm spirv-tools
|
|
|
|
name=spirv-llvm-translator
|
|
version=17.0.0
|
|
release=1
|
|
source=(https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/v$version/$name-$version.tar.gz)
|
|
|
|
build() {
|
|
prt-get isinst ccache && PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')"
|
|
|
|
cmake -S SPIRV-LLVM-Translator-$version -B build -G Ninja $PKGMK_SLT \
|
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
|
-D CMAKE_INSTALL_LIBDIR=lib \
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
|
-D CMAKE_POSITION_INDEPENDENT_CODE=ON \
|
|
-D CMAKE_SKIP_RPATH=ON \
|
|
-D LLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr/include/spirv \
|
|
-D FETCHCONTENT_FULLY_DISCONNECTED=ON \
|
|
-D LLVM_EXTERNAL_LIT=/usr/bin/lit \
|
|
-Wno-dev
|
|
|
|
cmake --build build
|
|
DESTDIR=$PKG cmake --install build
|
|
}
|