Merge remote-tracking branch 'github/pr/372'.
[gentoo.git] / net-analyzer / netio / netio-1.32.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 inherit eutils toolchain-funcs
7
8 DESCRIPTION="a network benchmarking tool that measures net throughput with NetBIOS and TCP/IP protocols"
9 HOMEPAGE="http://www.ars.de/ars/ars.nsf/docs/netio"
10 SRC_URI='http://www.ars.de/ARS/ars.nsf/f24a6a0b94c22d82862566960071bf5a/aa577bc4be573b05c125706d004c75b5/$FILE/netio132.zip'
11
12 LICENSE="free-noncomm"
13 SLOT="0"
14 KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
15 IUSE=""
16 RESTRICT="mirror" # bug #391789 comment #1
17
18 DEPEND="app-arch/unzip
19         >=sys-apps/sed-4"
20
21 S="${WORKDIR}"
22
23 src_prepare() {
24         edos2unix *.c *.h
25
26         sed -i \
27                 -e "s|LFLAGS=\"\"|LFLAGS?=\"${LDFLAGS}\"|g" \
28                 -e 's|\(CC\)=|\1?=|g' \
29                 -e 's|\(CFLAGS\)=|\1+=|g' \
30                 Makefile || die
31         epatch "${FILESDIR}"/${PN}-1.26-linux-include.patch
32 }
33
34 src_compile() {
35         emake \
36                 CC="$(tc-getCC)" \
37                 CFLAGS="${CFLAGS}" \
38                 linux
39 }
40
41 src_install() {
42         dobin netio
43         dodoc netio.doc
44 }