|
@@ -0,0 +1,80 @@
|
|
|
|
+# 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]}"
|
|
|
|
+
|
|
|
|
+DOCS=(ChangeLog README NEWS TODO)
|
|
|
|
+
|
|
|
|
+PATCHES=(
|
|
|
|
+ "${FILESDIR}/${P}-errorline.patch"
|
|
|
|
+ "${FILESDIR}/${P}-bindir.patch"
|
|
|
|
+ "${FILESDIR}/${P}-versioning.patch"
|
|
|
|
+ "${FILESDIR}/${P}-clear.patch"
|
|
|
|
+ "${FILESDIR}/${P}-avail.patch"
|
|
|
|
+)
|
|
|
|
+
|
|
|
|
+src_prepare() {
|
|
|
|
+ default
|
|
|
|
+
|
|
|
|
+ #has_version ">=dev-lang/tcl-8.6.0" && epatch "${FILESDIR}"/${P}-errorline.patch
|
|
|
|
+
|
|
|
|
+ sed -e "s:@EPREFIX@:${EPREFIX}:g" \
|
|
|
|
+ "${FILESDIR}"/modules.sh.in > modules.sh || die
|
|
|
|
+
|
|
|
|
+ AT_M4DIR="."
|
|
|
|
+ eautoreconf
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+src_configure() {
|
|
|
|
+
|
|
|
|
+ local myeconfargs=(
|
|
|
|
+ --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 ${myeconfargs}
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+src_install() {
|
|
|
|
+
|
|
|
|
+ echo "I am in 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
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+pkg_postinst() {
|
|
|
|
+ elog "Add this line at the end of your bashrc:"
|
|
|
|
+ elog "[ -f /opt/Modules/default/init/bash ] && source /opt/Modules/default/init/bash"
|
|
|
|
+}
|