# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-misc/tiers/tiers-1.1.ebuild,v 1.12 2013/02/02 18:16:19 ulm Exp $ EAPI="5" inherit eutils MY_P="${PN}${PV}" DESCRIPTION="Random network topography generator" HOMEPAGE="http://www.isi.edu/nsnam/ns/ns-topogen.html#tiers" SRC_URI="http://www.isi.edu/nsnam/dist/topogen/${MY_P}.tar.gz http://www.isi.edu/nsnam/dist/topogen/tiers2ns-lan.awk" LICENSE="mapm" SLOT="0" KEYWORDS="~amd64 ~ppc x86" IUSE="" RDEPEND="sci-visualization/gnuplot virtual/awk" DEPEND="${RDEPEND}" S=${WORKDIR}/${MY_P} src_unpack() { unpack ${MY_P}.tar.gz cd "${S}" } src_prepare() { epatch "${FILESDIR}"/${P}-makefile.patch epatch "${FILESDIR}"/${MY_P}-gccfixes.patch epatch "${FILESDIR}"/${P}-gcc43.patch sed -i \ -e '1a\#!/bin/sh' \ -e '1d' \ -e "s|-f |-f /usr/share/${PN}/|g" \ "${S}"/bin/strip4gnuplot3.5 || die } src_compile() { cd "${S}"/src emake \ CXX="$(tc-getCXX)" \ CONFIGFILE="/etc/tiers-gnuplot.conf" \ EXEC="../bin/tiers-gnuplot" # cleanup for a sec rm *.o emake \ CXX="$(tc-getCXX)" \ CONFIGFILE="/etc/tiers.conf" \ EXEC="../bin/tiers" } src_install() { dobin bin/tiers bin/tiers-gnuplot bin/strip4gnuplot3.5 insinto /etc newins src/tiers_config.generic tiers.conf newins src/tiers_config.gnuplot tiers-gnuplot.conf insinto /usr/share/${PN} doins bin/*.awk "${DISTDIR}"/tiers2ns-lan.awk dodoc CHANGES COPYRIGHT README dodoc -r docs/ }