# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

DESCRIPTION="cave surveying tool for creating 2D/3D cave maps"
HOMEPAGE="http://therion.speleo.sk/"
SRC_URI="http://therion.speleo.sk/downloads/${P}.tar.gz"

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

RDEPEND=">=dev-lang/tk-8.4.3
	dev-tcltk/bwidget
	virtual/tetex"
DEPEND="${RDEPEND}
	dev-lang/perl"

S=${WORKDIR}/${PN}

src_compile() {
	emake || die "make failed"
	emake -C thtom/linux || die "make thtom failed"
}

src_install() {
	dobin therion xtherion/xtherion || die "dobin failed"
	insinto /etc
	doins therion.ini xtherion/xtherion.ini || die "doins failed"
	insinto /usr/lib/tcl8.*
	doins -r thtom/linux/Tom0.2
}
