spirv-llvm-translator: initial commit, version 16.0.0

This commit is contained in:
Tim Biermann 2023-06-07 22:14:55 +02:00
parent 9012588258
commit b7fa8090f1
Signed by: tb
GPG Key ID: 42F8B4E30B673606
3 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,12 @@
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/llvm-spirv
drwxr-xr-x root/root usr/include/
drwxr-xr-x root/root usr/include/LLVMSPIRVLib/
-rw-r--r-- root/root usr/include/LLVMSPIRVLib/LLVMSPIRVExtensions.inc
-rw-r--r-- root/root usr/include/LLVMSPIRVLib/LLVMSPIRVLib.h
-rw-r--r-- root/root usr/include/LLVMSPIRVLib/LLVMSPIRVOpts.h
drwxr-xr-x root/root usr/lib/
-rw-r--r-- root/root usr/lib/libLLVMSPIRVLib.a
drwxr-xr-x root/root usr/lib/pkgconfig/
-rw-r--r-- root/root usr/lib/pkgconfig/LLVMSPIRVLib.pc

View File

@ -0,0 +1,5 @@
untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/dcX7VbMTPple6Nn468UWce9Pm3dKARbngLZoosDyYiHwIRR9W5GXWncXiLgA3HWD95sSuHNVnaC3I0eM4O+/Qc=
SHA256 (Pkgfile) = ca200db080229d0b8066909f42e1c5a30b8c22f8492b0248ce18eb8c1cd96ee3
SHA256 (.footprint) = cd463b26973c4d27d3224f5f0cc026b48489191c2610d91098c10c033d914000
SHA256 (spirv-llvm-translator-16.0.0.tar.gz) = 305fac5bb8efdad9054f0d27b5b765aca8b3349a500e2ba0c927763e42badc2b

View File

@ -0,0 +1,34 @@
# 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
# Optional: clang lld
name=spirv-llvm-translator
version=16.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/:*$//')"
if prt-get isinst clang lld; then
export CC=clang CXX=clang++ AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib LDFLAGS+=' -fuse-ld=lld'
PKGMK_SLT+=' -D LLVM_ENABLE_LTO=ON'
fi
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 \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
}