metis: bugfix: make shared library build portable (#4489)

Fixes #4488. When compiling metis as a shared library, the package
used the syntax `-rpath=`, followed by a path. This syntax is
non-portable, so replace it using Spack's compiler rpath argument
property.
This commit is contained in:
Geoffrey Oxberry 2017-06-13 17:59:25 -07:00 committed by Todd Gamblin
parent b802524517
commit 56f7c85c93

View File

@ -135,7 +135,8 @@ def install(self, spec, prefix):
# Set up and run tests on installation
ccompile('-I%s' % prefix.include, '-L%s' % prefix.lib,
'-Wl,-rpath=%s' % (prefix.lib if '+shared' in spec else ''),
self.compiler.cc_rpath_arg +
'%s' % (prefix.lib if '+shared' in spec else ''),
join_path('Programs', 'io.o'), join_path('Test', 'mtest.c'),
'-o', '%s/mtest' % prefix.bin, '-lmetis', '-lm')