summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2022-04-09 16:29:39 +0200
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2022-04-12 08:39:15 +0200
commit1999135cab658fea39d011b6ec82c8e09638fd0d (patch)
treee999c23f5c62a81962a4d6e5c8133dcf867bd92d
parenta708844e870720a1be4f4f3c4b47b28d4acef321 (diff)
downloadspack-1999135cab658fea39d011b6ec82c8e09638fd0d.tar.gz
spack-1999135cab658fea39d011b6ec82c8e09638fd0d.tar.bz2
spack-1999135cab658fea39d011b6ec82c8e09638fd0d.tar.xz
spack-1999135cab658fea39d011b6ec82c8e09638fd0d.zip
ntl: remove custom phases
-rw-r--r--var/spack/repos/builtin/packages/ntl/package.py29
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)