From 1999135cab658fea39d011b6ec82c8e09638fd0d Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sat, 9 Apr 2022 16:29:39 +0200 Subject: [PATCH] ntl: remove custom phases --- .../repos/builtin/packages/ntl/package.py | 29 +++++-------------- 1 file 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 @@ def configure_args(self): 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)