From 3cf426df99dfd287a9796def959627ce62047145 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Mon, 4 Oct 2021 22:03:48 -0400 Subject: zstd: fix install name on macOS (#26518) Reverting from CMake to Make install caused `-install_path=/usr/local/lib/libzstd.1.dylib` to be hardcoded into the zstd. Now we explicitly pass the PREFIX into the build command so that the correct spack install path is saved. Fixes #26438 and also the ROOT install issue I had :) --- var/spack/repos/builtin/packages/zstd/package.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'var') 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') -- cgit v1.2.3-70-g09d2