summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSeth R. Johnson <johnsonsr@ornl.gov>2021-10-04 22:03:48 -0400
committerGitHub <noreply@github.com>2021-10-05 02:03:48 +0000
commit3cf426df99dfd287a9796def959627ce62047145 (patch)
treeb8b992b1581b54056aa472fc212ad811a4bab8bb /var
parentb5673d70de12d97f6b960ae7cd626707c7f96d16 (diff)
downloadspack-3cf426df99dfd287a9796def959627ce62047145.tar.gz
spack-3cf426df99dfd287a9796def959627ce62047145.tar.bz2
spack-3cf426df99dfd287a9796def959627ce62047145.tar.xz
spack-3cf426df99dfd287a9796def959627ce62047145.zip
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 :)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/zstd/package.py13
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')