summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-03-27 16:10:05 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-03-27 16:10:05 -0700
commit8b45d6f84fdb2ee627a76f412fd8cc12b206046a (patch)
tree50c46e9b934fe784bda330871fd6f9df7598dbc0 /var
parent82c09e66d22933303f4284713f5daf464d733975 (diff)
parent7eca1284c81c3efc5a87b8a174a0974811656b3e (diff)
downloadspack-8b45d6f84fdb2ee627a76f412fd8cc12b206046a.tar.gz
spack-8b45d6f84fdb2ee627a76f412fd8cc12b206046a.tar.bz2
spack-8b45d6f84fdb2ee627a76f412fd8cc12b206046a.tar.xz
spack-8b45d6f84fdb2ee627a76f412fd8cc12b206046a.zip
Merge pull request #658 from davydden/metis_parmetis_darwin
metis/parmetis/oce/boost: correct install_name on Darwin via a global tool
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py50
-rw-r--r--var/spack/repos/builtin/packages/metis/package.py6
-rw-r--r--var/spack/repos/builtin/packages/netlib-scalapack/package.py5
-rw-r--r--var/spack/repos/builtin/packages/oce/package.py6
-rw-r--r--var/spack/repos/builtin/packages/parmetis/package.py6
5 files changed, 47 insertions, 26 deletions
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
index fb1f5daee7..82ce6fbb74 100644
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -1,5 +1,6 @@
from spack import *
import spack
+import sys
class Boost(Package):
"""Boost provides free peer-reviewed portable C++ source
@@ -45,34 +46,34 @@ class Boost(Package):
version('1.34.1', '2d938467e8a448a2c9763e0a9f8ca7e5')
version('1.34.0', 'ed5b9291ffad776f8757a916e1726ad0')
- default_install_libs = set(['atomic',
- 'chrono',
- 'date_time',
- 'filesystem',
+ default_install_libs = set(['atomic',
+ 'chrono',
+ 'date_time',
+ 'filesystem',
'graph',
'iostreams',
'locale',
'log',
- 'math',
+ 'math',
'program_options',
- 'random',
- 'regex',
- 'serialization',
- 'signals',
- 'system',
- 'test',
- 'thread',
+ 'random',
+ 'regex',
+ 'serialization',
+ 'signals',
+ 'system',
+ 'test',
+ 'thread',
'wave'])
- # mpi/python are not installed by default because they pull in many
- # dependencies and/or because there is a great deal of customization
+ # mpi/python are not installed by default because they pull in many
+ # dependencies and/or because there is a great deal of customization
# possible (and it would be difficult to choose sensible defaults)
default_noinstall_libs = set(['mpi', 'python'])
all_libs = default_install_libs | default_noinstall_libs
for lib in all_libs:
- variant(lib, default=(lib not in default_noinstall_libs),
+ variant(lib, default=(lib not in default_noinstall_libs),
description="Compile with {0} library".format(lib))
variant('debug', default=False, description='Switch to the debug version of Boost')
@@ -124,9 +125,9 @@ class Boost(Package):
with open('user-config.jam', 'w') as f:
compiler_wrapper = join_path(spack.build_env_path, 'c++')
- f.write("using {0} : : {1} ;\n".format(boostToolsetId,
+ f.write("using {0} : : {1} ;\n".format(boostToolsetId,
compiler_wrapper))
-
+
if '+mpi' in spec:
f.write('using mpi : %s ;\n' %
join_path(spec['mpi'].prefix.bin, 'mpicxx'))
@@ -155,7 +156,7 @@ class Boost(Package):
linkTypes = ['static']
if '+shared' in spec:
linkTypes.append('shared')
-
+
threadingOpts = []
if '+multithreaded' in spec:
threadingOpts.append('multi')
@@ -163,12 +164,12 @@ class Boost(Package):
threadingOpts.append('single')
if not threadingOpts:
raise RuntimeError("At least one of {singlethreaded, multithreaded} must be enabled")
-
+
options.extend([
'toolset=%s' % self.determine_toolset(spec),
'link=%s' % ','.join(linkTypes),
'--layout=tagged'])
-
+
return threadingOpts
def install(self, spec, prefix):
@@ -177,14 +178,14 @@ class Boost(Package):
if "+{0}".format(lib) in spec:
withLibs.append(lib)
if not withLibs:
- # if no libraries are specified for compilation, then you dont have
+ # if no libraries are specified for compilation, then you dont have
# to configure/build anything, just copy over to the prefix directory.
src = join_path(self.stage.source_path, 'boost')
mkdirp(join_path(prefix, 'include'))
dst = join_path(prefix, 'include', 'boost')
install_tree(src, dst)
return
-
+
# to make Boost find the user-config.jam
env['BOOST_BUILD_PATH'] = './'
@@ -207,4 +208,7 @@ class Boost(Package):
# Boost.MPI if the threading options are not separated.
for threadingOpt in threadingOpts:
b2('install', 'threading=%s' % threadingOpt, *b2_options)
-
+
+ # The shared libraries are not installed correctly on Darwin; correct this
+ if (sys.platform == 'darwin') and ('+shared' in spec):
+ fix_darwin_install_name(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py
index 68b9f6fd30..9301135f9f 100644
--- a/var/spack/repos/builtin/packages/metis/package.py
+++ b/var/spack/repos/builtin/packages/metis/package.py
@@ -24,7 +24,7 @@
##############################################################################
from spack import *
-import glob
+import glob,sys
class Metis(Package):
"""
@@ -90,3 +90,7 @@ class Metis(Package):
fs = glob.glob(join_path(source_directory,'GKlib',"*.h"))
for f in fs:
install(f, GKlib_dist)
+
+ # The shared library is not installed correctly on Darwin; correct this
+ if (sys.platform == 'darwin') and ('+shared' in spec):
+ fix_darwin_install_name(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
index c3e6822cdf..d59f8e41fe 100644
--- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py
+++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
@@ -41,6 +41,11 @@ class NetlibScalapack(Package):
make()
make("install")
+ # The shared libraries are not installed correctly on Darwin; correct this
+ if (sys.platform == 'darwin') and ('+shared' in spec):
+ fix_darwin_install_name(prefix.lib)
+
+
def setup_dependent_package(self, module, dependent_spec):
spec = self.spec
lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so'
diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py
index 06acb96736..4d5081ac9d 100644
--- a/var/spack/repos/builtin/packages/oce/package.py
+++ b/var/spack/repos/builtin/packages/oce/package.py
@@ -1,5 +1,5 @@
from spack import *
-import platform
+import platform, sys
class Oce(Package):
"""
@@ -45,3 +45,7 @@ class Oce(Package):
cmake('.', *options)
make("install/strip")
+
+ # The shared libraries are not installed correctly on Darwin; correct this
+ if (sys.platform == 'darwin'):
+ fix_darwin_install_name(prefix.lib)
diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py
index f5b8b6de91..ff4370aa4b 100644
--- a/var/spack/repos/builtin/packages/parmetis/package.py
+++ b/var/spack/repos/builtin/packages/parmetis/package.py
@@ -24,7 +24,7 @@
##############################################################################
from spack import *
-
+import sys
class Parmetis(Package):
"""
@@ -83,3 +83,7 @@ class Parmetis(Package):
cmake(source_directory, *options)
make()
make("install")
+
+ # The shared library is not installed correctly on Darwin; correct this
+ if (sys.platform == 'darwin') and ('+shared' in spec):
+ fix_darwin_install_name(prefix.lib)