zstd: improve %nvhpc conflict (#29867)

This commit is contained in:
Harmen Stoppels 2022-04-08 09:28:31 +02:00 committed by GitHub
parent 99425e273b
commit b667be470e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,12 +38,22 @@ class Zstd(MakefilePackage):
depends_on('lz4', when='+programs') depends_on('lz4', when='+programs')
depends_on('xz', when='+programs') depends_on('xz', when='+programs')
conflicts('%nvhpc') # +programs builds vendored xxhash, which uses unsupported builtins
# (last tested: nvhpc@22.3)
conflicts('+programs %nvhpc')
def _make(self, *args, **kwargs): def _make(self, *args, **kwargs):
# PREFIX must be defined on macOS even when building the library, since # PREFIX must be defined on macOS even when building the library, since
# it gets hardcoded into the library's install_path # it gets hardcoded into the library's install_path
make('VERBOSE=1', 'PREFIX=' + self.prefix, '-C', *args, **kwargs) def_args = ['VERBOSE=1', 'PREFIX=' + self.prefix]
# Tested %nvhpc@22.3. No support for -MP
if '%nvhpc' in self.spec:
def_args.append('DEPFLAGS=-MT $@ -MMD -MF')
def_args.append('-C')
def_args.extend(args)
make(*def_args, **kwargs)
def build(self, spec, prefix): def build(self, spec, prefix):
self._make('lib') self._make('lib')