summaryrefslogtreecommitdiff
path: root/sys-cluster/lmod
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-02-17 10:35:54 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-02-17 10:35:54 +0000
commit463397cf1e064185110fe57c568d73f99a06f5d1 (patch)
tree9aa75eefc5154eaf0e3c33658b830fc54dc68052 /sys-cluster/lmod
parentc8d60dada2ec8eb48b2d2b290cd6683ccec40e39 (diff)
gentoo resync : 17.02.2021
Diffstat (limited to 'sys-cluster/lmod')
-rw-r--r--sys-cluster/lmod/Manifest7
-rw-r--r--sys-cluster/lmod/files/99lmod1
-rw-r--r--sys-cluster/lmod/files/lmod-8.4.19-no-libsandbox.patch13
-rw-r--r--sys-cluster/lmod/files/module.1-8.4.20539
-rw-r--r--sys-cluster/lmod/lmod-8.4.20.ebuild133
-rw-r--r--sys-cluster/lmod/lmod-9999.ebuild133
-rw-r--r--sys-cluster/lmod/metadata.xml28
7 files changed, 854 insertions, 0 deletions
diff --git a/sys-cluster/lmod/Manifest b/sys-cluster/lmod/Manifest
new file mode 100644
index 000000000000..f93e0d274c07
--- /dev/null
+++ b/sys-cluster/lmod/Manifest
@@ -0,0 +1,7 @@
+AUX 99lmod 22 BLAKE2B 6a470f0e5796f21f10e10161ee1fdb4fb3d794a9261bee9887c9e2d17959f21c8576fb3ada236a3a20a06e5d273d939751c5adbfb1bc6964247c19ad6b930461 SHA512 6aede256db3c633f7e6f7ad7d3a237563237b06ac499874c83e1d55177b0035cc4086bd10bfd7472075d10bc94d2e59c1e91790b7932d48433a34d5a7c304fc7
+AUX lmod-8.4.19-no-libsandbox.patch 374 BLAKE2B f4bf516a737f73cb547bd07933d2839748259bef017b740b2cb3e5e5fbba6909e932d3211edb1ba48fd16545ecfd7f3a2239046f5478bfad68f9d7ccdb296307 SHA512 9b5b5300588dda23efd82f8d55373be6f69289efad42260a721eb68dfc01475a8f18a9bba8eead8fe66724b8a8df0d75a4c6a85d51e0d3011cc1435cb8f148b6
+AUX module.1-8.4.20 7580 BLAKE2B 6b4f8f721178326a4124bb9c907d4dc0e7c1b7251c724af2826aa3f495af4702f0c9a8cbb06847fec5d44f525cd463b4f0ec898a6cd3074d11c3195ede191af5 SHA512 cfc9eb011f5e5fb2a40b9dfe71e6a888f573e17a55d0d34fe529dbb887ff7932e17c0172663c95dfbd00b67f883608921ae7bb19d352b6d9ce8207d13ca13c8b
+DIST lmod-8.4.20.tar.gz 19889342 BLAKE2B aef498ec8dd2b87aca02d66f394418aba4a81d1fec4684750e59d48d06bad16db7a24290920e40290ecba8a4bc65c7dbe5c23be28654db79433f41164fa4aaf6 SHA512 9749e34e7ad75531c87770b73fd20dab16c89c24e1a2d01e58f09f8510ffc8f896dfa7eab9dab26fe4d6d14ba04d331f98e08e92e0943aede9fe5131af038970
+EBUILD lmod-8.4.20.ebuild 3461 BLAKE2B 9a910a8259e7bf2717bae198b46b17c60515c3a47c18cb34997cabd9557042ce6efc6a67794e2594dacc0075b0396c2eff12a09f6b567576b834f91d829442e5 SHA512 4e5f23859aa0736850cdee4147b6dec91e104ecf84af99b1397007aedd45998fe392353121043b543923a859a7cefed07eff9b8eb8e1e06824a31f0774318e60
+EBUILD lmod-9999.ebuild 3461 BLAKE2B 9a910a8259e7bf2717bae198b46b17c60515c3a47c18cb34997cabd9557042ce6efc6a67794e2594dacc0075b0396c2eff12a09f6b567576b834f91d829442e5 SHA512 4e5f23859aa0736850cdee4147b6dec91e104ecf84af99b1397007aedd45998fe392353121043b543923a859a7cefed07eff9b8eb8e1e06824a31f0774318e60
+MISC metadata.xml 1067 BLAKE2B f520242500e560deee88ce53601d1dfaa929e8228344ea89f0d08242b58e44b280e9b6b3a396f787d231f5f6062336f770512ca2430d8ff8d64ae10a1198ee67 SHA512 6425f204b774beb6aaed3be55d279eaee61f12ea0ace2a9b083a533b92421704b64eea37fd00575147050636ef16fa07ebaf5df2d96a2101c8821d360c4d24ba
diff --git a/sys-cluster/lmod/files/99lmod b/sys-cluster/lmod/files/99lmod
new file mode 100644
index 000000000000..506b824d5a01
--- /dev/null
+++ b/sys-cluster/lmod/files/99lmod
@@ -0,0 +1 @@
+LMOD_CACHED_LOADS=yes
diff --git a/sys-cluster/lmod/files/lmod-8.4.19-no-libsandbox.patch b/sys-cluster/lmod/files/lmod-8.4.19-no-libsandbox.patch
new file mode 100644
index 000000000000..02248bc45484
--- /dev/null
+++ b/sys-cluster/lmod/files/lmod-8.4.19-no-libsandbox.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index ca75e34c..e9cc49e0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -616,7 +616,7 @@ AC_SUBST(SYS_LD_LIB_PATH)
+ SYS_LD_LIB_PATH=$LD_LIBRARY_PATH
+
+ AC_SUBST(SYS_LD_PRELOAD)
+-SYS_LD_PRELOAD=$LD_PRELOAD
++SYS_LD_PRELOAD=$(printf %s\\n $LD_PRELOAD | sed -e "s/libsandbox.so//g")
+
+ AC_SUBST(PATH_TO_SRC)
+ SRCDIR=$( cd $srcdir; pwd)
diff --git a/sys-cluster/lmod/files/module.1-8.4.20 b/sys-cluster/lmod/files/module.1-8.4.20
new file mode 100644
index 000000000000..2ec20e04ac85
--- /dev/null
+++ b/sys-cluster/lmod/files/module.1-8.4.20
@@ -0,0 +1,539 @@
+.Dd $Mdocdate: December 6 2020 $
+.Dt MODULE 1
+.Os
+.Sh NAME
+.Nm module
+.Nd lmod environment modules manager
+.Sh SYNOPSIS
+.Nm module
+.Op Ar options
+.Cm sub-command
+.Op Ar args ...
+.Sh DESCRIPTION
+.Nm
+from
+.Sy Lmod
+is a
+.Xr lua 1
+based module system to manage the users' environment under
+Unix systems, specifically designed to easily handle
+the
+.Ev MODULEPATH
+Hierarchical problem.
+Environment Modules provide a convenient way to
+dynamically change the users' environment through modulefiles.
+This includes easily adding or removing directories from the
+.Ev PATH , LD_LIBRARY_PATH , CPATH
+and other environment variables.
+All popular shells are supported, including bash, csh, fish,
+ksh, sh, tcsh, zsh, as well as some scripting languages such
+as tcl, perl and python.
+.Sh OPTIONS
+The following
+.Ar options
+are available:
+.Pp
+.Bl -tag -width Ds -compact
+.It Fl h , \&? , H , -help
+Show the help message.
+.Pp
+.It Fl -check_syntax , -checkSyntax
+Only check the
+.Nm
+command syntax, do not load any modules.
+.Pp
+.It Fl -config
+Report
+.Sy Lmod
+configuration.
+.Pp
+.It Fl -config_json
+Report
+.Sy Lmod
+configuration in json format.
+.Pp
+.It Fl D
+Write program tracing data to stderr.
+.Pp
+.It Fl d , -default
+List default modules only when used with
+.Cm avail .
+.Pp
+.It Fl -debug Ar dbglvl
+.Sy VALUES :
+1, 2, 3.
+.Pp
+Only write trace output with proper debug levels.
+.Pp
+.It Fl -dumpversion
+Dump version in a machine readable way and quit.
+.Pp
+.It Fl -expert
+Work in expert mode.
+.Pp
+.It Fl -force
+Force removal of a sticky module or save an empty collection.
+.Pp
+.It Fl -gitversion
+Dump git version in a machine readable way and quit.
+.Pp
+.It Fl -ignore_cache
+Treat the cache file(s) as out-of-date.
+.Pp
+.It Fl -initial_load
+Loading Lmod for first time in a user shell.
+.Pp
+.It Fl -latest
+Load latest (ignore default).
+.Pp
+.It Fl -mt
+Report Module Table State.
+.Pp
+.It Fl -no_redirect
+Force output of
+.Cm list ,
+.Cm avail
+and
+.Cm spider
+to stderr.
+.Pp
+.It Fl -novice
+Turn off
+.Fl -expert
+and
+.Fl -quiet
+flags.
+.Pp
+.It Fl -nx , -no_extensions
+.Pp
+.It Fl -pin_versions Ar pinVersions
+When doing a restore use the specified version, do not follow defaults.
+.Pp
+.It Fl q , -quiet
+Do not print out warnings.
+.Pp
+.It Fl r , -regexp
+Use regular expression match.
+.Pp
+.It Fl -raw
+Print modulefile in raw output when used with show.
+.Pp
+.It Fl -redirect
+Send the output of
+.Cm list ,
+.Cm avail
+and
+.Cm spider
+to stdout (not stderr).
+.Pp
+.It Fl -regression_testing
+Lmod regression testing.
+.Pp
+.It Fl -show_hidden
+.Cm avail
+and
+.Cm spider
+will report hidden modules.
+.Pp
+.It Fl -spider_timeout Ar timeout
+A timeout for
+.Cm spider .
+.Pp
+.It Fl s , -style Ar availStyle
+.Sy DEFAULT :
+system
+Site controlled avail style.
+.Pp
+.It Fl T , -trace
+.Pp
+.It Fl t , -terse
+Write out in machine readable format for
+.Cm list ,
+.Cm avail ,
+.Cm spider
+and
+.Cm savelist .
+.Pp
+.It Fl -timer
+Report run times.
+.Pp
+.It Fl v , -version
+Print version info and quit.
+.Pp
+.It Fl -w , -width Ar twidth
+Use
+.Ar twidth
+as max term width.
+.El
+.Sh SUB-COMMANDS
+.Ss HELP
+.TS
+tab(@);
+r l l.
+T{
+.Cm help
+T}@@T{
+Print the help message.
+T}
+T{
+.Cm help
+T}@T{
+.Ar module Op Ar moduleX moduleY ...
+T}@T{
+Print help messages from the given modules.
+T}
+.TE
+.Ss LOAD
+.TS
+tab(@);
+r l l.
+T{
+.Cm load , add
+T}@T{
+.Ar module Op Ar moduleX moduleY ...
+T}@T{
+Load the given modules.
+T}
+T{
+.Cm try-load , try-add
+T}@T{
+.Ar module Op Ar moduleX moduleY ...
+T}@T{
+Load the given modules, do not complain if not found.
+T}
+T{
+.Cm del , unload
+T}@T{
+.Ar module Op Ar moduleX moduleY ...
+T}@T{
+Unload the module(s), does not complain if not found.
+T}
+T{
+.Cm swap , sw , switch
+T}@T{
+.Ar moduleX moduleY
+T}@T{
+.Cm unload Ar moduleX
+and
+.Cm load Ar moduleY
+T}
+T{
+.Cm purge
+T}@@T{
+.Cm unload
+all modules
+T}
+T{
+.Cm refresh
+T}@@T{
+Reload aliases from the current list of modules.
+T}
+T{
+.Cm update
+T}@@T{
+Reload all currently loaded modules.
+T}
+.TE
+.Ss SEARCH
+.TS
+tab(@);
+r l l.
+T{
+.Cm list
+T}@@T{
+List all currently loaded modules.
+T}
+T{
+.Cm list
+T}@T{
+.Ar patX Op Ar patY ...
+T}@T{
+List all loaded modules that match any of the given patterns.
+T}
+T{
+.Cm avail , av
+T}@T{
+.Op Ar string
+T}@T{
+List all available modules.
+Restricts to modules containing
+.Ar string
+if it is provided.
+T}
+T{
+.Cm spider
+T}@@T{
+List all possible modules.
+T}
+T{
+.Cm spider
+T}@T{
+.Ar module
+T}@T{
+List all possible versions of that
+.Ar module
+file.
+T}
+T{
+.It Cm spider
+T}@T{
+.Ar string
+T}@T{
+List all modules that contain
+.Ar string .
+T}
+T{
+.Cm spider
+T}@T{
+.Ar name/version
+T}@T{
+Detailed information about that version of the module.
+T}
+T{
+.It Cm whatis
+T}@T{
+.Ar module
+T}@T{
+Print whatis information about the module.
+T}
+T{
+.Cm keyword , key
+T}@T{
+.Ar string
+T}@T{
+Search all name and
+.Cm whatis
+that contain
+.Ar string .
+T}
+.TE
+.Pp
+All searching commands (
+.Cm spider ,
+.Cm list ,
+.Cm avail ,
+.Cm keyword
+) support regular expressions with the
+.Fl r
+flag.
+.Pp
+For example, to find all modules that start with
+.Sq p
+or
+.Sq P :
+.D1 module -r spider '^p'
+.Pp
+Find all modules that have
+.Dq mpi
+in their name:
+.D1 module -r spider mpi
+.Pp
+Find all modules that end with
+.Dq mpi
+in their name:
+.D1 module -r spider 'mpi$'
+.Ss COLLECTIONS
+.TS
+tab(@);
+r l l.
+T{
+.Cm save , s
+T}@@T{
+Save the current list of modules to a user defined
+.Dq default
+collection.
+T}
+T{
+.Cm save , s
+T}@T{
+.Ar name
+T}@T{
+Save the current list of modules to the
+.Ar name
+collection.
+T}
+T{
+.Cm reset
+T}@@T{
+The same as
+.Cm restore
+.Ar system .
+T}
+T{
+.Cm restore , r
+T}@@T{
+Restore modules from the user's
+.Dq default
+(if defined) or the system default.
+T}
+T{
+.Cm restore , r
+T}@T{
+.Ar name
+T}@T{
+Restore modules from
+.Ar name
+collection.
+T}
+T{
+.Cm restore
+T}@T{
+.Ar system
+T}@T{
+Restore module state to system defaults.
+T}
+T{
+.Cm savelist
+T}@@T{
+List of saved collections.
+T}
+T{
+.Cm describe , mcc
+T}@T{
+.Ar name
+T}@T{
+Describe the contents of the
+.Ar name
+module collection.
+T}
+T{
+.Cm disable
+T}@T{
+.Ar name
+T}@T{
+Disable (i.e. remove) the
+.Ar name
+collection.
+T}
+.TE
+.Ss MISC
+.TS
+tab(@);
+r l l.
+T{
+.Cm is-loaded
+T}@T{
+.Ar modulefile
+T}@T{
+Return a true status if
+.Ar module
+is loaded.
+T}
+T{
+.Cm is-avail
+T}@T{
+.Ar modulefile
+T}@T{
+Return a true status if
+.Ar module
+can be loaded.
+T}
+T{
+.Cm show
+T}@T{
+.Ar modulefile
+T}@T{
+Show the commands in the
+.Ar module
+file.
+T}
+T{
+.Cm use [-a]
+T}@T{
+.Ar path
+T}@T{
+Prepend or append
+.Ar path
+to
+.Ev MODULEPATH .
+T}
+T{
+.Cm unuse
+T}@T{
+.Ar path
+T}@T{
+Remove
+.Ar path
+from
+.Ev MODULEPATH .
+T}
+T{
+.Cm tablelist
+T}@@T{
+Output list of active modules as a lua table.
+T}
+.TE
+.Ss DEPRECATED
+.TS
+tab(@);
+r l l.
+T{
+.Cm getdefault
+T}@T{
+.Op Ar name
+T}@T{
+Load the
+.Ar name
+collection of modules or the users
+.Dq default
+if no
+.Ar name
+given. Use
+.Cm restore
+Instead.
+T}
+T{
+.Cm setdefault
+T}@T{
+.Op Ar name
+T}@T{
+Save current list of modules to
+.Ar name
+if given, otherwise save as the
+.Dq default
+list for the user. Use
+.Cm save
+instead.
+T}
+.TE
+.Sh ENVIRONMENT
+To print properties and warnings in color, set the
+.Ev LMOD_COLORIZE
+environment variable to
+.Sy YES .
+.Sh SEE ALSO
+.Bd -filled -offset indent
+.TS
+tab(@);
+rb l.
+T{
+Documentation
+T}@T{
+.Lk http://lmod.readthedocs.org
+T}
+T{
+Github
+T}@T{
+.Lk https://github.com/TACC/Lmod
+T}
+T{
+Sourceforge
+T}@T{
+.Lk https://lmod.sf.net
+T}
+T{
+TACC Homepage
+T}@T{
+.Lk https://www.tacc.utexas.edu/research-development/tacc-projects/lmod
+T}
+.TE
+.Ed
+.Pp
+To report a bug please read
+.Lk http://lmod.readthedocs.io/en/latest/075_bug_reporting.html
+.Sh AUTHORS
+Modules based on Lua, written by
+.An Robert McLay Aq Mt mclay@tacc.utexas.edu .
+.Pp
+The man page for Gentoo linux is maintained by the
+.An Gentoo Science Project Aq Mt sci@gentoo.org .
diff --git a/sys-cluster/lmod/lmod-8.4.20.ebuild b/sys-cluster/lmod/lmod-8.4.20.ebuild
new file mode 100644
index 000000000000..f41314789e9a
--- /dev/null
+++ b/sys-cluster/lmod/lmod-8.4.20.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{1..3} )
+inherit autotools lua-single
+
+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 ~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}]
+ ')
+ virtual/pkgconfig
+"
+DEPEND="${RDEPEND}"
+BDEPEND="${RDEPEND}
+ test? (
+ $(lua_gen_cond_dep '
+ dev-util/hermes[${LUA_SINGLE_USEDEP}]
+ ')
+ app-shells/tcsh
+ )
+"
+
+PATCHES=( "${FILESDIR}"/${PN}-8.4.19-no-libsandbox.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 pkgs/{luafilesystem,term} || die
+ rm -r rt/{ck_mtree_syntax,colorize,end2end,help,ifur,settarg} || die
+ eautoreconf
+}
+
+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
+ --with-useDotFiles
+ --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() {
+ 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
+ insinto /etc/profile.d
+ newins "${ED}"/usr/share/Lmod/init/profile lmod.sh
+ newins "${ED}"/usr/share/Lmod/init/profile.fish lmod.fish
+ 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
new file mode 100644
index 000000000000..f41314789e9a
--- /dev/null
+++ b/sys-cluster/lmod/lmod-9999.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-{1..3} )
+inherit autotools lua-single
+
+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 ~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}]
+ ')
+ virtual/pkgconfig
+"
+DEPEND="${RDEPEND}"
+BDEPEND="${RDEPEND}
+ test? (
+ $(lua_gen_cond_dep '
+ dev-util/hermes[${LUA_SINGLE_USEDEP}]
+ ')
+ app-shells/tcsh
+ )
+"
+
+PATCHES=( "${FILESDIR}"/${PN}-8.4.19-no-libsandbox.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 pkgs/{luafilesystem,term} || die
+ rm -r rt/{ck_mtree_syntax,colorize,end2end,help,ifur,settarg} || die
+ eautoreconf
+}
+
+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
+ --with-useDotFiles
+ --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() {
+ 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
+ insinto /etc/profile.d
+ newins "${ED}"/usr/share/Lmod/init/profile lmod.sh
+ newins "${ED}"/usr/share/Lmod/init/profile.fish lmod.fish
+ 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/metadata.xml b/sys-cluster/lmod/metadata.xml
new file mode 100644
index 000000000000..cee363a19e2e
--- /dev/null
+++ b/sys-cluster/lmod/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gentoo@aisha.cc</email>
+ <name>Aisha Tammy</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription>
+ Lmod is a lua based program to manage the user environment
+ under Unix systems, specifically designed to easily handle the MODULEPATH
+ Hierarchical problem. Environment Modules provide a convenient way to
+ dynamically change the users' environment through modulefiles. This
+ includes easily adding or removing directories to the PATH,
+ LD_LIBRARY_PATH and other environment variables.
+ </longdescription>
+ <use>
+ <flag name="auto-swap">enable auto swapping of compiler</flag>
+ <flag name="cache">enable caching of modules</flag>
+ <flag name="duplicate-paths">allow duplicate entries in path</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">TACC/Lmod</remote-id>
+ </upstream>
+</pkgmetadata>