From fb6a2b5cabe284ecac5088c94fb2dba36f4a7e2e Mon Sep 17 00:00:00 2001 From: Ben Morgan Date: Wed, 20 Feb 2019 09:55:09 +0000 Subject: xxhash: edit prefix in Makefile for macOS (#10606) On macOS, the build of libxxhash is performed by a bare `make` launched by `MakePackage`s default `build` phase. As `prefix` is not set at this point, the library gets compiled with a hard-coded install name of `/usr/local/libxxhash.dylib`. Downstream clients, in the tested case Root, will then fail to build as the install name is incorrect. Move setting of `prefix` from `install` to `edit` so that it propagates to subsequent `build` and `install` phases. --- var/spack/repos/builtin/packages/xxhash/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/xxhash/package.py b/var/spack/repos/builtin/packages/xxhash/package.py index e2fcfbb731..cb8e37bfaa 100644 --- a/var/spack/repos/builtin/packages/xxhash/package.py +++ b/var/spack/repos/builtin/packages/xxhash/package.py @@ -26,5 +26,6 @@ class Xxhash(MakefilePackage): version('0.5.1', '9417fd8a4d88204b680e21a60f0ccada') version('0.5.0', '42e9a31a2cfc2f626fde17e84a0b6bb7') - def install(self, spec, prefix): - make('prefix={0}'.format(prefix), 'install') + def edit(self, spec, prefix): + makefile = FileFilter("Makefile") + makefile.filter('/usr/local', prefix) -- cgit v1.2.3-70-g09d2