diff --git a/spirv-llvm-translator/.footprint b/spirv-llvm-translator/.footprint new file mode 100644 index 000000000..283b13e86 --- /dev/null +++ b/spirv-llvm-translator/.footprint @@ -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 diff --git a/spirv-llvm-translator/.signature b/spirv-llvm-translator/.signature new file mode 100644 index 000000000..23edb2b50 --- /dev/null +++ b/spirv-llvm-translator/.signature @@ -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 diff --git a/spirv-llvm-translator/Pkgfile b/spirv-llvm-translator/Pkgfile new file mode 100644 index 000000000..cef353bb9 --- /dev/null +++ b/spirv-llvm-translator/Pkgfile @@ -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 +}