summaryrefslogtreecommitdiff
path: root/wm/icewm14
diff options
context:
space:
mode:
authorplunky <plunky@pkgsrc.org>2019-12-10 19:22:36 +0000
committerplunky <plunky@pkgsrc.org>2019-12-10 19:22:36 +0000
commit5a262146636daa799d7995e8b53e685672e9b798 (patch)
tree2e32c1f146fc693fc3545b2484d7c9a43227ad96 /wm/icewm14
parentf96b112d49dbc393e23695cb99cb899d2ed08a21 (diff)
downloadpkgsrc-5a262146636daa799d7995e8b53e685672e9b798.tar.gz
fix CPU status applet, on NetBSD at least
Diffstat (limited to 'wm/icewm14')
-rw-r--r--wm/icewm14/Makefile6
-rw-r--r--wm/icewm14/distinfo3
-rw-r--r--wm/icewm14/patches/patch-src_acpustatus.cc58
3 files changed, 64 insertions, 3 deletions
diff --git a/wm/icewm14/Makefile b/wm/icewm14/Makefile
index d8914768376..a058f9ee1f5 100644
--- a/wm/icewm14/Makefile
+++ b/wm/icewm14/Makefile
@@ -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 @@ USE_TOOLS+= msgfmt pkg-config
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 --git a/wm/icewm14/distinfo b/wm/icewm14/distinfo
index c41b5bb9d30..318aae25a97 100644
--- a/wm/icewm14/distinfo
+++ b/wm/icewm14/distinfo
@@ -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 --git a/wm/icewm14/patches/patch-src_acpustatus.cc b/wm/icewm14/patches/patch-src_acpustatus.cc
new file mode 100644
index 00000000000..609077a2d3d
--- /dev/null
+++ b/wm/icewm14/patches/patch-src_acpustatus.cc
@@ -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) {