1 |
commit: e14db70b16b463bef044f80c74072b373e1e3489 |
2 |
Author: Andrew Savchenko <bircoph <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Aug 25 19:25:38 2017 +0000 |
4 |
Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 25 19:25:38 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=e14db70b |
7 |
|
8 |
sys-cluster/modules: bump to EAPI 6 |
9 |
|
10 |
For modules-3.2.10-r2: |
11 |
- bump to EAPI 6 |
12 |
- fix sh.in template |
13 |
- fix gcc warnings |
14 |
|
15 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
16 |
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org> |
17 |
|
18 |
.../modules/files/modules-3.2.10-defs.patch | 20 +++++++ |
19 |
sys-cluster/modules/files/modules.sh.in | 2 +- |
20 |
sys-cluster/modules/modules-3.2.10-r2.ebuild | 66 ++++++++++++++++++++++ |
21 |
3 files changed, 87 insertions(+), 1 deletion(-) |
22 |
|
23 |
diff --git a/sys-cluster/modules/files/modules-3.2.10-defs.patch b/sys-cluster/modules/files/modules-3.2.10-defs.patch |
24 |
new file mode 100644 |
25 |
index 000000000..412abebd7 |
26 |
--- /dev/null |
27 |
+++ b/sys-cluster/modules/files/modules-3.2.10-defs.patch |
28 |
@@ -0,0 +1,20 @@ |
29 |
+--- modules-3.2.10/modules_def.h.orig 2017-04-21 19:33:52.698720482 +0300 |
30 |
++++ modules-3.2.10/modules_def.h 2017-04-21 19:35:19.506727343 +0300 |
31 |
+@@ -616,6 +616,9 @@ |
32 |
+ /** ModuleCmd_Purge.c **/ |
33 |
+ extern int ModuleCmd_Purge( Tcl_Interp*, int, char*[]); |
34 |
+ |
35 |
++/** ModuleCmd_Refresh.c **/ |
36 |
++extern int ModuleCmd_Refresh( Tcl_Interp*, int argc, char*[]); |
37 |
++ |
38 |
+ /** ModuleCmd_Switch.c **/ |
39 |
+ extern int ModuleCmd_Switch( Tcl_Interp*, int, char*[]); |
40 |
+ |
41 |
+@@ -753,6 +756,7 @@ |
42 |
+ extern char *EMGetEnv(Tcl_Interp *, char const *); |
43 |
+ extern char *EMSetEnv(Tcl_Interp *, char const *, char const *); |
44 |
+ extern int is_interactive(void); |
45 |
++extern void regex_quote(const char *, char *, int len); |
46 |
+ |
47 |
+ #ifndef HAVE_STRDUP |
48 |
+ # undef strdup |
49 |
|
50 |
diff --git a/sys-cluster/modules/files/modules.sh.in b/sys-cluster/modules/files/modules.sh.in |
51 |
index 6ed502e87..e3d6d43b2 100644 |
52 |
--- a/sys-cluster/modules/files/modules.sh.in |
53 |
+++ b/sys-cluster/modules/files/modules.sh.in |
54 |
@@ -3,5 +3,5 @@ if [ -f @EPREFIX@/usr/share/Modules/init/${shell} ] |
55 |
then |
56 |
. @EPREFIX@/usr/share/Modules/init/${shell} |
57 |
else |
58 |
- . @PREFIX@/usr/share/Modules/init/sh |
59 |
+ . @EPREFIX@/usr/share/Modules/init/sh |
60 |
fi |
61 |
|
62 |
diff --git a/sys-cluster/modules/modules-3.2.10-r2.ebuild b/sys-cluster/modules/modules-3.2.10-r2.ebuild |
63 |
new file mode 100644 |
64 |
index 000000000..ec32cd50e |
65 |
--- /dev/null |
66 |
+++ b/sys-cluster/modules/modules-3.2.10-r2.ebuild |
67 |
@@ -0,0 +1,66 @@ |
68 |
+# Copyright 1999-2017 Gentoo Foundation |
69 |
+# Distributed under the terms of the GNU General Public License v2 |
70 |
+ |
71 |
+EAPI=6 |
72 |
+ |
73 |
+inherit autotools |
74 |
+ |
75 |
+DESCRIPTION="Dynamic modification of a user's environment via modulefiles" |
76 |
+HOMEPAGE="http://modules.sourceforge.net/" |
77 |
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" |
78 |
+ |
79 |
+LICENSE="GPL-2" |
80 |
+SLOT="0" |
81 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
82 |
+IUSE="test X" |
83 |
+ |
84 |
+RDEPEND=" |
85 |
+ dev-lang/tcl:0= |
86 |
+ dev-tcltk/tclx |
87 |
+ X? ( x11-libs/libX11 )" |
88 |
+DEPEND="${RDEPEND} |
89 |
+ test? ( dev-util/dejagnu )" |
90 |
+ |
91 |
+S="${WORKDIR}/${P%[a-z]}" |
92 |
+ |
93 |
+PATCHES=( |
94 |
+ "${FILESDIR}"/${P}-bindir.patch |
95 |
+ "${FILESDIR}"/${P}-versioning.patch |
96 |
+ "${FILESDIR}"/${P}-clear.patch |
97 |
+ "${FILESDIR}"/${P}-avail.patch |
98 |
+ "${FILESDIR}"/${P}-defs.patch |
99 |
+) |
100 |
+ |
101 |
+DOCS=(ChangeLog README NEWS TODO) |
102 |
+ |
103 |
+src_prepare() { |
104 |
+ has_version ">=dev-lang/tcl-8.6.0" && |
105 |
+ eapply "${FILESDIR}"/${P}-errorline.patch |
106 |
+ default |
107 |
+ sed -e "s:@EPREFIX@:${EPREFIX}:g" \ |
108 |
+ "${FILESDIR}"/modules.sh.in > modules.sh || die |
109 |
+ |
110 |
+ eautoreconf |
111 |
+} |
112 |
+ |
113 |
+src_configure() { |
114 |
+ local myconf=( |
115 |
+ --disable-versioning |
116 |
+ --prefix="${EPREFIX}/usr/share" |
117 |
+ --exec-prefix="${EPREFIX}/usr/share/Modules" |
118 |
+ --with-module-path="${EPREFIX}/etc/modulefiles" |
119 |
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)" |
120 |
+ $(use_with X x) |
121 |
+ ) |
122 |
+ econf ${myconf[@]} |
123 |
+} |
124 |
+ |
125 |
+src_install() { |
126 |
+ default |
127 |
+ insinto /etc/profile.d |
128 |
+ doins modules.sh |
129 |
+ exeinto /usr/share/Modules/bin |
130 |
+ doexe "${FILESDIR}"/createmodule.{sh,py} |
131 |
+ dosym /usr/share/Modules/init/csh /etc/profile.d/modules.csh |
132 |
+ dodir /etc/modulefiles |
133 |
+} |