# Contributor: Lukas Jirkovsky # Contributor: gucong # Maintainer: Erich Eckner pkgname=embree-isa pkgver=3.13.2 pkgrel=5 pkgdesc="A collection of high-performance ray tracing kernels (with build-time ISA detection)" arch=('x86_64') url="https://embree.github.io/" license=('Apache') _pinned_dependencies=( 'gcc-libs=11.1.0' 'glibc>=2.31' 'tbb=2021.5.0' ) depends=("${_pinned_dependencies[@]}") provides=('embree') conflicts=('embree') makedepends=('cmake' 'ispc' 'freeglut' 'libxmu' 'openexr') source=("embree-${pkgver}.tar.gz::https://github.com/embree/embree/archive/v${pkgver}.tar.gz") sha512sums=('9e4912f52c503d8d1fe0c3c81bf8108f1af044bf08d76111e4c1ab434c6a38d33bae9aacfd60c874da76bcc2f909ad1f3f171d458adb7973644cdbfd3693dc0f') build() { cd "$srcdir/embree-$pkgver" MAX_ISA="SSE2" cat /proc/cpuinfo | grep sse3 > /dev/null && MAX_ISA="SSE3" cat /proc/cpuinfo | grep sse4_1 > /dev/null && MAX_ISA="SSE4.1" cat /proc/cpuinfo | grep sse4_2 > /dev/null && MAX_ISA="SSE4.2" cat /proc/cpuinfo | grep avx > /dev/null && MAX_ISA="AVX" cat /proc/cpuinfo | grep avx2 > /dev/null && MAX_ISA="AVX2" # ICC required for avx512 ? echo MAX_ISA: $MAX_ISA cmake . \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_BUILD_TYPE=Release \ -DEMBREE_TUTORIALS=OFF \ -DEMBREE_MAX_ISA="$MAX_ISA" make } package() { cd "$srcdir/embree-$pkgver" make DESTDIR="$pkgdir" install }