diff --git a/sys-cluster/lmod/Manifest b/sys-cluster/lmod/Manifest index a477dd5752b25..6d7304f0ceb2f 100644 --- a/sys-cluster/lmod/Manifest +++ b/sys-cluster/lmod/Manifest @@ -8,4 +8,5 @@ DIST lmod-9.1.2.tar.gz 33789483 BLAKE2B 3f296a0bc236aa96aeb482b68a73b0175ed0f375 DIST lmod-9.2-help-err.txt 30752 BLAKE2B dcfbe27c4ed7206153e467f932fc7f5ee5eca120c08d2368a6d64cd9ffafd61468223cfa6d3533c1c28a06c0dee07704bf70bb83ddd9899d8406b54d96a852e6 SHA512 b8ad4a175ccf7dc48936bc5732b416f62c1b73630a17868b5dcfddf12a35929a45d93f793ffb72b2e6db1fea6cd4a25563be1605502b2df4715bc4b624638969 DIST lmod-9.2.1.tar.gz 35593011 BLAKE2B b6bfa7842b6e4a3e75d2932f3431bfdd485caaffbf9168944e682f09a9fdfb3dfb7153b09b82150f9b36331fa7b56c9f818c3b5e681060579af6b2693c0073fd SHA512 a76a1f29337c7aaa4309c3e9fc1f87b0bfa1407f89ba8287031128fdc6c84b7d4dfcefd8cc62592e4e2bf60b01a62bdb69fa994bdd3cef83d38f401b0b797c36 DIST lmod-9.2.2.tar.gz 35593465 BLAKE2B c861b3388e4159329bd4d1b21eed899a2a71126f0cb4bfd338ce428b9f6f0c5383d1057ebb2d8a2de9326b0cc426dac9bfbc02e20853e0bccdf8e135d0dfaf06 SHA512 a61d83abaccbd0874cb0ddd7066f224f38f1e9dbe1e0ea0c2ae588e22ab3415e1d29aa85f0a1e73bb665ac076c53b0b881f218986884d8439b553918edda29cd +DIST lmod-9.2.3.tar.gz 35612228 BLAKE2B 4a554e5c93984006e9eda07a5c420ce114edaa913d24bf9530247bf9a5d65f07f8cea4630d507031a3e71de1bd1f3b00a7ac23f72178e08754206fe3802a60d4 SHA512 1c0a39f50bd14412edeb5c162442a721c732ee319160ccdf37f4f4d877ea89ea53d32cb76fa18c5eb7f81b274df3caed8732e894d664dae9dccb6ef57f48b27e DIST lmod-9.2.tar.gz 34130784 BLAKE2B d6e2d936d60c396a7c308590c2c908ddc7f5e2dd6a271d51dc5f76e8308866ca733565301e98f2beae996b8debb39e7de566d39b7f7720c042d94f14cfcd3ee1 SHA512 46d0a3b1e51c70249c03a4fce8c4664a3b882bd7b56277a141c14cdd81b49c8ade92b63a7b65ada327ec5d6bc23ece0e17045d9a3c0821ec05f91bb1c31fbda1 diff --git a/sys-cluster/lmod/lmod-9.2.3.ebuild b/sys-cluster/lmod/lmod-9.2.3.ebuild new file mode 100644 index 0000000000000..1e3c10eedf486 --- /dev/null +++ b/sys-cluster/lmod/lmod-9.2.3.ebuild @@ -0,0 +1,150 @@ +# 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 + +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? ( + >=dev-util/hermes-3.1[${LUA_SINGLE_USEDEP}] + app-shells/tcsh + ) + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-8.4.19-no-libsandbox.patch + "${FILESDIR}"/${PN}-8.7.55-make.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 +} + +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() { + # With current version test pass only when we eselect + # the 5.1 version of lua + 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 +} diff --git a/sys-cluster/lmod/lmod-9999.ebuild b/sys-cluster/lmod/lmod-9999.ebuild index b20845431a950..c3e8574b12f40 100644 --- a/sys-cluster/lmod/lmod-9999.ebuild +++ b/sys-cluster/lmod/lmod-9999.ebuild @@ -39,9 +39,7 @@ RDEPEND="${LUA_DEPS} BDEPEND="${RDEPEND} app-alternatives/bc test? ( - $(lua_gen_cond_dep ' - dev-util/hermes[${LUA_SINGLE_USEDEP}] - ') + >=dev-util/hermes-3.1[${LUA_SINGLE_USEDEP}] app-shells/tcsh ) virtual/pkgconfig