diff options
-rw-r--r-- | var/spack/repos/builtin/packages/zstd/package.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/zstd/package.py b/var/spack/repos/builtin/packages/zstd/package.py index bbee22d7b5..299ff0790f 100644 --- a/var/spack/repos/builtin/packages/zstd/package.py +++ b/var/spack/repos/builtin/packages/zstd/package.py @@ -37,12 +37,17 @@ class Zstd(MakefilePackage): depends_on('lzma', when='+programs') depends_on('lz4', when='+programs') + def _make(self, *args): + # PREFIX must be defined on macOS even when building the library, since + # it gets hardcoded into the library's install_path + make('VERBOSE=1', 'PREFIX=' + self.prefix, '-C', *args) + def build(self, spec, prefix): - make('-C', 'lib') + self._make('lib') if spec.variants['programs'].value: - make('-C', 'programs') + self._make('programs') def install(self, spec, prefix): - make('-C', 'lib', 'install', 'PREFIX={0}'.format(prefix)) + self._make('lib', 'install') if spec.variants['programs'].value: - make('-C', 'programs', 'install', 'PREFIX={0}'.format(prefix)) + self._make('programs', 'install') |