1 Star 0 Fork 12

王增亮/luarocks

forked from src-openEuler/luarocks
关闭
 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-luarocks-3.5.0-dynamic_libdir.patch 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
imjoey 提交于 2021-07-30 15:09 +08:00 . Initial luarocks package with v3.5.0
From aed621d5db1d521404238a92f16b879180a469a2 Mon Sep 17 00:00:00 2001
From: Michel Alexandre Salim <michel@michel-slm.name>
Date: Wed, 27 Jan 2021 20:32:07 -0800
Subject: [PATCH] Dynamically detect libdir on Linux
Some Linux distributions (e.g. Fedora, CentOS) put 64-bit libraries
in `/usr/lib64` rather than `/usr/lib`. On such systems `luarocks`
should use `lib64` rather than `lib`.
Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>
---
src/luarocks/core/cfg.lua | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua
index 4ac5ee2..c7d2cb2 100644
--- a/src/luarocks/core/cfg.lua
+++ b/src/luarocks/core/cfg.lua
@@ -397,6 +397,18 @@ local function make_defaults(lua_version, target_cpu, platforms, home)
defaults.variables.CFLAGS = defaults.variables.CFLAGS.." -fPIC"
end
defaults.web_browser = "xdg-open"
+ if platforms.linux then
+ -- inline code from fs/linux.lua since
+ -- luarocks.fs can't be required here
+ -- (circular dependencies)
+ local fd, _, code = io.open("/usr/lib64", "r")
+ if code ~= 2 then
+ defaults.lib_modules_path = "/lib64/lua/"..lua_version
+ end
+ if fd then
+ fd:close()
+ end
+ end
end
if platforms.cygwin then
--
2.29.2
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangzengliang1/luarocks.git
git@gitee.com:wangzengliang1/luarocks.git
wangzengliang1
luarocks
luarocks
master

搜索帮助