summaryrefslogtreecommitdiff
path: root/net-analyzer/netperf
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/netperf
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/netperf')
-rw-r--r--net-analyzer/netperf/Manifest17
-rw-r--r--net-analyzer/netperf/files/netperf-2.2-conf4
-rw-r--r--net-analyzer/netperf/files/netperf-2.2-init21
-rw-r--r--net-analyzer/netperf/files/netperf-2.6.0-log-dir.patch11
-rw-r--r--net-analyzer/netperf/files/netperf-2.7.0-includes.patch22
-rw-r--r--net-analyzer/netperf/files/netperf-2.7.0-init23
-rw-r--r--net-analyzer/netperf/files/netperf-2.7.0-inline.patch32
-rw-r--r--net-analyzer/netperf/files/netperf-2.7.0-space.patch17
-rw-r--r--net-analyzer/netperf/files/netperf-fix-scripts.patch34
-rw-r--r--net-analyzer/netperf/metadata.xml22
-rw-r--r--net-analyzer/netperf/netperf-2.6.0-r1.ebuild62
-rw-r--r--net-analyzer/netperf/netperf-2.7.0-r1.ebuild75
-rw-r--r--net-analyzer/netperf/netperf-2.7.0-r2.ebuild76
-rw-r--r--net-analyzer/netperf/netperf-2.7.0.ebuild63
14 files changed, 479 insertions, 0 deletions
diff --git a/net-analyzer/netperf/Manifest b/net-analyzer/netperf/Manifest
new file mode 100644
index 000000000000..36e12e0b0c4a
--- /dev/null
+++ b/net-analyzer/netperf/Manifest
@@ -0,0 +1,17 @@
+AUX netperf-2.2-conf 103 SHA256 9dce33f9552ce91ed5dbf57f44bd3d64a83aeb67ed9a41952a6c69601a10e340 SHA512 88a0d19c59a054071f472e62e6afd8c5fe37a77802dedea3adc82df0701f280c0ad8b5410e7fab74302861bc45920d38d576cfea1d8baa01cd5739801acb3b60 WHIRLPOOL 30bb26aab461eb024e80fdbb663ea334f0112d7bb1c6d6d4c83ccd017efab4a945a1ed2f6073a122de7a9e6888a4fd11787744ce8d236f22ab3b88a93ad61eb2
+AUX netperf-2.2-init 434 SHA256 2c0a09d31fc45c53d5362a97fc0f443c574b520d4613dc944fab540699bd6ad4 SHA512 ec09907d7e3bf9c38e6d142dd605c71620b790ece71685a347906fe1de103a6317345ab9181a618a14173380b155ceaa6a629fe3e33b571f038bde9074dfc112 WHIRLPOOL 9cd4f78fde842cbd7f7ab4271fda3b59216520fa459f9d8934d7124210413768c92ea7ad17759dc92523b025244707c7de5f3bbd6c6c6d2e00ca6ed3ba064a1d
+AUX netperf-2.6.0-log-dir.patch 261 SHA256 c5449f723cc26e3ebada62d954e5b8dbad3b0996db18401c816fa756905eedbb SHA512 108ab43c36041df5051cb1a130d33e42589c020dac296230a325ee4e1805ea2b3bbcb5cd1438cd4abe4d922ff5536410be9364eaad9044a3181c9acdc7b91bb6 WHIRLPOOL 197919f1204465ad813849ab6b6f4ee24f7fe2f5aaf7072ab6f4159a5713163041dffa6e721a066552b0b7746b353b84255a0aceca478993ee229f37dbbb20fd
+AUX netperf-2.7.0-includes.patch 468 SHA256 dcd9ca94d89cf6624d52b9dd8aa7e68d7ac47032ce964049d0faa591731f6270 SHA512 aec77b7a97e83a93d847f0935bd599d7497b3b749bb0cdb722d96cb49535b3eef9b7b9f60388f5cb2de726b4084abd9cd48614d73bc63b34c7bc0fcfffb0fd3f WHIRLPOOL cd740bf0a4a3029f63b44ff0f33e55ae4e7c09a897ff5eb4770269a36c342be7c8c0c77f7a55eb0c277fdc75890a3ca8cd0bc83ad5dcca3b0305f489491ec3c8
+AUX netperf-2.7.0-init 440 SHA256 a0e39a50e640042016fa880519a95fedcf5aa71ac9780e5efa98e9face076f49 SHA512 ed5a56d77f47aa01545be64104decc2893179c80094c50bb023b96b751cb5aa34ec8f18d606b0570bef47037bedf415250d9b55157f5e24c97e246f6f9643a36 WHIRLPOOL 9cbd3b6aaf622f2306d391bb7ace80fdc2e5b67a4eb999f57a945a1d404b248cf4fd632ac5b7f0a8a93a680aed5932fa3f7439ec2531f17c6f03f981f5d1582f
+AUX netperf-2.7.0-inline.patch 974 SHA256 07dba8cf543889f9b28b52c8ff9310f9656d2dc6235a0d6e7b9e52e052309f2f SHA512 9b9c542724456b49ea51c29d6b807edf938db105adfff57a06a9fdc76c5259019450d9ee674ea4e797b973542ea43377ee83332d391bcf14913e395a76a3d76c WHIRLPOOL 3c677547c45c05895b52e68770e3657e77462d464c9b160035cb71ea131aa668240fe55ca2b6bc8a99afc3a7d0b21440082b3910b4582ef6a858344efe83a514
+AUX netperf-2.7.0-space.patch 455 SHA256 607217572c3bf6e1fe7428ef057357157ff78c7075dd95d288678f85b571ff36 SHA512 e39bfcec70da00fa886b1f8389f54eca6bac83fc8ff48a72427fcd30c3f605e4ec2d01d2f7161ae0fa26bd56283c03593caf756db7d808f0e3e4d3a90d50f1fc WHIRLPOOL c384d51e410289da3f5298741b1924dafe5a18040e52c5c0f75496f5f36d8298c19d85b6dcc0ecd67aa7bd2b5e0df849c804edac7d1cf4ba761a47de0b453303
+AUX netperf-fix-scripts.patch 819 SHA256 2dd29e6134f769cfff036945ebbb63e6f10338c95a1d5705c374f63c2d81ac30 SHA512 d82b01695c432be2f7312641b5599514bf21ca4586f15406aa087034de8d7b66f000eafd02f685c56062a8639ff4158e01d56835e6b8c53baf46481b0a3d0f1a WHIRLPOOL eaf301c87e6fd04fbeb6bc2eb33f69036f885dfc8025257a0494d15bb201472d8e2e2b806e01f4634c5f52e3dd43c0f8a13d3b8010b84129ccb808c3ea68a2f0
+DIST netperf-2.6.0.tar.bz2 1032953 SHA256 cd8dac710d4273d29f70e8dbd09353a6362ac58a11926e0822233c0cb230323a SHA512 b3921d2e887088b14a8bbe5ace9b1cc0c8b29951eeaa7857ce3f324933397c8ff6b56eeacfe755181ce1a56c982fe431955f6db55bd20f2343324e22ee23c9b3 WHIRLPOOL b602c8660bae59648cbbe9eed47ee9d86b0ae714bc0c2906e80a14d0ce18951f125f3331f90acd776850b04506e37030545084677f6be512477ea37f76d972e7
+DIST netperf-2.7.0.tar.bz2 1024430 SHA256 842af17655835c8be7203808c3393e6cb327a8067f3ed1f1053eb78b4e40375a SHA512 5fb37945bead831247de9c8ba86b33f134ba39e753b483df72de97f536d0846538dadf61acc2dee57f04ab5d16a92afab4890e79a5d7ffa863afd526267fffad WHIRLPOOL 66c81e418750d67bfa15d6f1e3cd7a3a65f1168ebb080263cf70e0f3fe023a8128bfc559249268ec8e597ef3db5acdf5509861f12f8f49c6b2586e679014e34a
+EBUILD netperf-2.6.0-r1.ebuild 1666 SHA256 c587be6c47acda218a2793654c391345239b25bae4a34fdb14f5ea80861313f8 SHA512 59808e4719f87cdff58a090c8669f481d4c850a08ed8023e5fd4be837b23f7faa7b99c8f91dca300586e1d70cc20d1a727c433fe264b26c6b68916b9f0e68194 WHIRLPOOL 09bf41eac1524930dbeca8777f8ac6e9ec0c52f3912a00ac21ce30e5e82638d2fe2ab26bd5e324bd3030b74d5df80a839f66a3e45b873ed9e5009276b6cfb57b
+EBUILD netperf-2.7.0-r1.ebuild 1877 SHA256 5ce447fd66a185153ccd100e1db8f5119b56c58a388565baded1bf975c120835 SHA512 a1cbc73bf527e97afdfa88b3644d2f459138363fc8232a5a657b502214fd0d3eb0b48579831df7c56c07ec954b41724ee7cd1555a74d9229ff796cb50e7c7e6f WHIRLPOOL eebdee296487c79a26d4c4bbd95dd1e263a282e86e974b11f872220413abd88ee9c80095d6b85f60c0c457685e69c74f1356c5d0d74761f2a294b78fea8931c6
+EBUILD netperf-2.7.0-r2.ebuild 1928 SHA256 a99822044af5590a84b1bc418d87b2400750d35cbf46cf584dd0c84331515a0b SHA512 a4258a977642cd0a174bf41493d5526b8ea447e39fc01282f5d7d7b2f0da3ea400203b68522dcfe51e8da0d335167c9d0dc1c3e202d532d34cba23932875cca4 WHIRLPOOL 00dcd45209d8beaecb0fd6988cf559152a616d69fff7a5d3cafb6858e0a3b5a8bb93f897b97c11f982219699818f283d4b3edc4c299f14caf3f58e072753823c
+EBUILD netperf-2.7.0.ebuild 1727 SHA256 5bcc55c7d832a97806d6a3412e30c190f039338a4021c53d6c452e97e73901a7 SHA512 71cc28a007eb990c0325ab9592f5f7478ffd2b7484cc2ab4da4cab06e1f7971f1688b401b2951f7dde5dd3b1bea2cf58340b1e592b3d0738509cb48cab0da716 WHIRLPOOL e409731c7f498c467eab6e040bb5a425e4afc30bf38633c38714dca8bf7cf96accb62bbc7dd6adbf3e5828424dfed7c37ce9c49563b77620e1030f03e966820b
+MISC ChangeLog 4882 SHA256 3298e9cd396ef08266e9dd8397c349041ff93610df96f737b24233d78369df5e SHA512 ca249667d6e66fe7bd67b1755430dcb3808cd399bbac81d13b9ce5cb35a5f8c1ac705525b2aab098cfd208bfd52e41c096a266ef087d086deb28f01a0efe1d66 WHIRLPOOL 3b6884d2cef7e1074e65d792a7001e6b256ede146558d5bfe512358ec74b1b283d04daf308c8ae17f22636b4b6935d5182e89b78d4f4e44c6a90218f7becbf9b
+MISC ChangeLog-2015 10406 SHA256 526c3eff24ed9f2f0c19e644def228b125b9e4927c8f1112cdf1680c0fecab69 SHA512 3e7c21a4d2532f6099b7dc4471fb6d1980f3c91448f02798e799a7e82a8843e66c17b8199b79f0386fee5f177a743aef2924b94bd17cc03e31dd4fa323f5569b WHIRLPOOL 3b1dda403052008ea7e1ca1f3adf42667dc29dc5eef255c9389e71ad4892d8cb48d52463893cce0180eff1223316b4c21326594a86add9e7a79a2001e8488574
+MISC metadata.xml 775 SHA256 5b7fd3fabda186edc729f0e3b5eb5b27b5ca974f9e72be183888c49adcab39c0 SHA512 c1aaecd84a7fe73d798842ed1c117357809069f3f8c30a6920abf6641c46a5885e170dcecf7f2172d376b7f010e6dd07c47e233f15289c5de432550f1d05845e WHIRLPOOL fe76b6b6eb138e45c041bbb0037d755bed3d187efc8864f11d00ec28b2f8fc79e4edfc3124d6c62596d4a7742a4c6a511496441c35f1988fb8b138ec85511e98
diff --git a/net-analyzer/netperf/files/netperf-2.2-conf b/net-analyzer/netperf/files/netperf-2.2-conf
new file mode 100644
index 000000000000..f61f483a83ea
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-2.2-conf
@@ -0,0 +1,4 @@
+# Config file for /etc/init.d/netperf
+
+# Add your preferred netserver args here
+#NETSERVER_ARGS="-n 4"
diff --git a/net-analyzer/netperf/files/netperf-2.2-init b/net-analyzer/netperf/files/netperf-2.2-init
new file mode 100644
index 000000000000..cd2fb35cdd27
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-2.2-init
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+#
+# init.d script for net-analyzer/netperf's netserver
+#
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin 'Starting netperf server (netserver)'
+ start-stop-daemon --start --quiet --user nobody \
+ --exec /usr/sbin/netserver -- ${NETSERVER_ARGS} >/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin 'Stopping netperf server (netserver)'
+ start-stop-daemon --stop --quiet --exec /usr/sbin/netserver
+ eend $?
+}
diff --git a/net-analyzer/netperf/files/netperf-2.6.0-log-dir.patch b/net-analyzer/netperf/files/netperf-2.6.0-log-dir.patch
new file mode 100644
index 000000000000..00554cc0b5c2
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-2.6.0-log-dir.patch
@@ -0,0 +1,11 @@
+--- a/src/netserver.c
++++ b/src/netserver.c
+@@ -165,7 +165,7 @@
+ #elif defined(ANDROID)
+ #define DEBUG_LOG_FILE_DIR "/data/local/tmp/"
+ #else
+-#define DEBUG_LOG_FILE_DIR "/tmp/"
++#define DEBUG_LOG_FILE_DIR "/var/log/"
+ #endif
+ #endif /* DEBUG_LOG_FILE_DIR */
+
diff --git a/net-analyzer/netperf/files/netperf-2.7.0-includes.patch b/net-analyzer/netperf/files/netperf-2.7.0-includes.patch
new file mode 100644
index 000000000000..63c3cea40f4e
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-2.7.0-includes.patch
@@ -0,0 +1,22 @@
+--- a/src/net_uuid.c
++++ b/src/net_uuid.c
+@@ -28,6 +28,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <fcntl.h>
++#include <unistd.h> /* read(), close() */
+
+ #if defined(HAVE_INTTYPES_H)
+ #include <inttypes.h>
+--- a/src/netlib.c
++++ b/src/netlib.c
+@@ -81,6 +81,9 @@
+ #include <endian.h>
+ #endif
+
++#if defined(HAVE_SENDFILE)
++#include <sys/sendfile.h> /* sendfile() */
++#endif
+
+ #ifndef WIN32
+ /* at some point, I would like to get rid of all these "sys/"
diff --git a/net-analyzer/netperf/files/netperf-2.7.0-init b/net-analyzer/netperf/files/netperf-2.7.0-init
new file mode 100644
index 000000000000..3d1bb0c15973
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-2.7.0-init
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+#
+# init.d script for net-analyzer/netperf's netserver
+#
+
+depend() {
+ use net
+}
+
+start() {
+ checkpath -o netperf:netperf -d /var/log/netperf
+
+ ebegin 'Starting netperf server (netserver)'
+ start-stop-daemon --start --user netperf \
+ --exec /usr/sbin/netserver -- ${NETSERVER_ARGS}
+ eend $?
+}
+
+stop() {
+ ebegin 'Stopping netperf server (netserver)'
+ start-stop-daemon --stop --quiet --exec /usr/sbin/netserver
+ eend $?
+}
diff --git a/net-analyzer/netperf/files/netperf-2.7.0-inline.patch b/net-analyzer/netperf/files/netperf-2.7.0-inline.patch
new file mode 100644
index 000000000000..eb8c09b84695
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-2.7.0-inline.patch
@@ -0,0 +1,32 @@
+# Copyright Seblu 2015
+--- a/src/netlib.c 2015-08-04 20:30:43.449468815 +0200
++++ b/src/netlib.c 2015-08-04 20:31:40.317792002 +0200
+@@ -3997,11 +3997,7 @@
+ }
+ }
+
+-#ifdef WIN32
+-__forceinline void demo_interval_display(double actual_interval)
+-#else
+- inline void demo_interval_display(double actual_interval)
+-#endif
++void demo_interval_display(double actual_interval)
+ {
+ static int count = 0;
+ struct timeval now;
+@@ -4060,15 +4056,7 @@
+ important compilers have supported such a construct so it should
+ not be a big deal. raj 2012-01-23 */
+
+-#ifdef WIN32
+-/* It would seem that the Microsoft compiler will not inline across
+- source files. So there is little point in having an inline
+- directive in that situation. Of course that makes me wonder if an
+- inline directive has to appear in netlib.h... */
+ void demo_interval_tick(uint32_t units)
+-#else
+- inline void demo_interval_tick(uint32_t units)
+-#endif
+ {
+ double actual_interval = 0.0;
+
diff --git a/net-analyzer/netperf/files/netperf-2.7.0-space.patch b/net-analyzer/netperf/files/netperf-2.7.0-space.patch
new file mode 100644
index 000000000000..9ad43270b166
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-2.7.0-space.patch
@@ -0,0 +1,17 @@
+--- a/src/netserver.c
++++ b/src/netserver.c
+@@ -165,12 +165,12 @@
+ #elif defined(ANDROID)
+ #define DEBUG_LOG_FILE_DIR "/data/local/tmp/"
+ #else
+-#define DEBUG_LOG_FILE_DIR "/var/log/"
++#define DEBUG_LOG_FILE_DIR "/var/log/netperf/"
+ #endif
+ #endif /* DEBUG_LOG_FILE_DIR */
+
+ #ifndef DEBUG_LOG_FILE
+-#define DEBUG_LOG_FILE DEBUG_LOG_FILE_DIR"netserver.debug"
++#define DEBUG_LOG_FILE DEBUG_LOG_FILE_DIR "/netserver.debug"
+ #endif
+
+ #if !defined(PATH_MAX)
diff --git a/net-analyzer/netperf/files/netperf-fix-scripts.patch b/net-analyzer/netperf/files/netperf-fix-scripts.patch
new file mode 100644
index 000000000000..27e041fd7a32
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-fix-scripts.patch
@@ -0,0 +1,34 @@
+--- a/doc/examples/arr_script
++++ b/doc/examples/arr_script
+@@ -12,8 +12,7 @@
+ TOLERANCE=15
+ MAX_RETRIES=3
+
+- NETPERF="/usr/local/netperf/netperf"
+- NETPERF="./netperf"
++ NETPERF="/usr/bin/netperf"
+
+ NPROC_LIST=""
+ RR_SIZES=""
+--- a/doc/examples/packet_byte_script
++++ b/doc/examples/packet_byte_script
+@@ -25,7 +25,7 @@
+ fi
+
+ # where is netperf
+-NETPERF_DIR=${NETPERF_DIR:=/opt/netperf2/bin}
++NETPERF_DIR=${NETPERF_DIR:=/usr/bin}
+
+
+ # at what port will netserver be waiting? If you decide to run
+--- a/doc/examples/snapshot_script
++++ b/doc/examples/snapshot_script
+@@ -37,7 +37,7 @@
+ #
+ # where is netperf installed, there are a few possible places:
+
+-NETPERF_CMD=${NETPERF_CMD:=/opt/netperf/netperf}
++NETPERF_CMD=${NETPERF_CMD:=/usr/bin/netperf}
+
+
+ # there should be no more than two parms passed
diff --git a/net-analyzer/netperf/metadata.xml b/net-analyzer/netperf/metadata.xml
new file mode 100644
index 000000000000..8b0f12738e3f
--- /dev/null
+++ b/net-analyzer/netperf/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+<email>netmon@gentoo.org</email>
+<name>Gentoo network monitoring and analysis project</name>
+</maintainer>
+<longdescription lang="en">
+Netperf is a benchmark that can be used to measure the performance of many
+different types of networking. It provides tests for both unidirectional
+throughput, and end-to-end latency. The environments currently measureable by
+netperf include:
+
+ - TCP and UDP via BSD Sockets for both IPv4 and IPv6
+ - DLPI
+ - Unix Domain Sockets
+ - SCTP for both IPv4 and IPv6
+</longdescription>
+<use>
+<flag name="demo">Emit interim results during the run. May affect results</flag>
+</use>
+</pkgmetadata>
diff --git a/net-analyzer/netperf/netperf-2.6.0-r1.ebuild b/net-analyzer/netperf/netperf-2.6.0-r1.ebuild
new file mode 100644
index 000000000000..869d878465b5
--- /dev/null
+++ b/net-analyzer/netperf/netperf-2.6.0-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils flag-o-matic
+
+DESCRIPTION="Network performance benchmark including tests for TCP, UDP, sockets, ATM and more"
+SRC_URI="ftp://ftp.netperf.org/${PN}/${P}.tar.bz2"
+KEYWORDS="alpha amd64 arm64 hppa ia64 ppc ppc64 sparc x86"
+
+HOMEPAGE="http://www.netperf.org/"
+LICENSE="netperf"
+SLOT="0"
+IUSE="demo sctp"
+
+DEPEND=">=sys-apps/sed-4"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-fix-scripts.patch \
+ "${FILESDIR}"/${P}-log-dir.patch
+
+ # Fixing paths in scripts
+ sed -i \
+ -e 's:^\(NETHOME=\).*:\1"/usr/bin":' \
+ doc/examples/sctp_stream_script \
+ doc/examples/tcp_range_script \
+ doc/examples/tcp_rr_script \
+ doc/examples/tcp_stream_script \
+ doc/examples/udp_rr_script \
+ doc/examples/udp_stream_script \
+ || die
+
+ # netlib.c:2292:5: warning: implicit declaration of function ‘sched_setaffinity’
+ # nettest_omni.c:2943:5: warning: implicit declaration of function ‘splice’
+ append-cppflags -D_GNU_SOURCE
+}
+
+src_configure() {
+ econf \
+ $(use_enable demo) \
+ $(use_enable sctp)
+}
+
+src_install () {
+ default
+
+ # move netserver into sbin as we had it before 2.4 was released with its
+ # autoconf goodness
+ dodir /usr/sbin
+ mv "${D}"/usr/{bin,sbin}/netserver || die
+
+ # init.d / conf.d
+ newinitd "${FILESDIR}"/${PN}-2.2-init netperf
+ newconfd "${FILESDIR}"/${PN}-2.2-conf netperf
+
+ # documentation and example scripts
+ dodoc AUTHORS ChangeLog NEWS README Release_Notes
+ dodir /usr/share/doc/${PF}/examples
+ #Scripts no longer get installed by einstall
+ cp doc/examples/*_script "${D}"/usr/share/doc/${PF}/examples || die
+}
diff --git a/net-analyzer/netperf/netperf-2.7.0-r1.ebuild b/net-analyzer/netperf/netperf-2.7.0-r1.ebuild
new file mode 100644
index 000000000000..f1fa2ad05ae9
--- /dev/null
+++ b/net-analyzer/netperf/netperf-2.7.0-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic user
+
+DESCRIPTION="Network performance benchmark"
+SRC_URI="ftp://ftp.netperf.org/${PN}/${P}.tar.bz2"
+KEYWORDS="alpha amd64 ~arm64 hppa ia64 ppc ppc64 sparc x86"
+
+HOMEPAGE="http://www.netperf.org/"
+LICENSE="netperf"
+SLOT="0"
+IUSE="demo sctp"
+
+DEPEND=">=sys-apps/sed-4"
+
+pkg_setup() {
+ enewuser netperf
+ enewgroup netperf
+}
+
+src_prepare() {
+ eapply \
+ "${FILESDIR}"/${PN}-fix-scripts.patch \
+ "${FILESDIR}"/${PN}-2.6.0-log-dir.patch \
+ "${FILESDIR}"/${PN}-2.7.0-includes.patch \
+ "${FILESDIR}"/${PN}-2.7.0-space.patch
+
+ # Fixing paths in scripts
+ sed -i \
+ -e 's:^\(NETHOME=\).*:\1"/usr/bin":' \
+ doc/examples/sctp_stream_script \
+ doc/examples/tcp_range_script \
+ doc/examples/tcp_rr_script \
+ doc/examples/tcp_stream_script \
+ doc/examples/udp_rr_script \
+ doc/examples/udp_stream_script \
+ || die
+
+ # netlib.c:2292:5: warning: implicit declaration of function ‘sched_setaffinity’
+ # nettest_omni.c:2943:5: warning: implicit declaration of function ‘splice’
+ append-cppflags -D_GNU_SOURCE
+
+ eapply_user
+}
+
+src_configure() {
+ econf \
+ $(use_enable demo) \
+ $(use_enable sctp)
+}
+
+src_install () {
+ default
+
+ # move netserver into sbin as we had it before 2.4 was released with its
+ # autoconf goodness
+ dodir /usr/sbin
+ mv "${D}"/usr/{bin,sbin}/netserver || die
+
+ # init.d / conf.d
+ newinitd "${FILESDIR}"/${PN}-2.7.0-init netperf
+ newconfd "${FILESDIR}"/${PN}-2.2-conf netperf
+
+ keepdir /var/log/${PN}
+ fowners netperf:netperf /var/log/${PN}
+ fperms 0755 /var/log/${PN}
+
+ # documentation and example scripts
+ dodoc AUTHORS ChangeLog NEWS README Release_Notes
+ dodir /usr/share/doc/${PF}/examples
+ #Scripts no longer get installed by einstall
+ cp doc/examples/*_script "${D}"/usr/share/doc/${PF}/examples || die
+}
diff --git a/net-analyzer/netperf/netperf-2.7.0-r2.ebuild b/net-analyzer/netperf/netperf-2.7.0-r2.ebuild
new file mode 100644
index 000000000000..c27563056689
--- /dev/null
+++ b/net-analyzer/netperf/netperf-2.7.0-r2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic user
+
+DESCRIPTION="Network performance benchmark"
+SRC_URI="ftp://ftp.netperf.org/${PN}/${P}.tar.bz2"
+KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+HOMEPAGE="http://www.netperf.org/"
+LICENSE="netperf"
+SLOT="0"
+IUSE="demo sctp"
+
+DEPEND=">=sys-apps/sed-4"
+
+pkg_setup() {
+ enewuser netperf
+ enewgroup netperf
+}
+
+src_prepare() {
+ eapply \
+ "${FILESDIR}"/${PN}-fix-scripts.patch \
+ "${FILESDIR}"/${PN}-2.6.0-log-dir.patch \
+ "${FILESDIR}"/${PN}-2.7.0-includes.patch \
+ "${FILESDIR}"/${PN}-2.7.0-space.patch \
+ "${FILESDIR}"/${PN}-2.7.0-inline.patch
+
+ # Fixing paths in scripts
+ sed -i \
+ -e 's:^\(NETHOME=\).*:\1"/usr/bin":' \
+ doc/examples/sctp_stream_script \
+ doc/examples/tcp_range_script \
+ doc/examples/tcp_rr_script \
+ doc/examples/tcp_stream_script \
+ doc/examples/udp_rr_script \
+ doc/examples/udp_stream_script \
+ || die
+
+ # netlib.c:2292:5: warning: implicit declaration of function ‘sched_setaffinity’
+ # nettest_omni.c:2943:5: warning: implicit declaration of function ‘splice’
+ append-cppflags -D_GNU_SOURCE
+
+ eapply_user
+}
+
+src_configure() {
+ econf \
+ $(use_enable demo) \
+ $(use_enable sctp)
+}
+
+src_install () {
+ default
+
+ # move netserver into sbin as we had it before 2.4 was released with its
+ # autoconf goodness
+ dodir /usr/sbin
+ mv "${D}"/usr/{bin,sbin}/netserver || die
+
+ # init.d / conf.d
+ newinitd "${FILESDIR}"/${PN}-2.7.0-init netperf
+ newconfd "${FILESDIR}"/${PN}-2.2-conf netperf
+
+ keepdir /var/log/${PN}
+ fowners netperf:netperf /var/log/${PN}
+ fperms 0755 /var/log/${PN}
+
+ # documentation and example scripts
+ dodoc AUTHORS ChangeLog NEWS README Release_Notes
+ dodir /usr/share/doc/${PF}/examples
+ #Scripts no longer get installed by einstall
+ cp doc/examples/*_script "${D}"/usr/share/doc/${PF}/examples || die
+}
diff --git a/net-analyzer/netperf/netperf-2.7.0.ebuild b/net-analyzer/netperf/netperf-2.7.0.ebuild
new file mode 100644
index 000000000000..7c1622c9fe97
--- /dev/null
+++ b/net-analyzer/netperf/netperf-2.7.0.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils flag-o-matic
+
+DESCRIPTION="Network performance benchmark including tests for TCP, UDP, sockets, ATM and more"
+SRC_URI="ftp://ftp.netperf.org/${PN}/${P}.tar.bz2"
+KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+HOMEPAGE="http://www.netperf.org/"
+LICENSE="netperf"
+SLOT="0"
+IUSE="demo sctp"
+
+DEPEND=">=sys-apps/sed-4"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-fix-scripts.patch \
+ "${FILESDIR}"/${PN}-2.6.0-log-dir.patch \
+ "${FILESDIR}"/${PN}-2.7.0-includes.patch
+
+ # Fixing paths in scripts
+ sed -i \
+ -e 's:^\(NETHOME=\).*:\1"/usr/bin":' \
+ doc/examples/sctp_stream_script \
+ doc/examples/tcp_range_script \
+ doc/examples/tcp_rr_script \
+ doc/examples/tcp_stream_script \
+ doc/examples/udp_rr_script \
+ doc/examples/udp_stream_script \
+ || die
+
+ # netlib.c:2292:5: warning: implicit declaration of function ‘sched_setaffinity’
+ # nettest_omni.c:2943:5: warning: implicit declaration of function ‘splice’
+ append-cppflags -D_GNU_SOURCE
+}
+
+src_configure() {
+ econf \
+ $(use_enable demo) \
+ $(use_enable sctp)
+}
+
+src_install () {
+ default
+
+ # move netserver into sbin as we had it before 2.4 was released with its
+ # autoconf goodness
+ dodir /usr/sbin
+ mv "${D}"/usr/{bin,sbin}/netserver || die
+
+ # init.d / conf.d
+ newinitd "${FILESDIR}"/${PN}-2.2-init netperf
+ newconfd "${FILESDIR}"/${PN}-2.2-conf netperf
+
+ # documentation and example scripts
+ dodoc AUTHORS ChangeLog NEWS README Release_Notes
+ dodir /usr/share/doc/${PF}/examples
+ #Scripts no longer get installed by einstall
+ cp doc/examples/*_script "${D}"/usr/share/doc/${PF}/examples || die
+}