summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/arpack-ng/package.py5
-rw-r--r--var/spack/repos/builtin/packages/gettext/package.py30
-rw-r--r--var/spack/repos/builtin/packages/hypre/package.py5
-rw-r--r--var/spack/repos/builtin/packages/muparser/package.py18
-rw-r--r--var/spack/repos/builtin/packages/oce/package.py47
-rw-r--r--var/spack/repos/builtin/packages/p4est/package.py34
-rw-r--r--var/spack/repos/builtin/packages/python/package.py11
-rw-r--r--var/spack/repos/builtin/packages/ruby/package.py6
-rw-r--r--var/spack/repos/builtin/packages/tbb/package.py79
9 files changed, 224 insertions, 11 deletions
diff --git a/var/spack/repos/builtin/packages/arpack-ng/package.py b/var/spack/repos/builtin/packages/arpack-ng/package.py
index 614071cf53..dd86b17a53 100644
--- a/var/spack/repos/builtin/packages/arpack-ng/package.py
+++ b/var/spack/repos/builtin/packages/arpack-ng/package.py
@@ -50,7 +50,10 @@ class ArpackNg(Package):
options = ['--prefix=%s' % prefix]
if '+mpi' in spec:
- options.append('--enable-mpi')
+ options.extend([
+ '--enable-mpi',
+ 'F77=mpif77' #FIXME: avoid hardcoding MPI wrapper names
+ ])
if '~shared' in spec:
options.append('--enable-shared=no')
diff --git a/var/spack/repos/builtin/packages/gettext/package.py b/var/spack/repos/builtin/packages/gettext/package.py
new file mode 100644
index 0000000000..05712d7392
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gettext/package.py
@@ -0,0 +1,30 @@
+from spack import *
+
+class Gettext(Package):
+ """GNU internationalization (i18n) and localization (l10n) library."""
+ homepage = "https://www.gnu.org/software/gettext/"
+ url = "http://ftpmirror.gnu.org/gettext/gettext-0.19.7.tar.xz"
+
+ version('0.19.7', 'f81e50556da41b44c1d59ac93474dca5')
+
+ def install(self, spec, prefix):
+ options = ['--disable-dependency-tracking',
+ '--disable-silent-rules',
+ '--disable-debug',
+ '--prefix=%s' % prefix,
+ '--with-included-gettext',
+ '--with-included-glib',
+ '--with-included-libcroco',
+ '--with-included-libunistring',
+ '--with-emacs',
+ '--with-lispdir=%s/emacs/site-lisp/gettext' % prefix.share,
+ '--disable-java',
+ '--disable-csharp',
+ '--without-git', # Don't use VCS systems to create these archives
+ '--without-cvs',
+ '--without-xz']
+
+ configure(*options)
+
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py
index 242ee100d7..8d93d48d1f 100644
--- a/var/spack/repos/builtin/packages/hypre/package.py
+++ b/var/spack/repos/builtin/packages/hypre/package.py
@@ -1,5 +1,5 @@
from spack import *
-import os
+import os, sys
class Hypre(Package):
"""Hypre is a library of high performance preconditioners that
@@ -12,7 +12,8 @@ class Hypre(Package):
version('2.10.1', 'dc048c4cabb3cd549af72591474ad674')
version('2.10.0b', '768be38793a35bb5d055905b271f5b8e')
- variant('shared', default=True, description="Build shared library version (disables static library)")
+ # hypre does not know how to build shared libraries on Darwin
+ variant('shared', default=sys.platform!='darwin', description="Build shared library version (disables static library)")
depends_on("mpi")
depends_on("blas")
diff --git a/var/spack/repos/builtin/packages/muparser/package.py b/var/spack/repos/builtin/packages/muparser/package.py
new file mode 100644
index 0000000000..a1a9ff90e5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/muparser/package.py
@@ -0,0 +1,18 @@
+from spack import *
+
+class Muparser(Package):
+ """C++ math expression parser library."""
+ homepage = "http://muparser.beltoforion.de/"
+ url = "https://github.com/beltoforion/muparser/archive/v2.2.5.tar.gz"
+
+ version('2.2.5', '02dae671aa5ad955fdcbcd3fee313fb7')
+
+ def install(self, spec, prefix):
+ options = ['--disable-debug',
+ '--disable-dependency-tracking',
+ '--prefix=%s' % prefix]
+
+ configure(*options)
+
+ make()
+ make("install")
diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py
new file mode 100644
index 0000000000..06acb96736
--- /dev/null
+++ b/var/spack/repos/builtin/packages/oce/package.py
@@ -0,0 +1,47 @@
+from spack import *
+import platform
+
+class Oce(Package):
+ """
+ Open CASCADE Community Edition:
+ patches/improvements/experiments contributed by users over the official Open CASCADE library.
+ """
+ homepage = "https://github.com/tpaviot/oce"
+ url = "https://github.com/tpaviot/oce/archive/OCE-0.17.tar.gz"
+
+ version('0.17.1', '36c67b87093c675698b483454258af91')
+ version('0.17' , 'f1a89395c4b0d199bea3db62b85f818d')
+ version('0.16.1', '4d591b240c9293e879f50d86a0cb2bb3')
+ version('0.16' , '7a4b4df5a104d75a537e25e7dd387eca')
+ version('0.15' , '7ec541a1c350ca8a684f74980e48801c')
+
+ depends_on('cmake@2.8:')
+
+ def install(self, spec, prefix):
+ options = []
+ options.extend(std_cmake_args)
+ options.extend([
+ '-DOCE_INSTALL_PREFIX=%s' % prefix,
+ '-DOCE_BUILD_SHARED_LIB:BOOL=ON',
+ '-DOCE_BUILD_TYPE:STRING=Release',
+ '-DOCE_DATAEXCHANGE:BOOL=ON',
+ '-DOCE_DISABLE_X11:BOOL=ON',
+ '-DOCE_DRAW:BOOL=OFF',
+ '-DOCE_MODEL:BOOL=ON',
+ '-DOCE_MULTITHREAD_LIBRARY:STRING=NONE', # FIXME: add tbb
+ '-DOCE_OCAF:BOOL=ON',
+ '-DOCE_USE_TCL_TEST_FRAMEWORK:BOOL=OFF',
+ '-DOCE_VISUALISATION:BOOL=OFF',
+ '-DOCE_WITH_FREEIMAGE:BOOL=OFF',
+ '-DOCE_WITH_GL2PS:BOOL=OFF',
+ '-DOCE_WITH_OPENCL:BOOL=OFF'
+ ])
+
+ if platform.system() == 'Darwin':
+ options.extend([
+ '-DOCE_OSX_USE_COCOA:BOOL=ON',
+ ])
+
+ cmake('.', *options)
+
+ make("install/strip")
diff --git a/var/spack/repos/builtin/packages/p4est/package.py b/var/spack/repos/builtin/packages/p4est/package.py
new file mode 100644
index 0000000000..1e2969fe64
--- /dev/null
+++ b/var/spack/repos/builtin/packages/p4est/package.py
@@ -0,0 +1,34 @@
+from spack import *
+
+class P4est(Package):
+ """Dynamic management of a collection (a forest) of adaptive octrees in parallel"""
+ homepage = "http://www.p4est.org"
+ url = "http://p4est.github.io/release/p4est-1.1.tar.gz"
+
+ version('1.1', '37ba7f4410958cfb38a2140339dbf64f')
+
+ # disable by default to make it work on frontend of clusters
+ variant('tests', default=False, description='Run small tests')
+
+ depends_on('mpi')
+
+ def install(self, spec, prefix):
+ options = ['--enable-mpi',
+ '--enable-shared',
+ '--disable-vtk-binary',
+ '--without-blas',
+ 'CPPFLAGS=-DSC_LOG_PRIORITY=SC_LP_ESSENTIAL',
+ 'CFLAGS=-O2',
+ 'CC=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # TODO: use ENV variables or MPI class wrappers
+ 'CXX=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'),
+ 'FC=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'),
+ 'F77=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif77'),
+ ]
+
+ configure('--prefix=%s' % prefix, *options)
+
+ make()
+ if '+tests' in self.spec:
+ make("check")
+
+ make("install")
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index 4f55bc803e..6d9030805b 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -108,7 +108,7 @@ class Python(Package):
run_env.set('PYTHONPATH', pythonpath)
- def modify_module(self, module, spec, ext_spec):
+ def setup_dependent_package(self, module, ext_spec):
"""
Called before python modules' install() methods.
@@ -118,17 +118,18 @@ class Python(Package):
"""
# Python extension builds can have a global python executable function
if self.version >= Version("3.0.0") and self.version < Version("4.0.0"):
- module.python = Executable(join_path(spec.prefix.bin, 'python3'))
+ module.python = Executable(join_path(self.spec.prefix.bin, 'python3'))
else:
- module.python = Executable(join_path(spec.prefix.bin, 'python'))
+ module.python = Executable(join_path(self.spec.prefix.bin, 'python'))
# Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs.
module.python_lib_dir = os.path.join(ext_spec.prefix, self.python_lib_dir)
module.python_include_dir = os.path.join(ext_spec.prefix, self.python_include_dir)
module.site_packages_dir = os.path.join(ext_spec.prefix, self.site_packages_dir)
- # Make the site packages directory if it does not exist already.
- mkdirp(module.site_packages_dir)
+ # Make the site packages directory for extensions, if it does not exist already.
+ if ext_spec.package.is_extension:
+ mkdirp(module.site_packages_dir)
# ========================================================================
# Handle specifics of activating and deactivating python modules.
diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py
index 7ff1898ce9..e13677e4d2 100644
--- a/var/spack/repos/builtin/packages/ruby/package.py
+++ b/var/spack/repos/builtin/packages/ruby/package.py
@@ -30,7 +30,7 @@ class Ruby(Package):
# The actual installation path for this gem
spack_env.set('GEM_HOME', extension_spec.prefix)
- def modify_module(self, module, spec, ext_spec):
+ def setup_dependent_package(self, module, ext_spec):
"""Called before ruby modules' install() methods. Sets GEM_HOME
and GEM_PATH to values appropriate for the package being built.
@@ -39,5 +39,5 @@ class Ruby(Package):
gem('install', '<gem-name>.gem')
"""
# Ruby extension builds have global ruby and gem functions
- module.ruby = Executable(join_path(spec.prefix.bin, 'ruby'))
- module.gem = Executable(join_path(spec.prefix.bin, 'gem'))
+ module.ruby = Executable(join_path(self.spec.prefix.bin, 'ruby'))
+ module.gem = Executable(join_path(self.spec.prefix.bin, 'gem'))
diff --git a/var/spack/repos/builtin/packages/tbb/package.py b/var/spack/repos/builtin/packages/tbb/package.py
new file mode 100644
index 0000000000..56ffe4c27c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tbb/package.py
@@ -0,0 +1,79 @@
+from spack import *
+import os
+import glob
+
+class Tbb(Package):
+ """Widely used C++ template library for task parallelism.
+ Intel Threading Building Blocks (Intel TBB) lets you easily write parallel
+ C++ programs that take full advantage of multicore performance, that are
+ portable and composable, and that have future-proof scalability.
+ """
+ homepage = "http://www.threadingbuildingblocks.org/"
+
+ # Only version-specific URL's work for TBB
+ version('4.4.3', '80707e277f69d9b20eeebdd7a5f5331137868ce1', url='https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb44_20160128oss_src_0.tgz')
+
+ def coerce_to_spack(self,tbb_build_subdir):
+ for compiler in ["icc","gcc","clang"]:
+ fs = glob.glob(join_path(tbb_build_subdir,"*.%s.inc" % compiler ))
+ for f in fs:
+ lines = open(f).readlines()
+ of = open(f,"w")
+ for l in lines:
+ if l.strip().startswith("CPLUS ="):
+ of.write("# coerced to spack\n")
+ of.write("CPLUS = $(CXX)\n")
+ elif l.strip().startswith("CPLUS ="):
+ of.write("# coerced to spack\n")
+ of.write("CONLY = $(CC)\n")
+ else:
+ of.write(l);
+
+ def install(self, spec, prefix):
+ #
+ # we need to follow TBB's compiler selection logic to get the proper build + link flags
+ # but we still need to use spack's compiler wrappers
+ # to accomplish this, we do two things:
+ #
+ # * Look at the spack spec to determine which compiler we should pass to tbb's Makefile
+ #
+ # * patch tbb's build system to use the compiler wrappers (CC, CXX) for
+ # icc, gcc, clang
+ # (see coerce_to_spack())
+ #
+ self.coerce_to_spack("build")
+
+ if spec.satisfies('%clang'):
+ tbb_compiler = "clang"
+ elif spec.satisfies('%intel'):
+ tbb_compiler = "icc"
+ else:
+ tbb_compiler = "gcc"
+
+
+ mkdirp(prefix)
+ mkdirp(prefix.lib)
+
+ #
+ # tbb does not have a configure script or make install target
+ # we simply call make, and try to put the pieces together
+ #
+ make("compiler=%s" %(tbb_compiler))
+
+ # install headers to {prefix}/include
+ install_tree('include',prefix.include)
+
+ # install libs to {prefix}/lib
+ tbb_lib_names = ["libtbb",
+ "libtbbmalloc",
+ "libtbbmalloc_proxy"]
+
+ for lib_name in tbb_lib_names:
+ # install release libs
+ fs = glob.glob(join_path("build","*release",lib_name + ".*"))
+ for f in fs:
+ install(f, prefix.lib)
+ # install debug libs if they exist
+ fs = glob.glob(join_path("build","*debug",lib_name + "_debug.*"))
+ for f in fs:
+ install(f, prefix.lib)