# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit flag-o-matic DESCRIPTION="A utility to limit the bandwidth used by a process." HOMEPAGE="http://www.hping.org/netbrake/" SRC_URI="http://www.hping.org/netbrake/${P}.tar.gz" LICENSE="X11" SLOT="0" KEYWORDS="~x86" IUSE="httpsfs" DEPEND="" S=${WORKDIR}/${PN} src_unpack() { unpack ${A} cd "${S}" # Makefile.in ignores out compiler preference sed -i -e "s:CC=gcc:CC=$(tc-getCC):" Makefile.in \ || die "sed compiler fix failed." append-flags -fPIC # Makefile.in ignores our compiler flags preferences sed -i -e "s:-fPIC -Wall -O2 -g:$CFLAGS:" Makefile.in \ || die "sed cflag fix failed." # patch to install the library and script executable according # to gentoo's standards and remove user interaction for compile # options epatch ${FILESDIR}/${P}-fix-path-and-httpfs.patch || die use httpfs && export HTTPFS_FLAG=y } src_compile() { econf || die "econf failed" emake || die "emake failed" } src_install() { dolib libnetbrake.so.0.1 dobin netbrake dodoc AUTHORS CHANGES README THANKS TODO VERSION }