summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/embree/package.py73
-rw-r--r--var/spack/repos/builtin/packages/ispc/don-t-assume-that-ncurses-zlib-are-system-libraries.patch28
-rw-r--r--var/spack/repos/builtin/packages/ispc/fix-linking-against-llvm-10.patch26
-rw-r--r--var/spack/repos/builtin/packages/ispc/package.py49
4 files changed, 176 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/embree/package.py b/var/spack/repos/builtin/packages/embree/package.py
new file mode 100644
index 0000000000..432055aa83
--- /dev/null
+++ b/var/spack/repos/builtin/packages/embree/package.py
@@ -0,0 +1,73 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Embree(CMakePackage):
+ """Intel Embree High Performance Ray Tracing Kernels"""
+
+ homepage = "https://embree.org"
+ url = "https://github.com/embree/embree/archive/v3.7.0.tar.gz"
+ maintainers = ['aumuell']
+
+ version('3.12.1', sha256='0c9e760b06e178197dd29c9a54f08ff7b184b0487b5ba8b8be058e219e23336e')
+ version('3.12.0', sha256='f3646977c45a9ece1fb0cfe107567adcc645b1c77c27b36572d0aa98b888190c')
+ version('3.11.0', sha256='2ccc365c00af4389aecc928135270aba7488e761c09d7ebbf1bf3e62731b147d')
+ version('3.10.0', sha256='f1f7237360165fb8859bf71ee5dd8caec1fe02d4d2f49e89c11d250afa067aff')
+ version('3.9.0', sha256='53855e2ceb639289b20448ae9deab991151aa5f0bc7f9cc02f2af4dd6199d5d1')
+ version('3.8.0', sha256='40cbc90640f63c318e109365d29aea00003e4bd14aaba8bb654fc1010ea5753a')
+ version('3.7.0', sha256='2b6300ebe30bb3d2c6e5f23112b4e21a25a384a49c5e3c35440aa6f3c8d9fe84')
+
+ # default to Release, as RelWithDebInfo creates a lot of overhead
+ variant('build_type', default='Release',
+ description='CMake build type',
+ values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel'))
+
+ variant('ispc', default=True, description='Enable ISPC support')
+ depends_on('ispc', when='+ispc', type='build')
+
+ depends_on('tbb')
+
+ def cmake_args(self):
+ spec = self.spec
+
+ args = []
+
+ args.append('-DBUILD_TESTING=OFF')
+ args.append('-DEMBREE_TUTORIALS=OFF')
+ args.append('-DEMBREE_IGNORE_CMAKE_CXX_FLAGS=ON')
+
+ if 'ispc' in spec:
+ args.append('-DEMBREE_ISPC_SUPPORT=ON')
+ else:
+ args.append('-DEMBREE_ISPC_SUPPORT=OFF')
+
+ # code selection and defines controlling namespace names are based on
+ # defines controlled by compiler flags, so disable ISAs below compiler
+ # flags chosen by spack
+ if spec.target >= 'nehalem':
+ args.append('-DEMBREE_ISA_SSE2=OFF')
+ else:
+ args.append('-DEMBREE_ISA_SSE2=ON')
+
+ if spec.target >= 'sandybridge':
+ args.append('-DEMBREE_ISA_SSE42=OFF')
+ else:
+ args.append('-DEMBREE_ISA_SSE42=ON')
+
+ if spec.target >= 'haswell':
+ args.append('-DEMBREE_ISA_AVX=OFF')
+ else:
+ args.append('-DEMBREE_ISA_AVX=ON')
+
+ if spec.target >= 'skylake_avx512':
+ args.append('-DEMBREE_ISA_AVX2=OFF')
+ else:
+ args.append('-DEMBREE_ISA_AVX2=ON')
+
+ args.append('-DEMBREE_ISA_AVX512SKX=ON')
+
+ return args
diff --git a/var/spack/repos/builtin/packages/ispc/don-t-assume-that-ncurses-zlib-are-system-libraries.patch b/var/spack/repos/builtin/packages/ispc/don-t-assume-that-ncurses-zlib-are-system-libraries.patch
new file mode 100644
index 0000000000..3e28049c44
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ispc/don-t-assume-that-ncurses-zlib-are-system-libraries.patch
@@ -0,0 +1,28 @@
+From 44250379632ace94b08ff2dba17c69d3f36d5ffb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Aumu=CC=88ller?= <aumuell@reserv.at>
+Date: Sun, 27 Sep 2020 20:23:42 +0200
+Subject: [PATCH] don't assume that ncurses & zlib are system libraries
+
+---
+ CMakeLists.txt | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2bb4a7e6..53239a88 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -473,7 +473,10 @@ else()
+ if (ISPC_STATIC_LINK)
+ target_link_libraries(${PROJECT_NAME} pthread z.a tinfo.a curses.a)
+ else()
+- target_link_libraries(${PROJECT_NAME} pthread z tinfo curses)
++ find_package(Curses REQUIRED)
++ find_package(ZLIB REQUIRED)
++ find_library(NCURSES_TINFO_LIBRARY tinfo)
++ target_link_libraries(${PROJECT_NAME} pthread ${ZLIB_LIBRARIES} ${NCURSES_TINFO_LIBRARY} ${CURSES_LIBRARIES})
+ endif()
+ endif()
+ endif()
+--
+2.29.0
+
diff --git a/var/spack/repos/builtin/packages/ispc/fix-linking-against-llvm-10.patch b/var/spack/repos/builtin/packages/ispc/fix-linking-against-llvm-10.patch
new file mode 100644
index 0000000000..4ae7d15777
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ispc/fix-linking-against-llvm-10.patch
@@ -0,0 +1,26 @@
+From 0b68b43ec71130e1167d9ff59d5f874be47a9414 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Aumu=CC=88ller?= <aumuell@reserv.at>
+Date: Sun, 18 Oct 2020 21:02:32 +0200
+Subject: [PATCH] fix linking against llvm 10
+
+---
+ CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 68759c14..f4499c8f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -401,6 +401,9 @@ target_link_libraries(${PROJECT_NAME} ${LLVM_LIBRARY_LIST})
+ if (WIN32)
+ target_link_libraries(${PROJECT_NAME} version.lib shlwapi.lib odbc32.lib odbccp32.lib)
+ else()
++ if (CMAKE_DL_LIBS)
++ target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS})
++ endif()
+ if (APPLE)
+ target_link_libraries(${PROJECT_NAME} pthread z curses)
+ else()
+--
+2.28.0
+
diff --git a/var/spack/repos/builtin/packages/ispc/package.py b/var/spack/repos/builtin/packages/ispc/package.py
new file mode 100644
index 0000000000..4532e45243
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ispc/package.py
@@ -0,0 +1,49 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+# ispc requires <gnu/stubs-32.h>, e.g. from
+# glibc-devel.i686 (CentoOS) or libc6-dev-i386 and g++-multilib (Ubuntu)
+
+
+from spack import *
+
+
+class Ispc(CMakePackage):
+ """Intel Implicit SPMD Program Compiler
+
+ An open-source compiler for high-performance SIMD programming on the CPU"""
+
+ homepage = "https://ispc.github.io"
+ url = "https://github.com/ispc/ispc/tarball/v1.14.1"
+ maintainers = ['aumuell']
+
+ version('1.14.1', sha256='ca12f26dafbc4ef9605487d03a2156331c1351a4ffefc9bab4d896a466880794')
+ version('1.14.0', sha256='1ed72542f56738c632bb02fb0dd56ad8aec3e2487839ebbc0def8334f305a4c7')
+ version('1.13.0', sha256='aca595508b51dd1ff065c406a3fd7c93822320c510077dd4d97a2b98a23f097a')
+
+ depends_on('python', type='build')
+ depends_on('bison', type='build')
+ depends_on('flex', type='build')
+ depends_on('ncurses', type='link')
+ depends_on('zlib', type='link')
+ depends_on('llvm~libcxx')
+ depends_on('llvm@10:', when='@1.14:')
+ depends_on('llvm@10:10.999', when='@1.13:1.13.999')
+
+ patch('don-t-assume-that-ncurses-zlib-are-system-libraries.patch',
+ sha256='d3ccf547d3ba59779fd375e10417a436318f2200d160febb9f830a26f0daefdc')
+
+ patch('fix-linking-against-llvm-10.patch', when='@1.13:1.13.999',
+ sha256='d3ccf547d3ba59779fd375e10417a436318f2200d160febb9f830a26f0daefdc')
+
+ def cmake_args(self):
+ args = []
+ args.append('-DARM_ENABLED=FALSE')
+ args.append('-DISPC_NO_DUMPS=ON') # otherwise, LLVM needs patching
+ args.append('-DISPC_INCLUDE_EXAMPLES=OFF')
+ args.append('-DISPC_INCLUDE_TESTS=OFF')
+ args.append('-DISPC_INCLUDE_UTILS=OFF')
+ return args