diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/core/cfg.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua index 3c672693..7ea86542 100644 --- a/src/luarocks/core/cfg.lua +++ b/src/luarocks/core/cfg.lua | |||
@@ -385,7 +385,8 @@ local function make_defaults(lua_version, target_cpu, platforms, home) | |||
385 | } | 385 | } |
386 | defaults.export_path_separator = ":" | 386 | defaults.export_path_separator = ":" |
387 | defaults.wrapper_suffix = "" | 387 | defaults.wrapper_suffix = "" |
388 | defaults.local_cache = home.."/.cache/luarocks" | 388 | local xdg_cache_home = os.getenv("XDG_CACHE_HOME") or home.."/.cache" |
389 | defaults.local_cache = xdg_cache_home.."/luarocks" | ||
389 | if not defaults.variables.CFLAGS:match("-fPIC") then | 390 | if not defaults.variables.CFLAGS:match("-fPIC") then |
390 | defaults.variables.CFLAGS = defaults.variables.CFLAGS.." -fPIC" | 391 | defaults.variables.CFLAGS = defaults.variables.CFLAGS.." -fPIC" |
391 | end | 392 | end |