diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/ntl/package.py | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/var/spack/repos/builtin/packages/ntl/package.py b/var/spack/repos/builtin/packages/ntl/package.py index 2d3731e10c..260e92802a 100644 --- a/var/spack/repos/builtin/packages/ntl/package.py +++ b/var/spack/repos/builtin/packages/ntl/package.py @@ -6,9 +6,8 @@ from spack import * -class Ntl(Package): - """ - NTL -- a library for doing number theory +class Ntl(MakefilePackage): + """NTL -- a library for doing number theory NTL is open-source software distributed under the terms of the GNU Lesser General Public License (LGPL) version 2.1 or later. See the file @@ -16,7 +15,6 @@ class Ntl(Package): Documentation is available in the file doc/tour.html, which can be viewed with a web browser. - """ homepage = "https://libntl.org" @@ -32,12 +30,12 @@ class Ntl(Package): depends_on('gmp') - phases = ['configure', 'build', 'install'] + # The configure script is a thin wrapper around perl + depends_on('perl', type='build') - def configure_args(self): - spec = self.spec - prefix = self.prefix + build_directory = 'src' + def edit(self, spec, prefix): config_args = [ 'CXX={0}'.format(self.compiler.cxx), 'DEF_PREFIX={0}'.format(prefix), @@ -46,17 +44,6 @@ class Ntl(Package): if '+shared' in spec: config_args.append('SHARED=on') - return config_args - - def configure(self, spec, prefix): - with working_dir('src'): + with working_dir(self.build_directory): configure = Executable('./configure') - configure(*self.configure_args()) - - def build(self, spec, prefix): - with working_dir('src'): - make() - - def install(self, spec, prefix): - with working_dir('src'): - make('install') + configure(*config_args) |