From f110d0848a550ef4932132094d2cc626552b452b Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Mon, 11 Apr 2022 15:07:15 +0200 Subject: nasm: remove custom phases (#29986) --- var/spack/repos/builtin/packages/nasm/package.py | 29 +++++++----------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/var/spack/repos/builtin/packages/nasm/package.py b/var/spack/repos/builtin/packages/nasm/package.py index be39246736..ad180ff105 100644 --- a/var/spack/repos/builtin/packages/nasm/package.py +++ b/var/spack/repos/builtin/packages/nasm/package.py @@ -2,11 +2,8 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - from spack import * -is_windows = str(spack.platforms.host()) == 'windows' - class Nasm(Package): """NASM (Netwide Assembler) is an 80x86 assembler designed for @@ -31,8 +28,6 @@ class Nasm(Package): conflicts('%intel@:14', when='@2.14:', msg="Intel 14 has immature C11 support") - phases = ['configure', 'build', 'install'] - def patch(self): # Remove flags not recognized by the NVIDIA compiler if self.spec.satisfies('%nvhpc@:20.11'): @@ -41,22 +36,14 @@ class Nasm(Package): filter_file(r'CFLAGS="\$pa_add_flags__old_flags -Werror=.*"', 'CFLAGS="$pa_add_flags__old_flags"', 'configure') - def configure(self, spec, prefix): + def install(self, spec, prefix): with working_dir(self.stage.source_path, create=True): - if not is_windows: - configure(*['--prefix={0}'.format(self.prefix)]) + configure(*['--prefix={0}'.format(self.prefix)]) + make('V=1') + make('install') + @when('platform=windows') def build(self, spec, prefix): - with working_dir(self.stage.source_path): - if is_windows: - touch('asm\\warnings.time') - nmake('/f', 'Mkfiles\\msvc.mak') - else: - make(*['V=1']) - - def install(self, spec, prefix): - with working_dir(self.stage.source_path): - if is_windows: - pass - else: - make(*['install']) + with working_dir(self.stage.source_path, create=True): + touch('asm\\warnings.time') + nmake('/f', 'Mkfiles\\msvc.mak') -- cgit v1.2.3-70-g09d2