pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

gvfs: Update to gvfs-1.58.0



Module Name:	pkgsrc-wip
Committed By:	PHO <pho%cielonegro.org@localhost>
Pushed By:	pho
Date:		Sat Nov 15 03:46:49 2025 +0900
Changeset:	db69eaf888cf33018bcf7692d8ca1b603a4f494d

Modified Files:
	gvfs/Makefile
	gvfs/PLIST
	gvfs/distinfo
Added Files:
	gvfs/COMMIT_MSG
	gvfs/TODO
	gvfs/hacks.mk
	gvfs/options.mk
	gvfs/patches/patch-daemon_ParseFTPList.c
	gvfs/patches/patch-meson.build
Removed Files:
	gvfs/buildlink3.mk
	gvfs/patches/patch-client_gvfsfusedaemon.c
	gvfs/patches/patch-configure.ac
	gvfs/patches/patch-monitor_hal_hal-volume-monitor-daemon.c

Log Message:
gvfs: Update to gvfs-1.58.0

The change log is too long to paste here. See:
https://gitlab.gnome.org/GNOME/gvfs/-/blob/master/NEWS

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=db69eaf888cf33018bcf7692d8ca1b603a4f494d

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 gvfs/COMMIT_MSG                                    |   4 +
 gvfs/Makefile                                      | 199 +++++----
 gvfs/PLIST                                         | 155 +++++++
 gvfs/TODO                                          |  16 +
 gvfs/buildlink3.mk                                 |  41 --
 gvfs/distinfo                                      |  10 +-
 gvfs/hacks.mk                                      |  23 ++
 gvfs/options.mk                                    |  92 +++++
 gvfs/patches/patch-client_gvfsfusedaemon.c         |  14 -
 gvfs/patches/patch-configure.ac                    |  13 -
 gvfs/patches/patch-daemon_ParseFTPList.c           | 448 +++++++++++++++++++++
 gvfs/patches/patch-meson.build                     |  18 +
 .../patch-monitor_hal_hal-volume-monitor-daemon.c  |  38 --
 13 files changed, 892 insertions(+), 179 deletions(-)

diffs:
diff --git a/gvfs/COMMIT_MSG b/gvfs/COMMIT_MSG
new file mode 100644
index 0000000000..d62253cfd6
--- /dev/null
+++ b/gvfs/COMMIT_MSG
@@ -0,0 +1,4 @@
+sysutils/gvfs: Update to gvfs-1.58.0
+
+The change log is too long to paste here. See:
+https://gitlab.gnome.org/GNOME/gvfs/-/blob/master/NEWS
diff --git a/gvfs/Makefile b/gvfs/Makefile
index 2088e64dd1..eeb02960bb 100644
--- a/gvfs/Makefile
+++ b/gvfs/Makefile
@@ -1,99 +1,162 @@
 # $NetBSD: Makefile,v 1.79 2016/08/03 10:23:24 adam Exp $
 #
 
-DISTNAME=	gvfs-1.30.4
-PKGREVISION=	24
-CATEGORIES?=	sysutils 
-MASTER_SITES=	${MASTER_SITE_GNOME:=sources/gvfs/1.30/}
+DISTNAME=	gvfs-1.58.0
+CATEGORIES?=	sysutils
+MASTER_SITES=	${MASTER_SITE_GNOME:=sources/gvfs/${PKGVERSION_NOREV:S/./ /g:[1..2]:ts.}/}
 EXTRACT_SUFX=	.tar.xz
 
 MAINTAINER=	nervoso%k1.com.br@localhost
-HOMEPAGE=	http://www.gnome.org/
+HOMEPAGE=	https://wiki.gnome.org/Projects/gvfs
 COMMENT=	Userspace virtual filesystem
 LICENSE=	gnu-lgpl-v2
 
-GNU_CONFIGURE=	yes
-USE_LIBTOOL=	yes
-USE_TOOLS+=	aclocal autoheader autoconf automake gettext-m4 \
-		gmake gm4 intltool msgfmt pkg-config
-CONFIGURE_ARGS+=	--enable-http
-CONFIGURE_ARGS+=	--disable-keyring
-CONFIGURE_ARGS+=	--disable-admin
-CONFIGURE_ARGS+=	--disable-silent-rules
-CONFIGURE_ARGS+=	--enable-bash-completion
-
-PLIST_SRC=	/dev/null
-GENERATE_PLIST=	cd ${DESTDIR}${LOCALBASE};find * \! -type d;
-
-.include "../../mk/bsd.prefs.mk"
-
-PKG_OPTIONS_VAR=        PKG_OPTIONS.gvfs
-PKG_SUPPORTED_OPTIONS+= fuse samba hal
-PKG_SUGGESTED_OPTIONS+= samba 
-PLIST_VARS+=		${PKG_SUPPORTED_OPTIONS}
-
-# XXX fuse.bl3.mk will fail if we include it and fuse is not available
-.if ${OPSYS} == "Linux" #|| (${OPSYS} == "NetBSD" && exists(/usr/include/fuse.h))
-PKG_SUGGESTED_OPTIONS+=	fuse
+# TODO: Remove this line. Dunno why but mk/tools/replace.mk dies without it.
+USE_TOOLS+=	gm4
+
+USE_TOOLS+=	pkg-config
+
+.include "options.mk"
+.include "../../mk/bsd.fast.prefs.mk"
+
+# SystemD support is obviously only for Linux.
+.if ${OPSYS} != "Linux"
+MESON_ARGS+=	-Dsystemduserunitdir=no
+MESON_ARGS+=	-Dtmpfilesdir=no
 .endif
 
-.include "../../mk/bsd.options.mk"
+# afc://{UUID}
+#   Apple File Conduit; allow to exchange files with iOS devices
+MESON_ARGS+=	-Dafc=true
+.include "../../wip/libimobiledevice/buildlink3.mk"
+.include "../../textproc/libplist/buildlink3.mk"
+
+# afp://[user@]host[:port][/share]
+#   Apple Filing Protocol.
+MESON_ARGS+=	-Dafp=true
+
+# archive://{URL-ENCODED-URI}
+#   Access archive files.
+MESON_ARGS+=	-Darchive=true
+.include "../../archivers/libarchive/buildlink3.mk"
 
-.if !empty(PKG_OPTIONS:Msamba)
-CONFIGURE_ARGS+=	--with-samba-includes=${BUILDLINK_PREFIX.samba}/include
-CONFIGURE_ARGS+=	--with-samba-libs=${BUILDLINK_PREFIX.samba}/lib
-.include "../../net/samba/buildlink3.mk"
-PLIST.samba=		yes
+# burn://{DEVICE}
+#   Virtual filesystem for file managers to help them implement burning
+#   optical discs.
+MESON_ARGS+=	-Dburn=true
+
+# cdda://{DEVICE}
+#   Access audio discs.
+PLIST_VARS+=	cdda
+.if ${OPSYS} == "Linux"
+MESON_ARGS+=	-Dcdda=true
+PLIST.cdda=	yes
+# libcdio-paranoia is a cross-platform library but the gvfs backend relies
+# on udev, which is only available on Linux.
+GUDEV_REQUIRED=	yes
+.  include "../../misc/libcdio-paranoia/buildlink3.mk"
 .else
-CONFIGURE_ARGS+=	--disable-samba
+MESON_ARGS+=	-Dcdda=false
 .endif
 
-.if !empty(PKG_OPTIONS:Mnohal)
-.include "../../misc/libcdio-paranoia/buildlink3.mk"
-.include "../../wip/hal/buildlink3.mk"
-CONFIGURE_ARGS+=	--enable-hal
-CONFIGURE_ARGS+=	--enable-cdda
-PLIST.hal=		yes
+# gphoto2://{ID_SERIAL}, gphoto2://[usb:bus,dev]
+#   Access digital cameras.
+PLIST_VARS+=	gphoto2
+.if ${OPSYS} == "Linux"
+MESON_ARGS+=	-Dgphoto2=true
+PLIST.gphoto2=	yes
+GUDEV_REQUIRED=	yes
+.  include "../../devel/libgphoto2/buildlink3.mk"
 .else
-CONFIGURE_ARGS+=	--disable-hal
-CONFIGURE_ARGS+=	--disable-cdda
+MESON_ARGS+=	-Dgphoto2=false
 .endif
 
-.if !empty(PKG_OPTIONS:Mfuse)
-#.include "../../mk/fuse.buildlink3.mk"
-.include "../../filesystems/fuse/buildlink3.mk"
-CONFIGURE_ARGS+=	--enable-fuse
-PLIST.fuse=		yes
+# mtp://{ID_SERIAL}, mtp://[usb:bus,dev]
+#   Access digital audio/media players.
+PLIST_VARS+=	mtp
+.if ${OPSYS} == "Linux"
+MESON_ARGS+=	-Dmtp=true
+PLIST.mtp=	yes
+GUDEV_REQUIRED=	yes
+.  include "../../devel/libmtp/buildlink3.mk"
 .else
-CONFIGURE_ARGS+=	--disable-fuse
+MESON_ARGS+=	-Dmtp=false
 .endif
 
-BUILDLINK_TRANSFORM+=	rm:-DG_DISABLE_DEPRECATED
+# http://, https://
+#   HTTP protocol support.
+MESON_ARGS+=	-Dhttp=true
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../net/libsoup3/buildlink3.mk"
+
+# nfs://{HOST}/{SHARE}
+#   NFS v2 and v3 protocols.
+MESON_ARGS+=	-Dnfs=true
+.include "../../wip/libnfs/buildlink3.mk"
+
+# OneDrive support requires libmsgraph-1 but we haven't packaged it
+# yet. Nobody would want to use it anyway.
+MESON_ARGS+=	-Donedrive=false
+
+# sftp://[user@]host[:port], ssh://[user@]host[:port]
+#   SFTP protocol support.
+MESON_ARGS+=	-Dsftp=true
+
+# ufisks2 support requires libudisks2 but we haven't packaged it yet. It's
+# only for Linux anyway.
+MESON_ARGS+=	-Dudisks2=false
 
-DBUS_CFLAGS!=		pkg-config --cflags dbus-1
-CFLAGS+=		${DBUS_CFLAGS}
-CFLAGS.SunOS+=		-D_XOPEN_SOURCE=500 -D__EXTENSIONS__
+# wsdd:///
+#   Access Web Service Discovery Daemon.
+MESON_ARGS+=	-Dwsdd=true
 
+# Blu-Ray metadata support.
+MESON_ARGS+=	-Dbluray=true
+.include "../../multimedia/libbluray/buildlink3.mk"
 
-#BUILDLINK_DEPMETHOD.autogen+= build
-#.include "../../devel/autogen/buildlink3.mk"
+# FUSE support.
+MESON_ARGS+=	-Dfuse=true
+.include "../../mk/fuse.buildlink3.mk"
 
-pre-configure:
-	cd ${WRKSRC} && autoreconf --force --install
+# libgcrypt support.
+MESON_ARGS+=	-Dgcrypt=true
+.include "../../security/libgcrypt/buildlink3.mk"
 
+# logind support requires libelogind but we haven't packaged it yet. It's
+# only for Linux anyway.
+MESON_ARGS+=	-Dlogind=false
 
-DEPENDS+=	glib-networking:../../net/glib-networking
+# libusb-1 support: Not available on DragonFly.
+.if ${OPSYS} == "DragonFly"
+MESON_ARGS+=	-Dlibusb=false
+.else
+MESON_ARGS+=	-Dlibusb=true
+.  include "../../devel/libusb1/buildlink3.mk"
+.endif
+
+# Generate man pages.
+MESON_ARGS+=	-Dman=true
+
+# Some options require libgudev, which is only available on Linux.
+.if ${GUDEV_REQUIRED:tl} == "yes"
+MESON_ARGS+=	-Dgudev=true
+.  include "../../devel/libgudev/buildlink3.mk"
+.else
+MESON_ARGS+=	-Dgudev=false
+.endif
+
+# Some options require gnome-online-accounts, which is supposedly
+# universally available but users would have a reason not to want it by
+# default.
+.if ${GOA_REQUIRED:tl} == "yes"
+MESON_ARGS+=	-Dgoa=true
+.  include "../../net/gnome-online-accounts/buildlink3.mk"
+.else
+MESON_ARGS+=	-Dgoa=false
+.endif
 
-BUILDLINK_API_DEPENDS.glib2+=	glib2>=2.23.4
 .include "../../devel/glib2/modules.mk"
+.include "../../devel/meson/build.mk"
 .include "../../sysutils/dbus/buildlink3.mk"
-.include "../../archivers/libarchive/buildlink3.mk"
-BUILDLINK_API_DEPENDS.libsoup+=	libsoup>=2.26.0
-.include "../../net/libsoup/buildlink3.mk"
-.include "../../textproc/libxml2/buildlink3.mk"
-.include "../../devel/GConf/buildlink3.mk"
-.include "../../security/gcr/buildlink3.mk"
-.include "../../security/openssl/buildlink3.mk"
-#.include "../../security/polkit/buildlink3.mk"
-.include "../../wip/gnome-mount/buildlink3.mk"
+.include "../../sysutils/gsettings-desktop-schemas/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/gvfs/PLIST b/gvfs/PLIST
index e69de29bb2..b201a6f6dc 100644
--- a/gvfs/PLIST
+++ b/gvfs/PLIST
@@ -0,0 +1,155 @@
+@comment $NetBSD$
+lib/gio/modules/libgioremote-volume-monitor.so
+lib/gio/modules/libgvfsdbus.so
+lib/gvfs/libgvfscommon.so
+lib/gvfs/libgvfsdaemon.so
+libexec/gvfs-afc-volume-monitor
+libexec/gvfsd
+${PLIST.admin}libexec/gvfsd-admin
+libexec/gvfsd-afc
+libexec/gvfsd-afp
+libexec/gvfsd-afp-browse
+libexec/gvfsd-archive
+libexec/gvfsd-burn
+${PLIST.cdda}libexec/gvfsd-cdda
+libexec/gvfsd-computer
+libexec/gvfsd-dav
+${PLIST.dnssd}libexec/gvfsd-dnssd
+libexec/gvfsd-ftp
+libexec/gvfsd-fuse
+${PLIST.google}libexec/gvfsd-google
+${PLIST.gphoto2}libexec/gvfsd-gphoto2
+libexec/gvfsd-http
+libexec/gvfsd-localtest
+libexec/gvfsd-metadata
+${PLIST.mtp}libexec/gvfsd-mtp
+libexec/gvfsd-network
+libexec/gvfsd-nfs
+libexec/gvfsd-recent
+libexec/gvfsd-sftp
+${PLIST.smb}libexec/gvfsd-smb
+${PLIST.smb}libexec/gvfsd-smb-browse
+libexec/gvfsd-trash
+libexec/gvfsd-wsdd
+man/man1/gvfsd-fuse.1
+man/man1/gvfsd-metadata.1
+man/man1/gvfsd.1
+man/man7/gvfs.7
+${PLIST.dnssd}share/GConf/gsettings/gvfs-dns-sd.convert
+${PLIST.smb}share/GConf/gsettings/gvfs-smb.convert
+share/dbus-1/services/org.gtk.vfs.AfcVolumeMonitor.service
+share/dbus-1/services/org.gtk.vfs.Daemon.service
+share/dbus-1/services/org.gtk.vfs.Metadata.service
+${PLIST.dnssd}share/glib-2.0/schemas/org.gnome.system.dns_sd.gschema.xml
+share/glib-2.0/schemas/org.gnome.system.gvfs.enums.xml
+${PLIST.smb}share/glib-2.0/schemas/org.gnome.system.smb.gschema.xml
+share/glib-2.0/schemas/org.gnome.system.wsdd.gschema.xml
+${PLIST.admin}share/gvfs/mounts/admin.mount
+share/gvfs/mounts/afc.mount
+share/gvfs/mounts/afp-browse.mount
+share/gvfs/mounts/afp.mount
+share/gvfs/mounts/archive.mount
+share/gvfs/mounts/burn.mount
+${PLIST.cdda}share/gvfs/mounts/cdda.mount
+share/gvfs/mounts/computer.mount
+${PLIST.dnssd}share/gvfs/mounts/dav+sd.mount
+share/gvfs/mounts/dav.mount
+${PLIST.dnssd}share/gvfs/mounts/dns-sd.mount
+share/gvfs/mounts/ftp.mount
+share/gvfs/mounts/ftpis.mount
+share/gvfs/mounts/ftps.mount
+${PLIST.google}share/gvfs/mounts/google.mount
+${PLIST.gphoto2}share/gvfs/mounts/gphoto2.mount
+share/gvfs/mounts/http.mount
+share/gvfs/mounts/localtest.mount
+${PLIST.mtp}share/gvfs/mounts/mtp.mount
+share/gvfs/mounts/network.mount
+share/gvfs/mounts/nfs.mount
+share/gvfs/mounts/recent.mount
+share/gvfs/mounts/sftp.mount
+${PLIST.smb}share/gvfs/mounts/smb-browse.mount
+${PLIST.smb}share/gvfs/mounts/smb.mount
+share/gvfs/mounts/trash.mount
+share/gvfs/mounts/wsdd.mount
+share/gvfs/remote-volume-monitors/afc.monitor
+share/locale/ab/LC_MESSAGES/gvfs.mo
+share/locale/af/LC_MESSAGES/gvfs.mo
+share/locale/ar/LC_MESSAGES/gvfs.mo
+share/locale/as/LC_MESSAGES/gvfs.mo
+share/locale/ast/LC_MESSAGES/gvfs.mo
+share/locale/be/LC_MESSAGES/gvfs.mo
+share/locale/be@latin/LC_MESSAGES/gvfs.mo
+share/locale/bg/LC_MESSAGES/gvfs.mo
+share/locale/bn/LC_MESSAGES/gvfs.mo
+share/locale/bn_IN/LC_MESSAGES/gvfs.mo
+share/locale/bs/LC_MESSAGES/gvfs.mo
+share/locale/ca/LC_MESSAGES/gvfs.mo
+share/locale/ca@valencia/LC_MESSAGES/gvfs.mo
+share/locale/cs/LC_MESSAGES/gvfs.mo
+share/locale/da/LC_MESSAGES/gvfs.mo
+share/locale/de/LC_MESSAGES/gvfs.mo
+share/locale/el/LC_MESSAGES/gvfs.mo
+share/locale/en@shaw/LC_MESSAGES/gvfs.mo
+share/locale/en_GB/LC_MESSAGES/gvfs.mo
+share/locale/eo/LC_MESSAGES/gvfs.mo
+share/locale/es/LC_MESSAGES/gvfs.mo
+share/locale/et/LC_MESSAGES/gvfs.mo
+share/locale/eu/LC_MESSAGES/gvfs.mo
+share/locale/fa/LC_MESSAGES/gvfs.mo
+share/locale/fi/LC_MESSAGES/gvfs.mo
+share/locale/fr/LC_MESSAGES/gvfs.mo
+share/locale/fur/LC_MESSAGES/gvfs.mo
+share/locale/ga/LC_MESSAGES/gvfs.mo
+share/locale/gl/LC_MESSAGES/gvfs.mo
+share/locale/gu/LC_MESSAGES/gvfs.mo
+share/locale/he/LC_MESSAGES/gvfs.mo
+share/locale/hi/LC_MESSAGES/gvfs.mo
+share/locale/hr/LC_MESSAGES/gvfs.mo
+share/locale/hu/LC_MESSAGES/gvfs.mo
+share/locale/id/LC_MESSAGES/gvfs.mo
+share/locale/ie/LC_MESSAGES/gvfs.mo
+share/locale/it/LC_MESSAGES/gvfs.mo
+share/locale/ja/LC_MESSAGES/gvfs.mo
+share/locale/ka/LC_MESSAGES/gvfs.mo
+share/locale/kab/LC_MESSAGES/gvfs.mo
+share/locale/kk/LC_MESSAGES/gvfs.mo
+share/locale/kn/LC_MESSAGES/gvfs.mo
+share/locale/ko/LC_MESSAGES/gvfs.mo
+share/locale/ku/LC_MESSAGES/gvfs.mo
+share/locale/lt/LC_MESSAGES/gvfs.mo
+share/locale/lv/LC_MESSAGES/gvfs.mo
+share/locale/mai/LC_MESSAGES/gvfs.mo
+share/locale/mk/LC_MESSAGES/gvfs.mo
+share/locale/ml/LC_MESSAGES/gvfs.mo
+share/locale/mr/LC_MESSAGES/gvfs.mo
+share/locale/ms/LC_MESSAGES/gvfs.mo
+share/locale/nb/LC_MESSAGES/gvfs.mo
+share/locale/nds/LC_MESSAGES/gvfs.mo
+share/locale/ne/LC_MESSAGES/gvfs.mo
+share/locale/nl/LC_MESSAGES/gvfs.mo
+share/locale/nn/LC_MESSAGES/gvfs.mo
+share/locale/oc/LC_MESSAGES/gvfs.mo
+share/locale/or/LC_MESSAGES/gvfs.mo
+share/locale/pa/LC_MESSAGES/gvfs.mo
+share/locale/pl/LC_MESSAGES/gvfs.mo
+share/locale/pt/LC_MESSAGES/gvfs.mo
+share/locale/pt_BR/LC_MESSAGES/gvfs.mo
+share/locale/ro/LC_MESSAGES/gvfs.mo
+share/locale/ru/LC_MESSAGES/gvfs.mo
+share/locale/sk/LC_MESSAGES/gvfs.mo
+share/locale/sl/LC_MESSAGES/gvfs.mo
+share/locale/sq/LC_MESSAGES/gvfs.mo
+share/locale/sr/LC_MESSAGES/gvfs.mo
+share/locale/sr@latin/LC_MESSAGES/gvfs.mo
+share/locale/sv/LC_MESSAGES/gvfs.mo
+share/locale/ta/LC_MESSAGES/gvfs.mo
+share/locale/te/LC_MESSAGES/gvfs.mo
+share/locale/tg/LC_MESSAGES/gvfs.mo
+share/locale/th/LC_MESSAGES/gvfs.mo
+share/locale/tr/LC_MESSAGES/gvfs.mo
+share/locale/ug/LC_MESSAGES/gvfs.mo
+share/locale/uk/LC_MESSAGES/gvfs.mo
+share/locale/vi/LC_MESSAGES/gvfs.mo
+share/locale/zh_CN/LC_MESSAGES/gvfs.mo
+share/locale/zh_HK/LC_MESSAGES/gvfs.mo
+share/locale/zh_TW/LC_MESSAGES/gvfs.mo
diff --git a/gvfs/TODO b/gvfs/TODO
new file mode 100644
index 0000000000..5adc77376b
--- /dev/null
+++ b/gvfs/TODO
@@ -0,0 +1,16 @@
+<!-- -*- markdown -*- ->
+
+# Fairly untested
+
+This package needs to be tested further, before being imported back to the
+main pkgsrc tree. It especially needs to be build-tested (at least) on
+Linux where a lot of PLIST diffs are expected to happen there.
+
+# gvfsd-fuse is known not to work on NetBSD
+
+This is because NetBSD refuse(3) doesn't support non-root mounting but
+gvfsd(1) relies on this specific functionality. gvfsd(1) launches
+gvfsd-fuse(1) as a regular user, and it exits with an error. We should
+probably implement fusermount(1) as a part of refuse(3).
+
+Or maybe we can get away with just setuid-ing gvfsd-fuse?
diff --git a/gvfs/buildlink3.mk b/gvfs/buildlink3.mk
deleted file mode 100644
index 5400d6c525..0000000000
--- a/gvfs/buildlink3.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-# $NetBSD$
-# XXX
-# XXX This file was created automatically using createbuildlink-3.18.
-# XXX After this file has been verified as correct, the comment lines
-# XXX beginning with "XXX" should be removed.  Please do not commit
-# XXX unverified buildlink3.mk files.
-# XXX
-# XXX Packages that only install static libraries or headers should
-# XXX include the following line:
-# XXX
-# XXX	BUILDLINK_DEPMETHOD.gvfs?=	build
-
-BUILDLINK_TREE+=	gvfs
-
-.if !defined(GVFS_BUILDLINK3_MK)
-GVFS_BUILDLINK3_MK:=
-
-BUILDLINK_API_DEPENDS.gvfs+=	gvfs>=1.30.4nb23
-BUILDLINK_ABI_DEPENDS.gvfs?=	gvfs>=1.30.4nb24
-BUILDLINK_PKGSRCDIR.gvfs?=	../../wip/gvfs
-
-# XXX
-# XXX Uncomment and keep only the buildlink3 lines below which are directly
-# XXX needed for dependencies to compile, link, and run.  If this package
-# XXX provides a wrappered API or otherwise does not expose the APIs of the
-# XXX buildlink3 lines below to dependencies, remove them.
-# XXX
-.include "../../net/samba/buildlink3.mk"
-.include "../../misc/libcdio-paranoia/buildlink3.mk"
-.include "../../wip/hal/buildlink3.mk"
-.include "../../sysutils/dbus/buildlink3.mk"
-.include "../../archivers/libarchive/buildlink3.mk"
-.include "../../net/libsoup/buildlink3.mk"
-.include "../../textproc/libxml2/buildlink3.mk"
-.include "../../devel/GConf/buildlink3.mk"
-.include "../../security/gcr/buildlink3.mk"
-.include "../../security/openssl/buildlink3.mk"
-.include "../../wip/gnome-mount/buildlink3.mk"
-.endif	# GVFS_BUILDLINK3_MK
-
-BUILDLINK_TREE+=	-gvfs
diff --git a/gvfs/distinfo b/gvfs/distinfo
index 712aef4933..717b56fcc6 100644
--- a/gvfs/distinfo
+++ b/gvfs/distinfo
@@ -1,7 +1,7 @@
 $NetBSD: distinfo,v 1.25 2015/11/04 01:32:16 agc Exp $
 
-RMD160 (gvfs-1.30.4.tar.xz) = 4ba199efe4361e657a03777a698ff4766176ea40
-SHA512 (gvfs-1.30.4.tar.xz) = 305b2abc8cfcb4bdea1fb84f5a7df4aac9697494f5d63d40ce1eb234b547aed497deb4d88a2cb17f9ab4fc188d49ff56033993a17cbfebae6d65a33dc84a633a
-Size (gvfs-1.30.4.tar.xz) = 1895304 bytes
-SHA1 (patch-configure) = 9baf399e5b3905dadd77173d2a8114cb5e49b528
-SHA1 (patch-configure.ac) = f53fb836c45ecd2d0c2a218ea90b0404cb1b19c4
+BLAKE2s (gvfs-1.58.0.tar.xz) = 9f9bbd4ed9fc3133a64a8a35bf7455cc0dfa0e5008d1bba59b180ae73f762e62
+SHA512 (gvfs-1.58.0.tar.xz) = b77e1d6184be7310ffad74a45598c07ebc9555d4a5b72d2c2be535e3258a7a2da73f68f74e4ff669988410688e5592e33cf68e30e5ac12d28e9b70d36a4a9b42
+Size (gvfs-1.58.0.tar.xz) = 1283696 bytes
+SHA1 (patch-daemon_ParseFTPList.c) = 50c38494cabb67c4c5047a1dc5a34f487f7349cf
+SHA1 (patch-meson.build) = f223d6dc97791da7ef96cf4cc099c1599c0e39b2
diff --git a/gvfs/hacks.mk b/gvfs/hacks.mk
new file mode 100644
index 0000000000..171f24cd72
--- /dev/null
+++ b/gvfs/hacks.mk
@@ -0,0 +1,23 @@
+# $NetBSD$
+
+.if !defined(GVFS_HACKS_MK)
+GVFS_HACKS_MK=	defined
+
+### [Sat Nov 15 02:58:22 JST 2025 : pho]
+### gvfs' meson.build files uses install_rpath to embed rpath to
+### ${PREFIX}/lib/gvfs. Unpatched Meson handles this just fine but
+### alas... our Meson has a patch to kill the rpath fixup
+### (patches/patch-mesonbuild_scripts_depfixer.py) and it renders
+### install_rpath non-functioning. We can't simply get away with deleting
+### the patch, because depfixer.py cannot inject a DT_RPATH that is longer
+### than existing ones. (Have they considered using patchelf instead of
+### hand-rolling their own ELF patcher?) To overcome the limitation they
+### introduced on their own, Meson allocates a dummy rpath with the same
+### length of install_rpath with every character replaced with 'X', like
+### "-Wl,-rpath,XXXXXXXXXX", which doesn't begin with a '/' so our
+### cwrappers remove them! Meson and our cwrappers fight against each other
+### in a very indirect way, and the only around is to do this silly hack:
+PKG_HACKS+=	rpath-fixup
+LDFLAGS+=	${COMPILER_RPATH_FLAG}${PREFIX:Q}/lib/gvfs
+
+.endif # GVFS_HACKS_MK
diff --git a/gvfs/options.mk b/gvfs/options.mk
new file mode 100644
index 0000000000..4464f99149
--- /dev/null
+++ b/gvfs/options.mk
@@ -0,0 +1,92 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.gvfs
+PKG_SUPPORTED_OPTIONS=	dnssd libgdata samba gcr secret
+PKG_SUGGESTED_OPTIONS=	dnssd secret
+
+.include "../../mk/bsd.fast.prefs.mk"
+.include "../../mk/bsd.options.mk"
+
+.if ${OPSYS} == "Linux"
+# polkit itself is cross-platform but gvfs also requires libcap, which is
+# only available on Linux.
+PKG_SUPPORTED_OPTIONS+=	polkit
+PKG_SUGGESTED_OPTIONS+=	polkit
+.endif
+
+GUDEV_REQUIRED=	no
+GOA_REQUIRED=	no
+
+###
+### admin:///
+###   Access local filesystem as a root user.
+###
+PLIST_VARS+=	admin
+.if !empty(PKG_OPTIONS:Mpolkit)
+MESON_ARGS+=	-Dadmin=true
+PLIST.admin=	yes
+.  include "../../sysutils/libcap/buildlink3.mk"
+.  include "../../security/polkit/buildlink3.mk"
+.else
+MESON_ARGS+=	-Dadmin=false
+.endif
+
+###
+### dns-sd://{DOMAIN}
+###   DNS-SD shares on the local network.
+###
+PLIST_VARS+=	dnssd
+.if !empty(PKG_OPTIONS:Mdnssd)
+MESON_ARGS+=	-Ddnssd=true
+PLIST.dnssd=	yes
+.  include "../../net/avahi/buildlink3.mk"
+.else
+MESON_ARGS+=	-Ddnssd=false
+.endif
+
+###
+### google-drive://{USER}@{HOST}
+###   Access Google Drive.
+###
+PLIST_VARS+=	google
+.if !empty(PKG_OPTIONS:Mlibgdata)
+MESON_ARGS+=	-Dgoogle=true
+PLIST.google=	yes
+GOA_REQUIRED=	yes
+.  include "../../net/libgdata/buildlink3.mk"
+.else
+MESON_ARGS+=	-Dgoogle=false
+.endif
+
+###
+### smb://[user@]host[:port][/share]
+###   SMB/CIFS protocol support.
+###
+PLIST_VARS+=	smb
+.if !empty(PKG_OPTIONS:Msamba)
+MESON_ARGS+=	-Dsmb=true
+PLIST.smb=	yes
+.  include "../../net/samba4/buildlink3.mk"
+.else
+MESON_ARGS+=	-Dsmb=false
+.endif
+
+###
+### GCR support.
+###
+.if !empty(PKG_OPTIONS:Mgcr)
+MESON_ARGS+=	-Dgcr=true
+.  include "../../wip/gcr4/buildlink3.mk"
+.else
+MESON_ARGS+=	-Dgcr=false
+.endif
+
+###
+### GNOME Keyring support.
+###
+.if !empty(PKG_OPTIONS:Msecret)
+MESON_ARGS+=	-Dkeyring=true
+.  include "../../security/libsecret/buildlink3.mk"
+.else
+MESON_ARGS+=	-Dkeyring=false
+.endif
diff --git a/gvfs/patches/patch-client_gvfsfusedaemon.c b/gvfs/patches/patch-client_gvfsfusedaemon.c
deleted file mode 100644
index fb63dfdab4..0000000000
--- a/gvfs/patches/patch-client_gvfsfusedaemon.c
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- client/gvfsfusedaemon.c.orig	2017-03-28 14:05:33.000000000 +0000
-+++ client/gvfsfusedaemon.c
-@@ -2443,7 +2443,9 @@ vfs_init (struct fuse_conn_info *conn)
-   subthread = g_thread_new ("gvfs-fuse-sub", (GThreadFunc) subthread_main, NULL);
- 
-   /* Indicate O_TRUNC support for open() */
-+#ifdef FUSE_CAP_ATOMIC_O_TRUNC
-   conn->want |= FUSE_CAP_ATOMIC_O_TRUNC;
-+#endif
- 
-   /* Prevent out-of-order readahead */
-   conn->async_read = 0;
diff --git a/gvfs/patches/patch-configure.ac b/gvfs/patches/patch-configure.ac
deleted file mode 100644
index fee42989c8..0000000000
--- a/gvfs/patches/patch-configure.ac
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- configure.ac.orig	2017-03-28 14:05:33.000000000 +0000
-+++ configure.ac
-@@ -823,7 +823,7 @@ AC_CHECK_MEMBERS([struct statvfs.f_baset
- dnl
- dnl if statfs() takes 2 arguments (Posix) or 4 (Solaris)
- dnl
--if test "$ac_cv_func_statfs" = yes ; then
-+if test "$ac_cv_func_statvfs" != yes -a "$ac_cv_func_statfs" = yes; then
-   AC_MSG_CHECKING([number of arguments to statfs()])
-   AC_TRY_COMPILE([#include <unistd.h>
-   #ifdef HAVE_SYS_PARAM_H
diff --git a/gvfs/patches/patch-daemon_ParseFTPList.c b/gvfs/patches/patch-daemon_ParseFTPList.c
new file mode 100644
index 0000000000..68f373e4b2
--- /dev/null
+++ b/gvfs/patches/patch-daemon_ParseFTPList.c
@@ -0,0 +1,448 @@
+$NetBSD$
+
+Fix misuse of ctype(3) functions. Please... What the hell is this...
+
+--- daemon/ParseFTPList.c.orig	2025-11-14 15:53:26.627351338 +0000
++++ daemon/ParseFTPList.c
+@@ -127,9 +127,9 @@ int ParseFTPList(const char *line, struc
+             result->fe_type = 'f'; /* its a file */
+           else if (*p == 'm')
+           {
+-            if (isdigit(line[pos]))
++            if (isdigit((unsigned char)line[pos]))
+             {
+-              while (pos < linelen && isdigit(line[pos]))
++              while (pos < linelen && isdigit((unsigned char)line[pos]))
+                 pos++;
+               if (pos < linelen && line[pos] == ',')
+               {
+@@ -143,9 +143,9 @@ int ParseFTPList(const char *line, struc
+           }
+           else if (*p == 's')
+           {
+-            if (isdigit(line[pos]))
++            if (isdigit((unsigned char)line[pos]))
+             {
+-              while (pos < linelen && isdigit(line[pos]))
++              while (pos < linelen && isdigit((unsigned char)line[pos]))
+                 pos++;
+               if (pos < linelen && line[pos] == ',' &&
+                  ((&line[pos]) - (p+1)) < (int) (sizeof(result->fe_size)-1) )
+@@ -155,7 +155,7 @@ int ParseFTPList(const char *line, struc
+               }
+             }
+           }
+-          else if (isalpha(*p)) /* 'i'/'up' or unknown "fact" (property) */
++          else if (isalpha((unsigned char)*p)) /* 'i'/'up' or unknown "fact" (property) */
+           {
+             while (pos < linelen && *++p != ',')
+               pos++;
+@@ -233,9 +233,9 @@ int ParseFTPList(const char *line, struc
+                 break;
+             }
+             else if (p[pos] != '.' && p[pos] != '~' && 
+-                     !isdigit(p[pos]) && !isalpha(p[pos]))
++                     !isdigit((unsigned char)p[pos]) && !isalpha((unsigned char)p[pos]))
+               break;
+-            else if (isalpha(p[pos]) && p[pos] != toupper(p[pos]))
++            else if (isalpha((unsigned char)p[pos]) && p[pos] != toupper((unsigned char)p[pos]))
+               break;
+           }
+           if (pos > 0)
+@@ -251,9 +251,9 @@ int ParseFTPList(const char *line, struc
+           {
+             pos--;
+             if (p[pos] != '$' && p[pos] != '_' && p[pos] != '-' &&
+-                p[pos] != '~' && !isdigit(p[pos]) && !isalpha(p[pos]))
++                p[pos] != '~' && !isdigit((unsigned char)p[pos]) && !isalpha((unsigned char)p[pos]))
+               break;
+-            else if (isalpha(p[pos]) && p[pos] != toupper(p[pos]))
++            else if (isalpha((unsigned char)p[pos]) && p[pos] != toupper((unsigned char)p[pos]))
+               break;
+           }
+           if (pos == 0)
+@@ -289,9 +289,9 @@ int ParseFTPList(const char *line, struc
+          ((toklen[3]==10 || toklen[3]==11 ) &&
+                         (tokens[3][toklen[3]-3]) == '.' )
+         ) &&  /* time in [H]H:MM[:SS[.CC]] format */
+-                                    isdigit(*tokens[1]) && /* size */
+-                                    isdigit(*tokens[2]) && /* date */
+-                                    isdigit(*tokens[3])    /* time */
++                                    isdigit((unsigned char)*tokens[1]) && /* size */
++                                    isdigit((unsigned char)*tokens[2]) && /* date */
++                                    isdigit((unsigned char)*tokens[3])    /* time */
+                 )
+         {
+           lstyle = 'V';
+@@ -328,7 +328,7 @@ int ParseFTPList(const char *line, struc
+             while (lstyle && pos < toklen[0] && *p != ']')
+             {
+               if (*p != '$' && *p != '.' && *p != '_' && *p != '-' &&
+-                  *p != '~' && !isdigit(*p) && !isalpha(*p))              
++                  *p != '~' && !isdigit((unsigned char)*p) && !isalpha((unsigned char)*p))              
+                 lstyle = 0;
+               pos++;
+               p++;
+@@ -348,9 +348,9 @@ int ParseFTPList(const char *line, struc
+           while (lstyle && pos < toklen[0] && *p != ';')
+           {
+             if (*p != '$' && *p != '.' && *p != '_' && *p != '-' &&
+-                *p != '~' && !isdigit(*p) && !isalpha(*p))
++                *p != '~' && !isdigit((unsigned char)*p) && !isalpha((unsigned char)*p))
+               lstyle = 0;
+-            else if (isalpha(*p) && *p != toupper(*p))
++            else if (isalpha((unsigned char)*p) && *p != toupper((unsigned char)*p))
+               lstyle = 0;
+             p++;
+             pos++;
+@@ -361,7 +361,7 @@ int ParseFTPList(const char *line, struc
+               lstyle = 0;
+             for (pos++;lstyle && pos < toklen[0];pos++)
+             {
+-              if (!isdigit(tokens[0][pos]))
++              if (!isdigit((unsigned char)tokens[0][pos]))
+                 lstyle = 0;
+             }
+           }
+@@ -384,11 +384,11 @@ int ParseFTPList(const char *line, struc
+             state->carry_buf_len = pos;
+             return '?'; /* tell caller to treat as junk */
+           }
+-          else if (isdigit(*tokens[1])) /* not no-privs message */
++          else if (isdigit((unsigned char)*tokens[1])) /* not no-privs message */
+           {
+             for (pos = 0; lstyle && pos < (toklen[1]); pos++)
+             {
+-              if (!isdigit((tokens[1][pos])) && (tokens[1][pos]) != '/')
++              if (!isdigit((unsigned char)(tokens[1][pos])) && (tokens[1][pos]) != '/')
+                 lstyle = 0;
+             }
+             if (lstyle && numtoks > 4) /* Multinet or UCX but not CMU */
+@@ -409,7 +409,7 @@ int ParseFTPList(const char *line, struc
+         state->parsed_one = 1;
+         state->lstyle = lstyle;
+ 
+-        if (isdigit(*tokens[1]))  /* not permission denied etc */
++        if (isdigit((unsigned char)*tokens[1]))  /* not permission denied etc */
+         {
+           /* strip leading directory name */
+           if (*tokens[0] == '[') /* CMU server */
+@@ -503,8 +503,8 @@ int ParseFTPList(const char *line, struc
+           if (*p == '-')
+             p++;
+           tbuf[0] = p[0];
+-          tbuf[1] = tolower(p[1]);
+-          tbuf[2] = tolower(p[2]);
++          tbuf[1] = tolower((unsigned char)p[1]);
++          tbuf[2] = tolower((unsigned char)p[2]);
+           month_num = 0;
+           for (pos = 0; pos < (12*3); pos+=3)
+           {
+@@ -587,9 +587,9 @@ int ParseFTPList(const char *line, struc
+                 if ( (*tokens[pos+1] == '-' &&
+                       *tokens[pos+2] == '-' &&
+                       *tokens[pos+3] == '-')  ||
+-                      (isdigit(*tokens[pos+1]) &&
+-                       isdigit(*tokens[pos+2]) &&
+-                       isdigit(*tokens[pos+3])) )
++                      (isdigit((unsigned char)*tokens[pos+1]) &&
++                       isdigit((unsigned char)*tokens[pos+2]) &&
++                       isdigit((unsigned char)*tokens[pos+3])) )
+                 {
+                   lstyle = 'C';
+                   tokmarker = pos;
+@@ -605,7 +605,7 @@ int ParseFTPList(const char *line, struc
+       {
+         for (pos = 0, p = tokens[0]; lstyle && pos < toklen[0]; pos++, p++)
+         {  
+-          if (isalpha(*p) && toupper(*p) != *p)
++          if (isalpha((unsigned char)*p) && toupper((unsigned char)*p) != *p)
+             lstyle = 0;
+         } 
+         for (pos = tokmarker+1; pos <= tokmarker+3; pos++)
+@@ -614,7 +614,7 @@ int ParseFTPList(const char *line, struc
+           {
+             for (p = tokens[pos]; lstyle && p<(tokens[pos]+toklen[pos]); p++)
+             {
+-              if (!isdigit(*p))
++              if (!isdigit((unsigned char)*p))
+                 lstyle = 0;
+             }
+           }
+@@ -635,7 +635,7 @@ int ParseFTPList(const char *line, struc
+             else if (pos != 2 && pos != 5)
+               lstyle = 0;
+           }
+-          else if (*p != '-' && !isdigit(*p))
++          else if (*p != '-' && !isdigit((unsigned char)*p))
+             lstyle = 0;
+           else if (*p == '-' && pos != 4 && pos != 7)
+             lstyle = 0;
+@@ -643,7 +643,7 @@ int ParseFTPList(const char *line, struc
+         for (pos = 0, p = tokens[tokmarker+5]; 
+              lstyle && pos < toklen[tokmarker+5]; pos++, p++)
+         {
+-          if (*p != ':' && !isdigit(*p))
++          if (*p != ':' && !isdigit((unsigned char)*p))
+             lstyle = 0;
+           else if (*p == ':' && pos != (toklen[tokmarker+5]-3)
+                              && pos != (toklen[tokmarker+5]-6))
+@@ -730,16 +730,16 @@ int ParseFTPList(const char *line, struc
+        * "07-14-00  01:38PM              2250540 Valentineoffprank-HiRes.jpg"
+       */
+       if ((numtoks >= 4) && (toklen[0] == 8 || toklen[0] == 10) && toklen[1] == 7 && 
+-          (*tokens[2] == '<' || isdigit(*tokens[2])) )
++          (*tokens[2] == '<' || isdigit((unsigned char)*tokens[2])) )
+       {
+         p = tokens[0];
+-        if ( isdigit(p[0]) && isdigit(p[1]) && p[2]=='-' && 
+-             isdigit(p[3]) && isdigit(p[4]) && p[5]=='-' &&
+-             isdigit(p[6]) && isdigit(p[7]) )
++        if ( isdigit((unsigned char)p[0]) && isdigit((unsigned char)p[1]) && p[2]=='-' && 
++             isdigit((unsigned char)p[3]) && isdigit((unsigned char)p[4]) && p[5]=='-' &&
++             isdigit((unsigned char)p[6]) && isdigit((unsigned char)p[7]) )
+         {
+           p = tokens[1];
+-          if ( isdigit(p[0]) && isdigit(p[1]) && p[2]==':' && 
+-               isdigit(p[3]) && isdigit(p[4]) && 
++          if ( isdigit((unsigned char)p[0]) && isdigit((unsigned char)p[1]) && p[2]==':' && 
++               isdigit((unsigned char)p[3]) && isdigit((unsigned char)p[4]) && 
+                (p[5]=='A' || p[5]=='P') && p[6]=='M')
+           {
+             lstyle = 'W';
+@@ -751,7 +751,7 @@ int ParseFTPList(const char *line, struc
+               {
+                 for (pos = 1; (lstyle && pos < toklen[2]); pos++)
+                 {
+-                  if (!isdigit(*++p))
++                  if (!isdigit((unsigned char)*++p))
+                     lstyle = 0;
+                 }
+               }
+@@ -882,16 +882,16 @@ int ParseFTPList(const char *line, struc
+       */
+       p = &(line[toklen[0]]);
+       /* \s(\d\d-\d\d-\d\d)\s+(\d\d:\d\d)\s */
+-      if (numtoks >= 4 && toklen[0] <= 18 && isdigit(*tokens[0]) &&
++      if (numtoks >= 4 && toklen[0] <= 18 && isdigit((unsigned char)*tokens[0]) &&
+          (linelen - toklen[0]) >= (53-18)                        &&
+          p[18-18] == ' ' && p[34-18] == ' '                      &&
+          p[37-18] == '-' && p[40-18] == '-' && p[43-18] == ' '   &&
+          p[45-18] == ' ' && p[48-18] == ':' && p[51-18] == ' '   &&
+-         isdigit(p[35-18]) && isdigit(p[36-18])                  &&
+-         isdigit(p[38-18]) && isdigit(p[39-18])                  &&
+-         isdigit(p[41-18]) && isdigit(p[42-18])                  &&
+-         isdigit(p[46-18]) && isdigit(p[47-18])                  &&
+-         isdigit(p[49-18]) && isdigit(p[50-18])
++         isdigit((unsigned char)p[35-18]) && isdigit((unsigned char)p[36-18])                  &&
++         isdigit((unsigned char)p[38-18]) && isdigit((unsigned char)p[39-18])                  &&
++         isdigit((unsigned char)p[41-18]) && isdigit((unsigned char)p[42-18])                  &&
++         isdigit((unsigned char)p[46-18]) && isdigit((unsigned char)p[47-18])                  &&
++         isdigit((unsigned char)p[49-18]) && isdigit((unsigned char)p[50-18])
+       )
+       {
+         lstyle = 'O'; /* OS/2 */
+@@ -899,7 +899,7 @@ int ParseFTPList(const char *line, struc
+         {            
+           for (pos = 1; lstyle && pos < toklen[0]; pos++)
+           {
+-            if (!isdigit(tokens[0][pos]))
++            if (!isdigit((unsigned char)tokens[0][pos]))
+               lstyle = 0;
+           }
+         }
+@@ -1046,34 +1046,34 @@ int ParseFTPList(const char *line, struc
+            *  (\d\d\d\d|\d\:\d\d|\d\d\:\d\d|\d\:\d\d\:\d\d|\d\d\:\d\d\:\d\d)
+            *  \s+(.+)$
+           */
+-          if (isdigit(*tokens[pos]) /* size */
++          if (isdigit((unsigned char)*tokens[pos]) /* size */
+               /* (\w\w\w) */
+-           && toklen[pos+1] == 3 && isalpha(*tokens[pos+1]) &&
+-              isalpha(tokens[pos+1][1]) && isalpha(tokens[pos+1][2])
++           && toklen[pos+1] == 3 && isalpha((unsigned char)*tokens[pos+1]) &&
++              isalpha((unsigned char)tokens[pos+1][1]) && isalpha((unsigned char)tokens[pos+1][2])
+               /* (\d|\d\d) */
+-           && isdigit(*tokens[pos+2]) &&
++           && isdigit((unsigned char)*tokens[pos+2]) &&
+                 (toklen[pos+2] == 1 || 
+-                  (toklen[pos+2] == 2 && isdigit(tokens[pos+2][1])))
+-           && toklen[pos+3] >= 4 && isdigit(*tokens[pos+3]) 
++                  (toklen[pos+2] == 2 && isdigit((unsigned char)tokens[pos+2][1])))
++           && toklen[pos+3] >= 4 && isdigit((unsigned char)*tokens[pos+3]) 
+               /* (\d\:\d\d\:\d\d|\d\d\:\d\d\:\d\d) */
+            && (toklen[pos+3] <= 5 || (
+                (toklen[pos+3] == 7 || toklen[pos+3] == 8) &&
+                (tokens[pos+3][toklen[pos+3]-3]) == ':'))
+-           && isdigit(tokens[pos+3][toklen[pos+3]-2])
+-           && isdigit(tokens[pos+3][toklen[pos+3]-1])
++           && isdigit((unsigned char)tokens[pos+3][toklen[pos+3]-2])
++           && isdigit((unsigned char)tokens[pos+3][toklen[pos+3]-1])
+            && (
+               /* (\d\d\d\d) */
+                  ((toklen[pos+3] == 4 || toklen[pos+3] == 5) &&
+-                  isdigit(tokens[pos+3][1]) &&
+-                  isdigit(tokens[pos+3][2])  )
++                  isdigit((unsigned char)tokens[pos+3][1]) &&
++                  isdigit((unsigned char)tokens[pos+3][2])  )
+               /* (\d\:\d\d|\d\:\d\d\:\d\d) */
+               || ((toklen[pos+3] == 4 || toklen[pos+3] == 7) && 
+                   (tokens[pos+3][1]) == ':' &&
+-                  isdigit(tokens[pos+3][2]) && isdigit(tokens[pos+3][3]))
++                  isdigit((unsigned char)tokens[pos+3][2]) && isdigit((unsigned char)tokens[pos+3][3]))
+               /* (\d\d\:\d\d|\d\d\:\d\d\:\d\d) */
+               || ((toklen[pos+3] == 5 || toklen[pos+3] == 8) && 
+-                  isdigit(tokens[pos+3][1]) && (tokens[pos+3][2]) == ':' &&
+-                  isdigit(tokens[pos+3][3]) && isdigit(tokens[pos+3][4])) 
++                  isdigit((unsigned char)tokens[pos+3][1]) && ((unsigned char)tokens[pos+3][2]) == ':' &&
++                  isdigit((unsigned char)tokens[pos+3][3]) && isdigit((unsigned char)tokens[pos+3][4])) 
+               )
+            )
+           {
+@@ -1085,7 +1085,7 @@ int ParseFTPList(const char *line, struc
+             p = tokens[tokmarker];
+             for (i = 0; i < toklen[tokmarker]; i++)
+             {
+-              if (!isdigit(*p++))
++              if (!isdigit((unsigned char)*p++))
+               {
+                 lstyle = 0;
+                 break;
+@@ -1281,7 +1281,7 @@ int ParseFTPList(const char *line, struc
+       * CMT.CSV             0      Jul 06 1995 14:56   RHA
+       */
+       if (numtoks >= 4 && toklen[0] < 13 && 
+-          ((toklen[1] == 5 && *tokens[1] == '<') || isdigit(*tokens[1])) )
++          ((toklen[1] == 5 && *tokens[1] == '<') || isdigit((unsigned char)*tokens[1])) )
+       {
+         if (numtoks == 4
+          && (toklen[2] == 8 || toklen[2] == 9)
+@@ -1289,12 +1289,12 @@ int ParseFTPList(const char *line, struc
+              ((tokens[2][2]) == '-' && (tokens[2][5]) == '-'))
+          && (toklen[3] == 4 || toklen[3] == 5)
+          && (tokens[3][toklen[3]-3]) == ':'
+-         && isdigit(tokens[2][0]) && isdigit(tokens[2][1])
+-         && isdigit(tokens[2][3]) && isdigit(tokens[2][4])
+-         && isdigit(tokens[2][6]) && isdigit(tokens[2][7])
+-         && (toklen[2] < 9 || isdigit(tokens[2][8]))
+-         && isdigit(tokens[3][toklen[3]-1]) && isdigit(tokens[3][toklen[3]-2])
+-         && isdigit(tokens[3][toklen[3]-4]) && isdigit(*tokens[3]) 
++         && isdigit((unsigned char)tokens[2][0]) && isdigit((unsigned char)tokens[2][1])
++         && isdigit((unsigned char)tokens[2][3]) && isdigit((unsigned char)tokens[2][4])
++         && isdigit((unsigned char)tokens[2][6]) && isdigit((unsigned char)tokens[2][7])
++         && (toklen[2] < 9 || isdigit((unsigned char)tokens[2][8]))
++         && isdigit((unsigned char)tokens[3][toklen[3]-1]) && isdigit((unsigned char)tokens[3][toklen[3]-2])
++         && isdigit((unsigned char)tokens[3][toklen[3]-4]) && isdigit((unsigned char)*tokens[3]) 
+          )
+         {
+           lstyle = 'w';
+@@ -1303,13 +1303,13 @@ int ParseFTPList(const char *line, struc
+          && toklen[2] == 3 && toklen[3] == 2
+          && toklen[4] == 4 && toklen[5] == 5
+          && (tokens[5][2]) == ':'
+-         && isalpha(tokens[2][0]) && isalpha(tokens[2][1])
+-         &&                          isalpha(tokens[2][2])
+-         && isdigit(tokens[3][0]) && isdigit(tokens[3][1])
+-         && isdigit(tokens[4][0]) && isdigit(tokens[4][1])
+-         && isdigit(tokens[4][2]) && isdigit(tokens[4][3])
+-         && isdigit(tokens[5][0]) && isdigit(tokens[5][1])
+-         && isdigit(tokens[5][3]) && isdigit(tokens[5][4])
++         && isalpha((unsigned char)tokens[2][0]) && isalpha((unsigned char)tokens[2][1])
++         &&                          isalpha((unsigned char)tokens[2][2])
++         && isdigit((unsigned char)tokens[3][0]) && isdigit((unsigned char)tokens[3][1])
++         && isdigit((unsigned char)tokens[4][0]) && isdigit((unsigned char)tokens[4][1])
++         && isdigit((unsigned char)tokens[4][2]) && isdigit((unsigned char)tokens[4][3])
++         && isdigit((unsigned char)tokens[5][0]) && isdigit((unsigned char)tokens[5][1])
++         && isdigit((unsigned char)tokens[5][3]) && isdigit((unsigned char)tokens[5][4])
+          /* could also check that (&(tokens[5][5]) - tokens[2]) == 17 */
+         )
+         {
+@@ -1323,7 +1323,7 @@ int ParseFTPList(const char *line, struc
+           {
+             for (pos = 0; lstyle && pos < toklen[1]; pos++)
+             {
+-              if (!isdigit(*p++))
++              if (!isdigit((unsigned char)*p++))
+                 lstyle = 0;
+             }
+           } /* not <DIR> */
+@@ -1341,7 +1341,7 @@ int ParseFTPList(const char *line, struc
+         result->fe_type = 'd';
+ 
+         p = tokens[1];
+-        if (isdigit(*p))
++        if (isdigit((unsigned char)*p))
+         {
+           result->fe_type = 'f';
+           pos = toklen[1];
+@@ -1354,9 +1354,9 @@ int ParseFTPList(const char *line, struc
+         p = tokens[2];
+         if (toklen[2] == 3) /* Chameleon */
+         {
+-          tbuf[0] = toupper(p[0]);
+-          tbuf[1] = tolower(p[1]);
+-          tbuf[2] = tolower(p[2]);
++          tbuf[0] = toupper((unsigned char)p[0]);
++          tbuf[1] = tolower((unsigned char)p[1]);
++          tbuf[2] = tolower((unsigned char)p[2]);
+           for (pos = 0; pos < (12*3); pos+=3)
+           {
+             if (tbuf[0] == month_names[pos+0] &&
+@@ -1475,7 +1475,7 @@ int ParseFTPList(const char *line, struc
+         if (linelen > pos)
+         {
+           p = &line[pos];
+-          if ((*p == '-' || *p == '=' || isdigit(*p)) &&
++          if ((*p == '-' || *p == '=' || isdigit((unsigned char)*p)) &&
+               ((linelen == (pos+1)) || 
+                (linelen >= (pos+3) && p[1] == ' ' && p[2] == ' ')) )
+           {
+@@ -1502,7 +1502,7 @@ int ParseFTPList(const char *line, struc
+               {
+                 for (pos = 0; lstyle && pos < toklen[tokmarker]; pos++) 
+                 {
+-                  if (!isdigit(tokens[tokmarker][pos]))
++                  if (!isdigit((unsigned char)tokens[tokmarker][pos]))
+                     lstyle = 0; 
+                 }
+               }
+@@ -1559,7 +1559,7 @@ int ParseFTPList(const char *line, struc
+             result->fe_type  = 'd';
+           }
+         }
+-        else if (isdigit(*tokens[tokmarker]))
++        else if (isdigit((unsigned char)*tokens[tokmarker]))
+         {
+           pos = toklen[tokmarker];
+           if (pos > (sizeof(result->fe_size)-1))
+@@ -1577,24 +1577,24 @@ int ParseFTPList(const char *line, struc
+           pos = toklen[pos];
+ 
+           if ((pos == 4 || pos == 5)
+-          &&  isdigit(*p) && isdigit(p[pos-1]) && isdigit(p[pos-2])
++          &&  isdigit((unsigned char)*p) && isdigit((unsigned char)p[pos-1]) && isdigit((unsigned char)p[pos-2])
+           &&  ((pos == 5 && p[2] == ':') ||  
+-               (pos == 4 && (isdigit(p[1]) || p[1] == ':')))
++               (pos == 4 && (isdigit((unsigned char)p[1]) || p[1] == ':')))
+              )
+           {
+             month_num = tokmarker+1; /* assumed position of month field */
+             pos = tokmarker+2;       /* assumed position of mday field */
+-            if (isdigit(*tokens[month_num])) /* positions are reversed */
++            if (isdigit((unsigned char)*tokens[month_num])) /* positions are reversed */
+             {
+               month_num++;
+               pos--;
+             }
+             p = tokens[month_num];
+-            if (isdigit(*tokens[pos]) 
++            if (isdigit((unsigned char)*tokens[pos]) 
+             && (toklen[pos] == 1 || 
+-                  (toklen[pos] == 2 && isdigit(tokens[pos][1])))
++                  (toklen[pos] == 2 && isdigit((unsigned char)tokens[pos][1])))
+             && toklen[month_num] == 3
+-            && isalpha(*p) && isalpha(p[1]) && isalpha(p[2])  )
++            && isalpha((unsigned char)*p) && isalpha((unsigned char)p[1]) && isalpha((unsigned char)p[2])  )
+             {
+               pos = atoi(tokens[pos]);
+               if (pos > 0 && pos <= 31)
diff --git a/gvfs/patches/patch-meson.build b/gvfs/patches/patch-meson.build
new file mode 100644
index 0000000000..b32d32d13f
--- /dev/null
+++ b/gvfs/patches/patch-meson.build
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Work around a build failure on NetBSD. Not sure if this is the right thing
+though. No software should use statfs(2) in the first place.
+
+--- meson.build.orig	2025-11-14 15:34:15.578508432 +0000
++++ meson.build
+@@ -122,6 +122,10 @@ if cc.compiles(statfs_code.format('statf
+   config_h.set('STATFS_ARGS', 2)
+ elif cc.compiles(statfs_code.format('statfs("/", &st, sizeof (st), 0)'))
+   config_h.set('STATFS_ARGS', 4)
++elif host_machine.system().contains('netbsd')
++  # NetBSD has statfs(2) as a compatibility symbol without a function
++  # declaration, which makes it impossible to determine its type.
++  config_h.set('STATFS_ARGS', 2)
+ else
+   error('unable to determine number of arguments to statfs()')
+ endif
diff --git a/gvfs/patches/patch-monitor_hal_hal-volume-monitor-daemon.c b/gvfs/patches/patch-monitor_hal_hal-volume-monitor-daemon.c
deleted file mode 100644
index 75b6aa7b94..0000000000
--- a/gvfs/patches/patch-monitor_hal_hal-volume-monitor-daemon.c
+++ /dev/null
@@ -1,38 +0,0 @@
-$NetBSD$
-
---- monitor/hal/hal-volume-monitor-daemon.c.orig	2020-09-28 23:58:08.642966101 +0000
-+++ monitor/hal/hal-volume-monitor-daemon.c
-@@ -27,14 +27,33 @@
- #include <glib/gi18n-lib.h>
- #include <gmodule.h>
- #include <gio/gio.h>
-+#include <signal.h>
-+#include <unistd.h>
- 
- #include <gvfsproxyvolumemonitordaemon.h>
- 
- #include "ghalvolumemonitor.h"
- 
-+static char	**saveargs;
-+
-+static void reset(int s) {
-+	sigset_t	set;
-+
-+	sigemptyset(&set);
-+	sigaddset(&set,SIGHUP);
-+	sigprocmask(SIG_UNBLOCK,&set,NULL);
-+	execvp(saveargs[0],saveargs);
-+}
-+
- int
- main (int argc, char *argv[])
- {
-+
-+  if (signal(SIGHUP, reset) ==  SIG_ERR) {
-+	perror ("SIGHUP");
-+	exit (1);
-+  }
-+  saveargs=argv;
-   g_vfs_proxy_volume_monitor_daemon_init ();
-   return g_vfs_proxy_volume_monitor_daemon_main (argc,
-                                                  argv,



Home | Main Index | Thread Index | Old Index