net-analyzer/mtr: add 0.96

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-07-12 07:18:19 +01:00
parent 34b330d6b0
commit ed1b1bd787
4 changed files with 100 additions and 12 deletions

View File

@@ -1 +1,2 @@
DIST mtr-0.95.tar.gz 144541 BLAKE2B 3c972675b97945b96562802c5d0f10de963160682c93c0ea2991b72eca33d136d18948c5e746ca3dfb280ebc9c3ab154e7774f8409ed4e5f7470a8feb128e71b SHA512 a7d69e0c551a10ae80a650a34588119e6c6b124a8c2c93d3de29e5daa6ef99f9217d875529d443c3760cd6fd7bd04d1e9abe33ef12635826c66a98bd776c1690
DIST mtr-0.96.tar.gz 158043 BLAKE2B c7dff18b6f6e48a648783d719a6cedd14b141fe2013b75031f3ee830e8c4fb9c93639259c860047c8108c21519df30740f7515256ed08552f7697a42e938257b SHA512 893c5f4623ba437bca309633ce1911c900e33a51252fce5f68ea8e74885302f744198e5616ba0155b4e09fb34eedba7e41ac4507403dc9d657e295ccf66c7d31

View File

@@ -0,0 +1,14 @@
https://github.com/traviscross/mtr/pull/368
--- a/configure.ac
+++ b/configure.ac
@@ -136,7 +136,10 @@ AS_IF([test "x$with_ncurses" = "xyes"],
# (On Solaris 11.3, ncurses builds and links for us, but curses does not.)
[AC_SEARCH_LIBS(
[initscr], [ncursesw ncurses curses],
+ [AC_SEARCH_LIBS(
+ [raw], [ncurses curses cursesX tinfo],
[AC_DEFINE([HAVE_CURSES], [1], [Define if a curses library available])],
+ [with_ncurses=no])],
[with_ncurses=no])
])
AM_CONDITIONAL([WITH_CURSES], [test "x$with_ncurses" = xyes])

View File

@@ -0,0 +1,70 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
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 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="gui +ipinfo +ipv6 jansson ncurses"
# Tests timeout even w/o sandbox
RESTRICT="test"
RDEPEND="
gui? (
dev-libs/glib:2
x11-libs/gtk+:3
)
jansson? ( dev-libs/jansson:= )
ncurses? ( sys-libs/ncurses:= )
"
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.96-tinfo.patch
)
src_prepare() {
default
eautoreconf
}
src_configure() {
local myeconfargs=(
$(use_enable ipv6)
$(use_with gui gtk)
$(use_with ipinfo)
$(use_with jansson)
$(use_with ncurses)
--with-bashcompletiondir="$(get_bashcompdir)"
)
econf "${myeconfargs[@]}"
}
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
}

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -13,17 +13,17 @@ if [[ ${PV} == *9999* ]] ; then
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 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~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!
IUSE="gui +ipinfo +ipv6 jansson ncurses"
# Tests timeout even w/o sandbox
RESTRICT="test"
RDEPEND="
gtk? (
gui? (
dev-libs/glib:2
x11-libs/gtk+:3
)
@@ -37,7 +37,7 @@ 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.96-tinfo.patch
)
src_prepare() {
@@ -47,13 +47,16 @@ src_prepare() {
}
src_configure() {
econf \
$(use_enable ipv6) \
$(use_with gtk) \
$(use_with ipinfo) \
$(use_with jansson) \
$(use_with ncurses) \
local myeconfargs=(
$(use_enable ipv6)
$(use_with gui gtk)
$(use_with ipinfo)
$(use_with jansson)
$(use_with ncurses)
--with-bashcompletiondir="$(get_bashcompdir)"
)
econf "${myeconfargs[@]}"
}
pkg_postinst() {