summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/parmetis/package.py26
1 files changed, 10 insertions, 16 deletions
diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py
index 927a7715e6..dacd218f99 100644
--- a/var/spack/repos/builtin/packages/parmetis/package.py
+++ b/var/spack/repos/builtin/packages/parmetis/package.py
@@ -27,7 +27,7 @@ from spack import *
import sys
-class Parmetis(Package):
+class Parmetis(CMakePackage):
"""ParMETIS is an MPI-based parallel library that implements a variety of
algorithms for partitioning unstructured graphs, meshes, and for
computing fill-reducing orderings of sparse matrices."""
@@ -40,7 +40,6 @@ class Parmetis(Package):
version('4.0.2', '0912a953da5bb9b5e5e10542298ffdce')
variant('shared', default=True, description='Enables the build of shared libraries.')
- variant('debug', default=False, description='Builds the library in debug mode.')
variant('gdb', default=False, description='Enables gdb support.')
depends_on('cmake@2.8:', type='build')
@@ -61,11 +60,10 @@ class Parmetis(Package):
url += '/parmetis-{0}.tar.gz'.format(version)
return url
- def install(self, spec, prefix):
- source_directory = self.stage.source_path
- build_directory = join_path(source_directory, 'build')
+ def cmake_args(self):
+ spec = self.spec
- options = std_cmake_args[:]
+ options = []
options.extend([
'-DGKLIB_PATH:PATH=%s/GKlib' % spec['metis'].prefix.include,
'-DMETIS_PATH:PATH=%s' % spec['metis'].prefix,
@@ -87,17 +85,13 @@ class Parmetis(Package):
for o in rpath_options:
options.remove(o)
- if '+debug' in spec:
- options.extend(['-DDEBUG:BOOL=ON',
- '-DCMAKE_BUILD_TYPE:STRING=Debug'])
if '+gdb' in spec:
options.append('-DGDB:BOOL=ON')
- with working_dir(build_directory, create=True):
- cmake(source_directory, *options)
- make()
- make('install')
+ return options
- # The shared library is not installed correctly on Darwin; fix this
- if (sys.platform == 'darwin') and ('+shared' in spec):
- fix_darwin_install_name(prefix.lib)
+ @run_after('install')
+ def darwin_fix(self):
+ # The shared library is not installed correctly on Darwin; fix this
+ if (sys.platform == 'darwin') and ('+shared' in self.spec):
+ fix_darwin_install_name(prefix.lib)