summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/slurm/files/slurm-20.11.0.1_autoconf-lua.patch')
-rw-r--r--sys-cluster/slurm/files/slurm-20.11.0.1_autoconf-lua.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/sys-cluster/slurm/files/slurm-20.11.0.1_autoconf-lua.patch b/sys-cluster/slurm/files/slurm-20.11.0.1_autoconf-lua.patch
new file mode 100644
index 000000000000..f17039e0b59d
--- /dev/null
+++ b/sys-cluster/slurm/files/slurm-20.11.0.1_autoconf-lua.patch
@@ -0,0 +1,50 @@
+Prevent automagical detection of Lua, abort if Lua support has been
+requested but Lua cannot be found with pkg-config, and use the Lua
+pkg-config module set up by the eclass-provided wrapper (or unslotted Lua)
+instead of enumerating installed versions.
+
+--- a/auxdir/x_ac_lua.m4
++++ b/auxdir/x_ac_lua.m4
+@@ -12,18 +12,21 @@
+
+ AC_DEFUN([X_AC_LUA],
+ [
+- x_ac_lua_pkg_name="lua"
+- #check for 5.3 then 5.2 then 5.1
+- PKG_CHECK_EXISTS([lua5.3], [x_ac_lua_pkg_name=lua5.3],
+- [PKG_CHECK_EXISTS([lua-5.3], [x_ac_lua_pkg_name=lua-5.3],
+- [PKG_CHECK_EXISTS([lua5.2], [x_ac_lua_pkg_name=lua5.2],
+- [PKG_CHECK_EXISTS([lua-5.2], [x_ac_lua_pkg_name=lua-5.2],
+- [PKG_CHECK_EXISTS([lua5.1], [x_ac_lua_pkg_name=lua5.1],
+- [PKG_CHECK_EXISTS([lua-5.1], [x_ac_lua_pkg_name=lua-5.1],
+- [x_ac_lua_pkg_name="lua >= 5.1"])])])])])])
+- PKG_CHECK_MODULES([lua], ${x_ac_lua_pkg_name},
+- [x_ac_have_lua="yes"],
+- [x_ac_have_lua="no"])
++ AC_MSG_CHECKING([whether to enable support for job scripts written in Lua])
++ AC_ARG_ENABLE(
++ [lua],
++ AS_HELP_STRING(--enable-lua, enable support for job scripts written in Lua),
++ [x_ac_enable_lua="$enableval"],
++ [x_ac_enable_lua=yes])
++ AC_MSG_RESULT([$x_ac_enable_lua])
++
++ x_ac_have_lua=no
++ if test "x$x_ac_enable_lua" = "xyes"; then
++ x_ac_lua_pkg_name="lua"
++ PKG_CHECK_MODULES([lua], ${x_ac_lua_pkg_name},
++ [x_ac_have_lua="yes"],
++ [AC_MSG_ERROR([Lua support requested but Lua not found])])
++ fi
+
+ if test "x$x_ac_have_lua" = "xyes"; then
+ saved_CFLAGS="$CFLAGS"
+@@ -52,8 +55,6 @@
+ fi
+ CFLAGS="$saved_CFLAGS"
+ LIBS="$saved_LIBS"
+- else
+- AC_MSG_WARN([unable to locate lua package])
+ fi
+
+ AM_CONDITIONAL(HAVE_LUA, test "x$x_ac_have_lua" = "xyes")