aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/modules/files/modules-3.2.10-defs.patch20
-rw-r--r--sys-cluster/modules/files/modules.sh.in2
-rw-r--r--sys-cluster/modules/modules-3.2.10-r2.ebuild66
3 files changed, 87 insertions, 1 deletions
diff --git a/sys-cluster/modules/files/modules-3.2.10-defs.patch b/sys-cluster/modules/files/modules-3.2.10-defs.patch
new file mode 100644
index 000000000..412abebd7
--- /dev/null
+++ b/sys-cluster/modules/files/modules-3.2.10-defs.patch
@@ -0,0 +1,20 @@
+--- modules-3.2.10/modules_def.h.orig 2017-04-21 19:33:52.698720482 +0300
++++ modules-3.2.10/modules_def.h 2017-04-21 19:35:19.506727343 +0300
+@@ -616,6 +616,9 @@
+ /** ModuleCmd_Purge.c **/
+ extern int ModuleCmd_Purge( Tcl_Interp*, int, char*[]);
+
++/** ModuleCmd_Refresh.c **/
++extern int ModuleCmd_Refresh( Tcl_Interp*, int argc, char*[]);
++
+ /** ModuleCmd_Switch.c **/
+ extern int ModuleCmd_Switch( Tcl_Interp*, int, char*[]);
+
+@@ -753,6 +756,7 @@
+ extern char *EMGetEnv(Tcl_Interp *, char const *);
+ extern char *EMSetEnv(Tcl_Interp *, char const *, char const *);
+ extern int is_interactive(void);
++extern void regex_quote(const char *, char *, int len);
+
+ #ifndef HAVE_STRDUP
+ # undef strdup
diff --git a/sys-cluster/modules/files/modules.sh.in b/sys-cluster/modules/files/modules.sh.in
index 6ed502e87..e3d6d43b2 100644
--- a/sys-cluster/modules/files/modules.sh.in
+++ b/sys-cluster/modules/files/modules.sh.in
@@ -3,5 +3,5 @@ if [ -f @EPREFIX@/usr/share/Modules/init/${shell} ]
then
. @EPREFIX@/usr/share/Modules/init/${shell}
else
- . @PREFIX@/usr/share/Modules/init/sh
+ . @EPREFIX@/usr/share/Modules/init/sh
fi
diff --git a/sys-cluster/modules/modules-3.2.10-r2.ebuild b/sys-cluster/modules/modules-3.2.10-r2.ebuild
new file mode 100644
index 000000000..ec32cd50e
--- /dev/null
+++ b/sys-cluster/modules/modules-3.2.10-r2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="Dynamic modification of a user's environment via modulefiles"
+HOMEPAGE="http://modules.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="test X"
+
+RDEPEND="
+ dev-lang/tcl:0=
+ dev-tcltk/tclx
+ X? ( x11-libs/libX11 )"
+DEPEND="${RDEPEND}
+ test? ( dev-util/dejagnu )"
+
+S="${WORKDIR}/${P%[a-z]}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-bindir.patch
+ "${FILESDIR}"/${P}-versioning.patch
+ "${FILESDIR}"/${P}-clear.patch
+ "${FILESDIR}"/${P}-avail.patch
+ "${FILESDIR}"/${P}-defs.patch
+)
+
+DOCS=(ChangeLog README NEWS TODO)
+
+src_prepare() {
+ has_version ">=dev-lang/tcl-8.6.0" &&
+ eapply "${FILESDIR}"/${P}-errorline.patch
+ default
+ sed -e "s:@EPREFIX@:${EPREFIX}:g" \
+ "${FILESDIR}"/modules.sh.in > modules.sh || die
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ --disable-versioning
+ --prefix="${EPREFIX}/usr/share"
+ --exec-prefix="${EPREFIX}/usr/share/Modules"
+ --with-module-path="${EPREFIX}/etc/modulefiles"
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ $(use_with X x)
+ )
+ econf ${myconf[@]}
+}
+
+src_install() {
+ default
+ insinto /etc/profile.d
+ doins modules.sh
+ exeinto /usr/share/Modules/bin
+ doexe "${FILESDIR}"/createmodule.{sh,py}
+ dosym /usr/share/Modules/init/csh /etc/profile.d/modules.csh
+ dodir /etc/modulefiles
+}