diff options
author | Michael Kuhn <michael.kuhn@informatik.uni-hamburg.de> | 2019-10-06 04:03:35 +0200 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2019-10-05 21:03:35 -0500 |
commit | bdb92f2d91605dd8a93ef16f0d7fcf6595f5b012 (patch) | |
tree | f99f3df188744d4e44db47e380bf1cc7bc0c5b22 | |
parent | c6b8d79ea6960609ec62fada1ab210725a464886 (diff) | |
download | spack-bdb92f2d91605dd8a93ef16f0d7fcf6595f5b012.tar.gz spack-bdb92f2d91605dd8a93ef16f0d7fcf6595f5b012.tar.bz2 spack-bdb92f2d91605dd8a93ef16f0d7fcf6595f5b012.tar.xz spack-bdb92f2d91605dd8a93ef16f0d7fcf6595f5b012.zip |
Consistently support pkg-config files in share subdirectory (#12838)
While the build environment already takes share/pkgconfig into account,
the generated module files etc. only consider lib/pkgconfig and
lib64/pkgconfig.
-rw-r--r-- | etc/spack/defaults/modules.yaml | 2 | ||||
-rw-r--r-- | lib/spack/docs/environments.rst | 2 | ||||
-rw-r--r-- | lib/spack/spack/environment.py | 3 | ||||
-rw-r--r-- | lib/spack/spack/test/config.py | 1 | ||||
-rw-r--r-- | lib/spack/spack/test/data/config/modules.yaml | 2 | ||||
-rw-r--r-- | lib/spack/spack/test/environment_modifications.py | 1 |
6 files changed, 9 insertions, 2 deletions
diff --git a/etc/spack/defaults/modules.yaml b/etc/spack/defaults/modules.yaml index 1d91b0c88c..77c976510b 100644 --- a/etc/spack/defaults/modules.yaml +++ b/etc/spack/defaults/modules.yaml @@ -35,6 +35,8 @@ modules: - PKG_CONFIG_PATH lib64/pkgconfig: - PKG_CONFIG_PATH + share/pkgconfig: + - PKG_CONFIG_PATH '': - CMAKE_PREFIX_PATH diff --git a/lib/spack/docs/environments.rst b/lib/spack/docs/environments.rst index 664e6e2cce..6ce67f0067 100644 --- a/lib/spack/docs/environments.rst +++ b/lib/spack/docs/environments.rst @@ -764,7 +764,7 @@ ACLOCAL_PATH share/aclocal LD_LIBRARY_PATH lib, lib64 LIBRARY_PATH lib, lib64 CPATH include -PKG_CONFIG_PATH lib/pkgconfig, lib64/pkgconfig +PKG_CONFIG_PATH lib/pkgconfig, lib64/pkgconfig, share/pkgconfig CMAKE_PREFIX_PATH . =================== ========= diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index adb062d1cb..84c77df6b0 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -949,7 +949,8 @@ class Environment(object): ('LD_LIBRARY_PATH', ['lib', 'lib64']), ('LIBRARY_PATH', ['lib', 'lib64']), ('CPATH', ['include']), - ('PKG_CONFIG_PATH', ['lib/pkgconfig', 'lib64/pkgconfig']), + ('PKG_CONFIG_PATH', ['lib/pkgconfig', 'lib64/pkgconfig', + 'share/pkgconfig']), ('CMAKE_PREFIX_PATH', ['']), ] diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py index 631fbabe8b..163fc392d3 100644 --- a/lib/spack/spack/test/config.py +++ b/lib/spack/spack/test/config.py @@ -507,6 +507,7 @@ def test_keys_are_ordered(): 'include', 'lib/pkgconfig', 'lib64/pkgconfig', + 'share/pkgconfig', '' ) diff --git a/lib/spack/spack/test/data/config/modules.yaml b/lib/spack/spack/test/data/config/modules.yaml index adc16e896b..f610087fb1 100644 --- a/lib/spack/spack/test/data/config/modules.yaml +++ b/lib/spack/spack/test/data/config/modules.yaml @@ -37,5 +37,7 @@ modules: - PKG_CONFIG_PATH lib64/pkgconfig: - PKG_CONFIG_PATH + share/pkgconfig: + - PKG_CONFIG_PATH '': - CMAKE_PREFIX_PATH diff --git a/lib/spack/spack/test/environment_modifications.py b/lib/spack/spack/test/environment_modifications.py index a57ac74364..1e1759ddbc 100644 --- a/lib/spack/spack/test/environment_modifications.py +++ b/lib/spack/spack/test/environment_modifications.py @@ -28,6 +28,7 @@ def test_inspect_path(tmpdir): 'include': ['CPATH'], 'lib/pkgconfig': ['PKG_CONFIG_PATH'], 'lib64/pkgconfig': ['PKG_CONFIG_PATH'], + 'share/pkgconfig': ['PKG_CONFIG_PATH'], '': ['CMAKE_PREFIX_PATH'] } |