From 84528319401b01b49728756e68c70ad4ee054d87 Mon Sep 17 00:00:00 2001 From: lyn1001 Date: Sat, 7 May 2022 14:40:55 +0800 Subject: [PATCH] Support for lua 5.4 added --- Lmod.spec | 11 ++++++----- Support-for-lua-5.4-added.patch | 28 ++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 Support-for-lua-5.4-added.patch diff --git a/Lmod.spec b/Lmod.spec index 2299ae9..4dc1593 100644 --- a/Lmod.spec +++ b/Lmod.spec @@ -4,7 +4,7 @@ Name: Lmod Version: 8.1.17 -Release: 1 +Release: 2 Summary: Environmental Modules System in Lua License: MIT and LGPLv2 @@ -17,6 +17,7 @@ Source1: macros.%{name} # Backported version of # https://github.com/TACC/Lmod/commit/fa2e3a1a84951b38a56c76391e6b0c340c0199a7 Patch0: lmod-8.1.17-echo_stderr.patch +Patch1: Support-for-lua-5.4-added.patch BuildRequires: gcc BuildRequires: lua-devel @@ -45,6 +46,7 @@ where the library and header files can be found. %prep %setup -q %patch0 -p1 +%patch1 -p1 sed -i -e 's,/usr/bin/env ,/usr/bin/,' src/*.tcl # Remove bundled lua-filesystem and lua-term rm -r pkgs/{luafilesystem,term} tools/json.lua @@ -54,11 +56,7 @@ sed -i -e '/^#!/d' init/*.in %build -%if 0%{?rhel} && 0%{?rhel} <= 6 -%configure --prefix=%{_datadir} PS=/bin/ps -%else %configure --prefix=%{_datadir} PS=/usr/bin/ps -%endif %make_build @@ -105,5 +103,8 @@ install -Dpm 644 %{SOURCE1} %{buildroot}/%{macrosdir}/macros.%{name} %changelog +* Sat May 7 2022 liyanan - 8.1.17-2 +- Support for lua 5.4 added + * Fri Oct 10 2020 wangxiao - 8.1.17-1 - package init. diff --git a/Support-for-lua-5.4-added.patch b/Support-for-lua-5.4-added.patch new file mode 100644 index 0000000..e1b11c0 --- /dev/null +++ b/Support-for-lua-5.4-added.patch @@ -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