mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
43 lines
1.4 KiB
Bash
43 lines
1.4 KiB
Bash
# Maintainer: Daniel Bermond <dbermond@archlinux.org>
|
|
# Maintainer: Bruno Pagani <archange@archlinux.org>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - make llvm-spirv, install doesn't work otherwise
|
|
|
|
_srcname=SPIRV-LLVM-Translator
|
|
pkgname=${_srcname,,}
|
|
pkgver=13.0.0
|
|
pkgrel=1
|
|
pkgdesc="Tool and a library for bi-directional translation between SPIR-V and LLVM IR"
|
|
arch=(x86_64)
|
|
url="https://github.com/KhronosGroup/SPIRV-LLVM-Translator/"
|
|
license=(custom)
|
|
depends=(llvm-libs)
|
|
makedepends=(cmake llvm spirv-headers spirv-tools)
|
|
checkdepends=(python python-setuptools clang)
|
|
source=(${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
|
|
sha256sums=('b416c06525c8724be628327565956c418755fbb471b4fe23d040ca56e1a79061')
|
|
|
|
build() {
|
|
cmake -B build -S ${_srcname}-${pkgver} \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
|
-DCMAKE_SKIP_RPATH=ON \
|
|
-DLLVM_INCLUDE_TESTS=ON \
|
|
-DLLVM_EXTERNAL_LIT=/usr/bin/lit \
|
|
-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr/include/spirv/ \
|
|
-Wno-dev
|
|
make -C build llvm-spirv
|
|
}
|
|
|
|
check() {
|
|
LD_LIBRARY_PATH="${srcdir}/build/lib/SPIRV" make -C build test
|
|
}
|
|
|
|
package() {
|
|
make -C build DESTDIR="${pkgdir}" install
|
|
install -Dm755 build/tools/llvm-spirv/llvm-spirv -t "${pkgdir}"/usr/bin
|
|
install -Dm644 ${_srcname}-${pkgver}/LICENSE.TXT -t "${pkgdir}"/usr/share/licenses/${pkgname}/
|
|
}
|