here is the patch

On Fri, Jan 9, 2026 at 12:05 AM Jishan Alam <[email protected]> wrote:
>
> Hello,
> I've prepared an update of sysutils/wmtop from 0.84 to 0.85.
> The port builds, stages and installs cleanly on FreeBSD-15.0-STABLE on
> a TTY-only system.
>
> I do not have X server/windowmaker environment available locally, so I
> would appreciate runtime testing from anyone using X11.
>
> Thanks in advance.
>
> --
> Best Regards,
> Jishan Alam



-- 
Best Regards,
Jishan Alam
From e98ce28eafdf35cfe120f184c6d973b092e9fb01 Mon Sep 17 00:00:00 2001
From: Jishan Alam <[email protected]>
Date: Thu, 8 Jan 2026 23:59:08 +0530
Subject: [PATCH] Update to 0.85

---
 sysutils/wmtop/Makefile             |  19 +++--
 sysutils/wmtop/distinfo             |   5 +-
 sysutils/wmtop/files/patch-Makefile |  21 -----
 sysutils/wmtop/files/patch-wmtop.c  | 120 ----------------------------
 4 files changed, 14 insertions(+), 151 deletions(-)
 delete mode 100644 sysutils/wmtop/files/patch-Makefile
 delete mode 100644 sysutils/wmtop/files/patch-wmtop.c

diff --git a/sysutils/wmtop/Makefile b/sysutils/wmtop/Makefile
index 6a1d1910..c72d27dc 100644
--- a/sysutils/wmtop/Makefile
+++ b/sysutils/wmtop/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	wmtop
-PORTVERSION=	0.84
-PORTREVISION=	4
+PORTVERSION=	0.85
 CATEGORIES=	sysutils windowmaker
 MASTER_SITES=	https://www.dockapps.net/download/
 
@@ -10,21 +9,25 @@ WWW=		https://wmtop.sourceforge.net/
 
 LICENSE=	GPLv2
 
-USES=		gmake xorg		# gmake is needed for -jX builds
-USE_XORG=	xpm x11
+USES=	autoreconf xorg
+GNU_CONFIGURE=	yes
+USE_XORG=	xpm x11 xext
 USE_CSTD=	gnu89
-ALL_TARGET=	freebsd
-CFLAGS+=	-fcommon  # clang11/gcc10
 
-PORTDOCS=	BUGS CHANGES README TODO
+LIB_DEPENDS=	libdockapp.so:x11-wm/libdockapp
+
+PORTDOCS=	BUGS ChangeLog README TODO
 PLIST_FILES=	bin/wmtop \
 		share/man/man1/wmtop.1.gz
 
 OPTIONS_DEFINE=	DOCS
+post-extract:
+	@${MV} ${WRKDIR}/dockapps-* ${WRKSRC}
+	${ECHO_MSG} "Using WRKSRC=" ${WRKSRC}
 
 post-patch:
 	@${REINPLACE_CMD} -e 's/^\(LIBS.*\)/\1 -lkvm/ ; \
-		s/^\(FLAGS.*\)/\1 -DNO_PROCFS/' ${WRKSRC}/Makefile
+		s/^\(FLAGS.*\)/\1 -DNO_PROCFS/' ${WRKSRC}/Makefile.am
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/wmtop ${STAGEDIR}${PREFIX}/bin
diff --git a/sysutils/wmtop/distinfo b/sysutils/wmtop/distinfo
index e0d488a4..b336060a 100644
--- a/sysutils/wmtop/distinfo
+++ b/sysutils/wmtop/distinfo
@@ -1,2 +1,3 @@
-SHA256 (wmtop-0.84.tar.gz) = bca0651049c6bc897936d5523438e3eb14efa470abc6d08d3577332badc0f99a
-SIZE (wmtop-0.84.tar.gz) = 26492
+TIMESTAMP = 1767896824
+SHA256 (wmtop-0.85.tar.gz) = a1b7640aac041db98afc4ef65ee288319c06b1104071b14c461dd57500438d02
+SIZE (wmtop-0.85.tar.gz) = 21165
diff --git a/sysutils/wmtop/files/patch-Makefile b/sysutils/wmtop/files/patch-Makefile
deleted file mode 100644
index cd70faf7..00000000
--- a/sysutils/wmtop/files/patch-Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
---- Makefile.orig	Sat Apr 29 17:49:07 2000
-+++ Makefile	Sun May  7 17:04:17 2000
-@@ -1,12 +1,12 @@
- DEBUG  = -DPARANOID
--LIBDIR = -L/usr/X11R6/lib
-+LIBDIR = -L$(PREFIX)/lib
- LIBS   = -lXpm -lXext -lX11
--INCS   = -I/usr/X11R6/share/include -I/usr/X11R6/include
-+INCS   = -I$(PREFIX)/include
- OBJS   = wmtop.o wmgeneral/wmgeneral.o wmgeneral/misc.o wmgeneral/list.o
--OPTS   = -O3 -g -Wall
--FLAGS  = $(DEBUG) $(OPTS) -D$(OS)
--MAKE   = make
--CC     = cc
-+OPTS   = -g -Wall
-+FLAGS  = $(DEBUG) $(OPTS) -D$(OS) $(CFLAGS)
-+MAKE  ?= make
-+CC    ?= cc
- PREFIX ?= /usr/local
- 
- default:
diff --git a/sysutils/wmtop/files/patch-wmtop.c b/sysutils/wmtop/files/patch-wmtop.c
deleted file mode 100644
index 7ce361ad..00000000
--- a/sysutils/wmtop/files/patch-wmtop.c
+++ /dev/null
@@ -1,120 +0,0 @@
---- wmtop.c.orig	Wed Mar  7 05:30:56 2001
-+++ wmtop.c	Fri Feb 25 22:34:36 2005
-@@ -70,6 +70,13 @@
- #include "xpm/wmtop-neon2.xpm"
- #include "xpm/wmtop-rainbow.xpm"
- 
-+#ifdef NO_PROCFS
-+#include <kvm.h>
-+#include <sys/sysctl.h>
-+#include <sys/user.h>
-+#include <sys/resource.h>
-+#endif
-+
- /******************************************/
- /* Defines                                */
- /******************************************/
-@@ -191,6 +198,9 @@
-     int rss;
-     int time_stamp;
-     int counted;
-+#ifdef NO_PROCFS
-+    struct kinfo_proc *kp;
-+#endif
- };
- 
- /******************************************/
-@@ -455,17 +465,19 @@
-  * Anyone hoping to port wmtop should look here first.
-  */
- int process_parse_procfs(struct process *process) {
-+#if !defined(NO_PROCFS)
-     char line[WMTOP_BUFLENGTH],filename[WMTOP_BUFLENGTH],procname[WMTOP_BUFLENGTH];
-     int ps;
-     struct stat sbuf;
--    int user_time,kernel_time;
-     int rc;
-+#endif
-+    int user_time,kernel_time;
- #if defined(LINUX)
-     char *r,*q;
-     char deparenthesised_name[WMTOP_BUFLENGTH];
- 		int endl;
- #endif /* defined(LINUX) */
--#if defined(FREEBSD)
-+#if defined(FREEBSD) && !defined(NO_PROCFS)
-     int us,um,ks,km;
- #endif /* defined(FREEBSD) */
- 
-@@ -473,6 +485,15 @@
-     assert(process->id==0x0badfeed);
- #endif /* defined(PARANOID) */
- 
-+#if defined(NO_PROCFS)
-+#define GETV(u) ((u).tv_sec * 1000 + (u).tv_usec / 1000)
-+    process->time_stamp = g_time;
-+    if(process->name)
-+        wmtop_free(process->name);
-+    process->name = wmtop_strdup(process->kp->ki_comm);
-+    process->user_time = GETV(process->kp->ki_rusage.ru_utime);
-+    process->kernel_time = GETV(process->kp->ki_rusage.ru_stime);
-+#else
-     sprintf(filename,PROCFS_TEMPLATE,process->pid);
- 
-     /*
-@@ -582,6 +603,7 @@
-     process->user_time = us*1000+um/1000;
-     process->kernel_time = ks*1000+km/1000;
- #endif /* defined(FREEBSD) */
-+#endif /* defined(NO_PROCFS) */
- 
-     process->rss *= getpagesize();
- 
-@@ -607,6 +629,39 @@
- /******************************************/
- 
- int update_process_table() {
-+#if defined(NO_PROCFS)
-+    kvm_t *kd;
-+    int n;
-+    struct kinfo_proc *p;
-+
-+    if((kd = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, "wmtop")) == NULL)
-+        return 1;
-+
-+    if((p = kvm_getprocs(kd, KERN_PROC_ALL, 0, &n)) == NULL)
-+        return 1;
-+
-+    for(; n > 0; n --, p ++)
-+    {
-+      char **argv;
-+      struct process *pp;
-+
-+      if((argv = kvm_getargv(kd, p, 0)) == NULL ||
-+         argv[0] == NULL)
-+        continue;
-+
-+      pp = find_process(p->ki_pid);
-+      if(!pp)
-+          pp = new_process(p->ki_pid);
-+
-+      pp->kp = p;
-+      calculate_cpu(pp);
-+    }
-+
-+    if(kvm_close(kd) != 0)
-+        return 1;
-+
-+    return 0;
-+#else
-     DIR *dir;
-     struct dirent *entry;
- 
-@@ -640,6 +695,7 @@
-     closedir(dir);
- 
-     return 0;
-+#endif /* defined(NO_PROCFS) */
- }
- 
- /******************************************/
-- 
2.52.0

Reply via email to