diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-20 14:27:17 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-20 14:27:17 +0000 |
commit | 5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (patch) | |
tree | 66e860a5099bcad013f1cf667255dc372a7c11b3 /net-analyzer/netselect/netselect-0.4-r2.ebuild | |
parent | 7218e1b46bceac05841e90472501742d905fb3fc (diff) |
gentoo resync : 20.03.2021
Diffstat (limited to 'net-analyzer/netselect/netselect-0.4-r2.ebuild')
-rw-r--r-- | net-analyzer/netselect/netselect-0.4-r2.ebuild | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/net-analyzer/netselect/netselect-0.4-r2.ebuild b/net-analyzer/netselect/netselect-0.4-r2.ebuild new file mode 100644 index 000000000000..c0eb61494801 --- /dev/null +++ b/net-analyzer/netselect/netselect-0.4-r2.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit fcaps toolchain-funcs + +DESCRIPTION="Ultrafast implementation of ping" +HOMEPAGE="http://apenwarr.ca/netselect/" +SRC_URI=" + https://github.com/apenwarr/${PN}/archive/${P}.tar.gz + ipv6? ( https://dev.gentoo.org/~jer/${P}-ipv6.patch.xz ) +" +S="${WORKDIR}/${PN}-${P}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="ipv6" + +PATCHES=( + "${FILESDIR}"/${PN}-0.4-bsd.patch + "${FILESDIR}"/${PN}-0.4-flags.patch +) + +DOCS=( HISTORY README ) + +FILECAPS=( -g wheel cap_net_raw usr/bin/netselect ) + +src_prepare() { + use ipv6 && eapply "${WORKDIR}"/${PN}-0.4-ipv6.patch + + default + + # Don't warn about "root privileges required" when running as + # an unprivileged user with filecaps + if ! use prefix && use filecaps; then + sed -i -e '/if (geteuid () != 0)/,+2d' "${S}"/netselect.c || die + fi +} + +src_compile() { + emake CC="$(tc-getCC)" LDFLAGS="${CFLAGS} ${LDFLAGS}" +} + +src_install() { + dobin netselect + + einstalldocs + + doman netselect.1 +} + +pkg_postinst() { + ! use prefix && fcaps_pkg_postinst +} |