# Contributor: Leon Marz # Maintainer: Leon Marz pkgname=ispc pkgver=1.20.0 pkgrel=1 pkgdesc="Intel SPMD Program Compiler" url="https://ispc.github.io/" arch="x86_64 armv7 aarch64" # ispc only supports these arches license="BSD-3-Clause" _llvmver=15 makedepends="cmake bison clang$_llvmver-dev clang$_llvmver-static flex libxml2-dev llvm$_llvmver-dev llvm$_llvmver-static llvm$_llvmver-test-utils m4 ncurses-dev samurai zlib-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/ispc/ispc/archive/v$pkgver.tar.gz 0001-cmake-fixes.patch " options="!check" # ctest does not find a testsuite build() { _x86_enabled=OFF _arm_enabled=OFF case "$CARCH" in x86_64) _x86_enabled=ON ;; armv7|aarch64) _arm_enabled=ON ;; esac cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DBUILD_SHARED_LIBS=True \ -DCMAKE_C_COMPILER="clang-$_llvmver" \ -DCMAKE_CXX_COMPILER="clang++-$_llvmver" \ -DCLANG_EXECUTABLE="$(command -v clang-$_llvmver)" \ -DCLANGPP_EXECUTABLE="$(command -v clang++-$_llvmver)" \ -DLLVM_CONFIG_EXECUTABLE="/usr/lib/llvm$_llvmver/bin/llvm-config" \ -DX86_ENABLED=$_x86_enabled \ -DARM_ENABLED=$_arm_enabled \ -DISPC_INCLUDE_EXAMPLES=OFF \ -DISPC_OPAQUE_PTR_MODE=ON \ -DISPC_INCLUDE_RT=OFF cmake --build build } package() { DESTDIR="$pkgdir" cmake --install build } sha512sums=" c74600e8434463d9357a9af153bbaf06ebe809084d5154b28d80759430c231dac5fcc5ac04fc6d2cb68c2abae7afad339515a0fde11ac340939669a64d222f80 ispc-1.20.0.tar.gz 8e44d7fb0bc383f817855b45b64642d6db8f8448263e3f4b939fb9602a608d03b4f47f525df4147241b18e121bc253c7eb87cbb9e4a4f0b9653e05fc03efc0eb 0001-cmake-fixes.patch "