summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-petsc4py/ldshared.patch13
-rw-r--r--var/spack/repos/builtin/packages/py-petsc4py/package.py2
2 files changed, 15 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-petsc4py/ldshared.patch b/var/spack/repos/builtin/packages/py-petsc4py/ldshared.patch
new file mode 100644
index 0000000000..026a48722e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-petsc4py/ldshared.patch
@@ -0,0 +1,13 @@
+diff --git a/conf/baseconf.py b/conf/baseconf.py
+index 8a2466a5bd..73c08b923a 100644
+--- a/conf/baseconf.py
++++ b/conf/baseconf.py
+@@ -211,7 +211,7 @@ class PetscConfig:
+ ldshared = getenv('LDSHARED', ldshared)
+ ldflags = getenv('LDFLAGS', cflags + ' ' + (ldflags or ''))
+ ldcmd = split_quoted(ld) + split_quoted(ldflags)
+- ldshared = [flg for flg in split_quoted(ldshared) if flg not in ldcmd]
++ ldshared = [flg for flg in split_quoted(ldshared) if flg not in ldcmd and (flg.find('/lib/spack/env')<0)]
+ ldshared = str.join(' ', ldshared)
+ #
+ def get_flags(cmd):
diff --git a/var/spack/repos/builtin/packages/py-petsc4py/package.py b/var/spack/repos/builtin/packages/py-petsc4py/package.py
index 1136af6852..d022c64964 100644
--- a/var/spack/repos/builtin/packages/py-petsc4py/package.py
+++ b/var/spack/repos/builtin/packages/py-petsc4py/package.py
@@ -31,6 +31,8 @@ class PyPetsc4py(PythonPackage):
variant('mpi', default=True, description='Activates MPI support')
+ patch('ldshared.patch')
+
depends_on('py-cython', type='build', when='@develop')
depends_on('python@2.6:2.8,3.3:', type=('build', 'run'))
depends_on('py-setuptools', type='build')