lua package: add lib64 to LUA_PATH and LUA_CPATH (#7434)

This is needed when using system lua on RHEL and clones where lua
is installed in /usr/lib64. Note that the path entry for lua in
packages.yaml should specify the major/minor version of lua (since
this is used to calculate the lua lib directory)
This commit is contained in:
Patrick Gartung 2018-03-08 22:18:55 -06:00 committed by scheibelp
parent 74bb15285b
commit 331f5f27eb

View File

@ -102,6 +102,7 @@ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
deptypes=('build', 'run'), deptype_query='run'):
if d.package.extends(self.spec):
lua_paths.append(os.path.join(d.prefix, self.lua_lib_dir))
lua_paths.append(os.path.join(d.prefix, self.lua64_lib_dir))
lua_paths.append(os.path.join(d.prefix, self.lua_share_dir))
lua_patterns = []
@ -112,6 +113,7 @@ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
# Always add this package's paths
for p in (os.path.join(self.spec.prefix, self.lua_lib_dir),
os.path.join(self.spec.prefix, self.lua_lib64_dir),
os.path.join(self.spec.prefix, self.lua_share_dir)):
self.append_paths(lua_patterns, lua_cpatterns, p)
@ -155,6 +157,10 @@ def setup_environment(self, spack_env, run_env):
def lua_lib_dir(self):
return os.path.join('lib', 'lua', str(self.version.up_to(2)))
@property
def lua_lib64_dir(self):
return os.path.join('lib64', 'lua', str(self.version.up_to(2)))
@property
def lua_share_dir(self):
return os.path.join('share', 'lua', str(self.version.up_to(2)))