Deprecated the gtk3 Meson option and effectively forced GTK3 usage (value: true, deprecated: true), plus updated option/help text so users no longer expect GTK2 frontend builds. Also clarified the AppIndicator option text for non-Windows GTK frontend builds.

Updated src/fe-gtk/meson.build to always resolve gtk_dep from dependency('gtk+-3.0', version: '>= 3.22'), removed the GTK2 fallback branch and -DHAVE_GTK2, and kept AppIndicator detection guarded under host_machine.system() != 'windows' as requested. The GTK X11 helper dep is now unconditionally checked within that same non-Windows block (no gtk3 toggle).

Updated Meson summary output to explicitly report the GTK frontend as GTK+ 3.22+ when enabled, reinforcing that GTK2 builds are no longer expected.
This commit is contained in:
2026-02-22 14:42:20 -07:00
parent c7311009dc
commit 52f547ae13
3 changed files with 21 additions and 27 deletions

View File

@@ -177,6 +177,7 @@ if meson.version().version_compare('>= 0.55.0')
}, section: 'Directories')
summary({
'GTK Frontend': get_option('gtk-frontend') ? 'enabled (GTK+ 3.22+)' : 'disabled',
'TLS (openssl)': libssl_dep.found(),
'Plugin Support': get_option('plugin'),
'DBus Support': dbus_glib_dep.found(),

View File

@@ -2,8 +2,8 @@
option('gtk-frontend', type: 'boolean',
description: 'Main graphical interface'
)
option('gtk3', type: 'boolean', value: false,
description: 'Build GTK frontend against GTK 3'
option('gtk3', type: 'boolean', value: true, deprecated: true,
description: 'Deprecated: GTK frontend always builds against GTK 3'
)
option('text-frontend', type: 'boolean', value: false,
description: 'Text interface (not generally useful)'
@@ -23,7 +23,7 @@ option('libcanberra', type: 'feature', value: 'auto',
description: 'Support for sound alerts, Unix only'
)
option('appindicator', type: 'feature', value: 'auto',
description: 'Use Ayatana/AppIndicator-based tray backend when GTK3 is enabled'
description: 'Use Ayatana/AppIndicator-based tray backend for GTK frontend (non-Windows only)'
)
# Install options

View File

@@ -35,11 +35,10 @@ zoitechat_gtk_deps = [
libgmodule_dep, # used by libsexy
]
if get_option('gtk3')
gtk_dep = dependency('gtk+-3.0', version: '>= 3.22')
zoitechat_gtk_cflags += '-DHAVE_GTK3'
gtk_dep = dependency('gtk+-3.0', version: '>= 3.22')
zoitechat_gtk_cflags += '-DHAVE_GTK3'
if host_machine.system() != 'windows'
if host_machine.system() != 'windows'
appindicator_opt = get_option('appindicator')
if appindicator_opt.allowed()
@@ -57,21 +56,15 @@ if get_option('gtk3')
endif
endif
endif
endif
else
gtk_dep = dependency('gtk+-2.0', version: '>= 2.24.0')
zoitechat_gtk_cflags += '-DHAVE_GTK2'
endif
zoitechat_gtk_deps += gtk_dep
if host_machine.system() != 'windows'
if get_option('gtk3')
gdk_x11_dep = dependency('gdk-x11-3.0', required: false)
if gdk_x11_dep.found()
zoitechat_gtk_deps += gdk_x11_dep
endif
endif
x11_dep = dependency('x11', required: false)
if x11_dep.found()