aboutsummaryrefslogtreecommitdiff
blob: 8ec69c83038f656e79403d8956809b98b881892a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

inherit autotools-utils

DESCRIPTION="Dynamic modification of a user's environment via modulefiles."
HOMEPAGE="http://modules.sourceforge.net/"
SRC_URI="http://sourceforge.net/projects/modules/files/Modules/${P%[a-z]}/${P}.tar.bz2/download -> ${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="X"

DEPEND="
	dev-lang/tcl
	dev-tcltk/tclx
	X? ( x11-libs/libX11 )
	"
RDEPEND="${DEPEND}"

S="${WORKDIR}/${P%[a-z]}"

DOCS=(ChangeLog README NEWS TODO)

src_prepare() {
	has_version ">=dev-lang/tcl-8.6.0" && epatch "${FILESDIR}/${P}-errorline.patch"
}

src_configure() {
	local myeconfargs=(
		$(use_with X x)
		--prefix=/opt
	)
	autotools-utils_src_configure
}

src_install() {
	autotools-utils_src_install
	dosym ${PV%[a-z]} /opt/Modules/default
}

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"
}