]> Pileus Git - ~andy/sunrise/blob - dev-cpp/omnetpp/omnetpp-3.3.ebuild
dev-cpp/omnetpp: New Ebuild for bug 159300 thanks to Charlie Shepherd and #gentoo...
[~andy/sunrise] / dev-cpp / omnetpp / omnetpp-3.3.ebuild
1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 DESCRIPTION="A C++-based object-oriented discrete event simulation."
6 HOMEPAGE="http://www.omnetpp.org/"
7 SRC_URI="http://www.omnetpp.org/download/release/${P}-src.tgz"
8
9 LICENSE="omnetpp"
10 SLOT="0"
11 KEYWORDS="~x86"
12 IUSE="examples"
13
14 DEPEND="=dev-lang/tcl-8.4*
15         dev-lang/tk
16         app-doc/doxygen
17         sys-devel/bison
18         dev-lang/perl
19         dev-libs/libxslt
20         virtual/ghostscript
21         media-gfx/imagemagick
22         media-gfx/graphviz"
23 RDEPEND="${DEPEND}"
24
25 src_compile() {
26         export PATH="${PATH}:${S}/bin"
27         export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${S}/lib"
28         export TCL_LIBRARY="$ROOT/usr/lib/tcl8.4"
29         econf || die 'econf failed'
30         emake || die 'error: emake failed'
31 }
32
33 src_install() {
34         rm -f bin/neddoc*
35         dolib lib/*
36         dobin bin/*
37         dodoc doc/*
38         insinto "/usr/share/doc/${P}/bitmaps"
39         doins -r bitmaps/* || die "error: installing data failed"
40         if use examples ; then
41                 insinto "/usr/share/doc/${P}/samples"
42                 doins -r samples/* || die "error: installing data failed"
43                 for x in $(find ./samples -executable -type f); do
44                         exeinto "/usr/share/doc/${P}/$(dirname ${x})"
45                         doexe "${x}"
46                 done;
47         fi
48 }
49
50 pkg_postinst() {
51         if use examples ; then
52                 echo ""
53                 einfo "In order to provide the samples"
54                 einfo "please copy them to a user home directory."
55                 einfo "The samples are located in:"
56                 einfo "   /usr/share/doc/${P}/samples"
57                 echo ""
58         fi
59 }