summaryrefslogtreecommitdiff
path: root/net-analyzer/pinger
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/pinger')
-rw-r--r--net-analyzer/pinger/Manifest3
-rw-r--r--net-analyzer/pinger/files/pinger-0.33-musl-int-types.patch158
-rw-r--r--net-analyzer/pinger/pinger-0.33-r1.ebuild (renamed from net-analyzer/pinger/pinger-0.33.ebuild)34
3 files changed, 176 insertions, 19 deletions
diff --git a/net-analyzer/pinger/Manifest b/net-analyzer/pinger/Manifest
index 775e9611727b..638f7e8a3014 100644
--- a/net-analyzer/pinger/Manifest
+++ b/net-analyzer/pinger/Manifest
@@ -1,4 +1,5 @@
AUX pinger-0.33-gentoo.patch 2488 BLAKE2B a94bf31ad31089f5a8686cc316437984c570677ce60cff01a4ce517f1557256cdc3c440049c68aebd642c4d92d76b29cd56ef18da1d9161e06dac20504ce4207 SHA512 7ebda41ab5caf068476e82f181893b688a0c211cc3e26750517e2cdd4db872bfba4b8d389708bb39fedf103d29cb5b98be3ba0064cd73453735ece3a68776730
+AUX pinger-0.33-musl-int-types.patch 5192 BLAKE2B 273eaea87fdc0763483a03145e4d98e877acf13ae37811b1efdc4d5b49987d542f889769109fda4376cc486298b08b4373ac26cfbb5b1757fc868a48d378823a SHA512 7aaaca7aa6a3e116b494bce388e63e99f8239afe44ab582abce356f29e000097e12615b248a4701c9637204b74c0585dcf60a7433ebcf49bb8d6c00910c5a8a3
DIST pinger-0.33.tar.gz 247827 BLAKE2B 6139044be634438945c92a431b97276b5556b513a948a675d6d70c73e4e22d08a58b9cf6607170f804354c18371af54a222b0e064cc1c8275ba77f67ddbd6699 SHA512 fff07599ef91fbdcff9be7806eca57a71e8e6fac7e9afc67c4147e6246b0bcdadf379de28f87054dbe7c409955c0e0ddeae7f529e954231bea0cfb39e4e29bc1
-EBUILD pinger-0.33.ebuild 1078 BLAKE2B b51e13232fef4c311cedec158290c71def8f25e41cdb5a0b89038028b347cd969dd0ff261a9192363b314d9944181f14f99e345315b82a5353db72891430089f SHA512 2794d2e2c077dfbc2cedfcb31789fa2a1afc6f122fec008027d0e28fd661f8f772e80cc12740dc40ca137a4aaef72ca8407ff9259b946bd88608cd2081104576
+EBUILD pinger-0.33-r1.ebuild 1127 BLAKE2B 8a5d8c7bb061f58959e0d30e0bdd593355d5da9c241b4ca4e604c0bdfa67a2b847cbc20e1713b2dd6d55d58b1fb6749dea6bea052d2c398c3dd70d9bc5db3c12 SHA512 69d29153d52cf6d2d6a2f0843bfc2f6f490882e6d9a21815f4ce934053c2b1dae936e2aba4d68e5d6500abcda2494f06bd925f09b675d56827f01cd20dcd0550
MISC metadata.xml 478 BLAKE2B d44f500d43bb193fa7c0ace6b8ccc58de5c1c57bb40804272c3bf893bf4ec5d8555ed9668eaa91151297a27db138404d755c5ade15374e6358df9e5369355e43 SHA512 1c4f0de91fafca3e2df1496dfabe073f62e9cc05be8eca51ab1faf907faa028adbfd80083c55e76e55d5fabe9e2ce8a2cd2bdd5750ca0eda0fd0724f2b9f03e0
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..0777242ba6f8
--- /dev/null
+++ b/net-analyzer/pinger/files/pinger-0.33-musl-int-types.patch
@@ -0,0 +1,158 @@
+From: Sam James <sam@gentoo.org>
+Date: Wed, 29 Dec 2021 23:40:20 +0000
+Subject: [PATCH] Use <stdint.h> types
+
+Fixes musl compatibility.
+
+Bug: https://bugs.gentoo.org/712746
+--- a/src/fake_gtk.h
++++ b/src/fake_gtk.h
+@@ -7,7 +7,6 @@
+ #define GdkEvent int
+ #define gpointer int *
+ #define gboolean void
+-#define gint int
+ #define GdkInputCondition int
+
+ #else
+--- a/src/globals.h
++++ b/src/globals.h
+@@ -62,10 +62,6 @@
+ #define EXTERN extern
+ #endif
+
+-#ifndef __USE_MISC
+-#define unsigned int uint;
+-#endif
+-
+ #define MAX_HOSTS 100
+ /* Maximum size of domain name */
+ #define MAX_DNAME_LEN 60
+@@ -93,8 +89,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 */
++ unsigned int last_seq_sent; /* sequence nr. of last packet sent */
++ unsigned int 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) */
+@@ -164,9 +160,9 @@ typedef struct flstruct
+ #ifdef LOCAL
+ /* hosts specified only by domain names are resolved every 10 minutes. Specify
+ * other interval in seconds here if required. -1=disable. */
+-uint dns_check_s = 600;
++unsigned int dns_check_s = 600;
+ #else
+-extern uint dns_check_s;
++extern unsigned int dns_check_s;
+ #endif
+
+ EXTERN int mode;
+--- a/src/interface_gtk.c
++++ b/src/interface_gtk.c
+@@ -3,6 +3,7 @@
+ #include "ping.h"
+ #include <gdk/gdkkeysyms.h>
+ #include <stdio.h>
++#include <stdint.h>
+ #include <string.h>
+
+ GtkWidget *window;
+@@ -13,7 +14,7 @@ static GtkWidget *scrolled_list;
+ static GtkWidget *tabs;
+ /* status bar for clock */
+ static GtkWidget *status_bar;
+-static guint status_bar_context;
++static unsigned int status_bar_context;
+ /* Box where store tabs and status bar */
+ static GtkWidget *vbox;
+
+@@ -31,7 +32,7 @@ struct regular_disp_data
+ {
+ hosts_data *hosts;
+ int *stop_loop;
+- guint disp_timeout_id;
++ unsigned int disp_timeout_id;
+ };
+
+ /* Interface display data */
+@@ -54,7 +55,7 @@ enum
+ static GtkWidget *create_list(hosts_data * hosts, int set_nr,
+ GtkListStore ** model);
+ static gboolean display_pinger_status(gpointer data);
+-static gint gtk_delete_event(GtkWidget * widget, GdkEvent * event,
++static int gtk_delete_event(GtkWidget * widget, GdkEvent * event,
+ gpointer data);
+ static gchar *my_locale_to_utf8(char *text, char *file, int line);
+
+@@ -63,7 +64,7 @@ static void tab_refresh_rate(GtkWidget * widget, GdkEvent * event,
+ {
+ g_source_remove(int_disp_data->disp_timeout_id);
+ int_disp_data->disp_timeout_id =
+- g_timeout_add((guint32) * (int *) data, display_pinger_status,
++ g_timeout_add((uint32_t) * (int *) data, display_pinger_status,
+ (gpointer) int_disp_data);
+ }
+
+@@ -462,7 +463,7 @@ static GtkWidget *create_list(hosts_data * hosts, int set_nr,
+ }
+
+ /* delete_event callback function. data is (hosts_data *) */
+-static gint gtk_delete_event(GtkWidget * widget,
++static int gtk_delete_event(GtkWidget * widget,
+ GdkEvent * event, gpointer data)
+ {
+ if (free_sockets((hosts_data *) data))
+@@ -532,7 +533,7 @@ void gtk_gui_loop(hosts_data * hosts, int *stop_loop)
+ disp_data.stop_loop = stop_loop;
+
+ disp_data.disp_timeout_id =
+- g_timeout_add((guint32) hosts->titles->refresh_int,
++ g_timeout_add((uint32_t) hosts->titles->refresh_int,
+ display_pinger_status, (gpointer) & disp_data);
+ display_pinger_status((gpointer) & disp_data);
+
+--- 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