From 346253a5fe4e9a41475ed2fc74a3860b9d2dcae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Mon, 18 May 2026 14:01:43 +0200 Subject: [PATCH] sys-cluster/lmod: version bump to 9.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bob Dröge Part-of: https://github.com/gentoo/gentoo/pull/46278 Closes: https://github.com/gentoo/gentoo/pull/46278 Signed-off-by: Alfredo Tupone --- sys-cluster/lmod/Manifest | 1 + sys-cluster/lmod/files/lmod-9.2.1-test.patch | 11 ++ sys-cluster/lmod/lmod-9.2.1.ebuild | 154 +++++++++++++++++++ 3 files changed, 166 insertions(+) create mode 100644 sys-cluster/lmod/files/lmod-9.2.1-test.patch create mode 100644 sys-cluster/lmod/lmod-9.2.1.ebuild diff --git a/sys-cluster/lmod/Manifest b/sys-cluster/lmod/Manifest index 0c5dd0eea1ad9..31e1eed325297 100644 --- a/sys-cluster/lmod/Manifest +++ b/sys-cluster/lmod/Manifest @@ -7,3 +7,4 @@ DIST lmod-9.1.2-load-err.txt 25012 BLAKE2B 15c202c64609d851f41f81afb42f00d3439f9 DIST lmod-9.1.2.tar.gz 33789483 BLAKE2B 3f296a0bc236aa96aeb482b68a73b0175ed0f3756b87fd931780f2f288ed59e118fc87c9f99d27a7a9589579c5c559d68ad33289b89f786a60592cfd0a33f00d SHA512 20eb56041f4a461758b59f9925d6e7cbf18f0af94743d80dbba3f1adbc195d704e0875ef4727d931a9d9590dc5f3384174774612af71d2e011eb3c40c615f960 DIST lmod-9.2-help-err.txt 30752 BLAKE2B dcfbe27c4ed7206153e467f932fc7f5ee5eca120c08d2368a6d64cd9ffafd61468223cfa6d3533c1c28a06c0dee07704bf70bb83ddd9899d8406b54d96a852e6 SHA512 b8ad4a175ccf7dc48936bc5732b416f62c1b73630a17868b5dcfddf12a35929a45d93f793ffb72b2e6db1fea6cd4a25563be1605502b2df4715bc4b624638969 DIST lmod-9.2.tar.gz 34130784 BLAKE2B d6e2d936d60c396a7c308590c2c908ddc7f5e2dd6a271d51dc5f76e8308866ca733565301e98f2beae996b8debb39e7de566d39b7f7720c042d94f14cfcd3ee1 SHA512 46d0a3b1e51c70249c03a4fce8c4664a3b882bd7b56277a141c14cdd81b49c8ade92b63a7b65ada327ec5d6bc23ece0e17045d9a3c0821ec05f91bb1c31fbda1 +DIST lmod-9.2.1.tar.gz 35593011 BLAKE2B b6bfa7842b6e4a3e75d2932f3431bfdd485caaffbf9168944e682f09a9fdfb3dfb7153b09b82150f9b36331fa7b56c9f818c3b5e681060579af6b2693c0073fd SHA512 a76a1f29337c7aaa4309c3e9fc1f87b0bfa1407f89ba8287031128fdc6c84b7d4dfcefd8cc62592e4e2bf60b01a62bdb69fa994bdd3cef83d38f401b0b797c36 diff --git a/sys-cluster/lmod/files/lmod-9.2.1-test.patch b/sys-cluster/lmod/files/lmod-9.2.1-test.patch new file mode 100644 index 0000000000000..4bbe164055d1f --- /dev/null +++ b/sys-cluster/lmod/files/lmod-9.2.1-test.patch @@ -0,0 +1,11 @@ +--- a/rt/help/help.tdesc 2026-05-18 16:03:41.653576306 +0200 ++++ b/rt/help/help.tdesc 2026-05-18 16:06:38.378582894 +0200 +@@ -45,6 +45,8 @@ + cat _stderr.[0-9][0-9][0-9] > _stderr.orig + cleanUp _stderr.orig err.txt + ++ sed -i '/libsandbox.so/d' err.txt ++ + rm -f results.csv + wrapperDiff --csv results.csv $(testDir)/out.txt out.txt + wrapperDiff --csv results.csv $(testDir)/err.txt err.txt diff --git a/sys-cluster/lmod/lmod-9.2.1.ebuild b/sys-cluster/lmod/lmod-9.2.1.ebuild new file mode 100644 index 0000000000000..b3a05aa0bbf19 --- /dev/null +++ b/sys-cluster/lmod/lmod-9.2.1.ebuild @@ -0,0 +1,154 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1..3} ) +inherit autotools lua-single prefix + +DESCRIPTION="Environment Module System based on Lua" +HOMEPAGE="https://lmod.readthedocs.io/en/latest https://github.com/TACC/Lmod" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/TACC/Lmod" +else + SRC_URI="https://github.com/TACC/Lmod/archive/${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}"/Lmod-${PV} + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi +SRC_URI+=" https://dev.gentoo.org/~tupone/distfiles/${PN}-9.1.2-load-err.txt" + +LICENSE="MIT" +SLOT="0" +IUSE="+auto-swap +cache duplicate-paths test" +REQUIRED_USE="${LUA_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +RDEPEND="${LUA_DEPS} + dev-lang/tcl + dev-lang/tk + $(lua_gen_cond_dep ' + >=dev-lua/luafilesystem-1.8.0[${LUA_USEDEP}] + dev-lua/luajson[${LUA_USEDEP}] + dev-lua/luaposix[${LUA_USEDEP}] + dev-lua/lua-term[${LUA_USEDEP}] + ') +" +BDEPEND="${RDEPEND} + app-alternatives/bc + test? ( + $(lua_gen_cond_dep ' + dev-util/hermes[${LUA_SINGLE_USEDEP}] + ') + app-shells/tcsh + ) + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-8.4.19-no-libsandbox.patch + "${FILESDIR}"/${PN}-8.7.55-make.patch + "${FILESDIR}"/${PN}-9.2.1-test.patch +) + +pkg_pretend() { + elog "You can control the siteName and syshost settings by" + elog "using the variables LMOD_SITENAME and LMOD_SYSHOST, during" + elog "build time, which are both set to 'Gentoo' by default." + elog "There are a lot of options for this package, especially" + elog "for run time behaviour. Remember to use the EXTRA_ECONF variable." + elog "To see full list of options visit:" + elog "\t https://lmod.readthedocs.io/en/latest/090_configuring_lmod.html" +} + +src_prepare() { + default + rm -r rt/end2end || die # should run in a git repository + hprefixify -w '/#\!\/bin\/tcsh/' rt/csh_swap/csh_swap.tdesc || die + eautoreconf + sed -i \ + -e "1s|#!/usr/bin/env lua|#!${LUA}|" \ + proj_mgmt/joinBase64Results \ + proj_mgmt/clean_gold_files/regularize \ + || die + sed -i \ + -e "s| lua| ${LUA}|" \ + rt/csh_swap/csh_swap.tdesc \ + || die + sed -i \ + -e "/prepend_path/d" \ + rt/changeMPATH/mf/Core/admin/admin-1.0.lua \ + rt/changeMPATH/mf/Core2/admin/admin-1.0.lua \ + || die + cp "${DISTDIR}"/${PN}-9.1.2-load-err.txt \ + rt/load/err.txt || die +} + +src_configure() { + local LMOD_SITENAME="${LMOD_SITENAME:-Gentoo}" + local LMOD_SYSHOST="${LMOD_SYSHOST:-Gentoo}" + + local LUAC="${LUA%/*}/luac${LUA#*lua}" + + local myconf=( + --with-tcl + --with-fastTCLInterp + --with-colorize + --with-supportKsh + --without-useBuiltinPkgs + --with-siteControlPrefix + --with-siteName="${LMOD_SITENAME}" + --with-syshost="${LMOD_SYSHOST}" + --with-lua_include="$(lua_get_include_dir)" + --with-lua="${LUA}" + --with-luac="${LUAC}" + --with-module-root-path="${EPREFIX}/etc/modulefiles" + --with-spiderCacheDir="${EPREFIX}/etc/lmod_cache/spider_cache" + --with-updateSystemFn="${EPREFIX}/etc/lmod_cache/system.txt" + --prefix="${EPREFIX}/usr/share/Lmod" + --with-caseIndependentSorting + --without-hiddenItalic + --with-exportedModuleCmd + --without-redirect + --with-extendedDefault + $(use_with cache cachedLoads) + $(use_with duplicate-paths duplicatePaths) + $(use_with auto-swap autoSwap) + ) + econf "${myconf[@]}" +} + +src_compile() { + CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \ + default +} + +src_test() { + local -x PATH="${EPREFIX}/opt/hermes/bin:${PATH}" + tm -vvv || die + testcleanup || die +} + +src_install() { + dosym -r /usr/share/Lmod/init/profile /etc/bash/bashrc.d/z00_lmod.sh + dosym -r /usr/share/Lmod/init/profile /etc/profile.d/z00_lmod.sh + dosym -r /usr/share/Lmod/init/cshrc /etc/profile.d/z00_lmod.csh + dosym -r /usr/share/Lmod/init/profile.fish /etc/fish/conf.d/z00_lmod.fish + default + newman "${FILESDIR}"/module.1-8.4.20 module.1 + # not a real man page + rm -r "${ED}"/usr/share/Lmod/share/man || die + doenvd "${FILESDIR}"/99lmod + keepdir /etc/modulefiles + keepdir /etc/lmod_cache +} + +pkg_postinst() { + if use cache ; then + elog "Lmod spider cache has been enabled." + elog "Remember to update the spider cache with" + elog "/usr/share/Lmod/libexec/update_lmod_system_cache_files \ " + elog "\t \$MODULEPATH" + fi +}