aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAisha Tammy <gentoo@aisha.cc>2020-09-26 15:09:29 +0000
committerAisha Tammy <gentoo@aisha.cc>2020-09-26 15:09:29 +0000
commitc389cf1c4521de0c89009fd3da28801e6207131f (patch)
treeaedb533d030b569afdd32ef06cd07bc19c005e27 /sys-cluster
parentdev-util/Hermes: add env.d file and remove symliks (diff)
downloadsci-c389cf1c4521de0c89009fd3da28801e6207131f.tar.gz
sci-c389cf1c4521de0c89009fd3da28801e6207131f.tar.bz2
sci-c389cf1c4521de0c89009fd3da28801e6207131f.zip
sys-cluster/Lmod: environment module system
Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/Lmod/Lmod-8.4.5.ebuild104
-rw-r--r--sys-cluster/Lmod/Manifest1
-rw-r--r--sys-cluster/Lmod/metadata.xml23
3 files changed, 128 insertions, 0 deletions
diff --git a/sys-cluster/Lmod/Lmod-8.4.5.ebuild b/sys-cluster/Lmod/Lmod-8.4.5.ebuild
new file mode 100644
index 000000000..925e1d5e9
--- /dev/null
+++ b/sys-cluster/Lmod/Lmod-8.4.5.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Environment Module System based on Lua"
+HOMEPAGE="https://lmod.readthedocs.io/en/latest"
+SRC_URI="https://github.com/TACC/Lmod/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+KEYWORDS="~amd64"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="auto-swap cache dotfiles duplicate +extend italic module-cmd nocase redirect test"
+RESTRICT="!test? ( test )"
+
+RDEPEND+="
+ app-shells/tcsh
+ || (
+ app-shells/loksh
+ app-shells/mksh
+ app-shells/ksh
+ )
+ app-shells/zsh
+ dev-lang/tcl
+ dev-lua/luafilesystem
+ dev-lua/luajson
+ dev-lua/luaposix
+ dev-lua/lua-term
+"
+DEPEND+="${RDEPEND}"
+BDEPEND+="
+ test? (
+ dev-util/Hermes
+ )
+"
+
+pkg_setup() {
+ elog "There is a lot of options for this package,"
+ elog "especially for run time behaviour."
+ elog "You can set them using EXTRA_ECONF variable."
+ elog "To see full list of options visit:"
+ elog "https://lmod.readthedocs.io/en/latest/090_configuring_lmod.html"
+}
+
+src_prepare() {
+ default
+
+ rm -r "${S}"/rt/{colorize,end2end,help,ifur,settarg} || die
+}
+
+src_configure() {
+ # set environment variables to pass to Lmod configuration
+ local -x CACHE_LIFETIME="${CACHE_LIFETIME:-86400}"
+ local -x SHORT_TIME="${SHORT_TIME:-2}"
+ local -x SYSTEM_TOUCH="${SYSTEM_TOUCH:-/var/lmod/latest_system_update.time}"
+ local -x SITE_NAME="${SITE_NAME:-Gentoo}"
+ local -x SYSHOST="${SYSHOST:-Gentoo}"
+
+ local myconf=(
+ --with-tcl
+ --with-fastTCLInterp
+ --with-colorize
+ --prefix=/opt
+ --with-ancient="${CACHE_LIFETIME}"
+ --with-supportKsh
+ --with-updateSystemFn="${SYSTEM_TOUCH}"
+ --with-siteName="${SITE_NAME}"
+ --with-syshost="${SYSHOST}"
+ --with-shortTime="${SHORT_TIME}"
+ --without-useBuiltinPkgs
+ $(use_with duplicate duplicatePaths)
+ $(use_with nocase caseIndependentSorting)
+ $(use_with italic hiddenItalic)
+ $(use_with auto-swap autoSwap)
+ $(use_with module-cmd exportedModuleCmd)
+ $(use_with redirect)
+ $(use_with dotfiles useDotFiles)
+ $(use_with cache cachedLoads)
+ $(use_with extend extendedDefault)
+ )
+
+ econf ${myconf[@]} ${EXTRA_ECONF[@]}
+}
+
+src_test() {
+ local -x PATH="/opt/hermes/bin:${PATH}"
+ tm -vvv || die
+}
+
+src_install() {
+ default
+
+ keepdir /var/lmod
+}
+
+pkg_postinst() {
+ elog "Lmod has been installed at /opt/lmod/{lmod -> ${PV}}"
+ elog "To activate Lmod, you need to source the profile"
+ elog "script provided"
+ elog " $ . /opt/lmod/lmod/init/profile"
+ elog "This will provide you with the 'module' command"
+ elog " $ man module"
+}
diff --git a/sys-cluster/Lmod/Manifest b/sys-cluster/Lmod/Manifest
new file mode 100644
index 000000000..cf3e6785d
--- /dev/null
+++ b/sys-cluster/Lmod/Manifest
@@ -0,0 +1 @@
+DIST Lmod-8.4.5.tar.gz 19925053 BLAKE2B 9b0f3d9a0e44455b548710adabe53fc43fb7251d7e8852ed63d2e370c65aa89023b605c50ad582317b06d7c88d92330471d5491e6157a9861a823cec9bab348c SHA512 0a4bb191e61d450932d9d282d8d18116c5e66d51a2c93151f39b32a06feb5e0fe33100b568467af9082feed18a04460197e2942b1b0ba0383db05a5874b99b99
diff --git a/sys-cluster/Lmod/metadata.xml b/sys-cluster/Lmod/metadata.xml
new file mode 100644
index 000000000..6297993f4
--- /dev/null
+++ b/sys-cluster/Lmod/metadata.xml
@@ -0,0 +1,23 @@
+<?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>
+ <use>
+ <flag name="auto-swap">enable auto swapping of compiler</flag>
+ <flag name="cache">enable caching of modules</flag>
+ <flag name="dotfiles">use ~/.lmod.d/.cache instead of ~/.lmod.d/__cache__</flag>
+ <flag name="duplicate">allow duplicate entries in path</flag>
+ <flag name="extend">enable extended default functionality</flag>
+ <flag name="italic">use italics, instead of faint colors, to represent hidden folders</flag>
+ <flag name="module-cmd">export module command</flag>
+ <flag name="nocase">do case insensitive sortings and searches</flag>
+ <flag name="redirect">redirect messages to stdout</flag>
+ </use>
+</pkgmetadata>