git: 030111b816ea - main - sysutils/py-psutil: Fix failing __FreeBSD_version check

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Tue, 21 Jun 2022 21:00:39 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=030111b816ead69e62d5243b845450bc9cce3457

commit 030111b816ead69e62d5243b845450bc9cce3457
Author:     Torsten Blum <torstenb@FreeBSD.org>
AuthorDate: 2022-06-21 20:58:58 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-06-21 20:58:58 +0000

    sysutils/py-psutil: Fix failing __FreeBSD_version check
    
    - Bump PORTREVISION for package change
    
    psutil 5.9.1 does not include <sys/param.h> in arch/freebsd/mem.c, causing the
    __FreeBSD_version check there not not work properly and thus breaking the port
    on systems without COMPAT_FREEBSD7.
    
    PR:             264807
    Reference:      https://github.com/giampaolo/psutil/issues/2113
---
 sysutils/py-psutil/Makefile                              |  1 +
 sysutils/py-psutil/files/patch-psutil_arch_freebsd_mem.c | 10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/sysutils/py-psutil/Makefile b/sysutils/py-psutil/Makefile
index a17f74b073d1..8722ee5280e3 100644
--- a/sysutils/py-psutil/Makefile
+++ b/sysutils/py-psutil/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	psutil
 PORTVERSION=	5.9.1
+PORTREVISION=	1
 CATEGORIES=	sysutils python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
diff --git a/sysutils/py-psutil/files/patch-psutil_arch_freebsd_mem.c b/sysutils/py-psutil/files/patch-psutil_arch_freebsd_mem.c
new file mode 100644
index 000000000000..cbe44517b448
--- /dev/null
+++ b/sysutils/py-psutil/files/patch-psutil_arch_freebsd_mem.c
@@ -0,0 +1,10 @@
+--- psutil/arch/freebsd/mem.c.orig	2022-01-17 12:10:50 UTC
++++ psutil/arch/freebsd/mem.c
+@@ -6,6 +6,7 @@
+ 
+ 
+ #include <Python.h>
++#include <sys/param.h>
+ #include <sys/sysctl.h>
+ #include <sys/vmmeter.h>
+ #include <vm/vm_param.h>