pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
gtk4: add wayland support
Module Name: pkgsrc-wip
Committed By: kikadf <kikadf.01%gmail.com@localhost>
Pushed By: kikadf
Date: Sun Feb 15 11:49:10 2026 +0100
Changeset: 3e1a8ad987db9206b479468f1c70a68e5669d385
Modified Files:
gtk4/Makefile
gtk4/PLIST
gtk4/buildlink3.mk
gtk4/distinfo
gtk4/options.mk
Added Files:
gtk4/patches/patch-gdk_wayland_gdkseat-wayland.c
Log Message:
gtk4: add wayland support
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=3e1a8ad987db9206b479468f1c70a68e5669d385
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
gtk4/Makefile | 3 ++-
gtk4/PLIST | 12 ++++++++++
gtk4/buildlink3.mk | 5 +++++
gtk4/distinfo | 1 +
gtk4/options.mk | 28 +++++++++++++-----------
gtk4/patches/patch-gdk_wayland_gdkseat-wayland.c | 21 ++++++++++++++++++
6 files changed, 56 insertions(+), 14 deletions(-)
diffs:
diff --git a/gtk4/Makefile b/gtk4/Makefile
index 3e83a8c51f..d934586068 100644
--- a/gtk4/Makefile
+++ b/gtk4/Makefile
@@ -2,7 +2,7 @@
DISTNAME= gtk-4.20.3
PKGNAME= ${DISTNAME:S/gtk/gtk4/}
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gtk/${PKGVERSION_NOREV:R}/}
EXTRACT_SUFX= .tar.xz
@@ -35,6 +35,7 @@ MESON_ARGS+= -Dvulkan=disabled
MESON_ARGS+= -Df16c=disabled
PKGCONFIG_OVERRIDE+= output/meson-private/gtk4.pc
+PKGCONFIG_OVERRIDE+= output/meson-private/gtk4-wayland.pc
PKGCONFIG_OVERRIDE+= output/meson-private/gtk4-x11.pc
PKGCONFIG_OVERRIDE+= output/meson-private/gtk4-unix-print.pc
diff --git a/gtk4/PLIST b/gtk4/PLIST
index 41d1ce381b..5b3b14d66d 100644
--- a/gtk4/PLIST
+++ b/gtk4/PLIST
@@ -79,6 +79,15 @@ ${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.wayland}include/gtk-4.0/gdk/wayland/gdkwayland.h
+${PLIST.wayland}include/gtk-4.0/gdk/wayland/gdkwaylanddevice.h
+${PLIST.wayland}include/gtk-4.0/gdk/wayland/gdkwaylanddisplay.h
+${PLIST.wayland}include/gtk-4.0/gdk/wayland/gdkwaylandglcontext.h
+${PLIST.wayland}include/gtk-4.0/gdk/wayland/gdkwaylandmonitor.h
+${PLIST.wayland}include/gtk-4.0/gdk/wayland/gdkwaylandpopup.h
+${PLIST.wayland}include/gtk-4.0/gdk/wayland/gdkwaylandseat.h
+${PLIST.wayland}include/gtk-4.0/gdk/wayland/gdkwaylandsurface.h
+${PLIST.wayland}include/gtk-4.0/gdk/wayland/gdkwaylandtoplevel.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
@@ -408,6 +417,7 @@ 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.wayland}lib/girepository-1.0/GdkWayland-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
@@ -417,6 +427,7 @@ 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.wayland}lib/pkgconfig/gtk4-wayland.pc
${PLIST.x11}lib/pkgconfig/gtk4-x11.pc
lib/pkgconfig/gtk4.pc
share/applications/org.gtk.Demo4.desktop
@@ -427,6 +438,7 @@ 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.wayland}share/gir-1.0/GdkWayland-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
diff --git a/gtk4/buildlink3.mk b/gtk4/buildlink3.mk
index 97445349a2..a6e0107a0b 100644
--- a/gtk4/buildlink3.mk
+++ b/gtk4/buildlink3.mk
@@ -25,6 +25,11 @@ pkgbase := gtk4
.include "../../x11/libXi/buildlink3.mk"
.include "../../x11/libXinerama/buildlink3.mk"
.endif
+.if ${PKG_BUILD_OPTIONS.gtk4:Mwayland}
+.include "../../devel/wayland/buildlink3.mk"
+.include "../../devel/wayland-protocols/buildlink3.mk"
+.include "../../x11/libxkbcommon/buildlink3.mk"
+.endif # PKG_BUILD_OPTIONS.gtk4:Mwayland
.endif # GTK4_BUILDLINK3_MK
diff --git a/gtk4/distinfo b/gtk4/distinfo
index 94676413b0..44c098eed1 100644
--- a/gtk4/distinfo
+++ b/gtk4/distinfo
@@ -3,5 +3,6 @@ $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-gdk_wayland_gdkseat-wayland.c) = dca273b6d0d1874590e31c3a9f5194b8adf0ecf5
SHA1 (patch-meson.build) = ed697477ebfa2b06559877170cc5b05079c61ceb
SHA1 (patch-testsuite_gdk_colorstate.c) = 7a6d441f91332bffbd4e170809d8ad7ec51773bd
diff --git a/gtk4/options.mk b/gtk4/options.mk
index 86baa359da..272bb8cbb7 100644
--- a/gtk4/options.mk
+++ b/gtk4/options.mk
@@ -1,7 +1,7 @@
# $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_SUPPORTED_OPTIONS= cups debug wayland
PKG_OPTIONS_REQUIRED_GROUPS= gui
PKG_OPTIONS_GROUP.gui= x11
@@ -12,25 +12,27 @@ PKG_SUGGESTED_OPTIONS+= quartz
.else
PKG_SUGGESTED_OPTIONS+= x11
.endif
+.include "../../devel/wayland/platform.mk"
+.if ${PLATFORM_SUPPORTS_WAYLAND} == "yes"
+PKG_SUGGESTED_OPTIONS+= wayland
+.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
+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
+.endif
PLIST_VARS+= quartz
.if !empty(PKG_OPTIONS:Mquartz)
diff --git a/gtk4/patches/patch-gdk_wayland_gdkseat-wayland.c b/gtk4/patches/patch-gdk_wayland_gdkseat-wayland.c
new file mode 100644
index 0000000000..c94b7deef4
--- /dev/null
+++ b/gtk4/patches/patch-gdk_wayland_gdkseat-wayland.c
@@ -0,0 +1,21 @@
+$NetBSD$
+
+Allow building on systems without evdev
+
+--- gdk/wayland/gdkseat-wayland.c.orig 2026-02-15 09:56:56.344100295 +0000
++++ gdk/wayland/gdkseat-wayland.c
+@@ -48,6 +48,14 @@
+ #include <dev/evdev/input.h>
+ #elif defined(HAVE_LINUX_INPUT_H)
+ #include <linux/input.h>
++#else
++#ifndef BTN_LEFT
++#define BTN_LEFT (0x110)
++#define BTN_RIGHT (0x111)
++#define BTN_MIDDLE (0x112)
++#define BTN_STYLUS (0x14b)
++#define BTN_STYLUS2 (0x14c)
++#endif
+ #endif
+
+ /**
Home |
Main Index |
Thread Index |
Old Index