x11/xfce4/xfce4-systemload: update to 1.3.2

This commit is contained in:
landry 2022-12-15 14:48:13 +00:00
parent cff1e43e8a
commit 1068396ccd
4 changed files with 58 additions and 31 deletions

View File

@ -1,8 +1,7 @@
COMMENT= Xfce4 cpu/memory/swap/uptime monitor panel plugin
XFCE_VERSION= 1.3.1
XFCE_VERSION= 1.3.2
XFCE_PLUGIN= systemload
REVISION= 0
# BSD
PERMIT_PACKAGE= Yes
@ -14,7 +13,7 @@ CONFIGURE_ARGS= --disable-upower
WANTLIB += ICE SM X11 X11-xcb Xcomposite Xcursor Xdamage
WANTLIB += Xext Xfixes Xi Xinerama Xrandr Xrender fribidi
WANTLIB += atk-1.0 cairo expat ffi fontconfig freetype
WANTLIB += atk-1.0 atspi cairo dbus-1 expat ffi fontconfig freetype
WANTLIB += gdk_pixbuf-2.0 gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0
WANTLIB += kvm m pango-1.0 pangocairo-1.0
WANTLIB += pangoft2-1.0 pcre2-8 pixman-1 png

View File

@ -1,2 +1,2 @@
SHA256 (xfce4/xfce4-systemload-plugin-1.3.1.tar.bz2) = VtEAeAHVLXwrWhO7VHRfbX8G/aKLSc6TYUVjMGiBdlI=
SIZE (xfce4/xfce4-systemload-plugin-1.3.1.tar.bz2) = 417959
SHA256 (xfce4/xfce4-systemload-plugin-1.3.2.tar.bz2) = uzA/wwIOBTrR+guPy/DXaBxVY7uPZJNX1qlaV3gCsHI=
SIZE (xfce4/xfce4-systemload-plugin-1.3.2.tar.bz2) = 409767

View File

@ -1,26 +0,0 @@
call get_netload() first on lo0 before get_netlist() otherwise the plugin blows with
[ERROR] glibtop_get_netload: Function not implemented
https://gitlab.xfce.org/panel-plugins/xfce4-systemload-plugin/-/issues/22
Index: panel-plugin/network.c
--- panel-plugin/network.c.orig
+++ panel-plugin/network.c
@@ -40,8 +40,10 @@ static gint
read_netload_libgtop (gulong *bytes)
{
glibtop_netlist netlist;
+ glibtop_netload netload;
char **interfaces, **i;
+ glibtop_get_netload (&netload, "lo0");
interfaces = glibtop_get_netlist (&netlist);
if (!interfaces)
return -1;
@@ -49,7 +51,6 @@ read_netload_libgtop (gulong *bytes)
*bytes = 0;
for (i = interfaces; *i != NULL; i++)
{
- glibtop_netload netload;
glibtop_get_netload (&netload, *i);
*bytes += netload.bytes_total;
}

View File

@ -0,0 +1,54 @@
Index: panel-plugin/network.cc
--- panel-plugin/network.cc.orig
+++ panel-plugin/network.cc
@@ -39,17 +39,19 @@
#include <glibtop/netload.h>
static gint
-read_netload_libgtop (gulong *bytes)
+read_netload_libgtop (guint64 *bytes)
{
glibtop_netlist netlist;
- char **interfaces = glibtop_get_netlist (&netlist);
+ glibtop_netload netload;
+ char **interfaces;
+ glibtop_get_netload (&netload, "lo0");
+ interfaces = glibtop_get_netlist (&netlist);
if (!interfaces)
return -1;
*bytes = 0;
for (char **i = interfaces; *i != NULL; i++)
{
- glibtop_netload netload;
glibtop_get_netload (&netload, *i);
*bytes += netload.bytes_total;
}
@@ -67,6 +69,7 @@ read_netload_libgtop (gulong *bytes)
#endif
+#if 0
static const char *const PROC_NET_NETSTAT = "/proc/net/netstat";
static gint
@@ -110,6 +113,7 @@ read_netload_proc (gulong *bytes)
*bytes = in_octets + out_octets;
return 0;
}
+#endif
gint
read_netload (gulong *net, gulong *NTotal)
@@ -122,9 +126,8 @@ read_netload (gulong *net, gulong *NTotal)
time[1] = g_get_monotonic_time ();
- if (read_netload_proc (&bytes[1]) != 0)
- if (read_netload_libgtop (&bytes[1]) != 0)
- return -1;
+ if (read_netload_libgtop (&bytes[1]) != 0)
+ return -1;
if (time[0] != 0 && G_LIKELY (time[1] > time[0]) && G_LIKELY (bytes[1] >= bytes[0]))
{