From 1d6a6dbdcbff848d998b949bcf6cc5b2133260e3 Mon Sep 17 00:00:00 2001 From: Alarig Le Lay Date: Tue, 22 Feb 2022 23:13:07 +0100 Subject: [PATCH] net-analyzer/mtr: mtr 0.95 is still unable to bind an ip Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Alarig Le Lay --- net-analyzer/mtr/Manifest | 1 + net-analyzer/mtr/mtr-0.94-r1.ebuild | 4 +- net-analyzer/mtr/mtr-0.95.ebuild | 68 +++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 net-analyzer/mtr/mtr-0.95.ebuild diff --git a/net-analyzer/mtr/Manifest b/net-analyzer/mtr/Manifest index 69472ac..c365712 100644 --- a/net-analyzer/mtr/Manifest +++ b/net-analyzer/mtr/Manifest @@ -1 +1,2 @@ DIST mtr-0.94.tar.gz 143616 BLAKE2B e9b4619a85a515d729f0987d5882fb91e4bfa3be82476efbfdb832d0b13ed334be1c1a1bcf8ab4ca820002e79ca4a24d0b50f2739d9284b7dec0b8852a1a91e0 SHA512 0e58bd79562ff80f9308135562ab22aa1f1eea686aefd3aef07bac05e661e34b60fde7c66c96bf4f0919f546376fbd6106ecd8fa92328c24f6f903097496bf11 +DIST mtr-0.95.tar.gz 144541 BLAKE2B 3c972675b97945b96562802c5d0f10de963160682c93c0ea2991b72eca33d136d18948c5e746ca3dfb280ebc9c3ab154e7774f8409ed4e5f7470a8feb128e71b SHA512 a7d69e0c551a10ae80a650a34588119e6c6b124a8c2c93d3de29e5daa6ef99f9217d875529d443c3760cd6fd7bd04d1e9abe33ef12635826c66a98bd776c1690 diff --git a/net-analyzer/mtr/mtr-0.94-r1.ebuild b/net-analyzer/mtr/mtr-0.94-r1.ebuild index 6463669..6f517ea 100644 --- a/net-analyzer/mtr/mtr-0.94-r1.ebuild +++ b/net-analyzer/mtr/mtr-0.94-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -10,7 +10,7 @@ SRC_URI="https://github.com/traviscross/${PN}/archive/v${PV}.tar.gz -> ${P}.tar. LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" IUSE="gtk +ipinfo +ipv6 jansson ncurses" RDEPEND=" diff --git a/net-analyzer/mtr/mtr-0.95.ebuild b/net-analyzer/mtr/mtr-0.95.ebuild new file mode 100644 index 0000000..c70dfe0 --- /dev/null +++ b/net-analyzer/mtr/mtr-0.95.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools bash-completion-r1 fcaps + +DESCRIPTION="My TraceRoute, an Excellent network diagnostic tool" +HOMEPAGE="https://www.bitwizard.nl/mtr/" + +if [[ ${PV} == *9999* ]] ; then + EGIT_REPO_URI="https://github.com/traviscross/mtr" + inherit git-r3 +else + SRC_URI="https://github.com/traviscross/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="gtk +ipinfo +ipv6 jansson ncurses" +# TODO: This is an inherited RESTRICT - figure out why! +RESTRICT="test" + +RDEPEND=" + gtk? ( + dev-libs/glib:2 + x11-libs/gtk+:3 + ) + jansson? ( dev-libs/jansson:= ) + ncurses? ( sys-libs/ncurses:0= ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +DOCS=( AUTHORS FORMATS NEWS README.md SECURITY TODO ) +FILECAPS=( cap_net_raw usr/sbin/mtr-packet ) + +PATCHES=( + "${FILESDIR}"/${PN}-0.88-tinfo.patch + "${FILESDIR}"/${PN}-0.94-ipv4-sockets.patch +) + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable ipv6) \ + $(use_with gtk) \ + $(use_with ipinfo) \ + $(use_with jansson) \ + $(use_with ncurses) \ + --with-bashcompletiondir="$(get_bashcompdir)" +} + +pkg_postinst() { + fcaps_pkg_postinst + + if use prefix && [[ ${CHOST} == *-darwin* ]] ; then + ewarn "mtr needs root privileges to run. To grant them:" + ewarn " % sudo chown root ${EPREFIX}/usr/sbin/mtr" + ewarn " % sudo chmod u+s ${EPREFIX}/usr/sbin/mtr" + fi +}