pkgsrc-WIP-changes archive

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

Import x11/gtk4



Module Name:	pkgsrc-wip
Committed By:	kikadf <kikadf.01%gmail.com@localhost>
Pushed By:	kikadf
Date:		Sun Feb 15 11:15:58 2026 +0100
Changeset:	243bac198cf5396bf258c147fdbd29da64de6e0a

Modified Files:
	Makefile
Added Files:
	gtk4/DESCR
	gtk4/Makefile
	gtk4/PLIST
	gtk4/buildlink3.mk
	gtk4/distinfo
	gtk4/files/immodules.tmpl
	gtk4/modules.mk
	gtk4/options.mk
	gtk4/patches/patch-meson.build
	gtk4/patches/patch-testsuite_gdk_colorstate.c

Log Message:
Import x11/gtk4

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

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

diffstat:
 Makefile                                      |   1 +
 gtk4/DESCR                                    |   9 +
 gtk4/Makefile                                 |  63 +++
 gtk4/PLIST                                    | 594 ++++++++++++++++++++++++++
 gtk4/buildlink3.mk                            |  31 ++
 gtk4/distinfo                                 |   7 +
 gtk4/files/immodules.tmpl                     |  14 +
 gtk4/modules.mk                               |  32 ++
 gtk4/options.mk                               |  74 ++++
 gtk4/patches/patch-meson.build                |  27 ++
 gtk4/patches/patch-testsuite_gdk_colorstate.c |  15 +
 11 files changed, 867 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 5edd2dae60..472492b892 100644
--- a/Makefile
+++ b/Makefile
@@ -1477,6 +1477,7 @@ SUBDIR+=	gtk2-engines-galaxy
 SUBDIR+=	gtk2-engines-magicchicken
 SUBDIR+=	gtk2-murrina-fancy-clearlooks
 SUBDIR+=	gtk2-theme-pack
+SUBDIR+=	gtk4
 SUBDIR+=	gtkada
 SUBDIR+=	gtkaml
 SUBDIR+=	gtkglextmm
diff --git a/gtk4/DESCR b/gtk4/DESCR
new file mode 100644
index 0000000000..90988c7d66
--- /dev/null
+++ b/gtk4/DESCR
@@ -0,0 +1,9 @@
+GTK is a multi-platform toolkit for creating graphical user
+interfaces. Offering a complete set of widgets, GTK is suitable for
+projects ranging from small one-off tools to complete application
+suites.
+
+GTK has been designed from the ground up to support a range of
+languages, not only C/C++.
+
+This package contains GTK 4.
diff --git a/gtk4/Makefile b/gtk4/Makefile
new file mode 100644
index 0000000000..3e83a8c51f
--- /dev/null
+++ b/gtk4/Makefile
@@ -0,0 +1,63 @@
+# $NetBSD: Makefile,v 1.70 2026/02/06 10:06:13 wiz Exp $
+
+DISTNAME=	gtk-4.20.3
+PKGNAME=	${DISTNAME:S/gtk/gtk4/}
+PKGREVISION=	3
+CATEGORIES=	x11
+MASTER_SITES=	${MASTER_SITE_GNOME:=sources/gtk/${PKGVERSION_NOREV:R}/}
+EXTRACT_SUFX=	.tar.xz
+
+MAINTAINER=	ryoon%NetBSD.org@localhost
+HOMEPAGE=	https://www.gtk.org/
+COMMENT=	Multi-platform toolkit for creating GUIs, version 4
+LICENSE=	gnu-lgpl-v2.1
+
+# TEST_DEPENDS, but meson fails if it's not found
+TOOL_DEPENDS+=	${PYPKGPREFIX}-gobject3-[0-9]*:../../devel/py-gobject3
+# TODO: add more python dependencies?
+# gi-docgen| subprojects/gi-docgen/meson.build:10:0: Exception: python3 is missing modules: jinja2, markdown, markupsafe, pygments, toml, typogrify
+
+# Gdk-4.0 dumps core with full RELRO
+# http://gnats.netbsd.org/57792
+RELRO_SUPPORTED=	partial
+
+.include "options.mk"
+
+USE_TOOLS+=	gdbus-codegen msgfmt msgmerge pkg-config xgettext
+USE_LANGUAGES=	c c++
+# meson.build only mentions c++11 to build harfbuzz as a subproject
+
+MESON_REQD+=		1.5.0
+MESON_ARGS+=		-Dintrospection=enabled
+# needs gstreamer-gl
+MESON_ARGS+=		-Dmedia-gstreamer=disabled
+MESON_ARGS+=		-Dvulkan=disabled
+MESON_ARGS+=		-Df16c=disabled
+
+PKGCONFIG_OVERRIDE+=	output/meson-private/gtk4.pc
+PKGCONFIG_OVERRIDE+=	output/meson-private/gtk4-x11.pc
+PKGCONFIG_OVERRIDE+=	output/meson-private/gtk4-unix-print.pc
+
+PKGCONFIG_OVERRIDE_STAGE=	post-configure
+
+BUILDLINK_TRANSFORM.SunOS+=	rm:-Wl,--export-dynamic
+
+BUILDLINK_API_DEPENDS.glib2+=	glib2>=2.80
+.include "../../devel/glib2/buildlink3.mk"
+.include "../../devel/glib2/schemas.mk"
+.include "../../devel/gobject-introspection/buildlink3.mk"
+.include "../../devel/libexecinfo/buildlink3.mk"
+.include "../../devel/meson/build.mk"
+BUILDLINK_API_DEPENDS.pango+=	pango>=1.56
+.include "../../devel/pango/buildlink3.mk"
+BUILDLINK_API_DEPENDS.cairo+=	cairo>=1.18.2
+.include "../../graphics/cairo/buildlink3.mk"
+.include "../../graphics/gdk-pixbuf2/buildlink3.mk"
+.include "../../graphics/graphene/buildlink3.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../graphics/libepoxy/buildlink3.mk"
+.include "../../graphics/librsvg/buildlink3.mk"
+.include "../../multimedia/gst-plugins1-bad/buildlink3.mk"
+.include "../../textproc/iso-codes/buildlink3.mk"
+.include "../../lang/python/tool.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/gtk4/PLIST b/gtk4/PLIST
new file mode 100644
index 0000000000..41d1ce381b
--- /dev/null
+++ b/gtk4/PLIST
@@ -0,0 +1,594 @@
+@comment $NetBSD: PLIST,v 1.27 2026/01/06 20:06:35 adam Exp $
+bin/gtk4-builder-tool
+bin/gtk4-demo
+bin/gtk4-demo-application
+bin/gtk4-encode-symbolic-svg
+bin/gtk4-image-tool
+bin/gtk4-launch
+bin/gtk4-node-editor
+bin/gtk4-path-tool
+bin/gtk4-print-editor
+bin/gtk4-query-settings
+bin/gtk4-rendernode-tool
+bin/gtk4-update-icon-cache
+bin/gtk4-widget-factory
+include/gtk-4.0/gdk/deprecated/gdkpixbuf.h
+include/gtk-4.0/gdk/gdk.h
+include/gtk-4.0/gdk/gdkapplaunchcontext.h
+include/gtk-4.0/gdk/gdkcairo.h
+include/gtk-4.0/gdk/gdkcairocontext.h
+include/gtk-4.0/gdk/gdkcicpparams.h
+include/gtk-4.0/gdk/gdkclipboard.h
+include/gtk-4.0/gdk/gdkcolorstate.h
+include/gtk-4.0/gdk/gdkconfig.h
+include/gtk-4.0/gdk/gdkcontentdeserializer.h
+include/gtk-4.0/gdk/gdkcontentformats.h
+include/gtk-4.0/gdk/gdkcontentprovider.h
+include/gtk-4.0/gdk/gdkcontentproviderimpl.h
+include/gtk-4.0/gdk/gdkcontentserializer.h
+include/gtk-4.0/gdk/gdkcursor.h
+include/gtk-4.0/gdk/gdkdevice.h
+include/gtk-4.0/gdk/gdkdevicepad.h
+include/gtk-4.0/gdk/gdkdevicetool.h
+include/gtk-4.0/gdk/gdkdisplay.h
+include/gtk-4.0/gdk/gdkdisplaymanager.h
+include/gtk-4.0/gdk/gdkdmabufformats.h
+include/gtk-4.0/gdk/gdkdmabuftexture.h
+include/gtk-4.0/gdk/gdkdmabuftexturebuilder.h
+include/gtk-4.0/gdk/gdkdrag.h
+include/gtk-4.0/gdk/gdkdragsurface.h
+include/gtk-4.0/gdk/gdkdragsurfacesize.h
+include/gtk-4.0/gdk/gdkdrawcontext.h
+include/gtk-4.0/gdk/gdkdrop.h
+include/gtk-4.0/gdk/gdkenums.h
+include/gtk-4.0/gdk/gdkenumtypes.h
+include/gtk-4.0/gdk/gdkevents.h
+include/gtk-4.0/gdk/gdkframeclock.h
+include/gtk-4.0/gdk/gdkframetimings.h
+include/gtk-4.0/gdk/gdkglcontext.h
+include/gtk-4.0/gdk/gdkgltexture.h
+include/gtk-4.0/gdk/gdkgltexturebuilder.h
+include/gtk-4.0/gdk/gdkkeys.h
+include/gtk-4.0/gdk/gdkkeysyms.h
+include/gtk-4.0/gdk/gdkmemorytexture.h
+include/gtk-4.0/gdk/gdkmemorytexturebuilder.h
+include/gtk-4.0/gdk/gdkmonitor.h
+include/gtk-4.0/gdk/gdkpaintable.h
+include/gtk-4.0/gdk/gdkpango.h
+include/gtk-4.0/gdk/gdkpopup.h
+include/gtk-4.0/gdk/gdkpopuplayout.h
+include/gtk-4.0/gdk/gdkrectangle.h
+include/gtk-4.0/gdk/gdkrgba.h
+include/gtk-4.0/gdk/gdkseat.h
+include/gtk-4.0/gdk/gdksnapshot.h
+include/gtk-4.0/gdk/gdksurface.h
+include/gtk-4.0/gdk/gdktexture.h
+include/gtk-4.0/gdk/gdktexturedownloader.h
+include/gtk-4.0/gdk/gdktoplevel.h
+include/gtk-4.0/gdk/gdktoplevellayout.h
+include/gtk-4.0/gdk/gdktoplevelsize.h
+include/gtk-4.0/gdk/gdktypes.h
+include/gtk-4.0/gdk/gdkvulkancontext.h
+${PLIST.quartz}include/gtk-4.0/gdk/macos/gdkmacos.h
+${PLIST.quartz}include/gtk-4.0/gdk/macos/gdkmacosdevice.h
+${PLIST.quartz}include/gtk-4.0/gdk/macos/gdkmacosdisplay.h
+${PLIST.quartz}include/gtk-4.0/gdk/macos/gdkmacosglcontext.h
+${PLIST.quartz}include/gtk-4.0/gdk/macos/gdkmacoskeymap.h
+${PLIST.quartz}include/gtk-4.0/gdk/macos/gdkmacosmonitor.h
+${PLIST.quartz}include/gtk-4.0/gdk/macos/gdkmacosseat.h
+${PLIST.quartz}include/gtk-4.0/gdk/macos/gdkmacossurface.h
+include/gtk-4.0/gdk/version/gdk-visibility.h
+include/gtk-4.0/gdk/version/gdkversionmacros.h
+${PLIST.x11}include/gtk-4.0/gdk/x11/gdkx-autocleanups.h
+${PLIST.x11}include/gtk-4.0/gdk/x11/gdkx.h
+${PLIST.x11}include/gtk-4.0/gdk/x11/gdkx11applaunchcontext.h
+${PLIST.x11}include/gtk-4.0/gdk/x11/gdkx11device-xi2.h
+${PLIST.x11}include/gtk-4.0/gdk/x11/gdkx11device.h
+${PLIST.x11}include/gtk-4.0/gdk/x11/gdkx11devicemanager-xi2.h
+${PLIST.x11}include/gtk-4.0/gdk/x11/gdkx11devicemanager.h
+${PLIST.x11}include/gtk-4.0/gdk/x11/gdkx11display.h
+${PLIST.x11}include/gtk-4.0/gdk/x11/gdkx11dnd.h
+${PLIST.x11}include/gtk-4.0/gdk/x11/gdkx11glcontext.h
+${PLIST.x11}include/gtk-4.0/gdk/x11/gdkx11monitor.h
+${PLIST.x11}include/gtk-4.0/gdk/x11/gdkx11property.h
+${PLIST.x11}include/gtk-4.0/gdk/x11/gdkx11screen.h
+${PLIST.x11}include/gtk-4.0/gdk/x11/gdkx11selection.h
+${PLIST.x11}include/gtk-4.0/gdk/x11/gdkx11surface.h
+${PLIST.x11}include/gtk-4.0/gdk/x11/gdkx11utils.h
+include/gtk-4.0/gsk/gl/gskglrenderer.h
+include/gtk-4.0/gsk/gpu/gskglrenderer.h
+include/gtk-4.0/gsk/gpu/gskvulkanrenderer.h
+include/gtk-4.0/gsk/gsk.h
+include/gtk-4.0/gsk/gskcairorenderer.h
+include/gtk-4.0/gsk/gskcomponenttransfer.h
+include/gtk-4.0/gsk/gskenums.h
+include/gtk-4.0/gsk/gskenumtypes.h
+include/gtk-4.0/gsk/gskglshader.h
+include/gtk-4.0/gsk/gskpath.h
+include/gtk-4.0/gsk/gskpathbuilder.h
+include/gtk-4.0/gsk/gskpathmeasure.h
+include/gtk-4.0/gsk/gskpathpoint.h
+include/gtk-4.0/gsk/gskrenderer.h
+include/gtk-4.0/gsk/gskrendernode.h
+include/gtk-4.0/gsk/gskroundedrect.h
+include/gtk-4.0/gsk/gskstroke.h
+include/gtk-4.0/gsk/gsktransform.h
+include/gtk-4.0/gsk/gsktypes.h
+include/gtk-4.0/gtk/a11y/gtkatspi.h
+include/gtk-4.0/gtk/a11y/gtkatspisocket.h
+include/gtk-4.0/gtk/css/gtkcss.h
+include/gtk-4.0/gtk/css/gtkcssenums.h
+include/gtk-4.0/gtk/css/gtkcssenumtypes.h
+include/gtk-4.0/gtk/css/gtkcsserror.h
+include/gtk-4.0/gtk/css/gtkcsslocation.h
+include/gtk-4.0/gtk/css/gtkcsssection.h
+include/gtk-4.0/gtk/deprecated/gtkappchooser.h
+include/gtk-4.0/gtk/deprecated/gtkappchooserbutton.h
+include/gtk-4.0/gtk/deprecated/gtkappchooserdialog.h
+include/gtk-4.0/gtk/deprecated/gtkappchooserwidget.h
+include/gtk-4.0/gtk/deprecated/gtkassistant.h
+include/gtk-4.0/gtk/deprecated/gtkcellarea.h
+include/gtk-4.0/gtk/deprecated/gtkcellareabox.h
+include/gtk-4.0/gtk/deprecated/gtkcellareacontext.h
+include/gtk-4.0/gtk/deprecated/gtkcelleditable.h
+include/gtk-4.0/gtk/deprecated/gtkcelllayout.h
+include/gtk-4.0/gtk/deprecated/gtkcellrenderer.h
+include/gtk-4.0/gtk/deprecated/gtkcellrendereraccel.h
+include/gtk-4.0/gtk/deprecated/gtkcellrenderercombo.h
+include/gtk-4.0/gtk/deprecated/gtkcellrendererpixbuf.h
+include/gtk-4.0/gtk/deprecated/gtkcellrendererprogress.h
+include/gtk-4.0/gtk/deprecated/gtkcellrendererspin.h
+include/gtk-4.0/gtk/deprecated/gtkcellrendererspinner.h
+include/gtk-4.0/gtk/deprecated/gtkcellrenderertext.h
+include/gtk-4.0/gtk/deprecated/gtkcellrenderertoggle.h
+include/gtk-4.0/gtk/deprecated/gtkcellview.h
+include/gtk-4.0/gtk/deprecated/gtkcolorbutton.h
+include/gtk-4.0/gtk/deprecated/gtkcolorchooser.h
+include/gtk-4.0/gtk/deprecated/gtkcolorchooserdialog.h
+include/gtk-4.0/gtk/deprecated/gtkcolorchooserwidget.h
+include/gtk-4.0/gtk/deprecated/gtkcombobox.h
+include/gtk-4.0/gtk/deprecated/gtkcomboboxtext.h
+include/gtk-4.0/gtk/deprecated/gtkdialog.h
+include/gtk-4.0/gtk/deprecated/gtkentrycompletion.h
+include/gtk-4.0/gtk/deprecated/gtkfilechooser.h
+include/gtk-4.0/gtk/deprecated/gtkfilechooserdialog.h
+include/gtk-4.0/gtk/deprecated/gtkfilechoosernative.h
+include/gtk-4.0/gtk/deprecated/gtkfilechooserwidget.h
+include/gtk-4.0/gtk/deprecated/gtkfontbutton.h
+include/gtk-4.0/gtk/deprecated/gtkfontchooser.h
+include/gtk-4.0/gtk/deprecated/gtkfontchooserdialog.h
+include/gtk-4.0/gtk/deprecated/gtkfontchooserwidget.h
+include/gtk-4.0/gtk/deprecated/gtkiconview.h
+include/gtk-4.0/gtk/deprecated/gtkinfobar.h
+include/gtk-4.0/gtk/deprecated/gtkliststore.h
+include/gtk-4.0/gtk/deprecated/gtklockbutton.h
+include/gtk-4.0/gtk/deprecated/gtkmessagedialog.h
+include/gtk-4.0/gtk/deprecated/gtkrender.h
+include/gtk-4.0/gtk/deprecated/gtkshortcutlabel.h
+include/gtk-4.0/gtk/deprecated/gtkshortcutsgroup.h
+include/gtk-4.0/gtk/deprecated/gtkshortcutssection.h
+include/gtk-4.0/gtk/deprecated/gtkshortcutsshortcut.h
+include/gtk-4.0/gtk/deprecated/gtkshortcutswindow.h
+include/gtk-4.0/gtk/deprecated/gtkshow.h
+include/gtk-4.0/gtk/deprecated/gtkstatusbar.h
+include/gtk-4.0/gtk/deprecated/gtkstylecontext.h
+include/gtk-4.0/gtk/deprecated/gtktreednd.h
+include/gtk-4.0/gtk/deprecated/gtktreemodel.h
+include/gtk-4.0/gtk/deprecated/gtktreemodelfilter.h
+include/gtk-4.0/gtk/deprecated/gtktreemodelsort.h
+include/gtk-4.0/gtk/deprecated/gtktreeselection.h
+include/gtk-4.0/gtk/deprecated/gtktreesortable.h
+include/gtk-4.0/gtk/deprecated/gtktreestore.h
+include/gtk-4.0/gtk/deprecated/gtktreeview.h
+include/gtk-4.0/gtk/deprecated/gtktreeviewcolumn.h
+include/gtk-4.0/gtk/deprecated/gtkvolumebutton.h
+include/gtk-4.0/gtk/gtk.h
+include/gtk-4.0/gtk/gtkaboutdialog.h
+include/gtk-4.0/gtk/gtkaccelgroup.h
+include/gtk-4.0/gtk/gtkaccessible.h
+include/gtk-4.0/gtk/gtkaccessiblerange.h
+include/gtk-4.0/gtk/gtkaccessibletext.h
+include/gtk-4.0/gtk/gtkactionable.h
+include/gtk-4.0/gtk/gtkactionbar.h
+include/gtk-4.0/gtk/gtkadjustment.h
+include/gtk-4.0/gtk/gtkalertdialog.h
+include/gtk-4.0/gtk/gtkapplication.h
+include/gtk-4.0/gtk/gtkapplicationwindow.h
+include/gtk-4.0/gtk/gtkaspectframe.h
+include/gtk-4.0/gtk/gtkatcontext.h
+include/gtk-4.0/gtk/gtkbinlayout.h
+include/gtk-4.0/gtk/gtkbitset.h
+include/gtk-4.0/gtk/gtkbookmarklist.h
+include/gtk-4.0/gtk/gtkboolfilter.h
+include/gtk-4.0/gtk/gtkborder.h
+include/gtk-4.0/gtk/gtkbox.h
+include/gtk-4.0/gtk/gtkboxlayout.h
+include/gtk-4.0/gtk/gtkbuildable.h
+include/gtk-4.0/gtk/gtkbuilder.h
+include/gtk-4.0/gtk/gtkbuilderlistitemfactory.h
+include/gtk-4.0/gtk/gtkbuilderscope.h
+include/gtk-4.0/gtk/gtkbutton.h
+include/gtk-4.0/gtk/gtkcalendar.h
+include/gtk-4.0/gtk/gtkcenterbox.h
+include/gtk-4.0/gtk/gtkcenterlayout.h
+include/gtk-4.0/gtk/gtkcheckbutton.h
+include/gtk-4.0/gtk/gtkcolordialog.h
+include/gtk-4.0/gtk/gtkcolordialogbutton.h
+include/gtk-4.0/gtk/gtkcolorutils.h
+include/gtk-4.0/gtk/gtkcolumnview.h
+include/gtk-4.0/gtk/gtkcolumnviewcell.h
+include/gtk-4.0/gtk/gtkcolumnviewcolumn.h
+include/gtk-4.0/gtk/gtkcolumnviewrow.h
+include/gtk-4.0/gtk/gtkcolumnviewsorter.h
+include/gtk-4.0/gtk/gtkconfig.h
+include/gtk-4.0/gtk/gtkconstraint.h
+include/gtk-4.0/gtk/gtkconstraintguide.h
+include/gtk-4.0/gtk/gtkconstraintlayout.h
+include/gtk-4.0/gtk/gtkcssprovider.h
+include/gtk-4.0/gtk/gtkcustomfilter.h
+include/gtk-4.0/gtk/gtkcustomlayout.h
+include/gtk-4.0/gtk/gtkcustomsorter.h
+include/gtk-4.0/gtk/gtkdebug.h
+include/gtk-4.0/gtk/gtkdialogerror.h
+include/gtk-4.0/gtk/gtkdirectorylist.h
+include/gtk-4.0/gtk/gtkdragicon.h
+include/gtk-4.0/gtk/gtkdragsource.h
+include/gtk-4.0/gtk/gtkdrawingarea.h
+include/gtk-4.0/gtk/gtkdropcontrollermotion.h
+include/gtk-4.0/gtk/gtkdropdown.h
+include/gtk-4.0/gtk/gtkdroptarget.h
+include/gtk-4.0/gtk/gtkdroptargetasync.h
+include/gtk-4.0/gtk/gtkeditable.h
+include/gtk-4.0/gtk/gtkeditablelabel.h
+include/gtk-4.0/gtk/gtkemojichooser.h
+include/gtk-4.0/gtk/gtkentry.h
+include/gtk-4.0/gtk/gtkentrybuffer.h
+include/gtk-4.0/gtk/gtkenums.h
+include/gtk-4.0/gtk/gtkeventcontroller.h
+include/gtk-4.0/gtk/gtkeventcontrollerfocus.h
+include/gtk-4.0/gtk/gtkeventcontrollerkey.h
+include/gtk-4.0/gtk/gtkeventcontrollerlegacy.h
+include/gtk-4.0/gtk/gtkeventcontrollermotion.h
+include/gtk-4.0/gtk/gtkeventcontrollerscroll.h
+include/gtk-4.0/gtk/gtkexpander.h
+include/gtk-4.0/gtk/gtkexpression.h
+include/gtk-4.0/gtk/gtkfiledialog.h
+include/gtk-4.0/gtk/gtkfilefilter.h
+include/gtk-4.0/gtk/gtkfilelauncher.h
+include/gtk-4.0/gtk/gtkfilter.h
+include/gtk-4.0/gtk/gtkfilterlistmodel.h
+include/gtk-4.0/gtk/gtkfixed.h
+include/gtk-4.0/gtk/gtkfixedlayout.h
+include/gtk-4.0/gtk/gtkflattenlistmodel.h
+include/gtk-4.0/gtk/gtkflowbox.h
+include/gtk-4.0/gtk/gtkfontdialog.h
+include/gtk-4.0/gtk/gtkfontdialogbutton.h
+include/gtk-4.0/gtk/gtkframe.h
+include/gtk-4.0/gtk/gtkgesture.h
+include/gtk-4.0/gtk/gtkgestureclick.h
+include/gtk-4.0/gtk/gtkgesturedrag.h
+include/gtk-4.0/gtk/gtkgesturelongpress.h
+include/gtk-4.0/gtk/gtkgesturepan.h
+include/gtk-4.0/gtk/gtkgesturerotate.h
+include/gtk-4.0/gtk/gtkgesturesingle.h
+include/gtk-4.0/gtk/gtkgesturestylus.h
+include/gtk-4.0/gtk/gtkgestureswipe.h
+include/gtk-4.0/gtk/gtkgesturezoom.h
+include/gtk-4.0/gtk/gtkglarea.h
+include/gtk-4.0/gtk/gtkgraphicsoffload.h
+include/gtk-4.0/gtk/gtkgrid.h
+include/gtk-4.0/gtk/gtkgridlayout.h
+include/gtk-4.0/gtk/gtkgridview.h
+include/gtk-4.0/gtk/gtkheaderbar.h
+include/gtk-4.0/gtk/gtkiconpaintable.h
+include/gtk-4.0/gtk/gtkicontheme.h
+include/gtk-4.0/gtk/gtkimage.h
+include/gtk-4.0/gtk/gtkimcontext.h
+include/gtk-4.0/gtk/gtkimcontextsimple.h
+include/gtk-4.0/gtk/gtkimmodule.h
+include/gtk-4.0/gtk/gtkimmulticontext.h
+include/gtk-4.0/gtk/gtkinscription.h
+include/gtk-4.0/gtk/gtklabel.h
+include/gtk-4.0/gtk/gtklayoutchild.h
+include/gtk-4.0/gtk/gtklayoutmanager.h
+include/gtk-4.0/gtk/gtklevelbar.h
+include/gtk-4.0/gtk/gtklinkbutton.h
+include/gtk-4.0/gtk/gtklistbase.h
+include/gtk-4.0/gtk/gtklistbox.h
+include/gtk-4.0/gtk/gtklistheader.h
+include/gtk-4.0/gtk/gtklistitem.h
+include/gtk-4.0/gtk/gtklistitemfactory.h
+include/gtk-4.0/gtk/gtklistview.h
+include/gtk-4.0/gtk/gtkmain.h
+include/gtk-4.0/gtk/gtkmaplistmodel.h
+include/gtk-4.0/gtk/gtkmediacontrols.h
+include/gtk-4.0/gtk/gtkmediafile.h
+include/gtk-4.0/gtk/gtkmediastream.h
+include/gtk-4.0/gtk/gtkmenubutton.h
+include/gtk-4.0/gtk/gtkmountoperation.h
+include/gtk-4.0/gtk/gtkmultifilter.h
+include/gtk-4.0/gtk/gtkmultiselection.h
+include/gtk-4.0/gtk/gtkmultisorter.h
+include/gtk-4.0/gtk/gtknative.h
+include/gtk-4.0/gtk/gtknativedialog.h
+include/gtk-4.0/gtk/gtknoselection.h
+include/gtk-4.0/gtk/gtknotebook.h
+include/gtk-4.0/gtk/gtknumericsorter.h
+include/gtk-4.0/gtk/gtkorientable.h
+include/gtk-4.0/gtk/gtkoverlay.h
+include/gtk-4.0/gtk/gtkoverlaylayout.h
+include/gtk-4.0/gtk/gtkpadcontroller.h
+include/gtk-4.0/gtk/gtkpaned.h
+include/gtk-4.0/gtk/gtkpasswordentry.h
+include/gtk-4.0/gtk/gtkpasswordentrybuffer.h
+include/gtk-4.0/gtk/gtkpicture.h
+include/gtk-4.0/gtk/gtkpopover.h
+include/gtk-4.0/gtk/gtkpopovermenu.h
+include/gtk-4.0/gtk/gtkpopovermenubar.h
+include/gtk-4.0/gtk/gtkprintdialog.h
+include/gtk-4.0/gtk/gtkprogressbar.h
+include/gtk-4.0/gtk/gtkrange.h
+include/gtk-4.0/gtk/gtkrecentmanager.h
+include/gtk-4.0/gtk/gtkrevealer.h
+include/gtk-4.0/gtk/gtkroot.h
+include/gtk-4.0/gtk/gtkscale.h
+include/gtk-4.0/gtk/gtkscalebutton.h
+include/gtk-4.0/gtk/gtkscrollable.h
+include/gtk-4.0/gtk/gtkscrollbar.h
+include/gtk-4.0/gtk/gtkscrolledwindow.h
+include/gtk-4.0/gtk/gtkscrollinfo.h
+include/gtk-4.0/gtk/gtksearchbar.h
+include/gtk-4.0/gtk/gtksearchentry.h
+include/gtk-4.0/gtk/gtksectionmodel.h
+include/gtk-4.0/gtk/gtkselectionfiltermodel.h
+include/gtk-4.0/gtk/gtkselectionmodel.h
+include/gtk-4.0/gtk/gtkseparator.h
+include/gtk-4.0/gtk/gtksettings.h
+include/gtk-4.0/gtk/gtkshortcut.h
+include/gtk-4.0/gtk/gtkshortcutaction.h
+include/gtk-4.0/gtk/gtkshortcutcontroller.h
+include/gtk-4.0/gtk/gtkshortcutmanager.h
+include/gtk-4.0/gtk/gtkshortcuttrigger.h
+include/gtk-4.0/gtk/gtksignallistitemfactory.h
+include/gtk-4.0/gtk/gtksingleselection.h
+include/gtk-4.0/gtk/gtksizegroup.h
+include/gtk-4.0/gtk/gtksizerequest.h
+include/gtk-4.0/gtk/gtkslicelistmodel.h
+include/gtk-4.0/gtk/gtksnapshot.h
+include/gtk-4.0/gtk/gtksorter.h
+include/gtk-4.0/gtk/gtksortlistmodel.h
+include/gtk-4.0/gtk/gtkspinbutton.h
+include/gtk-4.0/gtk/gtkspinner.h
+include/gtk-4.0/gtk/gtkstack.h
+include/gtk-4.0/gtk/gtkstacksidebar.h
+include/gtk-4.0/gtk/gtkstackswitcher.h
+include/gtk-4.0/gtk/gtkstringfilter.h
+include/gtk-4.0/gtk/gtkstringlist.h
+include/gtk-4.0/gtk/gtkstringsorter.h
+include/gtk-4.0/gtk/gtkstyleprovider.h
+include/gtk-4.0/gtk/gtkswitch.h
+include/gtk-4.0/gtk/gtksymbolicpaintable.h
+include/gtk-4.0/gtk/gtktestatcontext.h
+include/gtk-4.0/gtk/gtktestutils.h
+include/gtk-4.0/gtk/gtktext.h
+include/gtk-4.0/gtk/gtktextbuffer.h
+include/gtk-4.0/gtk/gtktextchild.h
+include/gtk-4.0/gtk/gtktextiter.h
+include/gtk-4.0/gtk/gtktextmark.h
+include/gtk-4.0/gtk/gtktexttag.h
+include/gtk-4.0/gtk/gtktexttagtable.h
+include/gtk-4.0/gtk/gtktextview.h
+include/gtk-4.0/gtk/gtktogglebutton.h
+include/gtk-4.0/gtk/gtktooltip.h
+include/gtk-4.0/gtk/gtktreeexpander.h
+include/gtk-4.0/gtk/gtktreelistmodel.h
+include/gtk-4.0/gtk/gtktreelistrowsorter.h
+include/gtk-4.0/gtk/gtktypebuiltins.h
+include/gtk-4.0/gtk/gtktypes.h
+include/gtk-4.0/gtk/gtkurilauncher.h
+include/gtk-4.0/gtk/gtkversion.h
+include/gtk-4.0/gtk/gtkvideo.h
+include/gtk-4.0/gtk/gtkviewport.h
+include/gtk-4.0/gtk/gtkwidget.h
+include/gtk-4.0/gtk/gtkwidgetpaintable.h
+include/gtk-4.0/gtk/gtkwindow.h
+include/gtk-4.0/gtk/gtkwindowcontrols.h
+include/gtk-4.0/gtk/gtkwindowgroup.h
+include/gtk-4.0/gtk/gtkwindowhandle.h
+include/gtk-4.0/gtk/print/gtkpagesetup.h
+include/gtk-4.0/gtk/print/gtkpapersize.h
+include/gtk-4.0/gtk/print/gtkprintcontext.h
+include/gtk-4.0/gtk/print/gtkprintoperation.h
+include/gtk-4.0/gtk/print/gtkprintoperationpreview.h
+include/gtk-4.0/gtk/print/gtkprintsettings.h
+include/gtk-4.0/unix-print/gtk/gtkunixprint.h
+include/gtk-4.0/unix-print/gtk/print/gtkpagesetupunixdialog.h
+include/gtk-4.0/unix-print/gtk/print/gtkprinter.h
+include/gtk-4.0/unix-print/gtk/print/gtkprintjob.h
+include/gtk-4.0/unix-print/gtk/print/gtkprintunixdialog.h
+lib/girepository-1.0/Gdk-4.0.typelib
+${PLIST.quartz}lib/girepository-1.0/GdkMacos-4.0.typelib
+${PLIST.x11}lib/girepository-1.0/GdkX11-4.0.typelib
+lib/girepository-1.0/Gsk-4.0.typelib
+lib/girepository-1.0/Gtk-4.0.typelib
+lib/libgtk-4.so
+lib/libgtk-4.so.1
+lib/libgtk-4.so.1.2000.3
+lib/pkgconfig/gtk4-atspi.pc
+${PLIST.quartz}lib/pkgconfig/gtk4-macos.pc
+lib/pkgconfig/gtk4-unix-print.pc
+${PLIST.x11}lib/pkgconfig/gtk4-x11.pc
+lib/pkgconfig/gtk4.pc
+share/applications/org.gtk.Demo4.desktop
+share/applications/org.gtk.PrintEditor4.desktop
+share/applications/org.gtk.WidgetFactory4.desktop
+share/applications/org.gtk.gtk4.NodeEditor.desktop
+share/gettext/its/gtk4builder.its
+share/gettext/its/gtk4builder.loc
+share/gir-1.0/Gdk-4.0.gir
+${PLIST.quartz}share/gir-1.0/GdkMacos-4.0.gir
+${PLIST.x11}share/gir-1.0/GdkX11-4.0.gir
+share/gir-1.0/Gsk-4.0.gir
+share/gir-1.0/Gtk-4.0.gir
+share/glib-2.0/schemas/org.gtk.Demo4.gschema.xml
+share/glib-2.0/schemas/org.gtk.gtk4.Inspector.gschema.xml
+share/glib-2.0/schemas/org.gtk.gtk4.Settings.ColorChooser.gschema.xml
+share/glib-2.0/schemas/org.gtk.gtk4.Settings.Debug.gschema.xml
+share/glib-2.0/schemas/org.gtk.gtk4.Settings.EmojiChooser.gschema.xml
+share/glib-2.0/schemas/org.gtk.gtk4.Settings.FileChooser.gschema.xml
+share/gtk-4.0/emoji/bn.gresource
+share/gtk-4.0/emoji/da.gresource
+share/gtk-4.0/emoji/de.gresource
+share/gtk-4.0/emoji/es.gresource
+share/gtk-4.0/emoji/et.gresource
+share/gtk-4.0/emoji/fi.gresource
+share/gtk-4.0/emoji/fr.gresource
+share/gtk-4.0/emoji/hi.gresource
+share/gtk-4.0/emoji/hu.gresource
+share/gtk-4.0/emoji/it.gresource
+share/gtk-4.0/emoji/ja.gresource
+share/gtk-4.0/emoji/ko.gresource
+share/gtk-4.0/emoji/lt.gresource
+share/gtk-4.0/emoji/ms.gresource
+share/gtk-4.0/emoji/nb.gresource
+share/gtk-4.0/emoji/nl.gresource
+share/gtk-4.0/emoji/pl.gresource
+share/gtk-4.0/emoji/pt.gresource
+share/gtk-4.0/emoji/ru.gresource
+share/gtk-4.0/emoji/sv.gresource
+share/gtk-4.0/emoji/th.gresource
+share/gtk-4.0/emoji/uk.gresource
+share/gtk-4.0/emoji/zh.gresource
+share/gtk-4.0/gtk4builder.rng
+share/gtk-4.0/valgrind/gtk.supp
+share/icons/hicolor/scalable/apps/org.gtk.Demo4.svg
+share/icons/hicolor/scalable/apps/org.gtk.PrintEditor4.Devel.svg
+share/icons/hicolor/scalable/apps/org.gtk.PrintEditor4.svg
+share/icons/hicolor/scalable/apps/org.gtk.WidgetFactory4.svg
+share/icons/hicolor/scalable/apps/org.gtk.gtk4.NodeEditor.Devel.svg
+share/icons/hicolor/scalable/apps/org.gtk.gtk4.NodeEditor.svg
+share/icons/hicolor/symbolic/apps/org.gtk.Demo4-symbolic.svg
+share/icons/hicolor/symbolic/apps/org.gtk.PrintEditor4-symbolic.svg
+share/icons/hicolor/symbolic/apps/org.gtk.WidgetFactory4-symbolic.svg
+share/icons/hicolor/symbolic/apps/org.gtk.gtk4.NodeEditor-symbolic.svg
+share/locale/ab/LC_MESSAGES/gtk40.mo
+share/locale/af/LC_MESSAGES/gtk40.mo
+share/locale/am/LC_MESSAGES/gtk40.mo
+share/locale/an/LC_MESSAGES/gtk40.mo
+share/locale/ang/LC_MESSAGES/gtk40.mo
+share/locale/ar/LC_MESSAGES/gtk40.mo
+share/locale/as/LC_MESSAGES/gtk40.mo
+share/locale/ast/LC_MESSAGES/gtk40.mo
+share/locale/az/LC_MESSAGES/gtk40.mo
+share/locale/az_IR/LC_MESSAGES/gtk40.mo
+share/locale/be/LC_MESSAGES/gtk40.mo
+share/locale/be@latin/LC_MESSAGES/gtk40.mo
+share/locale/bg/LC_MESSAGES/gtk40.mo
+share/locale/bn/LC_MESSAGES/gtk40.mo
+share/locale/bn_IN/LC_MESSAGES/gtk40.mo
+share/locale/br/LC_MESSAGES/gtk40.mo
+share/locale/bs/LC_MESSAGES/gtk40.mo
+share/locale/ca/LC_MESSAGES/gtk40.mo
+share/locale/ca@valencia/LC_MESSAGES/gtk40.mo
+share/locale/crh/LC_MESSAGES/gtk40.mo
+share/locale/cs/LC_MESSAGES/gtk40.mo
+share/locale/cy/LC_MESSAGES/gtk40.mo
+share/locale/da/LC_MESSAGES/gtk40.mo
+share/locale/de/LC_MESSAGES/gtk40.mo
+share/locale/dz/LC_MESSAGES/gtk40.mo
+share/locale/el/LC_MESSAGES/gtk40.mo
+share/locale/en/LC_MESSAGES/gtk40.mo
+share/locale/en@shaw/LC_MESSAGES/gtk40.mo
+share/locale/en_CA/LC_MESSAGES/gtk40.mo
+share/locale/en_GB/LC_MESSAGES/gtk40.mo
+share/locale/eo/LC_MESSAGES/gtk40.mo
+share/locale/es/LC_MESSAGES/gtk40.mo
+share/locale/et/LC_MESSAGES/gtk40.mo
+share/locale/eu/LC_MESSAGES/gtk40.mo
+share/locale/fa/LC_MESSAGES/gtk40.mo
+share/locale/fi/LC_MESSAGES/gtk40.mo
+share/locale/fr/LC_MESSAGES/gtk40.mo
+share/locale/fur/LC_MESSAGES/gtk40.mo
+share/locale/ga/LC_MESSAGES/gtk40.mo
+share/locale/gd/LC_MESSAGES/gtk40.mo
+share/locale/gl/LC_MESSAGES/gtk40.mo
+share/locale/gu/LC_MESSAGES/gtk40.mo
+share/locale/he/LC_MESSAGES/gtk40.mo
+share/locale/hi/LC_MESSAGES/gtk40.mo
+share/locale/hr/LC_MESSAGES/gtk40.mo
+share/locale/hu/LC_MESSAGES/gtk40.mo
+share/locale/hy/LC_MESSAGES/gtk40.mo
+share/locale/ia/LC_MESSAGES/gtk40.mo
+share/locale/id/LC_MESSAGES/gtk40.mo
+share/locale/ie/LC_MESSAGES/gtk40.mo
+share/locale/io/LC_MESSAGES/gtk40.mo
+share/locale/is/LC_MESSAGES/gtk40.mo
+share/locale/it/LC_MESSAGES/gtk40.mo
+share/locale/ja/LC_MESSAGES/gtk40.mo
+share/locale/ka/LC_MESSAGES/gtk40.mo
+share/locale/kab/LC_MESSAGES/gtk40.mo
+share/locale/kk/LC_MESSAGES/gtk40.mo
+share/locale/km/LC_MESSAGES/gtk40.mo
+share/locale/kn/LC_MESSAGES/gtk40.mo
+share/locale/ko/LC_MESSAGES/gtk40.mo
+share/locale/ku/LC_MESSAGES/gtk40.mo
+share/locale/ky/LC_MESSAGES/gtk40.mo
+share/locale/lg/LC_MESSAGES/gtk40.mo
+share/locale/li/LC_MESSAGES/gtk40.mo
+share/locale/lt/LC_MESSAGES/gtk40.mo
+share/locale/lv/LC_MESSAGES/gtk40.mo
+share/locale/mai/LC_MESSAGES/gtk40.mo
+share/locale/mi/LC_MESSAGES/gtk40.mo
+share/locale/mjw/LC_MESSAGES/gtk40.mo
+share/locale/mk/LC_MESSAGES/gtk40.mo
+share/locale/ml/LC_MESSAGES/gtk40.mo
+share/locale/mn/LC_MESSAGES/gtk40.mo
+share/locale/mr/LC_MESSAGES/gtk40.mo
+share/locale/ms/LC_MESSAGES/gtk40.mo
+share/locale/my/LC_MESSAGES/gtk40.mo
+share/locale/nb/LC_MESSAGES/gtk40.mo
+share/locale/nds/LC_MESSAGES/gtk40.mo
+share/locale/ne/LC_MESSAGES/gtk40.mo
+share/locale/nl/LC_MESSAGES/gtk40.mo
+share/locale/nn/LC_MESSAGES/gtk40.mo
+share/locale/nso/LC_MESSAGES/gtk40.mo
+share/locale/oc/LC_MESSAGES/gtk40.mo
+share/locale/or/LC_MESSAGES/gtk40.mo
+share/locale/pa/LC_MESSAGES/gtk40.mo
+share/locale/pl/LC_MESSAGES/gtk40.mo
+share/locale/ps/LC_MESSAGES/gtk40.mo
+share/locale/pt/LC_MESSAGES/gtk40.mo
+share/locale/pt_BR/LC_MESSAGES/gtk40.mo
+share/locale/ro/LC_MESSAGES/gtk40.mo
+share/locale/ru/LC_MESSAGES/gtk40.mo
+share/locale/rw/LC_MESSAGES/gtk40.mo
+share/locale/si/LC_MESSAGES/gtk40.mo
+share/locale/sk/LC_MESSAGES/gtk40.mo
+share/locale/sl/LC_MESSAGES/gtk40.mo
+share/locale/sq/LC_MESSAGES/gtk40.mo
+share/locale/sr/LC_MESSAGES/gtk40.mo
+share/locale/sr@ije/LC_MESSAGES/gtk40.mo
+share/locale/sr@latin/LC_MESSAGES/gtk40.mo
+share/locale/sv/LC_MESSAGES/gtk40.mo
+share/locale/ta/LC_MESSAGES/gtk40.mo
+share/locale/te/LC_MESSAGES/gtk40.mo
+share/locale/tg/LC_MESSAGES/gtk40.mo
+share/locale/th/LC_MESSAGES/gtk40.mo
+share/locale/tr/LC_MESSAGES/gtk40.mo
+share/locale/tt/LC_MESSAGES/gtk40.mo
+share/locale/ug/LC_MESSAGES/gtk40.mo
+share/locale/uk/LC_MESSAGES/gtk40.mo
+share/locale/ur/LC_MESSAGES/gtk40.mo
+share/locale/uz/LC_MESSAGES/gtk40.mo
+share/locale/uz@cyrillic/LC_MESSAGES/gtk40.mo
+share/locale/vi/LC_MESSAGES/gtk40.mo
+share/locale/wa/LC_MESSAGES/gtk40.mo
+share/locale/xh/LC_MESSAGES/gtk40.mo
+share/locale/yi/LC_MESSAGES/gtk40.mo
+share/locale/zh_CN/LC_MESSAGES/gtk40.mo
+share/locale/zh_HK/LC_MESSAGES/gtk40.mo
+share/locale/zh_TW/LC_MESSAGES/gtk40.mo
+share/metainfo/org.gtk.Demo4.appdata.xml
+share/metainfo/org.gtk.PrintEditor4.appdata.xml
+share/metainfo/org.gtk.WidgetFactory4.appdata.xml
+share/metainfo/org.gtk.gtk4.NodeEditor.appdata.xml
diff --git a/gtk4/buildlink3.mk b/gtk4/buildlink3.mk
new file mode 100644
index 0000000000..97445349a2
--- /dev/null
+++ b/gtk4/buildlink3.mk
@@ -0,0 +1,31 @@
+# $NetBSD: buildlink3.mk,v 1.20 2026/01/27 08:40:56 wiz Exp $
+
+BUILDLINK_TREE+=	gtk4
+
+.if !defined(GTK4_BUILDLINK3_MK)
+GTK4_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.gtk4+=	gtk4>=4.0.3
+BUILDLINK_ABI_DEPENDS.gtk4+=	gtk4>=4.20.3nb2
+BUILDLINK_PKGSRCDIR.gtk4?=	../../x11/gtk4
+
+.include "../../devel/glib2/buildlink3.mk"
+.include "../../devel/pango/buildlink3.mk"
+.include "../../graphics/cairo/buildlink3.mk"
+.include "../../graphics/gdk-pixbuf2/buildlink3.mk"
+.include "../../graphics/graphene/buildlink3.mk"
+.include "../../graphics/libepoxy/buildlink3.mk"
+.include "../../graphics/librsvg/buildlink3.mk"
+
+pkgbase := gtk4
+.include "../../mk/pkg-build-options.mk"
+
+.if ${PKG_BUILD_OPTIONS.gtk4:Mx11}
+.include "../../x11/libXcursor/buildlink3.mk"
+.include "../../x11/libXi/buildlink3.mk"
+.include "../../x11/libXinerama/buildlink3.mk"
+.endif
+
+.endif	# GTK4_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-gtk4
diff --git a/gtk4/distinfo b/gtk4/distinfo
new file mode 100644
index 0000000000..94676413b0
--- /dev/null
+++ b/gtk4/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.31 2026/01/06 20:06:35 adam Exp $
+
+BLAKE2s (gtk-4.20.3.tar.xz) = ded1e613ce985ec1723496fe9a3d6a78dbf727047242e2e389de183c148a5baa
+SHA512 (gtk-4.20.3.tar.xz) = 9ae8d2fb6fc6b3780587e70cbf4bff972dd36eedce79d91de874cc813ba3cb100ce6cce076e063e4606e0e32aa51d05c625dd272d5766190045f32b3754368f1
+Size (gtk-4.20.3.tar.xz) = 16003020 bytes
+SHA1 (patch-meson.build) = ed697477ebfa2b06559877170cc5b05079c61ceb
+SHA1 (patch-testsuite_gdk_colorstate.c) = 7a6d441f91332bffbd4e170809d8ad7ec51773bd
diff --git a/gtk4/files/immodules.tmpl b/gtk4/files/immodules.tmpl
new file mode 100644
index 0000000000..919e7a3cc6
--- /dev/null
+++ b/gtk4/files/immodules.tmpl
@@ -0,0 +1,14 @@
+# $NetBSD: immodules.tmpl,v 1.2 2025/11/23 13:38:20 ryoon Exp $
+#
+# Rebuild the GTK4 immodules database.
+#
+
+GTK4_IMMODULES_DB="@GTK4_IMMODULES_DB@"
+
+case ${STAGE} in
+DEINSTALL)
+	[ "${PKGBASE}" = "gtk4" ] && ${RM} -f ${GTK4_IMMODULES_DB}
+	;;
+*)
+	;;
+esac
diff --git a/gtk4/modules.mk b/gtk4/modules.mk
new file mode 100644
index 0000000000..418adca927
--- /dev/null
+++ b/gtk4/modules.mk
@@ -0,0 +1,32 @@
+# $NetBSD: modules.mk,v 1.2 2025/11/23 13:38:20 ryoon Exp $
+#
+# This Makefile fragment is intended to be included by packages that install
+# GTK4 modules.  It takes care of rebuilding the corresponding databases at
+# (de)installation time.
+#
+# The following variables can be defined:
+#    GTK4_IMMODULES - Set to YES if the package installs immodules.
+#
+
+.if !defined(GTK4_MODULES_MK)
+GTK4_MODULES_MK=	# defined
+
+.if defined(_BUILDING_GTK4)
+BUILDLINK_PREFIX.gtk4=	${PREFIX}
+GTK4_IMMODULES=		YES
+.endif
+
+.if defined(GTK4_IMMODULES) && !empty(GTK4_IMMODULES:M[Yy][Ee][Ss])
+FILES_SUBST+=		GTK4_IMMODULES_DB=${GTK4_IMMODULES_DB:Q}
+GTK4_IMMODULES_DB=	${BUILDLINK_PREFIX.gtk4}/lib/gtk-4.0/4.0.0/immodules.cache
+INSTALL_TEMPLATES+=	../../x11/gtk4/files/immodules.tmpl
+DEINSTALL_TEMPLATES+=	../../x11/gtk4/files/immodules.tmpl
+.endif
+
+PRINT_PLIST_AWK+=	/^libdata\/gtk-4.0/ { next; }
+
+.if !defined(_BUILDING_GTK4)
+.  include "../../x11/gtk4/buildlink3.mk"
+.endif
+
+.endif			# GTK4_MODULES_MK
diff --git a/gtk4/options.mk b/gtk4/options.mk
new file mode 100644
index 0000000000..86baa359da
--- /dev/null
+++ b/gtk4/options.mk
@@ -0,0 +1,74 @@
+# $NetBSD: options.mk,v 1.3 2023/07/25 01:09:27 wiz Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.gtk4
+PKG_SUPPORTED_OPTIONS=	cups debug
+
+PKG_OPTIONS_REQUIRED_GROUPS=	gui
+PKG_OPTIONS_GROUP.gui=		x11
+
+.if exists(/System/Library/Frameworks/Quartz.framework)
+PKG_OPTIONS_GROUP.gui+=	quartz
+PKG_SUGGESTED_OPTIONS+=	quartz
+.else
+PKG_SUGGESTED_OPTIONS+=	x11
+.endif
+
+PKG_SUGGESTED_OPTIONS+=	cups
+
+.include "../../mk/bsd.options.mk"
+
+## wayland option requires gdk/wayland/tablet-unstable-v2-client-protocol.h
+## and I cannot fint it in pkgsrc.
+#PKG_SUPPORTED_OPTIONS+=	wayland
+#PLIST_VARS+=		wayland
+#.if !empty(PKG_OPTIONS:Mwayland)
+#PLIST.wayland=		yes
+#.include "../../devel/wayland/buildlink3.mk"
+#.include "../../devel/wayland-protocols/buildlink3.mk"
+#.include "../../fonts/fontconfig/buildlink3.mk"
+#.include "../../x11/libxkbcommon/buildlink3.mk"
+#MESON_ARGS+=		-Dwayland-backend=true
+#.else
+MESON_ARGS+=		-Dwayland-backend=false
+#.endif
+
+PLIST_VARS+=		quartz
+.if !empty(PKG_OPTIONS:Mquartz)
+PLIST.quartz=		yes
+MESON_ARGS+=		-Dmacos-backend=true
+.else
+MESON_ARGS+=		-Dmacos-backend=false
+.endif
+
+PLIST_VARS+=		x11
+.if !empty(PKG_OPTIONS:Mx11)
+PLIST.x11=		yes
+MESON_ARGS+=		-Dx11-backend=true
+.include "../../x11/libXinerama/buildlink3.mk"
+.include "../../x11/libXrandr/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../x11/libXrender/buildlink3.mk"
+.include "../../x11/libXi/buildlink3.mk"
+.include "../../x11/libXext/buildlink3.mk"
+.include "../../x11/libXcursor/buildlink3.mk"
+.include "../../x11/libXdamage/buildlink3.mk"
+.include "../../x11/libXfixes/buildlink3.mk"
+.include "../../x11/libXcomposite/buildlink3.mk"
+.else
+MESON_ARGS+=		-Dx11-backend=false
+.endif
+
+PLIST_VARS+=		cups
+.if !empty(PKG_OPTIONS:Mcups)
+PLIST.cups=		yes
+MESON_ARGS+=		-Dprint-cups=enabled
+.include "../../print/libcups/buildlink3.mk"
+.else
+MESON_ARGS+=		-Dprint-cups=disabled
+.endif
+
+.if !empty(PKG_OPTIONS:Mdebug)
+MESON_ARGS+=		-Ddebug=true
+.else
+MESON_ARGS+=		-Ddebug=false
+.endif
diff --git a/gtk4/patches/patch-meson.build b/gtk4/patches/patch-meson.build
new file mode 100644
index 0000000000..d16dcffa65
--- /dev/null
+++ b/gtk4/patches/patch-meson.build
@@ -0,0 +1,27 @@
+$NetBSD: patch-meson.build,v 1.6 2026/01/06 20:06:35 adam Exp $
+
+Build fix for gcc 12 on NetBSD.
+It is the equivalent of the default PKGSRC_USE_RELRO=partial
+c.f., PR lib/57792
+
+Don't look for bash. Don't install bash-completions.
+
+--- meson.build.orig	2025-11-20 05:08:31.000000000 +0000
++++ meson.build
+@@ -429,7 +429,6 @@ common_cflags = cc.get_supported_argumen
+ common_ldflags = cc.get_supported_link_arguments([
+   '-Wl,-Bsymbolic',
+   '-Wl,-z,relro',
+-  '-Wl,-z,now',
+ ])
+ 
+ confinc = include_directories('.')
+@@ -858,7 +857,7 @@ if os_unix
+ endif
+ 
+ # Shell completion
+-bash = find_program('bash', required : false)
++bash = find_program('nonexistent_bash', required : false)
+ 
+ if bash.found()
+   bash_comp_dep = dependency('bash-completion', version: '>=2.0', required: false)
diff --git a/gtk4/patches/patch-testsuite_gdk_colorstate.c b/gtk4/patches/patch-testsuite_gdk_colorstate.c
new file mode 100644
index 0000000000..2faab8c89d
--- /dev/null
+++ b/gtk4/patches/patch-testsuite_gdk_colorstate.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-testsuite_gdk_colorstate.c,v 1.1 2026/01/05 14:08:23 adam Exp $
+
+Fix build.
+
+--- testsuite/gdk/colorstate.c.orig	2026-01-05 13:26:22.141849124 +0000
++++ testsuite/gdk/colorstate.c
+@@ -166,7 +166,7 @@ test_convert (gconstpointer testdata,
+                                         gdk_color_state_get_srgb ()));
+   if (method == TEXTURE_METHOD_DMABUF)
+     {
+-#ifdef HAVE_DRM_FOURCC_H
++#if 0
+       texture = udmabuf_texture_from_texture (texture, &error);
+ #else
+       g_assert_not_reached ();


Home | Main Index | Thread Index | Old Index