diff options
Diffstat (limited to 'embree-isa/PKGBUILD')
-rw-r--r-- | embree-isa/PKGBUILD | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/embree-isa/PKGBUILD b/embree-isa/PKGBUILD new file mode 100644 index 000000000..81395dc83 --- /dev/null +++ b/embree-isa/PKGBUILD @@ -0,0 +1,45 @@ +# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com> +# Contributor: gucong <gucong43216@gmail.com> +# Maintainer: Erich Eckner <arch at eckner dot net> + +pkgname=embree-isa +pkgver=2.16.2 +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") +md5sums=('6c465ba05de57aa24bb70be051c4ba90') + +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 +} + |