summaryrefslogtreecommitdiff
path: root/net-analyzer/netperf/netperf-2.7.0_p20210121.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-08 00:08:11 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-08 00:08:11 +0100
commitadc09cc4e6ebf7931735c02c0c272b4b885c2b30 (patch)
treed1e752b60c2ed90ae9e427cbe2b07061e3879191 /net-analyzer/netperf/netperf-2.7.0_p20210121.ebuild
parent941687623283212199cbe6e36f7d61b89d6222b2 (diff)
gentoo auto-resync : 08:06:2024 - 00:08:11
Diffstat (limited to 'net-analyzer/netperf/netperf-2.7.0_p20210121.ebuild')
-rw-r--r--net-analyzer/netperf/netperf-2.7.0_p20210121.ebuild79
1 files changed, 79 insertions, 0 deletions
diff --git a/net-analyzer/netperf/netperf-2.7.0_p20210121.ebuild b/net-analyzer/netperf/netperf-2.7.0_p20210121.ebuild
new file mode 100644
index 000000000000..26f455ffdac0
--- /dev/null
+++ b/net-analyzer/netperf/netperf-2.7.0_p20210121.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic
+
+COMMIT="3bc455b23f901dae377ca0a558e1e32aa56b31c4"
+DESCRIPTION="Network performance benchmark"
+HOMEPAGE="https://github.com/HewlettPackard/netperf"
+SRC_URI="https://github.com/HewlettPackard/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="demo sctp"
+
+RDEPEND="
+ acct-group/netperf
+ acct-user/netperf
+"
+BDEPEND="
+ ${RDEPEND}
+ sys-devel/gnuconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-fix-scripts.patch
+ "${FILESDIR}"/${PN}-log-dir.patch
+ "${FILESDIR}"/${PN}-2.7.0-includes.patch
+ "${FILESDIR}"/${PN}-2.7.0-fcommon.patch
+)
+
+src_prepare() {
+ # Fixing paths in scripts
+ sed -i \
+ -e "s:^\(NETHOME=\).*:\1\"${EPREFIX}/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
+
+ default
+ AT_M4DIR=src/missing/m4 eautoreconf
+}
+
+src_configure() {
+ # netlib.c:2292:5: warning: implicit declaration of function ‘sched_setaffinity’
+ # nettest_omni.c:2943:5: warning: implicit declaration of function ‘splice’
+ # TODO: drop once https://github.com/HewlettPackard/netperf/pull/73 merged
+ append-cppflags -D_GNU_SOURCE
+
+ econf \
+ $(use_enable demo) \
+ $(use_enable sctp)
+}
+
+src_install() {
+ default
+
+ # 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 doc/${PN}.txt
+ docinto html
+ dodoc doc/${PN}.html
+ exeinto /usr/share/${PN}/examples
+ doexe doc/examples/*_script
+}