pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/wm/icewm14 fix CPU status applet, on NetBSD at least
details: https://anonhg.NetBSD.org/pkgsrc/rev/700f175941e2
branches: trunk
changeset: 345352:700f175941e2
user: plunky <plunky%pkgsrc.org@localhost>
date: Tue Dec 10 19:22:36 2019 +0000
description:
fix CPU status applet, on NetBSD at least
diffstat:
wm/icewm14/Makefile | 6 ++-
wm/icewm14/distinfo | 3 +-
wm/icewm14/patches/patch-src_acpustatus.cc | 58 ++++++++++++++++++++++++++++++
3 files changed, 64 insertions(+), 3 deletions(-)
diffs (100 lines):
diff -r 25cd2f84c2e3 -r 700f175941e2 wm/icewm14/Makefile
--- a/wm/icewm14/Makefile Tue Dec 10 18:33:21 2019 +0000
+++ b/wm/icewm14/Makefile Tue Dec 10 19:22:36 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.3 2019/07/21 22:25:51 wiz Exp $
+# $NetBSD: Makefile,v 1.4 2019/12/10 19:22:36 plunky Exp $
DISTNAME= icewm-1.4.2
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= wm
MASTER_SITES= ${MASTER_SITE_GITHUB:=bbidulock/}
GITHUB_RELEASE= ${PKGVERSION_NOREV}
@@ -23,6 +23,8 @@
LDFLAGS.SunOS+= -lsocket -lnsl
+CMAKE_ARGS.NetBSD+= -DCMAKE_CXX_FLAGS="-DHAVE_SYSCTL_CP_TIME"
+
post-extract:
cp ${FILESDIR}/bsd-daemon.xpm ${WRKSRC}/lib/taskbar
diff -r 25cd2f84c2e3 -r 700f175941e2 wm/icewm14/distinfo
--- a/wm/icewm14/distinfo Tue Dec 10 18:33:21 2019 +0000
+++ b/wm/icewm14/distinfo Tue Dec 10 19:22:36 2019 +0000
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.3 2019/10/25 10:21:32 kamil Exp $
+$NetBSD: distinfo,v 1.4 2019/12/10 19:22:36 plunky Exp $
SHA1 (icewm-1.4.2.tar.bz2) = d1f9af531fec7beaa334db9c0e4764b9e40bbacd
RMD160 (icewm-1.4.2.tar.bz2) = 6aaabad0c235901556951c9d88178adf15e29f51
SHA512 (icewm-1.4.2.tar.bz2) = 0d227d75d2e3e6e5314eb0990375b85a34496e61e8b504ee023decb52b0c3a20bfd65c0d491b738d3742ddf3f21acfabfc8e4d43df51d137f568580b6c5ed0cd
Size (icewm-1.4.2.tar.bz2) = 1731772 bytes
SHA1 (patch-src_CMakeLists.txt) = 87a236a6d53937921ffca0044b1497124f8a9d83
+SHA1 (patch-src_acpustatus.cc) = 7c47b9e7690db4f011c2cfee3c7d5e36080b4b6a
SHA1 (patch-src_base.h) = 5321f1f1f8fd1ced2c5f38a7e5e614deee4703df
SHA1 (patch-src_icesm.cc) = c7fa247c395bb36307b7757a8c2698b62b7d0a6e
SHA1 (patch-src_icetray.cc) = a8e70da376e13be187037f190c672b8b75fd287b
diff -r 25cd2f84c2e3 -r 700f175941e2 wm/icewm14/patches/patch-src_acpustatus.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/wm/icewm14/patches/patch-src_acpustatus.cc Tue Dec 10 19:22:36 2019 +0000
@@ -0,0 +1,58 @@
+$NetBSD: patch-src_acpustatus.cc,v 1.1 2019/12/10 19:22:36 plunky Exp $
+
+fix CPU Status applet
+
+--- src/acpustatus.cc.orig 2017-07-30 08:53:35.524267864 +0000
++++ src/acpustatus.cc
+@@ -305,20 +305,15 @@ void CPUStatus::updateToolTip() {
+ }
+ setToolTip(ustring(fmt));
+ }
+-#elif defined HAVE_GETLOADAVG2
+- char load[sizeof("999.99 999.99 999.99")];
++#elif defined HAVE_GETLOADAVG
++ char fmt[255];
+ double loadavg[3];
+ if (getloadavg(loadavg, 3) < 0)
+ return;
+- snprintf(load, sizeof(load), "%3.2g %3.2g %3.2g",
+- loadavg[0], loadavg[1], loadavg[2]);
+- {
+- char id[10];
+- snprintf(id, sizeof[id], " %d ", cpuid);
+- char *loadmsg = cstrJoin(_("CPU"), id ,_("Load: "), load, NULL);
+- setToolTip(ustring(loadmsg));
+- delete [] loadmsg;
+- }
++ snprintf(fmt, sizeof(fmt), "%s %s %s: %3.2g %3.2g %3.2g",
++ _("CPU"), cpuid,
++ _("Load"), loadavg[0], loadavg[1], loadavg[2]);
++ setToolTip(ustring(fmt));
+ #endif
+ }
+
+@@ -634,6 +629,7 @@ void CPUStatus::getStatus() {
+ #else
+ typedef long cp_time_t;
+ #endif
++#ifndef HAVE_SYSCTLBYNAME
+ #if defined KERN_CPTIME
+ static int mib[] = { CTL_KERN, KERN_CPTIME };
+ #elif defined KERN_CP_TIME
+@@ -641,6 +637,7 @@ void CPUStatus::getStatus() {
+ #else
+ static int mib[] = { 0, 0 };
+ #endif
++#endif
+
+ cp_time_t cp_time[CPUSTATES];
+ size_t len = sizeof( cp_time );
+@@ -713,7 +710,7 @@ void CPUStatus::GetCPUStatus(YSMListener
+ CPUStatus::getCPUStatusCombined(aParent, fCPUStatus);
+ }
+ #elif defined(HAVE_SYSCTL_CP_TIME)
+- CPUStatus::getCPUStatusCombined(aParent, fCPUStatus);
++ CPUStatus::getCPUStatusCombined(smActionListener, aParent, fCPUStatus);
+ #endif
+ }
+ void CPUStatus::getCPUStatusCombined(YSMListener *smActionListener, YWindow *aParent, CPUStatus **&fCPUStatus) {
Home |
Main Index |
Thread Index |
Old Index