From 165f686400cb5621cbc09334527a74917c5c9aca Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 1 Feb 2022 18:44:51 +0100 Subject: lua: add fetcher for luarocks (#28707) --- var/spack/repos/builtin/packages/lua/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index d8d79a502c..2695834759 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -33,6 +33,7 @@ class Lua(Package): variant("pcfile", default=False, description="Add patch for lua.pc generation") variant('shared', default=True, description='Builds a shared version of the library') + variant('fetcher', default='curl', values=('curl', 'wget'), description='Fetcher to use in the LuaRocks package manager') extendable = True @@ -43,6 +44,11 @@ class Lua(Package): # luarocks needs unzip for some packages (e.g. lua-luaposix) depends_on('unzip', type='run') + # luarocks needs a fetcher (curl/wget), unfortunately I have not found + # how to force a choice for curl or wget, but curl seems the default. + depends_on('curl', when='fetcher=curl', type='run') + depends_on('wget', when='fetcher=wget', type='run') + patch( "http://lua.2524044.n2.nabble.com/attachment/7666421/0/pkg-config.patch", sha256="208316c2564bdd5343fa522f3b230d84bd164058957059838df7df56876cb4ae", -- cgit v1.2.3-70-g09d2