diff options
author | Sam James <sam@gentoo.org> | 2021-12-29 07:09:48 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-12-29 07:10:42 +0000 |
commit | 32774675d8734f64e79a98a0e272141a8872fa13 (patch) | |
tree | 22a9399148e2b29c8f0cb65ce63b260d3deaa829 /net-analyzer/pinger | |
parent | media-sound/orpheus: update EAPI 6 -> 7, fix build on musl (diff) | |
download | gentoo-32774675d8734f64e79a98a0e272141a8872fa13.tar.gz gentoo-32774675d8734f64e79a98a0e272141a8872fa13.tar.bz2 gentoo-32774675d8734f64e79a98a0e272141a8872fa13.zip |
net-analyzer/pinger: EAPI 5 -> 8, musl build fix
Also revbumps for ncurses := dep.
Closes: https://bugs.gentoo.org/712746
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-analyzer/pinger')
-rw-r--r-- | net-analyzer/pinger/files/pinger-0.33-musl-int-types.patch | 55 | ||||
-rw-r--r-- | net-analyzer/pinger/pinger-0.33-r1.ebuild (renamed from net-analyzer/pinger/pinger-0.33.ebuild) | 34 |
2 files changed, 71 insertions, 18 deletions
diff --git a/net-analyzer/pinger/files/pinger-0.33-musl-int-types.patch b/net-analyzer/pinger/files/pinger-0.33-musl-int-types.patch new file mode 100644 index 000000000000..c8cb99af3251 --- /dev/null +++ b/net-analyzer/pinger/files/pinger-0.33-musl-int-types.patch @@ -0,0 +1,55 @@ +https://bugs.gentoo.org/712746 +--- a/src/globals.h ++++ b/src/globals.h +@@ -93,8 +93,8 @@ typedef struct host_data_t + struct timeval lastok_tv; /* timestamp of last ok echo */ + int status; /* status of host, online, without reply, ... */ + double delay; /* ping latency in miliseconds */ +- u_int last_seq_sent; /* sequence nr. of last packet sent */ +- u_int last_seq_recv; /* sequence nr. of last packet received */ ++ uint last_seq_sent; /* sequence nr. of last packet sent */ ++ uint last_seq_recv; /* sequence nr. of last packet received */ + unsigned long long nr_sent; /* number of send and received */ + unsigned long long nr_recv; + int ok_delay; /* time in ms, after we send next echo when OK (sucessfuly ping - ECHO REPLY) */ +--- a/src/ping.c ++++ b/src/ping.c +@@ -35,10 +35,10 @@ + #endif + + /* Compute checksum for ICMP output buffer */ +-static u_short cksum(u_short * buf, u_int len) ++static unsigned short cksum(unsigned short * buf, unsigned int len) + { +- u_int sum = 0; +- u_short retval; ++ unsigned int sum = 0; ++ unsigned short retval; + + /* 32 bit sum adds sequential 16 bit buffer parts */ + while (len > 1) { +@@ -51,12 +51,12 @@ static u_short cksum(u_short * buf, u_int len) + + union + { +- u_short word; +- u_char byte; ++ unsigned short word; ++ unsigned char byte; + } odd; + + odd.word = 0; +- odd.byte = *(u_char *) buf; ++ odd.byte = *(unsigned char *) buf; + sum += odd.word; + } + +@@ -189,7 +189,7 @@ int send_icmp_echo(host_data * host, hosts_data * hosts) + ich->checksum = 0; + ich->un.echo.sequence = ++host->last_seq_sent; + ich->un.echo.id = getpid() & 0xFFFF; +- ich->checksum = cksum((u_short *) outpacket, outpacket_len); ++ ich->checksum = cksum((unsigned short *) outpacket, outpacket_len); + + if ((sendto + (host->rawfd, outpacket, outpacket_len, 0, (struct sockaddr *) &to, diff --git a/net-analyzer/pinger/pinger-0.33.ebuild b/net-analyzer/pinger/pinger-0.33-r1.ebuild index 4c401876eb65..32bfd97f82a2 100644 --- a/net-analyzer/pinger/pinger-0.33.ebuild +++ b/net-analyzer/pinger/pinger-0.33-r1.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=8 -inherit autotools epatch flag-o-matic +inherit autotools flag-o-matic DESCRIPTION="Cyclic multi ping utility for selected adresses using GTK/ncurses" HOMEPAGE="http://aa.vslib.cz/silk/projekty/pinger/" @@ -14,15 +14,11 @@ SLOT="0" KEYWORDS="amd64 ~ppc x86" IUSE="gtk2 gtk3 ncurses nls" -REQUIRED_USE=" - || ( gtk2 gtk3 ncurses ) - ?? ( gtk2 gtk3 ) -" -GTK_DEPEND=" - dev-libs/glib:2 -" -RDEPEND=" - gtk2? ( +REQUIRED_USE="|| ( gtk2 gtk3 ncurses ) + ?? ( gtk2 gtk3 )" + +GTK_DEPEND="dev-libs/glib:2" +RDEPEND="gtk2? ( ${GTK_DEPEND} >=x11-libs/gtk+-2.4:2 ) @@ -30,17 +26,19 @@ RDEPEND=" ${GTK_DEPEND} >=x11-libs/gtk+-3.12:3 ) - ncurses? ( sys-libs/ncurses ) -" -DEPEND=" - ${RDEPEND} - virtual/pkgconfig -" + ncurses? ( sys-libs/ncurses:= )" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" DOCS=( AUTHORS BUGS ChangeLog NEWS README ) +PATCHES=( + "${FILESDIR}"/${P}-gentoo.patch + "${FILESDIR}"/${P}-musl-int-types.patch +) + src_prepare() { - epatch "${FILESDIR}"/${P}-gentoo.patch + default sed -i -e '/Root privileges/d' src/Makefile.am || die |