pkgsrc-WIP-changes archive

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

glib: Import glib-2.70.0 as wip/glib



Module Name:	pkgsrc-wip
Committed By:	Dan Cîrnaț <cirnatdan%NetBSD.org@localhost>
Pushed By:	cirnatdan
Date:		Wed Sep 22 13:22:38 2021 +0200
Changeset:	f451c54e51e6532b9fd7ea956b02be44c5f327c0

Added Files:
	glib2/DEINSTALL
	glib2/DESCR
	glib2/INSTALL
	glib2/Makefile
	glib2/Makefile.common
	glib2/PLIST
	glib2/buildlink3.mk
	glib2/distinfo
	glib2/files/modules.tmpl
	glib2/files/schemas.tmpl
	glib2/modules.mk
	glib2/options.mk
	glib2/patches/patch-gio_gcredentialsprivate.h
	glib2/patches/patch-gio_gdbus-2.0_codegen_meson.build
	glib2/patches/patch-gio_glib-compile-schemas.c
	glib2/patches/patch-gio_gresource-tool.c
	glib2/patches/patch-gio_gunixcredentialsmessage.c
	glib2/patches/patch-gio_gunixmounts.c
	glib2/patches/patch-gio_inotify_inotify-kernel.c
	glib2/patches/patch-gio_meson.build
	glib2/patches/patch-gio_tests_gdbus-export.c
	glib2/patches/patch-glib_gatomic.c
	glib2/patches/patch-glib_gatomic.h
	glib2/patches/patch-glib_genviron.c
	glib2/patches/patch-glib_gspawn.c
	glib2/patches/patch-glib_meson.build
	glib2/patches/patch-glib_tests_hash.c
	glib2/patches/patch-glib_tests_include.c
	glib2/patches/patch-glib_tests_meson.build
	glib2/patches/patch-gmodule_gmodule.c
	glib2/patches/patch-gobject_glib-mkenums.in
	glib2/patches/patch-gobject_meson.build
	glib2/patches/patch-meson.build
	glib2/patches/patch-meson_options.txt
	glib2/schemas.mk

Log Message:
glib: Import glib-2.70.0 as wip/glib

Needed for GNOME 41  (main tree is in freeze)

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

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

diffstat:
 glib2/DEINSTALL                                    |  19 +
 glib2/DESCR                                        |   6 +
 glib2/INSTALL                                      |  19 +
 glib2/Makefile                                     |  81 ++++
 glib2/Makefile.common                              |  21 ++
 glib2/PLIST                                        | 416 +++++++++++++++++++++
 glib2/buildlink3.mk                                |  25 ++
 glib2/distinfo                                     |  28 ++
 glib2/files/modules.tmpl                           |  18 +
 glib2/files/schemas.tmpl                           |  18 +
 glib2/modules.mk                                   |  23 ++
 glib2/options.mk                                   |  28 ++
 glib2/patches/patch-gio_gcredentialsprivate.h      |  15 +
 .../patch-gio_gdbus-2.0_codegen_meson.build        |  29 ++
 glib2/patches/patch-gio_glib-compile-schemas.c     |  24 ++
 glib2/patches/patch-gio_gresource-tool.c           |  18 +
 glib2/patches/patch-gio_gunixcredentialsmessage.c  |  18 +
 glib2/patches/patch-gio_gunixmounts.c              |  61 +++
 glib2/patches/patch-gio_inotify_inotify-kernel.c   |  27 ++
 glib2/patches/patch-gio_meson.build                |  15 +
 glib2/patches/patch-gio_tests_gdbus-export.c       |  70 ++++
 glib2/patches/patch-glib_gatomic.c                 |  31 ++
 glib2/patches/patch-glib_gatomic.h                 |  25 ++
 glib2/patches/patch-glib_genviron.c                |  20 +
 glib2/patches/patch-glib_gspawn.c                  |  20 +
 glib2/patches/patch-glib_meson.build               |  33 ++
 glib2/patches/patch-glib_tests_hash.c              |  60 +++
 glib2/patches/patch-glib_tests_include.c           |  17 +
 glib2/patches/patch-glib_tests_meson.build         |  28 ++
 glib2/patches/patch-gmodule_gmodule.c              |  19 +
 glib2/patches/patch-gobject_glib-mkenums.in        |  18 +
 glib2/patches/patch-gobject_meson.build            |  14 +
 glib2/patches/patch-meson.build                    |  57 +++
 glib2/patches/patch-meson_options.txt              |  18 +
 glib2/schemas.mk                                   |  29 ++
 35 files changed, 1368 insertions(+)

diffs:
diff --git a/glib2/DEINSTALL b/glib2/DEINSTALL
new file mode 100644
index 0000000000..976d643c21
--- /dev/null
+++ b/glib2/DEINSTALL
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $NetBSD: DEINSTALL,v 1.1 2011/02/20 17:40:54 jmmv Exp $
+#
+# Forcibly remove any auto-generated caches.  The cache-regeneration tools
+# should be doing this automatically when there are no more files in the
+# directories they scan, but they don't.  And, anyway, we need to do this
+# if we want in-place updates of glib2 to work correctly.
+#
+
+GIO_MODULES_DIR="@GIO_MODULES_DIR@"
+GLIB_SCHEMAS_DIR="@GLIB_SCHEMAS_DIR@"
+
+case ${STAGE} in
+DEINSTALL)
+	${RM} -f "${GIO_MODULES_DIR}/giomodule.cache"
+	${RM} -f "${GLIB_SCHEMAS_DIR}/gschemas.compiled"
+	;;
+esac
diff --git a/glib2/DESCR b/glib2/DESCR
new file mode 100644
index 0000000000..0b160c0cbb
--- /dev/null
+++ b/glib2/DESCR
@@ -0,0 +1,6 @@
+GLib provides the core application building blocks for libraries
+and applications written in C.  It provides the core object system
+used in GNOME, the main loop implementation, and a large set of
+utility functions for strings and common data structures.
+
+This package contains GLib version 2.
diff --git a/glib2/INSTALL b/glib2/INSTALL
new file mode 100644
index 0000000000..c068471e20
--- /dev/null
+++ b/glib2/INSTALL
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# $NetBSD: INSTALL,v 1.1 2011/02/20 17:40:54 jmmv Exp $
+#
+# Generate caches after installing the glib2 package.  This is theorically
+# not needed for a fresh install but is required for in-place updates to
+# work correctly.
+
+GIO_MODULES_DIR="@GIO_MODULES_DIR@"
+GIO_QUERYMODULES="@GIO_QUERYMODULES@"
+GLIB_COMPILE_SCHEMAS="@GLIB_COMPILE_SCHEMAS@"
+GLIB_SCHEMAS_DIR="@GLIB_SCHEMAS_DIR@"
+
+case ${STAGE} in
+POST-INSTALL)
+	"${GIO_QUERYMODULES}" "${GIO_MODULES_DIR}"
+	XDG_DATA_DIRS= "${GLIB_COMPILE_SCHEMAS}" "${GLIB_SCHEMAS_DIR}"
+	;;
+esac
diff --git a/glib2/Makefile b/glib2/Makefile
new file mode 100644
index 0000000000..ece045f02f
--- /dev/null
+++ b/glib2/Makefile
@@ -0,0 +1,81 @@
+# $NetBSD: Makefile,v 1.284 2021/09/18 13:19:26 wiz Exp $
+
+.include "Makefile.common"
+
+PKGREVISION=	1
+
+CATEGORIES=	devel gnome
+COMMENT=	Some useful routines for C programming (glib2)
+
+.include "options.mk"
+
+MESON_ARGS+=	-Dinstalled_tests=false
+# Avoid linux dependency on libmount-dev
+MESON_ARGS+=	-Dlibmount=disabled
+MESON_ARGS+=	-Dlocalstatedir=${VARBASE}
+.if ${OPSYS} == "FreeBSD"
+MESON_ARGS+=	-Db_lundef=false
+.endif
+
+MAKE_ENV+=	LD_LIBRARY_PATH=${WRKSRC}/output/gio:${WRKSRC}/output/glib:${WRKSRC}/output/gobject:${WRKSRC}/output/gmodule
+# For Darwin
+MAKE_ENV+=	DYLD_LIBRARY_PATH=${WRKSRC}/output/gio:${WRKSRC}/output/glib:${WRKSRC}/output/gobject:${WRKSRC}/output/gmodule
+
+CPPFLAGS.SunOS+=	-D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -D__stub_epoll_create
+LDFLAGS.SunOS+=		-liconv -lintl -lnsl -lsocket
+LDFLAGS.FreeBSD+=	-liconv
+
+REPLACE_PYTHON+=	gio/gio-querymodules-wrapper.py
+REPLACE_PYTHON+=	gio/tests/gengiotypefuncs.py
+REPLACE_PYTHON+=	gio/tests/memory-monitor-dbus.py.in
+REPLACE_PYTHON+=	gio/tests/memory-monitor-portal.py.in
+REPLACE_PYTHON+=	gio/tests/static-link.py
+REPLACE_PYTHON+=	glib/update-gtranslit.py
+REPLACE_PYTHON+=	gobject/tests/mkenums.py
+REPLACE_PYTHON+=	tests/gen-casefold-txt.py
+REPLACE_PYTHON+=	tests/gen-casemap-txt.py
+
+GIO_MODULES_DIR=	${PREFIX}/lib/gio/modules
+OWN_DIRS=		${GIO_MODULES_DIR}
+
+FILES_SUBST+=		GIO_MODULES_DIR=${GIO_MODULES_DIR}
+FILES_SUBST+=		GIO_QUERYMODULES=${PREFIX}/bin/gio-querymodules
+FILES_SUBST+=		GLIB_COMPILE_SCHEMAS=${PREFIX}/bin/glib-compile-schemas
+FILES_SUBST+=		GLIB_SCHEMAS_DIR=${PREFIX}/share/glib-2.0/schemas
+
+BUILD_DEFS+=		VARBASE
+
+SUBST_CLASSES+=		xdg
+SUBST_MESSAGE.xdg=	Adjust XDG_DATA_DIRS so schemas and pixbuf loaders are found
+SUBST_STAGE.xdg=	pre-configure
+SUBST_FILES.xdg=	glib/gcharset.c glib/gutils.c gio/xdgmime/xdgmime.c
+SUBST_SED.xdg=		-e 's,/usr/local/share/:/usr/share/,${PREFIX}/share,'
+SUBST_SED.xdg+=		-e 's,/etc/xdg,${PKG_SYSCONFDIR}/xdg,'
+SUBST_SED.xdg+=		-e 's,/usr/share/locale,${PREFIX}/${PKGLOCALEDIR}/locale,'
+
+PKGCONFIG_OVERRIDE+=	output/meson-private/gio-2.0.pc
+PKGCONFIG_OVERRIDE+=	output/meson-private/gio-unix-2.0.pc
+PKGCONFIG_OVERRIDE+=	output/meson-private/glib-2.0.pc
+PKGCONFIG_OVERRIDE+=	output/meson-private/gmodule-2.0.pc
+PKGCONFIG_OVERRIDE+=	output/meson-private/gmodule-export-2.0.pc
+PKGCONFIG_OVERRIDE+=	output/meson-private/gmodule-no-export-2.0.pc
+PKGCONFIG_OVERRIDE+=	output/meson-private/gobject-2.0.pc
+PKGCONFIG_OVERRIDE+=	output/meson-private/gthread-2.0.pc
+
+PKGCONFIG_OVERRIDE_STAGE=	post-configure
+
+# to run gdbus-codegen to generate gdbus-daemon-generated.{h,c}
+TOOL_DEPENDS+=		${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
+PYTHON_FOR_BUILD_ONLY=	yes
+
+post-extract:
+	${CHMOD} +x ${WRKSRC}/gio/tests/gengiotypefuncs.py
+
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../devel/pcre/buildlink3.mk"
+.include "../../devel/meson/build.mk"
+.include "../../devel/libffi/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/glib2/Makefile.common b/glib2/Makefile.common
new file mode 100644
index 0000000000..9f5acd9ca9
--- /dev/null
+++ b/glib2/Makefile.common
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile.common,v 1.94 2021/09/13 07:14:50 adam Exp $
+# used by devel/gdbus-codegen/Makefile
+# used by devel/glib2/Makefile
+# used by devel/glib2-tools/Makefile
+
+DISTNAME=	glib-2.70.0
+PKGNAME=	${DISTNAME:S/glib/glib2/}
+MASTER_SITES=	${MASTER_SITE_GNOME:=sources/glib/${PKGVERSION_NOREV:R}/}
+EXTRACT_SUFX=	.tar.xz
+
+MAINTAINER=	prlw1%cam.ac.uk@localhost
+HOMEPAGE=	https://developer.gnome.org/glib/
+LICENSE=	gnu-lgpl-v2.1
+
+USE_LANGUAGES=	c c++ c99
+USE_TOOLS+=	msgfmt pkg-config
+
+# does snprintf %d with pid_t...
+BUILDLINK_TRANSFORM+=	rm:-Werror=format=2
+
+PYTHON_VERSIONS_INCOMPATIBLE=	27
diff --git a/glib2/PLIST b/glib2/PLIST
new file mode 100644
index 0000000000..b6254a9075
--- /dev/null
+++ b/glib2/PLIST
@@ -0,0 +1,416 @@
+@comment $NetBSD$
+bin/gapplication
+bin/gdbus
+bin/gio
+bin/gio-querymodules
+bin/glib-compile-resources
+bin/glib-compile-schemas
+bin/glib-gettextize
+bin/gobject-query
+bin/gresource
+bin/gsettings
+include/gio-unix-2.0/gio/gdesktopappinfo.h
+include/gio-unix-2.0/gio/gfiledescriptorbased.h
+include/gio-unix-2.0/gio/gunixconnection.h
+include/gio-unix-2.0/gio/gunixcredentialsmessage.h
+include/gio-unix-2.0/gio/gunixfdlist.h
+include/gio-unix-2.0/gio/gunixfdmessage.h
+include/gio-unix-2.0/gio/gunixinputstream.h
+include/gio-unix-2.0/gio/gunixmounts.h
+include/gio-unix-2.0/gio/gunixoutputstream.h
+include/gio-unix-2.0/gio/gunixsocketaddress.h
+include/glib-2.0/gio/gaction.h
+include/glib-2.0/gio/gactiongroup.h
+include/glib-2.0/gio/gactiongroupexporter.h
+include/glib-2.0/gio/gactionmap.h
+include/glib-2.0/gio/gappinfo.h
+include/glib-2.0/gio/gapplication.h
+include/glib-2.0/gio/gapplicationcommandline.h
+include/glib-2.0/gio/gasyncinitable.h
+include/glib-2.0/gio/gasyncresult.h
+include/glib-2.0/gio/gbufferedinputstream.h
+include/glib-2.0/gio/gbufferedoutputstream.h
+include/glib-2.0/gio/gbytesicon.h
+include/glib-2.0/gio/gcancellable.h
+include/glib-2.0/gio/gcharsetconverter.h
+include/glib-2.0/gio/gcontenttype.h
+include/glib-2.0/gio/gconverter.h
+include/glib-2.0/gio/gconverterinputstream.h
+include/glib-2.0/gio/gconverteroutputstream.h
+include/glib-2.0/gio/gcredentials.h
+include/glib-2.0/gio/gdatagrambased.h
+include/glib-2.0/gio/gdatainputstream.h
+include/glib-2.0/gio/gdataoutputstream.h
+include/glib-2.0/gio/gdbusactiongroup.h
+include/glib-2.0/gio/gdbusaddress.h
+include/glib-2.0/gio/gdbusauthobserver.h
+include/glib-2.0/gio/gdbusconnection.h
+include/glib-2.0/gio/gdbuserror.h
+include/glib-2.0/gio/gdbusinterface.h
+include/glib-2.0/gio/gdbusinterfaceskeleton.h
+include/glib-2.0/gio/gdbusintrospection.h
+include/glib-2.0/gio/gdbusmenumodel.h
+include/glib-2.0/gio/gdbusmessage.h
+include/glib-2.0/gio/gdbusmethodinvocation.h
+include/glib-2.0/gio/gdbusnameowning.h
+include/glib-2.0/gio/gdbusnamewatching.h
+include/glib-2.0/gio/gdbusobject.h
+include/glib-2.0/gio/gdbusobjectmanager.h
+include/glib-2.0/gio/gdbusobjectmanagerclient.h
+include/glib-2.0/gio/gdbusobjectmanagerserver.h
+include/glib-2.0/gio/gdbusobjectproxy.h
+include/glib-2.0/gio/gdbusobjectskeleton.h
+include/glib-2.0/gio/gdbusproxy.h
+include/glib-2.0/gio/gdbusserver.h
+include/glib-2.0/gio/gdbusutils.h
+include/glib-2.0/gio/gdrive.h
+include/glib-2.0/gio/gdtlsclientconnection.h
+include/glib-2.0/gio/gdtlsconnection.h
+include/glib-2.0/gio/gdtlsserverconnection.h
+include/glib-2.0/gio/gemblem.h
+include/glib-2.0/gio/gemblemedicon.h
+include/glib-2.0/gio/gfile.h
+include/glib-2.0/gio/gfileattribute.h
+include/glib-2.0/gio/gfileenumerator.h
+include/glib-2.0/gio/gfileicon.h
+include/glib-2.0/gio/gfileinfo.h
+include/glib-2.0/gio/gfileinputstream.h
+include/glib-2.0/gio/gfileiostream.h
+include/glib-2.0/gio/gfilemonitor.h
+include/glib-2.0/gio/gfilenamecompleter.h
+include/glib-2.0/gio/gfileoutputstream.h
+include/glib-2.0/gio/gfilterinputstream.h
+include/glib-2.0/gio/gfilteroutputstream.h
+include/glib-2.0/gio/gicon.h
+include/glib-2.0/gio/ginetaddress.h
+include/glib-2.0/gio/ginetaddressmask.h
+include/glib-2.0/gio/ginetsocketaddress.h
+include/glib-2.0/gio/ginitable.h
+include/glib-2.0/gio/ginputstream.h
+include/glib-2.0/gio/gio-autocleanups.h
+include/glib-2.0/gio/gio.h
+include/glib-2.0/gio/gioenums.h
+include/glib-2.0/gio/gioenumtypes.h
+include/glib-2.0/gio/gioerror.h
+include/glib-2.0/gio/giomodule.h
+include/glib-2.0/gio/gioscheduler.h
+include/glib-2.0/gio/giostream.h
+include/glib-2.0/gio/giotypes.h
+include/glib-2.0/gio/glistmodel.h
+include/glib-2.0/gio/gliststore.h
+include/glib-2.0/gio/gloadableicon.h
+include/glib-2.0/gio/gmemoryinputstream.h
+include/glib-2.0/gio/gmemorymonitor.h
+include/glib-2.0/gio/gmemoryoutputstream.h
+include/glib-2.0/gio/gmenu.h
+include/glib-2.0/gio/gmenuexporter.h
+include/glib-2.0/gio/gmenumodel.h
+include/glib-2.0/gio/gmount.h
+include/glib-2.0/gio/gmountoperation.h
+include/glib-2.0/gio/gnativesocketaddress.h
+include/glib-2.0/gio/gnativevolumemonitor.h
+include/glib-2.0/gio/gnetworkaddress.h
+include/glib-2.0/gio/gnetworking.h
+include/glib-2.0/gio/gnetworkmonitor.h
+include/glib-2.0/gio/gnetworkservice.h
+include/glib-2.0/gio/gnotification.h
+include/glib-2.0/gio/goutputstream.h
+include/glib-2.0/gio/gpermission.h
+include/glib-2.0/gio/gpollableinputstream.h
+include/glib-2.0/gio/gpollableoutputstream.h
+include/glib-2.0/gio/gpollableutils.h
+include/glib-2.0/gio/gpowerprofilemonitor.h
+include/glib-2.0/gio/gpropertyaction.h
+include/glib-2.0/gio/gproxy.h
+include/glib-2.0/gio/gproxyaddress.h
+include/glib-2.0/gio/gproxyaddressenumerator.h
+include/glib-2.0/gio/gproxyresolver.h
+include/glib-2.0/gio/gremoteactiongroup.h
+include/glib-2.0/gio/gresolver.h
+include/glib-2.0/gio/gresource.h
+include/glib-2.0/gio/gseekable.h
+include/glib-2.0/gio/gsettings.h
+include/glib-2.0/gio/gsettingsbackend.h
+include/glib-2.0/gio/gsettingsschema.h
+include/glib-2.0/gio/gsimpleaction.h
+include/glib-2.0/gio/gsimpleactiongroup.h
+include/glib-2.0/gio/gsimpleasyncresult.h
+include/glib-2.0/gio/gsimpleiostream.h
+include/glib-2.0/gio/gsimplepermission.h
+include/glib-2.0/gio/gsimpleproxyresolver.h
+include/glib-2.0/gio/gsocket.h
+include/glib-2.0/gio/gsocketaddress.h
+include/glib-2.0/gio/gsocketaddressenumerator.h
+include/glib-2.0/gio/gsocketclient.h
+include/glib-2.0/gio/gsocketconnectable.h
+include/glib-2.0/gio/gsocketconnection.h
+include/glib-2.0/gio/gsocketcontrolmessage.h
+include/glib-2.0/gio/gsocketlistener.h
+include/glib-2.0/gio/gsocketservice.h
+include/glib-2.0/gio/gsrvtarget.h
+include/glib-2.0/gio/gsubprocess.h
+include/glib-2.0/gio/gsubprocesslauncher.h
+include/glib-2.0/gio/gtask.h
+include/glib-2.0/gio/gtcpconnection.h
+include/glib-2.0/gio/gtcpwrapperconnection.h
+include/glib-2.0/gio/gtestdbus.h
+include/glib-2.0/gio/gthemedicon.h
+include/glib-2.0/gio/gthreadedsocketservice.h
+include/glib-2.0/gio/gtlsbackend.h
+include/glib-2.0/gio/gtlscertificate.h
+include/glib-2.0/gio/gtlsclientconnection.h
+include/glib-2.0/gio/gtlsconnection.h
+include/glib-2.0/gio/gtlsdatabase.h
+include/glib-2.0/gio/gtlsfiledatabase.h
+include/glib-2.0/gio/gtlsinteraction.h
+include/glib-2.0/gio/gtlspassword.h
+include/glib-2.0/gio/gtlsserverconnection.h
+include/glib-2.0/gio/gvfs.h
+include/glib-2.0/gio/gvolume.h
+include/glib-2.0/gio/gvolumemonitor.h
+include/glib-2.0/gio/gzlibcompressor.h
+include/glib-2.0/gio/gzlibdecompressor.h
+include/glib-2.0/glib-object.h
+include/glib-2.0/glib-unix.h
+include/glib-2.0/glib.h
+include/glib-2.0/glib/deprecated/gallocator.h
+include/glib-2.0/glib/deprecated/gcache.h
+include/glib-2.0/glib/deprecated/gcompletion.h
+include/glib-2.0/glib/deprecated/gmain.h
+include/glib-2.0/glib/deprecated/grel.h
+include/glib-2.0/glib/deprecated/gthread.h
+include/glib-2.0/glib/galloca.h
+include/glib-2.0/glib/garray.h
+include/glib-2.0/glib/gasyncqueue.h
+include/glib-2.0/glib/gatomic.h
+include/glib-2.0/glib/gbacktrace.h
+include/glib-2.0/glib/gbase64.h
+include/glib-2.0/glib/gbitlock.h
+include/glib-2.0/glib/gbookmarkfile.h
+include/glib-2.0/glib/gbytes.h
+include/glib-2.0/glib/gcharset.h
+include/glib-2.0/glib/gchecksum.h
+include/glib-2.0/glib/gconvert.h
+include/glib-2.0/glib/gdataset.h
+include/glib-2.0/glib/gdate.h
+include/glib-2.0/glib/gdatetime.h
+include/glib-2.0/glib/gdir.h
+include/glib-2.0/glib/genviron.h
+include/glib-2.0/glib/gerror.h
+include/glib-2.0/glib/gfileutils.h
+include/glib-2.0/glib/ggettext.h
+include/glib-2.0/glib/ghash.h
+include/glib-2.0/glib/ghmac.h
+include/glib-2.0/glib/ghook.h
+include/glib-2.0/glib/ghostutils.h
+include/glib-2.0/glib/gi18n-lib.h
+include/glib-2.0/glib/gi18n.h
+include/glib-2.0/glib/giochannel.h
+include/glib-2.0/glib/gkeyfile.h
+include/glib-2.0/glib/glib-autocleanups.h
+include/glib-2.0/glib/glib-typeof.h
+include/glib-2.0/glib/glist.h
+include/glib-2.0/glib/gmacros.h
+include/glib-2.0/glib/gmain.h
+include/glib-2.0/glib/gmappedfile.h
+include/glib-2.0/glib/gmarkup.h
+include/glib-2.0/glib/gmem.h
+include/glib-2.0/glib/gmessages.h
+include/glib-2.0/glib/gnode.h
+include/glib-2.0/glib/goption.h
+include/glib-2.0/glib/gpattern.h
+include/glib-2.0/glib/gpoll.h
+include/glib-2.0/glib/gprimes.h
+include/glib-2.0/glib/gprintf.h
+include/glib-2.0/glib/gqsort.h
+include/glib-2.0/glib/gquark.h
+include/glib-2.0/glib/gqueue.h
+include/glib-2.0/glib/grand.h
+include/glib-2.0/glib/grcbox.h
+include/glib-2.0/glib/grefcount.h
+include/glib-2.0/glib/grefstring.h
+include/glib-2.0/glib/gregex.h
+include/glib-2.0/glib/gscanner.h
+include/glib-2.0/glib/gsequence.h
+include/glib-2.0/glib/gshell.h
+include/glib-2.0/glib/gslice.h
+include/glib-2.0/glib/gslist.h
+include/glib-2.0/glib/gspawn.h
+include/glib-2.0/glib/gstdio.h
+include/glib-2.0/glib/gstrfuncs.h
+include/glib-2.0/glib/gstring.h
+include/glib-2.0/glib/gstringchunk.h
+include/glib-2.0/glib/gstrvbuilder.h
+include/glib-2.0/glib/gtestutils.h
+include/glib-2.0/glib/gthread.h
+include/glib-2.0/glib/gthreadpool.h
+include/glib-2.0/glib/gtimer.h
+include/glib-2.0/glib/gtimezone.h
+include/glib-2.0/glib/gtrashstack.h
+include/glib-2.0/glib/gtree.h
+include/glib-2.0/glib/gtypes.h
+include/glib-2.0/glib/gunicode.h
+include/glib-2.0/glib/guri.h
+include/glib-2.0/glib/gutils.h
+include/glib-2.0/glib/guuid.h
+include/glib-2.0/glib/gvariant.h
+include/glib-2.0/glib/gvarianttype.h
+include/glib-2.0/glib/gversion.h
+include/glib-2.0/glib/gversionmacros.h
+include/glib-2.0/glib/gwin32.h
+include/glib-2.0/gmodule.h
+include/glib-2.0/gobject/gbinding.h
+include/glib-2.0/gobject/gboxed.h
+include/glib-2.0/gobject/gclosure.h
+include/glib-2.0/gobject/genums.h
+include/glib-2.0/gobject/glib-enumtypes.h
+include/glib-2.0/gobject/glib-types.h
+include/glib-2.0/gobject/gmarshal.h
+include/glib-2.0/gobject/gobject-autocleanups.h
+include/glib-2.0/gobject/gobject.h
+include/glib-2.0/gobject/gobjectnotifyqueue.c
+include/glib-2.0/gobject/gparam.h
+include/glib-2.0/gobject/gparamspecs.h
+include/glib-2.0/gobject/gsignal.h
+include/glib-2.0/gobject/gsourceclosure.h
+include/glib-2.0/gobject/gtype.h
+include/glib-2.0/gobject/gtypemodule.h
+include/glib-2.0/gobject/gtypeplugin.h
+include/glib-2.0/gobject/gvalue.h
+include/glib-2.0/gobject/gvaluearray.h
+include/glib-2.0/gobject/gvaluecollector.h
+include/glib-2.0/gobject/gvaluetypes.h
+lib/glib-2.0/include/glibconfig.h
+lib/libgio-2.0.so
+lib/libgio-2.0.so.0
+lib/libgio-2.0.so.0.7000.0
+lib/libglib-2.0.so
+lib/libglib-2.0.so.0
+lib/libglib-2.0.so.0.7000.0
+lib/libgmodule-2.0.so
+lib/libgmodule-2.0.so.0
+lib/libgmodule-2.0.so.0.7000.0
+lib/libgobject-2.0.so
+lib/libgobject-2.0.so.0
+lib/libgobject-2.0.so.0.7000.0
+lib/libgthread-2.0.so
+lib/libgthread-2.0.so.0
+lib/libgthread-2.0.so.0.7000.0
+lib/pkgconfig/gio-2.0.pc
+lib/pkgconfig/gio-unix-2.0.pc
+lib/pkgconfig/glib-2.0.pc
+lib/pkgconfig/gmodule-2.0.pc
+lib/pkgconfig/gmodule-export-2.0.pc
+lib/pkgconfig/gmodule-no-export-2.0.pc
+lib/pkgconfig/gobject-2.0.pc
+lib/pkgconfig/gthread-2.0.pc
+share/aclocal/glib-2.0.m4
+share/aclocal/glib-gettext.m4
+share/aclocal/gsettings.m4
+share/gdb/auto-load/usr/pkg/lib/libglib-2.0.so.0.7000.0-gdb.py
+share/gdb/auto-load/usr/pkg/lib/libgobject-2.0.so.0.7000.0-gdb.py
+share/gettext/its/gschema.its
+share/gettext/its/gschema.loc
+share/glib-2.0/gdb/glib_gdb.py
+share/glib-2.0/gdb/gobject_gdb.py
+share/glib-2.0/gettext/po/Makefile.in.in
+share/glib-2.0/schemas/gschema.dtd
+share/glib-2.0/valgrind/glib.supp
+share/locale/af/LC_MESSAGES/glib20.mo
+share/locale/am/LC_MESSAGES/glib20.mo
+share/locale/an/LC_MESSAGES/glib20.mo
+share/locale/ar/LC_MESSAGES/glib20.mo
+share/locale/as/LC_MESSAGES/glib20.mo
+share/locale/ast/LC_MESSAGES/glib20.mo
+share/locale/az/LC_MESSAGES/glib20.mo
+share/locale/be/LC_MESSAGES/glib20.mo
+share/locale/be@latin/LC_MESSAGES/glib20.mo
+share/locale/bg/LC_MESSAGES/glib20.mo
+share/locale/bn/LC_MESSAGES/glib20.mo
+share/locale/bn_IN/LC_MESSAGES/glib20.mo
+share/locale/bs/LC_MESSAGES/glib20.mo
+share/locale/ca/LC_MESSAGES/glib20.mo
+share/locale/ca@valencia/LC_MESSAGES/glib20.mo
+share/locale/cs/LC_MESSAGES/glib20.mo
+share/locale/cy/LC_MESSAGES/glib20.mo
+share/locale/da/LC_MESSAGES/glib20.mo
+share/locale/de/LC_MESSAGES/glib20.mo
+share/locale/dz/LC_MESSAGES/glib20.mo
+share/locale/el/LC_MESSAGES/glib20.mo
+share/locale/en@shaw/LC_MESSAGES/glib20.mo
+share/locale/en_CA/LC_MESSAGES/glib20.mo
+share/locale/en_GB/LC_MESSAGES/glib20.mo
+share/locale/eo/LC_MESSAGES/glib20.mo
+share/locale/es/LC_MESSAGES/glib20.mo
+share/locale/et/LC_MESSAGES/glib20.mo
+share/locale/eu/LC_MESSAGES/glib20.mo
+share/locale/fa/LC_MESSAGES/glib20.mo
+share/locale/fi/LC_MESSAGES/glib20.mo
+share/locale/fr/LC_MESSAGES/glib20.mo
+share/locale/fur/LC_MESSAGES/glib20.mo
+share/locale/ga/LC_MESSAGES/glib20.mo
+share/locale/gd/LC_MESSAGES/glib20.mo
+share/locale/gl/LC_MESSAGES/glib20.mo
+share/locale/gu/LC_MESSAGES/glib20.mo
+share/locale/he/LC_MESSAGES/glib20.mo
+share/locale/hi/LC_MESSAGES/glib20.mo
+share/locale/hr/LC_MESSAGES/glib20.mo
+share/locale/hu/LC_MESSAGES/glib20.mo
+share/locale/hy/LC_MESSAGES/glib20.mo
+share/locale/id/LC_MESSAGES/glib20.mo
+share/locale/is/LC_MESSAGES/glib20.mo
+share/locale/it/LC_MESSAGES/glib20.mo
+share/locale/ja/LC_MESSAGES/glib20.mo
+share/locale/ka/LC_MESSAGES/glib20.mo
+share/locale/kk/LC_MESSAGES/glib20.mo
+share/locale/kn/LC_MESSAGES/glib20.mo
+share/locale/ko/LC_MESSAGES/glib20.mo
+share/locale/ku/LC_MESSAGES/glib20.mo
+share/locale/lt/LC_MESSAGES/glib20.mo
+share/locale/lv/LC_MESSAGES/glib20.mo
+share/locale/mai/LC_MESSAGES/glib20.mo
+share/locale/mg/LC_MESSAGES/glib20.mo
+share/locale/mk/LC_MESSAGES/glib20.mo
+share/locale/ml/LC_MESSAGES/glib20.mo
+share/locale/mn/LC_MESSAGES/glib20.mo
+share/locale/mr/LC_MESSAGES/glib20.mo
+share/locale/ms/LC_MESSAGES/glib20.mo
+share/locale/nb/LC_MESSAGES/glib20.mo
+share/locale/nds/LC_MESSAGES/glib20.mo
+share/locale/ne/LC_MESSAGES/glib20.mo
+share/locale/nl/LC_MESSAGES/glib20.mo
+share/locale/nn/LC_MESSAGES/glib20.mo
+share/locale/oc/LC_MESSAGES/glib20.mo
+share/locale/or/LC_MESSAGES/glib20.mo
+share/locale/pa/LC_MESSAGES/glib20.mo
+share/locale/pl/LC_MESSAGES/glib20.mo
+share/locale/ps/LC_MESSAGES/glib20.mo
+share/locale/pt/LC_MESSAGES/glib20.mo
+share/locale/pt_BR/LC_MESSAGES/glib20.mo
+share/locale/ro/LC_MESSAGES/glib20.mo
+share/locale/ru/LC_MESSAGES/glib20.mo
+share/locale/rw/LC_MESSAGES/glib20.mo
+share/locale/si/LC_MESSAGES/glib20.mo
+share/locale/sk/LC_MESSAGES/glib20.mo
+share/locale/sl/LC_MESSAGES/glib20.mo
+share/locale/sq/LC_MESSAGES/glib20.mo
+share/locale/sr/LC_MESSAGES/glib20.mo
+share/locale/sr@ije/LC_MESSAGES/glib20.mo
+share/locale/sr@latin/LC_MESSAGES/glib20.mo
+share/locale/sv/LC_MESSAGES/glib20.mo
+share/locale/ta/LC_MESSAGES/glib20.mo
+share/locale/te/LC_MESSAGES/glib20.mo
+share/locale/tg/LC_MESSAGES/glib20.mo
+share/locale/th/LC_MESSAGES/glib20.mo
+share/locale/tl/LC_MESSAGES/glib20.mo
+share/locale/tr/LC_MESSAGES/glib20.mo
+share/locale/tt/LC_MESSAGES/glib20.mo
+share/locale/ug/LC_MESSAGES/glib20.mo
+share/locale/uk/LC_MESSAGES/glib20.mo
+share/locale/vi/LC_MESSAGES/glib20.mo
+share/locale/wa/LC_MESSAGES/glib20.mo
+share/locale/xh/LC_MESSAGES/glib20.mo
+share/locale/yi/LC_MESSAGES/glib20.mo
+share/locale/zh_CN/LC_MESSAGES/glib20.mo
+share/locale/zh_HK/LC_MESSAGES/glib20.mo
+share/locale/zh_TW/LC_MESSAGES/glib20.mo
diff --git a/glib2/buildlink3.mk b/glib2/buildlink3.mk
new file mode 100644
index 0000000000..16cf3df4d4
--- /dev/null
+++ b/glib2/buildlink3.mk
@@ -0,0 +1,25 @@
+# $NetBSD: buildlink3.mk,v 1.31 2020/03/08 16:42:24 bsiegert Exp $
+
+BUILDLINK_TREE+=	glib2
+
+.if !defined(GLIB2_BUILDLINK3_MK)
+GLIB2_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.glib2+=	glib2>=2.4.0
+BUILDLINK_ABI_DEPENDS.glib2+=	glib2>=2.64.0nb1
+BUILDLINK_PKGSRCDIR.glib2?=	../../devel/glib2
+BUILDLINK_INCDIRS.glib2+=	include/glib-2.0
+BUILDLINK_INCDIRS.glib2+=	include/gio-unix-2.0
+BUILDLINK_INCDIRS.glib2+=	lib/glib-2.0/include
+
+TOOL_DEPENDS+=	glib2-tools-[0-9]*:../../devel/glib2-tools
+
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../devel/pcre/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../devel/libffi/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.endif # GLIB2_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-glib2
diff --git a/glib2/distinfo b/glib2/distinfo
new file mode 100644
index 0000000000..c3015bec9c
--- /dev/null
+++ b/glib2/distinfo
@@ -0,0 +1,28 @@
+$NetBSD: distinfo,v 1.290 2021/09/18 13:19:26 wiz Exp $
+
+SHA1 (glib-2.70.0.tar.xz) = c09ce3b8f917d1ee1aa4d5168afdaff5a518429a
+RMD160 (glib-2.70.0.tar.xz) = 139674d8107c540d5f826fabe0c756a4f4fc84a7
+SHA512 (glib-2.70.0.tar.xz) = fd3fcaebd34aebe0e63f9dc915b2df026a3f88a5c2254e9f17beea0a59ab0ac563976fca54eb57bd2f7af183c4ae76fb86f05951216bf4159d258b5e7b29696f
+Size (glib-2.70.0.tar.xz) = 4796812 bytes
+SHA1 (patch-gio_gcredentialsprivate.h) = 6547edb518a98c3aca53acc1f98bde83e71b14cb
+SHA1 (patch-gio_gdbus-2.0_codegen_meson.build) = ec8ce89da08059ebf953d84a1dca5a2b380349f4
+SHA1 (patch-gio_glib-compile-schemas.c) = 4fc8e8ba62bef01762007ebf21569053374808d0
+SHA1 (patch-gio_gresource-tool.c) = ad0e59f48f5f98ea66be568dbe2e5a5d1ac602fc
+SHA1 (patch-gio_gunixcredentialsmessage.c) = c13119ddd6262db7c03e53857e987f0c495d3312
+SHA1 (patch-gio_gunixmounts.c) = 6213fb2d4cb52af0ebbe794832e37dd3de9fd27f
+SHA1 (patch-gio_inotify_inotify-kernel.c) = 78544b4c32ef3b44e8721b1c07407f46a9e8c8a4
+SHA1 (patch-gio_meson.build) = c2bda4943f8580706ec45760604ed1bdf63d1c6f
+SHA1 (patch-gio_tests_gdbus-export.c) = 59d85ca079d02b52e33153c7d2ac1cc48c26707a
+SHA1 (patch-glib_gatomic.c) = deb2e74010523ad41ce141aa2f49b807ba2672e6
+SHA1 (patch-glib_gatomic.h) = d1c39c3594a5c89d196349e5eafb5512795f55f8
+SHA1 (patch-glib_genviron.c) = dd25be36536d56dfe933225d785eb65f753c4a97
+SHA1 (patch-glib_gspawn.c) = 8f833edd594168fe62c5d0e161ebaafdebda2294
+SHA1 (patch-glib_meson.build) = 65cbe6e3bd650f8f2c37f003a48ef183700a6ef9
+SHA1 (patch-glib_tests_hash.c) = a7e19ca55fcbbc0b188c34755cae5b6b65b67f1a
+SHA1 (patch-glib_tests_include.c) = 12d98caebfb87c1146821d518c37c45f97fc7be0
+SHA1 (patch-glib_tests_meson.build) = d358bd579eb09655c608106092bdeed8f16ff4d0
+SHA1 (patch-gmodule_gmodule.c) = a020920b8e5bad34550c9963eb2fc27bef24c5c9
+SHA1 (patch-gobject_glib-mkenums.in) = c177cf9b1ea81542665240678f47f68351a3760d
+SHA1 (patch-gobject_meson.build) = 412b65558aa4cf9648ee84a57ad6dfcc988b1a1d
+SHA1 (patch-meson.build) = 8d1247f5f7d6165ed70f3d009d5a70d82a52df82
+SHA1 (patch-meson_options.txt) = 7f633fbbfa9d9b2d958365891ffb9e4094d7dd54
diff --git a/glib2/files/modules.tmpl b/glib2/files/modules.tmpl
new file mode 100644
index 0000000000..f909ce496e
--- /dev/null
+++ b/glib2/files/modules.tmpl
@@ -0,0 +1,18 @@
+# $NetBSD: modules.tmpl,v 1.1 2010/11/17 14:09:55 drochner Exp $
+#
+# Rebuild the GIO modules database.
+#
+
+GIO_MODULES_DIR="@GIO_MODULES_DIR@"
+GIO_QUERYMODULES="@GIO_QUERYMODULES@"
+
+case ${STAGE} in
+POST-INSTALL)
+	${GIO_QUERYMODULES} ${GIO_MODULES_DIR}
+	;;
+POST-DEINSTALL)
+	${GIO_QUERYMODULES} ${GIO_MODULES_DIR}
+	;;
+*)
+	;;
+esac
diff --git a/glib2/files/schemas.tmpl b/glib2/files/schemas.tmpl
new file mode 100644
index 0000000000..33313ea4ce
--- /dev/null
+++ b/glib2/files/schemas.tmpl
@@ -0,0 +1,18 @@
+# $NetBSD: schemas.tmpl,v 1.1 2011/01/18 10:03:59 jmmv Exp $
+#
+# Recompile the GSettings schemas.
+#
+
+GLIB_SCHEMAS_DIR="@GLIB_SCHEMAS_DIR@"
+GLIB_COMPILE_SCHEMAS="@GLIB_COMPILE_SCHEMAS@"
+
+case "${STAGE}" in
+POST-INSTALL)
+	XDG_DATA_DIRS= "${GLIB_COMPILE_SCHEMAS}" "${GLIB_SCHEMAS_DIR}"
+	;;
+POST-DEINSTALL)
+	XDG_DATA_DIRS= "${GLIB_COMPILE_SCHEMAS}" "${GLIB_SCHEMAS_DIR}"
+	;;
+*)
+	;;
+esac
diff --git a/glib2/modules.mk b/glib2/modules.mk
new file mode 100644
index 0000000000..517bd78fa4
--- /dev/null
+++ b/glib2/modules.mk
@@ -0,0 +1,23 @@
+# $NetBSD: modules.mk,v 1.2 2019/11/03 10:39:12 rillig Exp $
+#
+# This Makefile fragment is intended to be included by packages that install
+# GIO modules.  It takes care of rebuilding the corresponding databases at
+# (de)installation time.
+#
+
+.if !defined(GIO_MODULES_MK)
+GIO_MODULES_MK=	# defined
+
+GIO_QUERYMODULES=	${BUILDLINK_PREFIX.glib2}/bin/gio-querymodules
+
+FILES_SUBST+=		GIO_MODULES_DIR=${GIO_MODULES_DIR:Q}
+FILES_SUBST+=		GIO_QUERYMODULES=${GIO_QUERYMODULES:Q}
+GIO_MODULES_DIR=	${BUILDLINK_PREFIX.glib2}/lib/gio/modules
+INSTALL_TEMPLATES+=	../../devel/glib2/files/modules.tmpl
+DEINSTALL_TEMPLATES+=	../../devel/glib2/files/modules.tmpl
+
+TOOLS_NOOP+=	gio-querymodules
+
+.include "../../devel/glib2/buildlink3.mk"
+
+.endif			# GIO_MODULES_MK
diff --git a/glib2/options.mk b/glib2/options.mk
new file mode 100644
index 0000000000..fd13a9e729
--- /dev/null
+++ b/glib2/options.mk
@@ -0,0 +1,28 @@
+# $NetBSD: options.mk,v 1.22 2019/10/29 09:22:24 adam Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.glib2
+PKG_SUPPORTED_OPTIONS=	fam
+
+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "Darwin"
+PKG_SUPPORTED_OPTIONS+=	cocoa
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+=	cocoa nococoa
+
+# if this options is enabled, use quartz for gtk{2,3}
+.if !empty(PKG_OPTIONS:Mcocoa)
+MESON_ARGS+=	-Duse_cocoa=true
+PLIST.cocoa=	yes
+.else
+PLIST.nococoa=	yes
+.endif
+
+PLIST_VARS+=	fam
+.if !empty(PKG_OPTIONS:Mfam)
+MESON_ARGS+=	-Dfam=true
+PLIST.fam=	yes
+.include "../../mk/fam.buildlink3.mk"
+.endif
diff --git a/glib2/patches/patch-gio_gcredentialsprivate.h b/glib2/patches/patch-gio_gcredentialsprivate.h
new file mode 100644
index 0000000000..a56a0adf77
--- /dev/null
+++ b/glib2/patches/patch-gio_gcredentialsprivate.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-gio_gcredentialsprivate.h,v 1.4 2020/09/29 10:43:33 prlw1 Exp $
+
+NetBSD has G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED.
+
+--- gio/gcredentialsprivate.h.orig	2020-08-18 10:52:24.847177300 +0000
++++ gio/gcredentialsprivate.h
+@@ -134,7 +134,7 @@
+ #define G_CREDENTIALS_USE_NETBSD_UNPCBID 1
+ #define G_CREDENTIALS_NATIVE_TYPE G_CREDENTIALS_TYPE_NETBSD_UNPCBID
+ #define G_CREDENTIALS_NATIVE_SIZE (sizeof (struct unpcbid))
+-/* #undef G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED */
++#define G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED 1
+ #define G_CREDENTIALS_SPOOFING_SUPPORTED 1
+ #define G_CREDENTIALS_HAS_PID 1
+ 
diff --git a/glib2/patches/patch-gio_gdbus-2.0_codegen_meson.build b/glib2/patches/patch-gio_gdbus-2.0_codegen_meson.build
new file mode 100644
index 0000000000..01e64fccef
--- /dev/null
+++ b/glib2/patches/patch-gio_gdbus-2.0_codegen_meson.build
@@ -0,0 +1,29 @@
+$NetBSD: patch-gio_gdbus-2.0_codegen_meson.build,v 1.2 2019/11/14 11:40:30 wiz Exp $
+
+Leave gdbus-2.0/codegen sudirectory to devel/gdbus-codegen package.
+
+--- gio/gdbus-2.0/codegen/meson.build.orig	2019-10-04 11:44:23.000000000 +0000
++++ gio/gdbus-2.0/codegen/meson.build
+@@ -17,6 +17,7 @@ gdbus_codegen_conf.set('DATADIR', glib_d
+ gdbus_codegen = configure_file(input : 'gdbus-codegen.in',
+   output : 'gdbus-codegen',
+   install_dir : get_option('bindir'),
++  install : false,
+   configuration : gdbus_codegen_conf
+ )
+   # Provide tools for others when we're a subproject and they use the Meson GNOME module
+@@ -28,6 +29,7 @@ gdbus_codegen_built_files = []
+ gdbus_codegen_built_files += configure_file(input : 'config.py.in',
+                                             output : 'config.py',
+                                             install_dir : codegen_dir,
++                                            install : false,
+                                             configuration : gdbus_codegen_conf)
+ 
+ foreach f : gdbus_codegen_files
+@@ -35,5 +37,6 @@ foreach f : gdbus_codegen_files
+   # and then install it too so that it can be used after installation
+   gdbus_codegen_built_files += configure_file(input : f, output : f,
+                                               install_dir : codegen_dir,
++                                              install : false,
+                                               copy : true)
+ endforeach
diff --git a/glib2/patches/patch-gio_glib-compile-schemas.c b/glib2/patches/patch-gio_glib-compile-schemas.c
new file mode 100644
index 0000000000..4d1409986d
--- /dev/null
+++ b/glib2/patches/patch-gio_glib-compile-schemas.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-gio_glib-compile-schemas.c,v 1.1 2020/09/18 11:18:29 wiz Exp $
+
+gsettings-desktop-schemas uses deprecated paths and is not going to stop
+anytime soon, see
+https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/issues/27
+
+--- gio/glib-compile-schemas.c.orig	2020-08-18 11:06:36.941520700 +0000
++++ gio/glib-compile-schemas.c
+@@ -1232,6 +1232,7 @@ parse_state_start_schema (ParseState  *s
+       return;
+     }
+ 
++#if 0
+   if (path && (g_str_has_prefix (path, "/apps/") ||
+                g_str_has_prefix (path, "/desktop/") ||
+                g_str_has_prefix (path, "/system/")))
+@@ -1244,6 +1245,7 @@ parse_state_start_schema (ParseState  *s
+       g_printerr ("%s\n", message);
+       g_free (message);
+     }
++#endif
+ 
+   state->schema_state = schema_state_new (path, gettext_domain,
+                                           extends, extends_name, list_of);
diff --git a/glib2/patches/patch-gio_gresource-tool.c b/glib2/patches/patch-gio_gresource-tool.c
new file mode 100644
index 0000000000..7f7d34e218
--- /dev/null
+++ b/glib2/patches/patch-gio_gresource-tool.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-gio_gresource-tool.c,v 1.2 2019/06/03 09:53:50 prlw1 Exp $
+
+Solaris fix
+
+--- gio/gresource-tool.c.orig	2019-05-03 13:43:28.000000000 +0000
++++ gio/gresource-tool.c
+@@ -29,6 +29,11 @@
+ #include <locale.h>
+ 
+ #ifdef HAVE_LIBELF
++/* Solaris native libelf does not support largefile in 32-bit mode */
++#  if defined(__sun) && defined(__i386)
++#    undef  _FILE_OFFSET_BITS
++#    define _FILE_OFFSET_BITS   32
++#  endif
+ #include <libelf.h>
+ #include <gelf.h>
+ #endif
diff --git a/glib2/patches/patch-gio_gunixcredentialsmessage.c b/glib2/patches/patch-gio_gunixcredentialsmessage.c
new file mode 100644
index 0000000000..99b1dc5345
--- /dev/null
+++ b/glib2/patches/patch-gio_gunixcredentialsmessage.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-gio_gunixcredentialsmessage.c,v 1.3 2018/10/19 16:44:15 leot Exp $
+
+Remove unused NetBSD case (G_CREDENTIALS_TYPE_NETBSD_UNPCBID does
+not support that, LOCAL_CREDS should be probably be used instead.
+Please not that before NetBSD 8.0 LOCAL_CREDS did not have an sc_pid
+field making it probably not suitable as GCredentials mechanism).
+
+--- gio/gunixcredentialsmessage.c.orig	2017-07-13 23:03:39.000000000 +0000
++++ gio/gunixcredentialsmessage.c
+@@ -89,8 +89,6 @@ g_unix_credentials_message_get_msg_type 
+   return SCM_CREDENTIALS;
+ #elif G_CREDENTIALS_USE_FREEBSD_CMSGCRED
+   return SCM_CREDS;
+-#elif G_CREDENTIALS_USE_NETBSD_UNPCBID
+-  return SCM_CREDS;
+ #elif G_CREDENTIALS_USE_SOLARIS_UCRED
+   return SCM_UCRED;
+ #elif G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED
diff --git a/glib2/patches/patch-gio_gunixmounts.c b/glib2/patches/patch-gio_gunixmounts.c
new file mode 100644
index 0000000000..6608636de3
--- /dev/null
+++ b/glib2/patches/patch-gio_gunixmounts.c
@@ -0,0 +1,61 @@
+$NetBSD: patch-gio_gunixmounts.c,v 1.6 2021/09/18 13:19:26 wiz Exp $
+
+SunOS has sys/mntent.h but no mnt_opts.
+XXX who else uses the sys/mntent.h case?
+https://gitlab.gnome.org/GNOME/glib/merge_requests/890
+
+getfsent does not support multiple threads, so use lock around its
+use.
+https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250311
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1717
+
+--- gio/gunixmounts.c.orig	2021-08-19 15:27:25.722339900 +0000
++++ gio/gunixmounts.c
+@@ -743,7 +743,7 @@ _g_get_unix_mounts (void)
+                                              mntent.mnt_mountp,
+                                              NULL,
+                                              mntent.mnt_fstype,
+-                                             mntent.mnt_opts,
++                                             mntent.mnt_mntopts,
+                                              is_read_only);
+ 
+       return_list = g_list_prepend (return_list, mount_entry);
+@@ -1406,6 +1406,8 @@ _g_get_unix_mount_points (void)
+ 
+ #elif (defined(HAVE_GETVFSSTAT) || defined(HAVE_GETFSSTAT)) && defined(HAVE_FSTAB_H) && defined(HAVE_SYS_MOUNT_H)
+ 
++G_LOCK_DEFINE_STATIC(getfsent);
++
+ static GList *
+ _g_get_unix_mount_points (void)
+ {
+@@ -1417,9 +1419,6 @@ _g_get_unix_mount_points (void)
+   struct stat sb;
+ #endif
+   
+-  if (!setfsent ())
+-    return NULL;
+-
+   return_list = NULL;
+   
+ #ifdef HAVE_SYS_SYSCTL_H
+@@ -1450,6 +1449,11 @@ _g_get_unix_mount_points (void)
+ #endif
+ #endif
+   
++  G_LOCK (getfsent);
++  if (!setfsent ()) {
++    G_UNLOCK (getfsent);
++    return NULL;
++  }
+   while ((fstab = getfsent ()) != NULL)
+     {
+       gboolean is_read_only = FALSE;
+@@ -1485,6 +1489,7 @@ _g_get_unix_mount_points (void)
+     }
+   
+   endfsent ();
++  G_UNLOCK (getfsent);
+   
+   return g_list_reverse (return_list);
+ }
diff --git a/glib2/patches/patch-gio_inotify_inotify-kernel.c b/glib2/patches/patch-gio_inotify_inotify-kernel.c
new file mode 100644
index 0000000000..b5857131b9
--- /dev/null
+++ b/glib2/patches/patch-gio_inotify_inotify-kernel.c
@@ -0,0 +1,27 @@
+$NetBSD: patch-gio_inotify_inotify-kernel.c,v 1.5 2019/11/14 11:40:30 wiz Exp $
+
+Use _XOPEN_NAME_MAX in lieu of NAME_MAX for SunOS.
+
+Include <sys/filio.h> for FIONREAD on SunOS.
+https://gitlab.gnome.org/GNOME/glib/merge_requests/889
+
+--- gio/inotify/inotify-kernel.c.orig	2019-10-04 11:44:23.000000000 +0000
++++ gio/inotify/inotify-kernel.c
+@@ -33,11 +33,17 @@
+ #ifdef HAVE_SYS_FILIO_H
+ #include <sys/filio.h>
+ #endif
++#ifdef HAVE_SYS_FILIO_H
++#include <sys/filio.h>
++#endif
+ #include <glib/glib-unix.h>
+ 
+ #include "glib-private.h"
+ 
+ /* From inotify(7) */
++#if !defined(NAME_MAX) && defined(_XOPEN_NAME_MAX)
++#define NAME_MAX             _XOPEN_NAME_MAX
++#endif
+ #define MAX_EVENT_SIZE       (sizeof(struct inotify_event) + NAME_MAX + 1)
+ 
+ /* Amount of time to sleep on receipt of uninteresting events */
diff --git a/glib2/patches/patch-gio_meson.build b/glib2/patches/patch-gio_meson.build
new file mode 100644
index 0000000000..e3887055f7
--- /dev/null
+++ b/glib2/patches/patch-gio_meson.build
@@ -0,0 +1,15 @@
+$NetBSD: patch-gio_meson.build,v 1.7 2019/11/14 11:40:30 wiz Exp $
+
+Disable inotify on SunOS.
+
+--- gio/meson.build.orig	2019-10-04 11:44:23.000000000 +0000
++++ gio/meson.build
+@@ -760,7 +760,7 @@ gioenumtypes_c = custom_target('gioenumt
+ gioenumtypes_dep = declare_dependency(sources : [gioenumtypes_h, glib_enumtypes_h])
+ 
+ # inotify
+-if glib_conf.has('HAVE_SYS_INOTIFY_H') and have_func_inotify_init1
++if glib_conf.has('HAVE_SYS_INOTIFY_H') and have_func_inotify_init1 and host_system != 'sunos'
+   subdir('inotify')
+   internal_deps += [ inotify_lib ]
+   internal_objects += [inotify_lib.extract_all_objects()]
diff --git a/glib2/patches/patch-gio_tests_gdbus-export.c b/glib2/patches/patch-gio_tests_gdbus-export.c
new file mode 100644
index 0000000000..7d5d1099fd
--- /dev/null
+++ b/glib2/patches/patch-gio_tests_gdbus-export.c
@@ -0,0 +1,70 @@
+$NetBSD: patch-gio_tests_gdbus-export.c,v 1.1 2019/06/21 20:21:00 prlw1 Exp $
+
+Revert GHashTable improvements
+https://gitlab.gnome.org/GNOME/glib/merge_requests/208
+
+to fix PR pkg/54310
+
+--- gio/tests/gdbus-export.c.orig	2019-06-10 17:47:20.000000000 +0000
++++ gio/tests/gdbus-export.c
+@@ -337,22 +337,6 @@ introspect_callback (GDBusProxy   *proxy
+   g_main_loop_quit (loop);
+ }
+ 
+-static gint
+-compare_strings (gconstpointer a,
+-                 gconstpointer b)
+-{
+-  const gchar *sa = *(const gchar **) a;
+-  const gchar *sb = *(const gchar **) b;
+-
+-  /* Array terminator must sort last */
+-  if (sa == NULL)
+-    return 1;
+-  if (sb == NULL)
+-    return -1;
+-
+-  return strcmp (sa, sb);
+-}
+-
+ static gchar **
+ get_nodes_at (GDBusConnection  *c,
+               const gchar      *object_path)
+@@ -406,9 +390,6 @@ get_nodes_at (GDBusConnection  *c,
+   g_free (xml_data);
+   g_dbus_node_info_unref (node_info);
+ 
+-  /* Nodes are semantically unordered; sort array so tests can rely on order */
+-  g_ptr_array_sort (p, compare_strings);
+-
+   return (gchar **) g_ptr_array_free (p, FALSE);
+ }
+ 
+@@ -1259,9 +1240,9 @@ test_object_registration (void)
+   nodes = get_nodes_at (c, "/foo/dyna");
+   g_assert (nodes != NULL);
+   g_assert_cmpint (g_strv_length (nodes), ==, 3);
+-  g_assert_cmpstr (nodes[0], ==, "cat");
+-  g_assert_cmpstr (nodes[1], ==, "cheezburger");
+-  g_assert_cmpstr (nodes[2], ==, "lol");
++  g_assert_cmpstr (nodes[0], ==, "lol");
++  g_assert_cmpstr (nodes[1], ==, "cat");
++  g_assert_cmpstr (nodes[2], ==, "cheezburger");
+   g_strfreev (nodes);
+   g_assert_cmpint (count_interfaces (c, "/foo/dyna/lol"), ==, 4);
+   g_assert_cmpint (count_interfaces (c, "/foo/dyna/cat"), ==, 4);
+@@ -1272,10 +1253,10 @@ test_object_registration (void)
+   nodes = get_nodes_at (c, "/foo/dyna");
+   g_assert (nodes != NULL);
+   g_assert_cmpint (g_strv_length (nodes), ==, 4);
+-  g_assert_cmpstr (nodes[0], ==, "cat");
+-  g_assert_cmpstr (nodes[1], ==, "cheezburger");
+-  g_assert_cmpstr (nodes[2], ==, "dynamicallycreated");
+-  g_assert_cmpstr (nodes[3], ==, "lol");
++  g_assert_cmpstr (nodes[0], ==, "lol");
++  g_assert_cmpstr (nodes[1], ==, "cat");
++  g_assert_cmpstr (nodes[2], ==, "cheezburger");
++  g_assert_cmpstr (nodes[3], ==, "dynamicallycreated");
+   g_strfreev (nodes);
+   g_assert_cmpint (count_interfaces (c, "/foo/dyna/dynamicallycreated"), ==, 4);
+ 
diff --git a/glib2/patches/patch-glib_gatomic.c b/glib2/patches/patch-glib_gatomic.c
new file mode 100644
index 0000000000..c2585a84f0
--- /dev/null
+++ b/glib2/patches/patch-glib_gatomic.c
@@ -0,0 +1,31 @@
+$NetBSD: patch-glib_gatomic.c,v 1.2 2020/03/04 15:11:48 wiz Exp $
+
+Ignore __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 as is already done
+for android and linux. PR pkg/54298
+
+--- glib/gatomic.c.orig	2020-02-27 16:12:52.000000000 +0000
++++ glib/gatomic.c
+@@ -94,8 +94,6 @@
+  * implement the atomic operations in a lock-free manner.
+  */
+ 
+-#if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
+-
+ /**
+  * g_atomic_int_get:
+  * @atomic: a pointer to a #gint or #guint
+@@ -658,14 +656,6 @@ gsize
+   return InterlockedXor (atomic, val);
+ #endif
+ }
+-#else
+-
+-/* This error occurs when `meson configure` decided that we should be capable
+- * of lock-free atomics but we find at compile-time that we are not.
+- */
+-#error G_ATOMIC_LOCK_FREE defined, but incapable of lock-free atomics.
+-
+-#endif /* defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) */
+ 
+ #else /* G_ATOMIC_LOCK_FREE */
+ 
diff --git a/glib2/patches/patch-glib_gatomic.h b/glib2/patches/patch-glib_gatomic.h
new file mode 100644
index 0000000000..f7f7b3507d
--- /dev/null
+++ b/glib2/patches/patch-glib_gatomic.h
@@ -0,0 +1,25 @@
+$NetBSD: patch-glib_gatomic.h,v 1.2 2020/03/04 15:11:48 wiz Exp $
+
+Ignore __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 as is already done
+for android and linux. PR pkg/54298
+
+--- glib/gatomic.h.orig	2020-02-27 16:12:52.000000000 +0000
++++ glib/gatomic.h
+@@ -82,7 +82,7 @@ gint                    g_atomic_int_exc
+ 
+ G_END_DECLS
+ 
+-#if defined(G_ATOMIC_LOCK_FREE) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
++#if defined(G_ATOMIC_LOCK_FREE)
+ 
+ /* We prefer the new C11-style atomic extension of GCC if available */
+ #if defined(__ATOMIC_SEQ_CST)
+@@ -372,7 +372,7 @@ G_END_DECLS
+ 
+ #endif /* !defined(__ATOMIC_SEQ_CST) */
+ 
+-#else /* defined(G_ATOMIC_LOCK_FREE) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) */
++#else /* defined(G_ATOMIC_LOCK_FREE) */
+ 
+ #define g_atomic_int_get(atomic) \
+   (g_atomic_int_get ((gint *) (atomic)))
diff --git a/glib2/patches/patch-glib_genviron.c b/glib2/patches/patch-glib_genviron.c
new file mode 100644
index 0000000000..ff26525214
--- /dev/null
+++ b/glib2/patches/patch-glib_genviron.c
@@ -0,0 +1,20 @@
+$NetBSD: patch-glib_genviron.c,v 1.2 2020/03/04 15:11:48 wiz Exp $
+
+Avoid the build failure with Clang on FreeBSD (see PR 54752).
+Set environ as a weak symbol (thanks to Joerg).
+
+--- glib/genviron.c.orig	2020-02-27 16:12:52.000000000 +0000
++++ glib/genviron.c
+@@ -329,8 +329,12 @@ g_setenv (const gchar *variable,
+ /* According to the Single Unix Specification, environ is not
+  * in any system header, although unistd.h often declares it.
+  */
++#if defined(__FreeBSD__)
++extern __attribute__((__weak__)) char **environ;
++#else
+ extern char **environ;
+ #endif
++#endif
+ 
+ /**
+  * g_unsetenv:
diff --git a/glib2/patches/patch-glib_gspawn.c b/glib2/patches/patch-glib_gspawn.c
new file mode 100644
index 0000000000..69636285fd
--- /dev/null
+++ b/glib2/patches/patch-glib_gspawn.c
@@ -0,0 +1,20 @@
+$NetBSD: patch-glib_gspawn.c,v 1.2 2020/03/04 15:11:48 wiz Exp $
+
+Avoid the build failure with Clang on FreeBSD (see PR 54752).
+Set environ as a weak symbol (thanks to Joerg).
+
+--- glib/gspawn.c.orig	2020-02-27 16:12:52.000000000 +0000
++++ glib/gspawn.c
+@@ -85,8 +85,12 @@
+ #ifdef HAVE__NSGETENVIRON
+ #define environ (*_NSGetEnviron())
+ #else
++#if defined(__FreeBSD__)
++extern __attribute__((__weak__)) char **environ;
++#else
+ extern char **environ;
+ #endif
++#endif
+ 
+ #ifndef O_CLOEXEC
+ #define O_CLOEXEC 0
diff --git a/glib2/patches/patch-glib_meson.build b/glib2/patches/patch-glib_meson.build
new file mode 100644
index 0000000000..41f3f809bb
--- /dev/null
+++ b/glib2/patches/patch-glib_meson.build
@@ -0,0 +1,33 @@
+$NetBSD: patch-glib_meson.build,v 1.9 2020/09/29 10:43:33 prlw1 Exp $
+
+- Don't bother with gtester as it's slated for deprecation anyway:
+  https://gitlab.gnome.org/GNOME/glib/issues/1441
+
+--- glib/meson.build.orig	2020-02-27 16:12:52.000000000 +0000
++++ glib/meson.build
+@@ -410,25 +410,8 @@ if host_system == 'windows'
+       include_directories : configinc,
+       dependencies : [libglib_dep])
+   endif
+-else
+-  gtester = executable('gtester', 'gtester.c',
+-    install : true,
+-    c_args : ['-UG_DISABLE_ASSERT'],
+-    include_directories : configinc,
+-    dependencies : [libglib_dep])
+ endif
+ 
+-report_conf = configuration_data()
+-report_conf.set('GLIB_VERSION', glib_version)
+-report_conf.set('PYTHON', python_name)
+-configure_file(
+-  input: 'gtester-report.in',
+-  output: 'gtester-report',
+-  install_dir: get_option('bindir'),
+-  configuration: report_conf,
+-  install_mode: 'rwxr-xr-x'
+-)
+-
+ install_data('glib_gdb.py', install_dir : join_paths(glib_pkgdatadir, 'gdb'))
+ 
+ gdb_conf = configuration_data()
diff --git a/glib2/patches/patch-glib_tests_hash.c b/glib2/patches/patch-glib_tests_hash.c
new file mode 100644
index 0000000000..800d81eea3
--- /dev/null
+++ b/glib2/patches/patch-glib_tests_hash.c
@@ -0,0 +1,60 @@
+$NetBSD: patch-glib_tests_hash.c,v 1.3 2020/03/04 15:11:48 wiz Exp $
+
+Revert GHashTable improvements
+https://gitlab.gnome.org/GNOME/glib/merge_requests/208
+
+to fix PR pkg/54310
+
+--- glib/tests/hash.c.orig	2020-02-27 16:12:52.000000000 +0000
++++ glib/tests/hash.c
+@@ -1353,9 +1353,6 @@ struct _GHashTable
+   gint             nnodes;
+   gint             noccupied;  /* nnodes + tombstones */
+ 
+-  guint            have_big_keys : 1;
+-  guint            have_big_values : 1;
+-
+   gpointer        *keys;
+   guint           *hashes;
+   gpointer        *values;
+@@ -1390,23 +1387,6 @@ count_keys (GHashTable *h, gint *unused,
+     }
+ }
+ 
+-#define BIG_ENTRY_SIZE (SIZEOF_VOID_P)
+-#define SMALL_ENTRY_SIZE (SIZEOF_INT)
+-
+-#if SMALL_ENTRY_SIZE < BIG_ENTRY_SIZE
+-# define USE_SMALL_ARRAYS
+-#endif
+-
+-static gpointer
+-fetch_key_or_value (gpointer a, guint index, gboolean is_big)
+-{
+-#ifdef USE_SMALL_ARRAYS
+-  return is_big ? *(((gpointer *) a) + index) : GUINT_TO_POINTER (*(((guint *) a) + index));
+-#else
+-  return *(((gpointer *) a) + index);
+-#endif
+-}
+-
+ static void
+ check_data (GHashTable *h)
+ {
+@@ -1414,9 +1394,14 @@ check_data (GHashTable *h)
+ 
+   for (i = 0; i < h->size; i++)
+     {
+-      if (h->hashes[i] >= 2)
++      if (h->hashes[i] < 2)
++        {
++          g_assert (h->keys[i] == NULL);
++          g_assert (h->values[i] == NULL);
++        }
++      else
+         {
+-          g_assert_cmpint (h->hashes[i], ==, h->hash_func (fetch_key_or_value (h->keys, i, h->have_big_keys)));
++          g_assert_cmpint (h->hashes[i], ==, h->hash_func (h->keys[i]));
+         }
+     }
+ }
diff --git a/glib2/patches/patch-glib_tests_include.c b/glib2/patches/patch-glib_tests_include.c
new file mode 100644
index 0000000000..9861ed9c08
--- /dev/null
+++ b/glib2/patches/patch-glib_tests_include.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-glib_tests_include.c,v 1.3 2019/11/26 10:27:09 jperkin Exp $
+
+Fix SunOS build.
+
+--- glib/tests/include.c.orig	2019-10-21 17:18:40.000000000 +0000
++++ glib/tests/include.c
+@@ -1,8 +1,10 @@
+ /* Test case for bug 659866 */
+ 
++#ifndef __sun
+ #define _POSIX_C_SOURCE 199309L
+ #undef _GNU_SOURCE
+ #undef _XOPEN_SOURCE
++#endif
+ #include <pthread.h>
+ #include <glib.h>
+ 
diff --git a/glib2/patches/patch-glib_tests_meson.build b/glib2/patches/patch-glib_tests_meson.build
new file mode 100644
index 0000000000..b098aef2ba
--- /dev/null
+++ b/glib2/patches/patch-glib_tests_meson.build
@@ -0,0 +1,28 @@
+$NetBSD: patch-glib_tests_meson.build,v 1.2 2021/03/31 10:11:23 wiz Exp $
+
+* Fix gtester is not defined error during configure.
+
+--- glib/tests/meson.build.orig	2021-03-18 13:28:31.953625200 +0000
++++ glib/tests/meson.build
+@@ -269,21 +269,4 @@ executable('testing-helper', 'testing-he
+   install: installed_tests_enabled,
+ )
+ 
+-# some testing of gtester functionality
+-if not meson.is_cross_build() and host_system != 'windows'
+-  xmllint = find_program('xmllint', required: false)
+-  if xmllint.found()
+-    tmpsample_xml = custom_target('tmpsample.xml',
+-      output : 'tmpsample.xml',
+-      command : [ gtester, '-k', '--quiet', '--i-know-this-is-deprecated', '-o', '@OUTPUT@',
+-                  '--test-arg=--gtester-selftest', gtester])
+-
+-    test('gtester-xmllint-check', xmllint,
+-      args : ['--noout', tmpsample_xml],
+-      env : test_env,
+-      suite : ['glib'],
+-    )
+-  endif
+-endif
+-
+ subdir('path-test-subdir')
diff --git a/glib2/patches/patch-gmodule_gmodule.c b/glib2/patches/patch-gmodule_gmodule.c
new file mode 100644
index 0000000000..4590709b1f
--- /dev/null
+++ b/glib2/patches/patch-gmodule_gmodule.c
@@ -0,0 +1,19 @@
+$NetBSD: patch-gmodule_gmodule.c,v 1.3 2021/06/30 14:26:11 prlw1 Exp $
+
+RTL_GLOBAL is a bug.
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2171
+
+--- gmodule/gmodule.c.orig	2021-06-10 18:57:57.268194400 +0000
++++ gmodule/gmodule.c
+@@ -506,9 +506,8 @@ g_module_open (const gchar    *file_name
+       if (!main_module)
+ 	{
+ 	  handle = _g_module_self ();
+-/* On Android 64 bit, RTLD_DEFAULT is (void *)0x0
+- * so it always fails to create main_module if file_name is NULL */
+-#if !defined(__BIONIC__) || !defined(__LP64__)
++/* On Linux, handle == RTLD_DEFAULT is (void *)0x0 */
++#if G_MODULE_IMPL != G_MODULE_IMPL_DL
+ 	  if (handle)
+ #endif
+ 	    {
diff --git a/glib2/patches/patch-gobject_glib-mkenums.in b/glib2/patches/patch-gobject_glib-mkenums.in
new file mode 100644
index 0000000000..376056c7bb
--- /dev/null
+++ b/glib2/patches/patch-gobject_glib-mkenums.in
@@ -0,0 +1,18 @@
+$NetBSD: patch-gobject_glib-mkenums.in,v 1.5 2019/06/03 09:53:50 prlw1 Exp $
+
+- Do not print failing characters that might not be ASCII
+
+--- gobject/glib-mkenums.in.orig	2018-01-08 20:00:49.000000000 +0000
++++ gobject/glib-mkenums.in
+@@ -88,9 +88,8 @@ else:
+ # https://bugzilla.gnome.org/show_bug.cgi?id=785113#c20
+ def replace_and_warn(err):
+     # 7 characters of context either side of the offending character
+-    print_warning('UnicodeWarning: {} at {} ({})'.format(
+-        err.reason, err.start,
+-        err.object[err.start - 7:err.end + 7]))
++    print_warning('UnicodeWarning: {} at {}'.format(
++        err.reason, err.start))
+     return ('?', err.end)
+ 
+ codecs.register_error('replace_and_warn', replace_and_warn)
diff --git a/glib2/patches/patch-gobject_meson.build b/glib2/patches/patch-gobject_meson.build
new file mode 100644
index 0000000000..17acef177b
--- /dev/null
+++ b/glib2/patches/patch-gobject_meson.build
@@ -0,0 +1,14 @@
+$NetBSD: patch-gobject_meson.build,v 1.5 2019/11/14 11:40:30 wiz Exp $
+
+Leave glib-genmarshal and glib-mkenums to devel/glib2-tools.
+
+--- gobject/meson.build.orig	2019-10-04 11:44:24.000000000 +0000
++++ gobject/meson.build
+@@ -75,6 +75,7 @@ foreach tool: python_tools
+     input : tool + '.in',
+     output : tool,
+     configuration : python_tools_conf,
++    install : false,
+     install_dir : glib_bindir,
+   )
+ 
diff --git a/glib2/patches/patch-meson.build b/glib2/patches/patch-meson.build
new file mode 100644
index 0000000000..fc6b0a465a
--- /dev/null
+++ b/glib2/patches/patch-meson.build
@@ -0,0 +1,57 @@
+$NetBSD$
+
+--- meson.build.orig	2021-09-17 10:17:56.849962700 +0000
++++ meson.build
+@@ -778,7 +778,7 @@ if host_system == 'darwin'
+                                       #error "Detected GNUstep, not Cocoa"
+                                       #endif''',
+                                    name : 'Mac OS X Cocoa support')
+-
++  glib_have_cocoa = glib_have_cocoa and get_option('use_cocoa')
+   if glib_have_cocoa
+     glib_conf.set('HAVE_COCOA', true)
+     osx_ldflags += ['-Wl,-framework,Foundation', '-Wl,-framework,AppKit']
+@@ -2047,7 +2047,7 @@ endif
+ # FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible
+ # implementations. This could be extended if issues are found in some platforms.
+ libintl_deps = []
+-if cc.has_function('ngettext', args : osx_ldflags)
++if cc.has_function('ngettext', args : osx_ldflags) and host_system != 'sunos'
+   have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset')
+ else
+   # First just find the bare library.
+@@ -2230,9 +2230,12 @@ endif
+ 
+ glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline)
+ 
+-python = import('python').find_installation('python3')
+-# used for '#!/usr/bin/env <name>'
+-python_name = 'python3'
++python = import('python').find_installation('python3', required: false)
++if not python.found()
++  python = import('python').find_installation()
++endif
++python_name = python.path()
++
+ 
+ python_version = python.language_version()
+ python_version_req = '>=3.5'
+@@ -2241,7 +2244,7 @@ if not python_version.version_compare(py
+ endif
+ 
+ # Determine which user environment-dependent files that we want to install
+-have_bash = find_program('bash', required : false).found() # For completion scripts
++have_bash = false
+ bash_comp_dep = dependency('bash-completion', version: '>=2.0', required: false)
+ have_sh = find_program('sh', required : false).found() # For glib-gettextize
+ 
+@@ -2250,8 +2253,7 @@ env_program = find_program('env', requir
+ 
+ # FIXME: How to detect Solaris? https://github.com/mesonbuild/meson/issues/1578
+ if host_system == 'sunos'
+-  glib_conf.set('_XOPEN_SOURCE_EXTENDED', 1)
+-  glib_conf.set('_XOPEN_SOURCE', 2)
++  glib_conf.set('_POSIX_C_SOURCE', 200809)
+   glib_conf.set('__EXTENSIONS__',1)
+ endif
+ 
diff --git a/glib2/patches/patch-meson_options.txt b/glib2/patches/patch-meson_options.txt
new file mode 100644
index 0000000000..536a54799a
--- /dev/null
+++ b/glib2/patches/patch-meson_options.txt
@@ -0,0 +1,18 @@
+$NetBSD: patch-meson_options.txt,v 1.2 2019/11/14 11:40:30 wiz Exp $
+
+Add use_cocoa option.
+
+--- meson_options.txt.orig	2019-10-04 11:44:24.000000000 +0000
++++ meson_options.txt
+@@ -90,6 +90,11 @@ option('nls',
+        yield: true,
+        description : 'Enable native language support (translations)')
+ 
++option('use_cocoa',
++       type : 'boolean',
++       value : false,
++       description : 'Use Cocoa on macOS')
++
+ option('oss_fuzz',
+        type : 'feature',
+        value : 'disabled',
diff --git a/glib2/schemas.mk b/glib2/schemas.mk
new file mode 100644
index 0000000000..086eede74c
--- /dev/null
+++ b/glib2/schemas.mk
@@ -0,0 +1,29 @@
+# $NetBSD: schemas.mk,v 1.3 2019/11/03 10:39:12 rillig Exp $
+#
+# This Makefile fragment is intended to be included by packages that install
+# GSettings schemas.  It takes care of rebuilding the corresponding databases
+# at (de)installation time.
+#
+
+.if !defined(GLIB_SCHEMAS_MK)
+GLIB_SCHEMAS_MK=	# defined
+
+GLIB_COMPILE_SCHEMAS=	${BUILDLINK_PREFIX.glib2}/bin/glib-compile-schemas
+
+FILES_SUBST+=		GLIB_SCHEMAS_DIR=${GLIB_SCHEMAS_DIR:Q}
+FILES_SUBST+=		GLIB_COMPILE_SCHEMAS=${GLIB_COMPILE_SCHEMAS:Q}
+GLIB_SCHEMAS_DIR=	${BUILDLINK_PREFIX.glib2}/share/glib-2.0/schemas
+INSTALL_TEMPLATES+=	../../devel/glib2/files/schemas.tmpl
+DEINSTALL_TEMPLATES+=	../../devel/glib2/files/schemas.tmpl
+
+TOOLS_NOOP+=		glib-compile-schemas
+# Adding glib-compile-schemas to TOOLS_NOOP is not enough to mock out all
+# calls to this tool.  Some packages do 'pkg-config --variable
+# glib_compile_schemas gio-2.0' to get the path to the binary.  Do a best
+# effort here by overriding the possibly-defined GLIB_COMPILE_SCHEMAS
+# variable in the offending Makefiles.
+MAKE_FLAGS+=		GLIB_COMPILE_SCHEMAS=glib-compile-schemas
+
+.include "../../devel/glib2/buildlink3.mk"
+
+.endif			# GLIB_SCHEMAS_MK


Home | Main Index | Thread Index | Old Index