From 0f558761aa2dee1017b4751e4017205e015a9560 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 29 Jun 2022 12:04:12 +0100 Subject: gentoo resync : 29.12.2022 --- net-libs/liboping/liboping-1.10.0-r3.ebuild | 82 +++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 net-libs/liboping/liboping-1.10.0-r3.ebuild (limited to 'net-libs/liboping/liboping-1.10.0-r3.ebuild') diff --git a/net-libs/liboping/liboping-1.10.0-r3.ebuild b/net-libs/liboping/liboping-1.10.0-r3.ebuild new file mode 100644 index 000000000000..80266390c95f --- /dev/null +++ b/net-libs/liboping/liboping-1.10.0-r3.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools fcaps perl-module + +DESCRIPTION="Protocol independent ANSI-C ping library and command line utility" +HOMEPAGE=" + https://noping.cc/ + https://github.com/octo/liboping +" +SRC_URI="https://noping.cc/files/${P}.tar.bz2" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0/0.3" +KEYWORDS="~alpha amd64 arm ~arm64 x86" +IUSE="+filecaps ncurses perl" + +DEPEND="ncurses? ( sys-libs/ncurses:0= )" +RDEPEND="${DEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${PN}-1.10.0-no-werror.patch" + "${FILESDIR}/${PN}-1.6.2-nouidmagic.patch" + "${FILESDIR}/${PN}-1.10.0-gcc8-fix.patch" + "${FILESDIR}/${PN}-1.10.0-do-not-quit-when-ping_send-fail.patch" + "${FILESDIR}/${PN}-1.10.0-report-right-error-msg-when-select-fails.patch" +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + myeconfargs=( + $(use_with ncurses) + $(use_with perl perl-bindings INSTALLDIRS=vendor) + ) + + econf "${myeconfargs[@]}" +} + +src_test() { + if use perl; then + pushd bindings/perl || die + perl-module_src_test + popd || die + fi +} + +src_install() { + default + find "${ED}" -type f -name '*.la' -delete || die +} + +pkg_postinst() { + if use filecaps; then + local _caps_str="CAP_NET_RAW" + _files=( "${EROOT}/usr/bin/oping") + + if use ncurses; then + _files+=( "${EROOT}/usr/bin/noping") + fi + + fcaps "${_caps_str}" "${_files[@]}" + + elog "Capabilities for" + elog "" + + local _file= + for _file in "${_files[@]}"; do + elog " ${_file}" + done + + elog "" + elog "set to ${_caps_str}+EP due to set 'filecaps' USE flag." + elog + fi +} -- cgit v1.2.3