summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-07-11 09:14:53 -0700
committerGitHub <noreply@github.com>2016-07-11 09:14:53 -0700
commit691e628726404832baed37f244dee136533d2f15 (patch)
treec0c2e3e9bac18aed833cac23831c0e102a0fa72e /var
parent85947d0985c1ab808b4f6b42c8b37950942f90c1 (diff)
parent38550bbc1b5a61c5c7a2869297642627fd598035 (diff)
downloadspack-691e628726404832baed37f244dee136533d2f15.tar.gz
spack-691e628726404832baed37f244dee136533d2f15.tar.bz2
spack-691e628726404832baed37f244dee136533d2f15.tar.xz
spack-691e628726404832baed37f244dee136533d2f15.zip
Merge pull request #1206 from davydden/pkg/slepc_371_fix
slepc: fix install_name for binaries on macOS for 3.7.1
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/slepc/install_name_371.patch32
-rw-r--r--var/spack/repos/builtin/packages/slepc/package.py15
2 files changed, 42 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/slepc/install_name_371.patch b/var/spack/repos/builtin/packages/slepc/install_name_371.patch
new file mode 100644
index 0000000000..d02ca88657
--- /dev/null
+++ b/var/spack/repos/builtin/packages/slepc/install_name_371.patch
@@ -0,0 +1,32 @@
+From 7489a3f3d569e2fbf5513ac9dcd769017d9f7eb7 Mon Sep 17 00:00:00 2001
+From: Lisandro Dalcin <dalcinl@gmail.com>
+Date: Thu, 2 Jun 2016 21:57:38 +0300
+Subject: [PATCH] OS X: Fix library path in invocation of install_name_tool
+
+---
+ config/install.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/config/install.py b/config/install.py
+index 09acd03..6ce98ae 100755
+--- a/config/install.py
++++ b/config/install.py
+@@ -25,6 +25,7 @@ class Installer:
+
+ def setupDirectories(self):
+ self.installDir = self.destDir
++ self.archDir = os.path.join(self.rootDir, self.arch)
+ self.rootIncludeDir = os.path.join(self.rootDir, 'include')
+ self.archIncludeDir = os.path.join(self.rootDir, self.arch, 'include')
+ self.rootConfDir = os.path.join(self.rootDir, 'lib','slepc','conf')
+@@ -220,7 +221,7 @@ for dir in dirs:
+ if os.path.splitext(dst)[1] == '.dylib' and os.path.isfile('/usr/bin/install_name_tool'):
+ (result, output) = commands.getstatusoutput('otool -D '+src)
+ oldname = output[output.find("\n")+1:]
+- installName = oldname.replace(self.destDir, self.installDir)
++ installName = oldname.replace(self.archDir, self.installDir)
+ (result, output) = commands.getstatusoutput('/usr/bin/install_name_tool -id ' + installName + ' ' + dst)
+ # preserve the original timestamps - so that the .a vs .so time order is preserved
+ shutil.copystat(src,dst)
+--
+2.7.4.1.g5468f9e
diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py
index d3739bf6a6..fd6c42d9fc 100644
--- a/var/spack/repos/builtin/packages/slepc/package.py
+++ b/var/spack/repos/builtin/packages/slepc/package.py
@@ -28,7 +28,7 @@ from spack import *
class Slepc(Package):
"""
- Scalable Library for Eigenvalue Computations.
+ Scalable Library for Eigenvalue Problem Computations.
"""
homepage = "http://www.grycap.upv.es/slepc"
@@ -45,9 +45,13 @@ class Slepc(Package):
depends_on('arpack-ng~mpi', when='+arpack^petsc~mpi')
depends_on('arpack-ng+mpi', when='+arpack^petsc+mpi')
+ patch('install_name_371.patch', when='@3.7.1')
+
def install(self, spec, prefix):
# set SLEPC_DIR for installation
- os.environ['SLEPC_DIR'] = self.stage.source_path
+ # Note that one should set the current (temporary) directory instead
+ # its symlink in spack/stage/ !
+ os.environ['SLEPC_DIR'] = os.getcwd()
options = []
@@ -67,9 +71,10 @@ class Slepc(Package):
configure('--prefix=%s' % prefix, *options)
make('MAKE_NP=%s' % make_jobs, parallel=False)
- # FIXME:
- # make('test')
- make('install')
+ if self.run_tests:
+ make('test', parallel=False)
+
+ make('install', parallel=False)
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
# set up SLEPC_DIR for everyone using SLEPc package