decouple from openresty
This commit is contained in:
parent
301a453cc5
commit
6b8d6458d1
@ -1,39 +0,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
|
|
||||||
Binary file not shown.
@ -1,31 +1,23 @@
|
|||||||
# Use luajit within openresty, which is compatible with lua 5.1
|
%global lua_version 5.4
|
||||||
%global lua_version 5.1
|
|
||||||
%{!?lua_pkgdir: %global lua_pkgdir %{_datadir}/lua/%{lua_version}}
|
%{!?lua_pkgdir: %global lua_pkgdir %{_datadir}/lua/%{lua_version}}
|
||||||
|
|
||||||
# Use luajit within openresty to build luarocks
|
|
||||||
%global openresty_prefix %{_usr}/local/openresty
|
|
||||||
%global openresty_luajit %{openresty_prefix}/luajit
|
|
||||||
|
|
||||||
Name: luarocks
|
Name: luarocks
|
||||||
Version: 3.5.0
|
Version: 3.9.2
|
||||||
Release: 3
|
Release: 1
|
||||||
Summary: A deployment and management system for Lua modules
|
Summary: A deployment and management system for Lua modules
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://luarocks.org
|
URL: http://luarocks.org
|
||||||
Source0: http://luarocks.org/releases/luarocks-%{version}.tar.gz
|
Source0: http://luarocks.org/releases/luarocks-%{version}.tar.gz
|
||||||
Patch0: 0001-luarocks-3.5.0-dynamic_libdir.patch
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: openresty-openssl111-devel >= 1.1.1h-1
|
BuildRequires: lua-devel
|
||||||
BuildRequires: openresty >= 1.19.3.1-1
|
|
||||||
|
|
||||||
Requires: unzip
|
Requires: unzip
|
||||||
Requires: zip
|
Requires: zip
|
||||||
Requires: openresty-openssl111 >= 1.1.1h-1
|
Requires: lua
|
||||||
Requires: openresty >= 1.19.3.1-1
|
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -45,12 +37,7 @@ repositories, and multiple local rocks trees.
|
|||||||
%build
|
%build
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
%if 0%(test `uname -m` == "loongarch64" && echo 1)
|
|
||||||
--lua-version=%{lua_version}
|
--lua-version=%{lua_version}
|
||||||
%else
|
|
||||||
--lua-version=%{lua_version} \
|
|
||||||
--with-lua=%{openresty_luajit}
|
|
||||||
%endif
|
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -59,8 +46,8 @@ repositories, and multiple local rocks trees.
|
|||||||
mkdir -p %{buildroot}%{_prefix}/lib/luarocks/rocks-%{lua_version}
|
mkdir -p %{buildroot}%{_prefix}/lib/luarocks/rocks-%{lua_version}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# TODO - find how to run this without having to pre-download entire rocks tree
|
# Need a offline regression test
|
||||||
# ./test/run_tests.sh
|
# ./smoke_test.sh
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -75,6 +62,12 @@ mkdir -p %{buildroot}%{_prefix}/lib/luarocks/rocks-%{lua_version}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 1 2023 Xinwei Hu <shinwell_hu@openeuler.sh> - 3.9.2-1
|
||||||
|
- Decouple luarocks from openresty
|
||||||
|
- Upgrade to 3.9.2
|
||||||
|
. Improved connectivity resiliency
|
||||||
|
. A couple of minor feature additions
|
||||||
|
|
||||||
* Thu Jan 5 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 3.5.0-3
|
* Thu Jan 5 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 3.5.0-3
|
||||||
- fix build error for loongarch64
|
- fix build error for loongarch64
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user