Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/lmod/
Date: Mon, 30 Jan 2023 09:58:26
Message-Id: 1675072497.722c8fe3257133ae45f0c97f98bbe03edf71bb0e.andrewammerlaan@gentoo
1 commit: 722c8fe3257133ae45f0c97f98bbe03edf71bb0e
2 Author: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> de>
3 AuthorDate: Wed Dec 28 13:15:29 2022 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 30 09:54:57 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=722c8fe3
7
8 sys-cluster/lmod: Add symlinks to profile
9
10 Signed-off-by: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik.de>
11 Closes: https://github.com/gentoo/gentoo/pull/28872
12 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
13
14 sys-cluster/lmod/lmod-8.6.14-r1.ebuild | 136 +++++++++++++++++++++++++++++++++
15 1 file changed, 136 insertions(+)
16
17 diff --git a/sys-cluster/lmod/lmod-8.6.14-r1.ebuild b/sys-cluster/lmod/lmod-8.6.14-r1.ebuild
18 new file mode 100644
19 index 000000000000..b0ffd880dea7
20 --- /dev/null
21 +++ b/sys-cluster/lmod/lmod-8.6.14-r1.ebuild
22 @@ -0,0 +1,136 @@
23 +# Copyright 1999-2023 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=8
27 +
28 +LUA_COMPAT=( lua5-{1..3} )
29 +inherit autotools lua-single prefix
30 +
31 +DESCRIPTION="Environment Module System based on Lua"
32 +HOMEPAGE="https://lmod.readthedocs.io/en/latest https://github.com/TACC/Lmod"
33 +
34 +if [[ ${PV} == 9999 ]]; then
35 + inherit git-r3
36 + EGIT_REPO_URI="https://github.com/TACC/Lmod"
37 +else
38 + SRC_URI="https://github.com/TACC/Lmod/archive/${PV}.tar.gz -> ${P}.tar.gz"
39 + S="${WORKDIR}"/Lmod-${PV}
40 + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
41 +fi
42 +
43 +LICENSE="MIT"
44 +SLOT="0"
45 +IUSE="+auto-swap +cache duplicate-paths test"
46 +REQUIRED_USE="${LUA_REQUIRED_USE}"
47 +RESTRICT="!test? ( test )"
48 +
49 +RDEPEND="${LUA_DEPS}
50 + dev-lang/tcl
51 + dev-lang/tk
52 + $(lua_gen_cond_dep '
53 + >=dev-lua/luafilesystem-1.8.0[${LUA_USEDEP}]
54 + dev-lua/luajson[${LUA_USEDEP}]
55 + dev-lua/luaposix[${LUA_USEDEP}]
56 + dev-lua/lua-term[${LUA_USEDEP}]
57 + ')
58 + virtual/pkgconfig
59 +"
60 +DEPEND="${RDEPEND}"
61 +BDEPEND="${RDEPEND}
62 + test? (
63 + $(lua_gen_cond_dep '
64 + dev-util/hermes[${LUA_SINGLE_USEDEP}]
65 + ')
66 + app-shells/tcsh
67 + )
68 +"
69 +
70 +PATCHES=( "${FILESDIR}"/${PN}-8.4.19-no-libsandbox.patch )
71 +
72 +pkg_pretend() {
73 + elog "You can control the siteName and syshost settings by"
74 + elog "using the variables LMOD_SITENAME and LMOD_SYSHOST, during"
75 + elog "build time, which are both set to 'Gentoo' by default."
76 + elog "There are a lot of options for this package, especially"
77 + elog "for run time behaviour. Remember to use the EXTRA_ECONF variable."
78 + elog "To see full list of options visit:"
79 + elog "\t https://lmod.readthedocs.io/en/latest/090_configuring_lmod.html"
80 +}
81 +
82 +src_prepare() {
83 + default
84 + rm -r pkgs/{luafilesystem,term} || die
85 + rm -r rt/{ck_mtree_syntax,colorize,end2end,help,ifur,settarg} || die
86 + hprefixify -w '/#\!\/bin\/tcsh/' rt/csh_swap/csh_swap.tdesc || die
87 + eautoreconf
88 +}
89 +
90 +src_configure() {
91 + local LMOD_SITENAME="${LMOD_SITENAME:-Gentoo}"
92 + local LMOD_SYSHOST="${LMOD_SYSHOST:-Gentoo}"
93 +
94 + local LUAC="${LUA%/*}/luac${LUA#*lua}"
95 +
96 + local myconf=(
97 + --with-tcl
98 + --with-fastTCLInterp
99 + --with-colorize
100 + --with-supportKsh
101 + --without-useBuiltinPkgs
102 + --with-siteControlPrefix
103 + --with-siteName="${LMOD_SITENAME}"
104 + --with-syshost="${LMOD_SYSHOST}"
105 + --with-lua_include="$(lua_get_include_dir)"
106 + --with-lua="${LUA}"
107 + --with-luac="${LUAC}"
108 + --with-module-root-path="${EPREFIX}/etc/modulefiles"
109 + --with-spiderCacheDir="${EPREFIX}/etc/lmod_cache/spider_cache"
110 + --with-updateSystemFn="${EPREFIX}/etc/lmod_cache/system.txt"
111 + --prefix="${EPREFIX}/usr/share/Lmod"
112 + --with-caseIndependentSorting
113 + --without-hiddenItalic
114 + --with-exportedModuleCmd
115 + --with-useDotFiles
116 + --without-redirect
117 + --with-extendedDefault
118 + $(use_with cache cachedLoads)
119 + $(use_with duplicate-paths duplicatePaths)
120 + $(use_with auto-swap autoSwap)
121 + )
122 + econf "${myconf[@]}"
123 +}
124 +
125 +src_compile() {
126 + CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
127 + default
128 +}
129 +
130 +src_test() {
131 + local -x PATH="${EPREFIX}/opt/hermes/bin:${PATH}"
132 + tm -vvv || die
133 + testcleanup || die
134 +}
135 +
136 +src_install() {
137 + dosym ../../../usr/share/Lmod/init/profile /etc/bash/bashrc.d/z00_lmod.sh
138 + dosym ../../usr/share/Lmod/init/profile /etc/profile.d/z00_lmod.sh
139 + dosym ../../usr/share/Lmod/init/cshrc /etc/profile.d/z00_lmod.csh
140 + dosym ../../../usr/share/Lmod/init/profile.fish /etc/fish/conf.d/z00_lmod.fish
141 + default
142 + newman "${FILESDIR}"/module.1-8.4.20 module.1
143 + # not a real man page
144 + rm -r "${ED}"/usr/share/Lmod/share/man || die
145 + doenvd "${FILESDIR}"/99lmod
146 + keepdir /etc/modulefiles
147 + keepdir /etc/lmod_cache
148 +
149 +}
150 +
151 +pkg_postinst() {
152 + if use cache ; then
153 + elog "Lmod spider cache has been enabled."
154 + elog "Remember to update the spider cache with"
155 + elog "/usr/share/Lmod/libexec/update_lmod_system_cache_files \ "
156 + elog "\t \$MODULEPATH"
157 + fi
158 +}