gentoo/net-analyzer/netperf/netperf-2.7.0_p20210121.ebuild
Arthur Zamarin ad4f6c00fb
*/*: convert to ASCII various comments
While not required, it is a good idea to convert comments to ASCII
to avoid issues with some tools that may not handle Unicode properly.
This commit converts various comments in the ebuilds to ASCII where
it makes sense.

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2025-05-19 19:56:12 +03:00

80 lines
1.9 KiB
Bash

# 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 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
}