!2 Support for lua 5.4 added
From: @lyn1001 Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
7ca7174ed0
11
Lmod.spec
11
Lmod.spec
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Name: Lmod
|
Name: Lmod
|
||||||
Version: 8.1.17
|
Version: 8.1.17
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Environmental Modules System in Lua
|
Summary: Environmental Modules System in Lua
|
||||||
|
|
||||||
License: MIT and LGPLv2
|
License: MIT and LGPLv2
|
||||||
@ -17,6 +17,7 @@ Source1: macros.%{name}
|
|||||||
# Backported version of
|
# Backported version of
|
||||||
# https://github.com/TACC/Lmod/commit/fa2e3a1a84951b38a56c76391e6b0c340c0199a7
|
# https://github.com/TACC/Lmod/commit/fa2e3a1a84951b38a56c76391e6b0c340c0199a7
|
||||||
Patch0: lmod-8.1.17-echo_stderr.patch
|
Patch0: lmod-8.1.17-echo_stderr.patch
|
||||||
|
Patch1: Support-for-lua-5.4-added.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: lua-devel
|
BuildRequires: lua-devel
|
||||||
@ -45,6 +46,7 @@ where the library and header files can be found.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
sed -i -e 's,/usr/bin/env ,/usr/bin/,' src/*.tcl
|
sed -i -e 's,/usr/bin/env ,/usr/bin/,' src/*.tcl
|
||||||
# Remove bundled lua-filesystem and lua-term
|
# Remove bundled lua-filesystem and lua-term
|
||||||
rm -r pkgs/{luafilesystem,term} tools/json.lua
|
rm -r pkgs/{luafilesystem,term} tools/json.lua
|
||||||
@ -54,11 +56,7 @@ sed -i -e '/^#!/d' init/*.in
|
|||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?rhel} && 0%{?rhel} <= 6
|
|
||||||
%configure --prefix=%{_datadir} PS=/bin/ps
|
|
||||||
%else
|
|
||||||
%configure --prefix=%{_datadir} PS=/usr/bin/ps
|
%configure --prefix=%{_datadir} PS=/usr/bin/ps
|
||||||
%endif
|
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
|
|
||||||
@ -105,5 +103,8 @@ install -Dpm 644 %{SOURCE1} %{buildroot}/%{macrosdir}/macros.%{name}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat May 7 2022 liyanan <liyanan32@h-partners.com> - 8.1.17-2
|
||||||
|
- Support for lua 5.4 added
|
||||||
|
|
||||||
* Fri Oct 10 2020 wangxiao <wangxiao65@huawei.com> - 8.1.17-1
|
* Fri Oct 10 2020 wangxiao <wangxiao65@huawei.com> - 8.1.17-1
|
||||||
- package init.
|
- package init.
|
||||||
|
|||||||
28
Support-for-lua-5.4-added.patch
Normal file
28
Support-for-lua-5.4-added.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
diff -up Lmod-8.3.17/configure.ac.lua54 Lmod-8.3.17/configure.ac
|
||||||
|
--- Lmod-8.3.17/configure.ac.lua54 2020-07-01 07:36:21.485611936 -0400
|
||||||
|
+++ Lmod-8.3.17/configure.ac 2020-07-01 07:36:42.517262553 -0400
|
||||||
|
@@ -667,8 +667,8 @@ fi
|
||||||
|
|
||||||
|
IntLuaV=$( $luaprog -e "_,_,M,m=_VERSION:gsub('Lua%s+',''):find('(%d+)%.(%d)'); print(math.floor(tonumber(M)*1000+tonumber(m)))")
|
||||||
|
|
||||||
|
-if test $IntLuaV -lt 5001 -o $IntLuaV -gt 5003; then
|
||||||
|
- echo "Error: Lmod requires versions 5.1 or 5.2 or 5.3, You have: $LuaV"
|
||||||
|
+if test $IntLuaV -lt 5001 -o $IntLuaV -gt 5004; then
|
||||||
|
+ echo "Error: Lmod requires versions 5.1 or 5.2 or 5.3 or 5.4, You have: $LuaV"
|
||||||
|
rm -f makefile
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
diff -up Lmod-8.3.17/configure.lua54 Lmod-8.3.17/configure
|
||||||
|
--- Lmod-8.3.17/configure.lua54 2020-07-01 07:37:35.882376092 -0400
|
||||||
|
+++ Lmod-8.3.17/configure 2020-07-01 07:37:48.545165732 -0400
|
||||||
|
@@ -4942,8 +4942,8 @@ fi
|
||||||
|
|
||||||
|
IntLuaV=$( $luaprog -e "_,_,M,m=_VERSION:gsub('Lua%s+',''):find('(%d+)%.(%d)'); print(math.floor(tonumber(M)*1000+tonumber(m)))")
|
||||||
|
|
||||||
|
-if test $IntLuaV -lt 5001 -o $IntLuaV -gt 5003; then
|
||||||
|
- echo "Error: Lmod requires versions 5.1 or 5.2 or 5.3, You have: $LuaV"
|
||||||
|
+if test $IntLuaV -lt 5001 -o $IntLuaV -gt 5004; then
|
||||||
|
+ echo "Error: Lmod requires versions 5.1 or 5.2 or 5.3 or 5.4, You have: $LuaV"
|
||||||
|
rm -f makefile
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
Loading…
x
Reference in New Issue
Block a user