1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools fcaps perl-module
8 DESCRIPTION="Protocol independent ANSI-C ping library and command line utility"
9 HOMEPAGE="https://noping.cc/"
10 SRC_URI="https://noping.cc/files/${P}.tar.bz2"
12 LICENSE="LGPL-2.1 GPL-2"
14 KEYWORDS="alpha amd64 arm x86"
15 IUSE="+filecaps ncurses perl"
17 DEPEND="ncurses? ( sys-libs/ncurses:0= )"
21 "${FILESDIR}"/${PN}-1.10.0-no-werror.patch
22 "${FILESDIR}/${PN}-1.6.2-nouidmagic.patch"
23 "${FILESDIR}"/${P}-gcc8-fix.patch
24 "${FILESDIR}"/${P}-do-not-quit-when-ping_send-fail.patch
25 "${FILESDIR}"/${P}-report-right-error-msg-when-select-fails.patch
36 $(use_with perl perl-bindings INSTALLDIRS=vendor) \
42 pushd bindings/perl >/dev/null || die
44 popd >/dev/null || die
51 find "${ED}"usr/lib* -name '*.la' -o -name '*.a' -delete || die
56 local _caps_str="CAP_NET_RAW"
57 _files=( "${EROOT%/}/usr/bin/oping")
60 _files+=( "${EROOT%/}/usr/bin/noping")
63 fcaps "${_caps_str}" "${_files[@]}"
65 elog "Capabilities for"
69 for _file in "${_files[@]}"; do
74 elog "set to ${_caps_str}+EP due to set 'filecaps' USE flag."