public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/pinger/, net-analyzer/pinger/files/
@ 2021-12-29  7:10 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2021-12-29  7:10 UTC (permalink / raw
  To: gentoo-commits

commit:     32774675d8734f64e79a98a0e272141a8872fa13
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 29 07:09:48 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 29 07:10:42 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32774675

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 <AT> gentoo.org>

 .../pinger/files/pinger-0.33-musl-int-types.patch  | 55 ++++++++++++++++++++++
 .../{pinger-0.33.ebuild => pinger-0.33-r1.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
similarity index 71%
rename from net-analyzer/pinger/pinger-0.33.ebuild
rename to 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
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/pinger/, net-analyzer/pinger/files/
@ 2022-10-06  0:34 Ionen Wolkens
  0 siblings, 0 replies; 2+ messages in thread
From: Ionen Wolkens @ 2022-10-06  0:34 UTC (permalink / raw
  To: gentoo-commits

commit:     6794a88c44a772e273d081b4b5d6212aaef81d1e
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  5 23:50:50 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Oct  6 00:33:31 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6794a88c

net-analyzer/pinger: fix build with upcoming clang16

Closes: https://bugs.gentoo.org/870871
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 net-analyzer/pinger/files/pinger-0.33-clang16.patch | 8 ++++++++
 net-analyzer/pinger/pinger-0.33-r1.ebuild           | 3 ++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/net-analyzer/pinger/files/pinger-0.33-clang16.patch b/net-analyzer/pinger/files/pinger-0.33-clang16.patch
new file mode 100644
index 000000000000..1a6fe6cf03da
--- /dev/null
+++ b/net-analyzer/pinger/files/pinger-0.33-clang16.patch
@@ -0,0 +1,8 @@
+https://bugs.gentoo.org/870871
+--- a/src/interface_ncurses.c
++++ b/src/interface_ncurses.c
+@@ -41,3 +41,3 @@
+  * characters */
+-static nr_print_ull(char *c, int max_chars, unsigned long long l)
++static int nr_print_ull(char *c, int max_chars, unsigned long long l)
+ {

diff --git a/net-analyzer/pinger/pinger-0.33-r1.ebuild b/net-analyzer/pinger/pinger-0.33-r1.ebuild
index 32bfd97f82a2..38ed420ff7df 100644
--- a/net-analyzer/pinger/pinger-0.33-r1.ebuild
+++ b/net-analyzer/pinger/pinger-0.33-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -35,6 +35,7 @@ DOCS=( AUTHORS BUGS ChangeLog NEWS README )
 PATCHES=(
 	"${FILESDIR}"/${P}-gentoo.patch
 	"${FILESDIR}"/${P}-musl-int-types.patch
+	"${FILESDIR}"/${P}-clang16.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-06  0:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-06  0:34 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/pinger/, net-analyzer/pinger/files/ Ionen Wolkens
  -- strict thread matches above, loose matches on Subject: below --
2021-12-29  7:10 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox