# Contributor: Lukas Jirkovsky # Contributor: gucong # Maintainer: Erich Eckner pkgname=embree-isa pkgver=2.17.0 pkgrel=1 pkgdesc="A collection of high-performance ray tracing kernels (with build-time ISA detection)" arch=('x86_64') url="https://embree.github.io/" license=('Apache') depends=('intel-tbb') 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=('726305721b2f94b7d14e8cb3f1ee41506f2f4e9508c0043ad9a43e52b057ed0d3434120e77bcd02e8c774d95d3d35c93d4aab9a6b333e23b6f2714053e9b9136') 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 }