From 7f1659786b32dd492b062347c6ca1538a8c71495 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Mon, 9 May 2022 21:54:38 -0700 Subject: Add a Lua build-system (#28854) Reworking lua to allow easier substitution of the base lua implementation. Also adding in a maintained version of luajit and re-factoring the entire stack to use a custom build-system to centralize functionality like environment variable management and luarocks installation. The `lua-lang` virtual is now versioned so that a package that requires Lua 5.1 semantics can get any lua, but one that requires 5.2 will only get upstream lua. The luaposix package requires lua-bit32, but only when built with a lua conforming to version 5.1. This adds the package, and the dependencies, but exposed a problem with luarocks dependency detection. Since we're installing each package in its own "tree" and there's no environment variable to list extra trees, spack now generates a luarocks config file that lists all the trees of all the dependencies, and references it by setting `LUAROCKS_CONFIG` in the build environment of every LuaPackage. This allows luarocks to find the spack installed dependencies correctly rather than trying (and failing) to download them. Co-authored-by: Adam J. Stewart Co-authored-by: Tom Scogland Co-authored-by: Massimiliano Culpo --- etc/spack/defaults/packages.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml index 00da33b10d..71bac6f247 100644 --- a/etc/spack/defaults/packages.yaml +++ b/etc/spack/defaults/packages.yaml @@ -35,7 +35,8 @@ packages: jpeg: [libjpeg-turbo, libjpeg] lapack: [openblas, amdlibflame] libllvm: [llvm, llvm-amdgpu] - lua-lang: [lua, lua-luajit] + lua-lang: [lua, lua-luajit-openresty, lua-luajit] + luajit: [lua-luajit-openresty, lua-luajit] mariadb-client: [mariadb-c-client, mariadb] mkl: [intel-mkl] mpe: [mpe2] -- cgit v1.2.3-60-g2f50