35 lines
1.2 KiB
Plaintext
35 lines
1.2 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: CRUX compat-32 Team, compat-32-ports at crux dot nu
|
|
# Depends on: llvm-32 spirv-tools-32
|
|
|
|
name=spirv-llvm-translator-32
|
|
version=19.1.3
|
|
release=1
|
|
source=(https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/v$version/spirv-llvm-translator-$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=lib32 \
|
|
-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_BUILD_TOOLS=ON \
|
|
-D CCACHE_ALLOWED=OFF \
|
|
-D LLVM_DIR=/usr/lib32/cmake/llvm \
|
|
-D LLVM_SPIRV_BUILD_EXTERNAL=YES \
|
|
-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
|
|
|
|
rm -r $PKG/usr/{bin,include}
|
|
}
|