git: 2fef1dbd478e - main - devel/libgtop: unbreak build with clang 15

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sat, 10 Dec 2022 08:33:55 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2fef1dbd478ea473588cc0f8ec4ff1b3654012a2

commit 2fef1dbd478ea473588cc0f8ec4ff1b3654012a2
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-12-08 22:41:12 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-12-10 08:30:12 +0000

    devel/libgtop: unbreak build with clang 15
    
    main.c:226:35: error: incompatible pointer to integer conversion passing 'char[1024]' to parameter of type 'pid_t' (aka 'int') [-Wint-conversion]
                    (server, &resp->u.data.proc_io, parameter);
                                                    ^~~~~~~~~
    ../../include/glibtop/procio.h:78:74: note: passing argument to parameter 'pid' here
    void glibtop_get_proc_io_l (glibtop *server, glibtop_proc_io *buf, pid_t pid);
                                                                             ^
    
    PR:             268260
    Reported by:    antoine (via bug 265425 exp-run)
---
 devel/libgtop/Makefile | 4 ++++
 devel/libgtop/distinfo | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/devel/libgtop/Makefile b/devel/libgtop/Makefile
index c9b37f52242c..dfe786ac62fe 100644
--- a/devel/libgtop/Makefile
+++ b/devel/libgtop/Makefile
@@ -1,9 +1,13 @@
 PORTNAME=	libgtop
 PORTVERSION=	2.40.0
+PORTREVISION=	1
 CATEGORIES=	devel gnome
 MASTER_SITES=	GNOME
 DIST_SUBDIR=	gnome2
 
+PATCH_SITES=	https://gitlab.gnome.org/GNOME/${PORTNAME}/-/commit/
+PATCHFILES+=	df6393ac0cd7.patch:-p1 # https://gitlab.gnome.org/GNOME/libgtop/-/merge_requests/35
+
 MAINTAINER=	gnome@FreeBSD.org
 COMMENT=	GNOME top library
 
diff --git a/devel/libgtop/distinfo b/devel/libgtop/distinfo
index 48111d90d847..56e3deabd0e7 100644
--- a/devel/libgtop/distinfo
+++ b/devel/libgtop/distinfo
@@ -1,3 +1,5 @@
 TIMESTAMP = 1591951268
 SHA256 (gnome2/libgtop-2.40.0.tar.xz) = 78f3274c0c79c434c03655c1b35edf7b95ec0421430897fb1345a98a265ed2d4
 SIZE (gnome2/libgtop-2.40.0.tar.xz) = 744316
+SHA256 (gnome2/df6393ac0cd7.patch) = c262b98834f07f524959a240dc41ff7711dd6f38920b6ce86299e8bb9dcf79bd
+SIZE (gnome2/df6393ac0cd7.patch) = 784