ntl: remove custom phases

This commit is contained in:
Massimiliano Culpo 2022-04-09 16:29:39 +02:00
parent a708844e87
commit 1999135cab

View File

@ -6,9 +6,8 @@
from spack import * from spack import *
class Ntl(Package): class Ntl(MakefilePackage):
""" """NTL -- a library for doing number theory
NTL -- a library for doing number theory
NTL is open-source software distributed under the terms of the GNU Lesser 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 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 Documentation is available in the file doc/tour.html, which can be viewed
with a web browser. with a web browser.
""" """
homepage = "https://libntl.org" homepage = "https://libntl.org"
@ -32,12 +30,12 @@ class Ntl(Package):
depends_on('gmp') 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): build_directory = 'src'
spec = self.spec
prefix = self.prefix
def edit(self, spec, prefix):
config_args = [ config_args = [
'CXX={0}'.format(self.compiler.cxx), 'CXX={0}'.format(self.compiler.cxx),
'DEF_PREFIX={0}'.format(prefix), 'DEF_PREFIX={0}'.format(prefix),
@ -46,17 +44,6 @@ def configure_args(self):
if '+shared' in spec: if '+shared' in spec:
config_args.append('SHARED=on') config_args.append('SHARED=on')
return config_args with working_dir(self.build_directory):
def configure(self, spec, prefix):
with working_dir('src'):
configure = Executable('./configure') configure = Executable('./configure')
configure(*self.configure_args()) configure(*config_args)
def build(self, spec, prefix):
with working_dir('src'):
make()
def install(self, spec, prefix):
with working_dir('src'):
make('install')