Dynamic library/include paths (#8136)

Fixes #7855
Closes #8070
Closes #2645

When searching for library directories (e.g. to add "-L" arguments to
the compiler wrapper) Spack was only trying the "lib/" and "lib64/"
directories for each dependency install prefix; this missed cases
where packages would install libraries to subdirectories and also was
not customizable. This PR makes use of the ".headers" and ".libs"
properties for more-advanced location of header/library directories.
Since packages can override the default behavior of ".headers" and
".libs", it also allows package writers to customize.

The following environment variables which used to be set by Spack
for a package build have been removed:

* Remove SPACK_PREFIX and SPACK_DEPENDENCIES environment variables as
  they are no-longer used
* Remove SPACK_INSTALL environment variable: it was not used before
  this PR
This commit is contained in:
Peter Scheibel
2019-02-13 17:38:14 -06:00
committed by GitHub
parent 1bf86292e1
commit 8ca384875e
9 changed files with 261 additions and 252 deletions

View File

@@ -31,7 +31,3 @@ def configure_args(self):
if self.spec.satisfies('@2.9.1:'):
args.append('--enable-freetype-config')
return args
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
spack_env.prepend_path('CPATH', self.prefix.include.freetype2)
run_env.prepend_path('CPATH', self.prefix.include.freetype2)