From 6b05b8e345eb420c2c751eaed93ce87202a643b7 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 1 Jun 2023 11:50:30 +0200 Subject: [PATCH 1/5] Lua and Lmod recipes added --- recipes/042-lua | 32 +++++++++++++++++++++++++ recipes/043-luarocks | 33 ++++++++++++++++++++++++++ recipes/044-lua-posix | 16 +++++++++++++ recipes/045-lmod | 55 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 136 insertions(+) create mode 100755 recipes/042-lua create mode 100755 recipes/043-luarocks create mode 100755 recipes/044-lua-posix create mode 100755 recipes/045-lmod diff --git a/recipes/042-lua b/recipes/042-lua new file mode 100755 index 0000000..f653b0a --- /dev/null +++ b/recipes/042-lua @@ -0,0 +1,32 @@ +#!/bin/bash +# +# https:// +# +P=lua +V=${LUA_VERSION:-5.4.6} +FNAME="$P-$V.tar.gz" +DOWNLOAD_URL="http://www.lua.org/ftp/$P-$V.tar.gz" + +source "$(dirname "$0")/librecipes.bash" + +#--- +# configure + +LUA_PREFIX="${PREFIX}/libexec/lua" +export INSTALL_TOP="${LUA_PREFIX}" +PATH="${LUA_PREFIX}/bin:$PATH" +sed -i "s;/usr/local/;${INSTALL_TOP}/;" "${SRC_DIR}/src/luaconf.h" +#--- +# compile & install +make -e -j ${NJOBS} || exit ${PB_ERR_MAKE} +make -e install || exit ${PB_ERR_INSTALL} + +#--- +# post-install + +#--- +# Local Variables: +# mode: sh +# sh-basic-offset: 8 +# tab-width: 8 +# End: diff --git a/recipes/043-luarocks b/recipes/043-luarocks new file mode 100755 index 0000000..5820056 --- /dev/null +++ b/recipes/043-luarocks @@ -0,0 +1,33 @@ +#!/bin/bash +# +# https:// +# +P=luarocks +V=${LUAROCKS_VERSION:-3.9.2} +FNAME="$P-$V.tar.gz" +DOWNLOAD_URL="https://luarocks.org/releases/$P-$V.tar.gz" + +source "$(dirname "$0")/librecipes.bash" + +#--- +# configure +LUA_PREFIX="${PREFIX}/libexec/lua" +PATH="${LUA_PREFIX}/bin:$PATH" +"${SRC_DIR}"/configure \ + --prefix="${LUA_PREFIX}" \ + + +#--- +# compile & install +make -e -j ${NJOBS} || exit ${PB_ERR_MAKE} +make -e install || exit ${PB_ERR_INSTALL} + +#--- +# post-install + +#--- +# Local Variables: +# mode: sh +# sh-basic-offset: 8 +# tab-width: 8 +# End: diff --git a/recipes/044-lua-posix b/recipes/044-lua-posix new file mode 100755 index 0000000..a8b6498 --- /dev/null +++ b/recipes/044-lua-posix @@ -0,0 +1,16 @@ +#!/bin/bash +# +# https:// +# +#--- +LUA_PREFIX="${PREFIX}/libexec/lua" +PATH="${LUA_PREFIX}/bin:$PATH" + +luarocks install luaposix + +#--- +# Local Variables: +# mode: sh +# sh-basic-offset: 8 +# tab-width: 8 +# End: diff --git a/recipes/045-lmod b/recipes/045-lmod new file mode 100755 index 0000000..43cd6a3 --- /dev/null +++ b/recipes/045-lmod @@ -0,0 +1,55 @@ +#!/bin/bash +# +# https:// +# +P=lmod +V=${LMOD_VERSION:-8.7} +FNAME="$P-$V.tar.gz" +DOWNLOAD_URL="https://sourceforge.net/projects/lmod/files/Lmod-$V.tar.bz2/download" + +source "$(dirname "$0")/librecipes.bash" + +#--- +# configure +mkdir -p "${BUILD_DIR}" && cd "$_" || exit ${PB_ERR_SYSTEM} +case $(uname -s) in + Linux ) + : declare -x LIBS="-lz -lpthread" + ;; + Darwin ) + : declare -x LIBS="-lz -framework CoreFoundation" + ;; + * ) + echo "Oops: unsupported OS!" 1>&2 + exit ${PB_ERR_SYSTEM} + ;; +esac + +#export C_INCLUDE_PATH+=":${PREFIX}/include" +#export LIBRARY_PATH+=":${PREFIX}/lib" +#export TCL_INCLUDE="${PREFIX}/include/tcl.h" +#export TCL_LIBS="${PREFIX}/lib/libtcl8.6.a" + +PATH="${PREFIX}/libexec/lua/bin:$PAT:$PATH" +LMOD_PREFIX="${PREFIX}/libexec" +"${SRC_DIR}"/configure \ + --prefix="${LMOD_PREFIX}" \ + --exec-prefix="${LMOD_PREFIX}" \ + --with-module-path="${PREFIX%%/Tools*}/Tools/${PMODULES_MODULEFILES_DIR}" \ + --with-fastTCLInterp=no \ + || exit ${PB_ERR_CONFIGURE} + +#--- +# compile & install +make -j ${NJOBS} || exit ${PB_ERR_MAKE} +make install || exit ${PB_ERR_INSTALL} + +#--- +# post-install + +#--- +# Local Variables: +# mode: sh +# sh-basic-offset: 8 +# tab-width: 8 +# End: From f2dfed3c6ced408557a286c09c6401bcfbe66f1c Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 1 Jun 2023 11:51:23 +0200 Subject: [PATCH 2/5] bugfix: librecipes.bash: missing def of UTILBIN_DIR added --- recipes/librecipes.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/librecipes.bash b/recipes/librecipes.bash index c696aaf..3cb0c62 100644 --- a/recipes/librecipes.bash +++ b/recipes/librecipes.bash @@ -20,7 +20,7 @@ DOWNLOADS_DIR="${PMODULES_DISTFILESDIR:-${TMP_DIR}/Downloads}" SRC_DIR="${TMP_DIR}/$P-$V/src" BUILD_DIR="${TMP_DIR}/$P-$V/build" SRC_FILE="${DOWNLOADS_DIR}/${FNAME}" - +UTILBIN_DIR='libexec' declare -ix PB_ERR_ARG=1 declare -ix PB_ERR_SETUP=2 From 7331f2811170d33924ef526734d4c0d2bc04ad77 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 1 Jun 2023 11:52:54 +0200 Subject: [PATCH 3/5] Pmodules version set to 1.1.13 --- build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build b/build index fbcc178..3a55a40 100755 --- a/build +++ b/build @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -declare -rx VERSION='1.1.12' +declare -rx VERSION='1.1.13' declare -rx BASH5_VERSION='5.2.15' declare -rx TCL_VERSION='8.6.13' declare -rx TCLLIB_VERSION='1.21' From be8be43cf99e00be0e79de9e2959fc83af8d279f Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 1 Jun 2023 11:54:02 +0200 Subject: [PATCH 4/5] feature: Lmod version added to build script --- build | 1 + 1 file changed, 1 insertion(+) diff --git a/build b/build index 3a55a40..93b82b0 100755 --- a/build +++ b/build @@ -6,6 +6,7 @@ declare -rx BASH5_VERSION='5.2.15' declare -rx TCL_VERSION='8.6.13' declare -rx TCLLIB_VERSION='1.21' declare -rx MODULES_VERSION='3.2.10.2' +declare -rx LMOD_VERSION='8.7' # for macOS only declare -rx GETOPT_VERSION='1.1.6' From 178afdf338742eb05356d16131054580c77a71fd Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 1 Jun 2023 12:06:13 +0200 Subject: [PATCH 5/5] feature: use Lua and Lmod from Pmodules --- Pmodules/modulecmd.bash.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index f371268..9a4ff2a 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -38,8 +38,7 @@ declare -x TCLLIBPATH std::prepend_path TCLLIBPATH "${PMODULES_HOME}/lib/Pmodules" declare -r tcl_cmd="${libexecdir}/modulecmd.bin" -#declare -r lmod_cmd="${PMODULES_HOME}/lmod/lmod/libexec/lmod" -declare -r lmod_cmd="/usr/share/lmod/lmod/libexec/lmod" +declare -r lmod_cmd="${PMODULES_HOME}/libexec/lmod/lmod/libexec/lmod" declare -- modulecmd="${tcl_cmd}" declare -- verbosity_lvl=${PMODULES_VERBOSITY:-'verbose'}