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.
This commit is contained in:
Ben Morgan 2019-02-20 09:55:09 +00:00 committed by Javier Cervantes
parent 286da7f47b
commit fb6a2b5cab

View file

@ -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)