From nobody Wed Oct 30 18:29:59 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xdwf00dKBz5bpHM; Wed, 30 Oct 2024 18:30:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xdwdz6wLwz4RM4; Wed, 30 Oct 2024 18:29:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730313000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6DslDhNvHwtTTWOptwtv7OS7zfOXxBFYEoHFNXkOcT0=; b=j5jp58oz4wSbPSU9upRIjCxpKjYvtkfixzlu2PhJ5LY5OSegri84rGKnlvHJUvh9lAQyUF Z3vL5JodbthUzveRXp+lub5CAI8CHtS5EQtsQtDyybifip2jZ6MLMO25eZNDh1fTKLO5RO e6tIpDjTAEUGKbnxE1FB5StiKSRpx+iIKF3Ps88NOSszMUi+EATSA1Y6np043FKMfZOKL5 mKoJuMFxkoBhkt1PtE3lQgDbonhftGPg4WIJd2N4A3D6slUWtcm9dabfMKtceHThZVquR9 XtWw9AMaX7q/RYJjA1DzFnccx+L5wXNrV8pBKuKG1bdCeQTUpqGDEpVdO9yl6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730313000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6DslDhNvHwtTTWOptwtv7OS7zfOXxBFYEoHFNXkOcT0=; b=xrJQMb6FqgVd9dru7LvWUvs4WEIdQa3QuVxSYJLDPVeDda9401dyK2xHFvesYp/1Mydrhk TX7XNuY0NijPhw3lOZTUHu6kmBjhK5qAzRQht3PUyFNI858LoX3wYygtq2ybDJu60qRqP7 qvTgT3RJVMS8kk8hI0tbLwSGokOl//vG5HmDz3suGJPZLzZagaKGDeZ/WYzXIcoYeYFOvt eNIiiJwoD7OxgrmhYo1Ah/gA5YCKudJGf985ey0rBrxuKvKiS41+zl/likBbmHUatdkEko Rw1CCHRMLWTFXKl1I2j7PN+I/rI+75lj21Ae1gFzbKc8qg2x6+pWt+vlcwP3Uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730313000; a=rsa-sha256; cv=none; b=tI30J2VIL1UJ+k/MkOzlXyJVoYEXvFLgfpdT8jSoUxJexDtwqsgbq+3ptUUJrS+qFDBZi1 XXzpEyNwx1X/GSuFKv6+jeH99UClHQLrXZsKYtHdyNru3Zaal3zewx+6RFMJ/fydiiD+N/ ItbryOT2NyEPMeFCYiMFoTkKEw8NDkd9yZd+4gXFM1JvC0zIoAmf64qmhUhAUFpPsCn3YS E19kKpXewY47K0S245nvZ1mKd9IlXsM4Ic40hnr0z6vg7DNqHjro3swvRkZN5Qdi2znW8+ Ey7wkTD/SPoKj13bpgUWeIQTiegZonmF5JBf3vF10J2Y2p0EQSMcIYZDviseDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xdwdz6VZMz1J8D; Wed, 30 Oct 2024 18:29:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49UITxT6055402; Wed, 30 Oct 2024 18:29:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49UITxls055399; Wed, 30 Oct 2024 18:29:59 GMT (envelope-from git) Date: Wed, 30 Oct 2024 18:29:59 GMT Message-Id: <202410301829.49UITxls055399@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Popov Subject: git: 622023b5f614 - main - devel/glib20: Enable GNetworkMonitor with Netlink backend List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 622023b5f6146fa8f9b544dcb49329395b1f0ff8 Auto-Submitted: auto-generated The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=622023b5f6146fa8f9b544dcb49329395b1f0ff8 commit 622023b5f6146fa8f9b544dcb49329395b1f0ff8 Author: Gleb Popov AuthorDate: 2024-10-30 18:28:40 +0000 Commit: Gleb Popov CommitDate: 2024-10-30 18:29:43 +0000 devel/glib20: Enable GNetworkMonitor with Netlink backend Sponsored by: Future Crew, LLC --- devel/glib20/Makefile | 1 + devel/glib20/files/patch-networkmonitor-netlink | 76 +++++++++++++++++++++++++ 2 files changed, 77 insertions(+) diff --git a/devel/glib20/Makefile b/devel/glib20/Makefile index a300d7e0aadf..fbeed640d9ae 100644 --- a/devel/glib20/Makefile +++ b/devel/glib20/Makefile @@ -1,5 +1,6 @@ PORTNAME= glib DISTVERSION= 2.80.5 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= devel MASTER_SITES= GNOME diff --git a/devel/glib20/files/patch-networkmonitor-netlink b/devel/glib20/files/patch-networkmonitor-netlink new file mode 100644 index 000000000000..6e5996f5ee11 --- /dev/null +++ b/devel/glib20/files/patch-networkmonitor-netlink @@ -0,0 +1,76 @@ +From 02172bda73663f63b603956a180c6c6fc6a3d187 Mon Sep 17 00:00:00 2001 +From: Gleb Popov <6yearold@gmail.com> +Date: Tue, 29 Oct 2024 21:18:36 +0300 +Subject: [PATCH] Enable GNetworkMonitorNetlink on FreeBSD + +https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4376 + +--- + gio/gnetworkmonitornetlink.c | 8 ++++++++ + meson.build | 4 +++- + 2 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/gio/gnetworkmonitornetlink.c b/gio/gnetworkmonitornetlink.c +index bf51d31f99..adaa77d38b 100644 +--- a/gio/gnetworkmonitornetlink.c ++++ ./gio/gnetworkmonitornetlink.c +@@ -38,8 +38,14 @@ + + /* must come at the end to pick system includes from + * gnetworkingprivate.h */ ++#ifdef HAVE_LINUX_NETLINK_H + #include + #include ++#endif ++#ifdef HAVE_NETLINK_NETLINK_H ++#include ++#include ++#endif + + static GInitableIface *initable_parent_iface; + static void g_network_monitor_netlink_iface_init (GNetworkMonitorInterface *iface); +@@ -124,6 +130,7 @@ g_network_monitor_netlink_initable_init (GInitable *initable, + return FALSE; + } + ++#ifdef SO_PASSCRED + if (!g_socket_set_option (nl->priv->sock, SOL_SOCKET, SO_PASSCRED, + TRUE, NULL)) + { +@@ -133,6 +140,7 @@ g_network_monitor_netlink_initable_init (GInitable *initable, + g_strerror (errsv)); + return FALSE; + } ++#endif + + /* Request the current state */ + if (!request_dump (nl, error)) +diff --git a/meson.build b/meson.build +index 69e4b036ea..7da293881e 100644 +--- a/meson.build ++++ ./meson.build +@@ -400,10 +400,12 @@ headers = [ + 'inttypes.h', + 'libproc.h', + 'limits.h', ++ 'linux/netlink.h', + 'locale.h', + 'mach/mach_time.h', + 'memory.h', + 'mntent.h', ++ 'netlink/netlink.h', + 'poll.h', + 'pwd.h', + 'sched.h', +@@ -461,7 +463,7 @@ if cc.check_header('malloc.h') + glib_conf_prefix = glib_conf_prefix + '#define HAVE_MALLOC_H 1\n' + endif + +-if cc.check_header('linux/netlink.h') ++if glib_conf.has('HAVE_LINUX_NETLINK_H') or glib_conf.has('HAVE_NETLINK_NETLINK_H') + glib_conf.set('HAVE_NETLINK', 1) + endif + +-- +GitLab +