Gentoo Archives: gentoo-commits

From: Aisha Tammy <gentoo@×××××.cc>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sys-cluster/Lmod/
Date: Sat, 26 Sep 2020 15:09:52
Message-Id: 1601132969.c389cf1c4521de0c89009fd3da28801e6207131f.epsilon-0@gentoo
1 commit: c389cf1c4521de0c89009fd3da28801e6207131f
2 Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
3 AuthorDate: Sat Sep 26 15:09:29 2020 +0000
4 Commit: Aisha Tammy <gentoo <AT> aisha <DOT> cc>
5 CommitDate: Sat Sep 26 15:09:29 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=c389cf1c
7
8 sys-cluster/Lmod: environment module system
9
10 Package-Manager: Portage-3.0.8, Repoman-3.0.1
11 Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>
12
13 sys-cluster/Lmod/Lmod-8.4.5.ebuild | 104 +++++++++++++++++++++++++++++++++++++
14 sys-cluster/Lmod/metadata.xml | 23 ++++++++
15 2 files changed, 127 insertions(+)
16
17 diff --git a/sys-cluster/Lmod/Lmod-8.4.5.ebuild b/sys-cluster/Lmod/Lmod-8.4.5.ebuild
18 new file mode 100644
19 index 000000000..925e1d5e9
20 --- /dev/null
21 +++ b/sys-cluster/Lmod/Lmod-8.4.5.ebuild
22 @@ -0,0 +1,104 @@
23 +# Copyright 1999-2020 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=7
27 +
28 +DESCRIPTION="Environment Module System based on Lua"
29 +HOMEPAGE="https://lmod.readthedocs.io/en/latest"
30 +SRC_URI="https://github.com/TACC/Lmod/archive/${PV}.tar.gz -> ${P}.tar.gz"
31 +
32 +KEYWORDS="~amd64"
33 +
34 +LICENSE="MIT"
35 +SLOT="0"
36 +IUSE="auto-swap cache dotfiles duplicate +extend italic module-cmd nocase redirect test"
37 +RESTRICT="!test? ( test )"
38 +
39 +RDEPEND+="
40 + app-shells/tcsh
41 + || (
42 + app-shells/loksh
43 + app-shells/mksh
44 + app-shells/ksh
45 + )
46 + app-shells/zsh
47 + dev-lang/tcl
48 + dev-lua/luafilesystem
49 + dev-lua/luajson
50 + dev-lua/luaposix
51 + dev-lua/lua-term
52 +"
53 +DEPEND+="${RDEPEND}"
54 +BDEPEND+="
55 + test? (
56 + dev-util/Hermes
57 + )
58 +"
59 +
60 +pkg_setup() {
61 + elog "There is a lot of options for this package,"
62 + elog "especially for run time behaviour."
63 + elog "You can set them using EXTRA_ECONF variable."
64 + elog "To see full list of options visit:"
65 + elog "https://lmod.readthedocs.io/en/latest/090_configuring_lmod.html"
66 +}
67 +
68 +src_prepare() {
69 + default
70 +
71 + rm -r "${S}"/rt/{colorize,end2end,help,ifur,settarg} || die
72 +}
73 +
74 +src_configure() {
75 + # set environment variables to pass to Lmod configuration
76 + local -x CACHE_LIFETIME="${CACHE_LIFETIME:-86400}"
77 + local -x SHORT_TIME="${SHORT_TIME:-2}"
78 + local -x SYSTEM_TOUCH="${SYSTEM_TOUCH:-/var/lmod/latest_system_update.time}"
79 + local -x SITE_NAME="${SITE_NAME:-Gentoo}"
80 + local -x SYSHOST="${SYSHOST:-Gentoo}"
81 +
82 + local myconf=(
83 + --with-tcl
84 + --with-fastTCLInterp
85 + --with-colorize
86 + --prefix=/opt
87 + --with-ancient="${CACHE_LIFETIME}"
88 + --with-supportKsh
89 + --with-updateSystemFn="${SYSTEM_TOUCH}"
90 + --with-siteName="${SITE_NAME}"
91 + --with-syshost="${SYSHOST}"
92 + --with-shortTime="${SHORT_TIME}"
93 + --without-useBuiltinPkgs
94 + $(use_with duplicate duplicatePaths)
95 + $(use_with nocase caseIndependentSorting)
96 + $(use_with italic hiddenItalic)
97 + $(use_with auto-swap autoSwap)
98 + $(use_with module-cmd exportedModuleCmd)
99 + $(use_with redirect)
100 + $(use_with dotfiles useDotFiles)
101 + $(use_with cache cachedLoads)
102 + $(use_with extend extendedDefault)
103 + )
104 +
105 + econf ${myconf[@]} ${EXTRA_ECONF[@]}
106 +}
107 +
108 +src_test() {
109 + local -x PATH="/opt/hermes/bin:${PATH}"
110 + tm -vvv || die
111 +}
112 +
113 +src_install() {
114 + default
115 +
116 + keepdir /var/lmod
117 +}
118 +
119 +pkg_postinst() {
120 + elog "Lmod has been installed at /opt/lmod/{lmod -> ${PV}}"
121 + elog "To activate Lmod, you need to source the profile"
122 + elog "script provided"
123 + elog " $ . /opt/lmod/lmod/init/profile"
124 + elog "This will provide you with the 'module' command"
125 + elog " $ man module"
126 +}
127
128 diff --git a/sys-cluster/Lmod/metadata.xml b/sys-cluster/Lmod/metadata.xml
129 new file mode 100644
130 index 000000000..6297993f4
131 --- /dev/null
132 +++ b/sys-cluster/Lmod/metadata.xml
133 @@ -0,0 +1,23 @@
134 +<?xml version="1.0" encoding="UTF-8"?>
135 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
136 +<pkgmetadata>
137 + <maintainer type="person">
138 + <email>gentoo@×××××.cc</email>
139 + <name>Aisha Tammy</name>
140 + </maintainer>
141 + <maintainer type="project">
142 + <email>sci@g.o</email>
143 + <name>Gentoo Science Project</name>
144 + </maintainer>
145 + <use>
146 + <flag name="auto-swap">enable auto swapping of compiler</flag>
147 + <flag name="cache">enable caching of modules</flag>
148 + <flag name="dotfiles">use ~/.lmod.d/.cache instead of ~/.lmod.d/__cache__</flag>
149 + <flag name="duplicate">allow duplicate entries in path</flag>
150 + <flag name="extend">enable extended default functionality</flag>
151 + <flag name="italic">use italics, instead of faint colors, to represent hidden folders</flag>
152 + <flag name="module-cmd">export module command</flag>
153 + <flag name="nocase">do case insensitive sortings and searches</flag>
154 + <flag name="redirect">redirect messages to stdout</flag>
155 + </use>
156 +</pkgmetadata>