git: 5e543050a907 - main - sysutils/asmon: Mark DEPRECATED

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Sun, 28 Nov 2021 16:17:59 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5e543050a907914386b13078cdfda1eba7cdf95d

commit 5e543050a907914386b13078cdfda1eba7cdf95d
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2021-11-28 16:15:46 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2021-11-28 16:17:39 +0000

    sysutils/asmon: Mark DEPRECATED
    
    - Fails to build on modern compilers
    - Set EXPIRATION_DATE to 2021-12-27
    - Return to pool
    - Make patches makepatch compatible
---
 sysutils/asmon/Makefile                  | 10 +++++++---
 sysutils/asmon/files/patch-asmon-asmon.c | 12 ++++--------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/sysutils/asmon/Makefile b/sysutils/asmon/Makefile
index 21027ea4a52c..bb2589087f7d 100644
--- a/sysutils/asmon/Makefile
+++ b/sysutils/asmon/Makefile
@@ -6,7 +6,7 @@ PORTREVISION=	3
 CATEGORIES=	sysutils afterstep
 MASTER_SITES=	AFTERSTEP/apps/asmon
 
-MAINTAINER=	bofh@FreeBSD.org
+MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Swallowable applet monitors the CPU usage, memory, and swap, etc
 
 LICENSE=	GPLv2
@@ -17,11 +17,15 @@ BROKEN_FreeBSD_14=	fails to compile: read_mem.c: invalid use of undefined type '
 BROKEN_mips=		fails to compile: asmon.c: storage size of 'sum' isn't known
 BROKEN_mips64=		fails to compile: asmon.c: storage size of 'sum' isn't known
 
-BUILD_WRKSRC=	${WRKDIR}/${PORTNAME}-${PORTVERSION}/asmon
-CFLAGS+=	-I${LOCALBASE}/include
+DEPRECATED=	Fails to build on modern FreeBSD
+EXPIRATION_DATE=	2021-12-27
+
 USES=		gmake xorg
 USE_CSTD=	gnu89
 USE_XORG=	xpm x11
+
+BUILD_WRKSRC=	${WRKDIR}/${PORTNAME}-${PORTVERSION}/asmon
+CFLAGS+=	-I${LOCALBASE}/include
 ALL_TARGET=	asmon
 MAKE_ARGS+=	LIBDIR="-L${LOCALBASE}/lib" \
 		SOLARIS_LIBS=-lkvm
diff --git a/sysutils/asmon/files/patch-asmon-asmon.c b/sysutils/asmon/files/patch-asmon-asmon.c
index 7fce50d6a099..39f0e813e1a6 100644
--- a/sysutils/asmon/files/patch-asmon-asmon.c
+++ b/sysutils/asmon/files/patch-asmon-asmon.c
@@ -1,15 +1,11 @@
---- asmon/asmon.c.bak	2012-03-13 19:03:06.795252708 +0600
-+++ asmon/asmon.c	2012-03-13 19:04:16.395242371 +0600
-@@ -990,7 +990,11 @@
+--- asmon/asmon.c.orig	2000-07-20 11:08:47 UTC
++++ asmon/asmon.c
+@@ -990,7 +990,7 @@ void DrawXmem(int Xpid, float total) 
  
  	kproc = kvm_getprocs(kd, KERN_PROC_PID, Xpid, &kcnt);
  
 -	Xsize = kproc->kp_eproc.e_vm.vm_map.size / 1024;
-+	#if __FreeBSD_version < 500000
-+		Xsize = kproc->kp_eproc.e_vm.vm_map.size / 1024;
-+	#else
-+		Xsize = kproc->ki_size / 1024;
-+	#endif
++	Xsize = kproc->ki_size / 1024;
  #endif
          if(old_Xsize!=Xsize)
  	{