summaryrefslogtreecommitdiff
blob: ff0de36e213432e24ca5f7132a4a0298fac2bdaa (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
50
51
52
53
54
55
56
57
58
59
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit multilib

DESCRIPTION="A C++-based object-oriented discrete event simulation."
HOMEPAGE="http://www.omnetpp.org/"
SRC_URI="http://www.omnetpp.org/download/release/${P}-src.tgz"

LICENSE="omnetpp"
SLOT="0"
KEYWORDS="~x86"
IUSE="examples"

RDEPEND="=dev-lang/tcl-8.4*
	=dev-lang/tk-8.4*
	dev-lang/perl
	dev-libs/libxslt
	virtual/ghostscript
	media-gfx/imagemagick
	media-gfx/graphviz"
DEPEND="${RDEPEND}
	app-doc/doxygen
	sys-devel/bison"

src_compile() {
	export PATH="${PATH}:${S}/bin"
	export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${S}/lib"
	export TCL_LIBRARY="/usr/$(get_libdir)/tcl8.4"
	econf || die 'econf failed'
	emake || die 'emake failed'
}

src_install() {
	rm -f bin/neddoc*
	dolib lib/*
	dobin bin/*
	dodoc doc/*
	insinto "/usr/share/doc/${PF}/bitmaps"
	doins -r bitmaps/* || die "installing bitmaps failed"
	if use examples ; then
		insinto "/usr/share/doc/${PF}/samples"
		doins -r samples/* || die "installing samples failed"
		for x in $(find ./samples -executable -type f); do
			exeinto "/usr/share/doc/${PF}/$(dirname ${x})"
			doexe "${x}"
		done;
	fi
}

pkg_postinst() {
	if use examples ; then
		elog "In order to provide the samples"
		elog "please copy them to a user home directory."
		elog "The samples are located in:"
		elog "   /usr/share/doc/${PF}/samples"
	fi
}