Add Debian 12 (GTK 4.8 / libadwaita 1.2) build compatibility - #16
Open
Navigata1 wants to merge 4 commits into
Open
Add Debian 12 (GTK 4.8 / libadwaita 1.2) build compatibility#16Navigata1 wants to merge 4 commits into
Navigata1 wants to merge 4 commits into
Conversation
Debian 12 'bookworm' ships GTK 4.8.3 and libadwaita 1.2.2, which predate
several APIs séance uses. Replace each newer call with a behaviourally
equivalent one available in GTK 4.8 / libadwaita 1.2 so the project builds
and runs on Debian 12 (and other older-LTS distros), on arm64 and amd64.
API substitutions (all source-level, no new runtime deps):
- gtk_gl_area_set_allowed_apis -> gtk_gl_area_set_use_es(false)
- gtk_css_provider_load_from_string -> gtk_css_provider_load_from_data(.., -1)
- gtk_search_entry_set_placeholder -> placeholder on GtkText editable delegate
- GtkFontDialogButton -> GtkFontButton (GtkFontChooser font-desc)
- AdwAlertDialog -> AdwMessageDialog
- AdwDialog -> AdwWindow + GtkWindow (modal/transient)
- AdwToolbarView -> vertical GtkBox
- AdwBanner -> GtkRevealer + label + optional button
- AdwSpinRow -> AdwActionRow + GtkSpinButton
- AdwSwitchRow -> AdwActionRow + GtkSwitch
- adw_combo_row_set_enable_search -> omitted (optional)
Add packaging/debian12/{install.sh,README.md}: an automated build+install
script (installs deps, fetches Zig 0.15.2, builds, installs) and docs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author
|
Update: I was able to confirm interactive pane rendering after all. Running against a painting display (an Xvfb framebuffer with Mesa software GL on the same arm64 box), the |
…arning Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a compatibility layer so séance builds and runs on Debian 12 "bookworm", which ships GTK 4.8.3 and libadwaita 1.2.2 — older than séance's current target (GTK 4.12+, libadwaita 1.4/1.5+). Useful for Debian 12 and other LTS distros that haven't moved to libadwaita 1.4+ yet. Tested on arm64 (aarch64); the substitutions apply equally to amd64.
Why
A clean
zig buildon Debian 12 fails with ~50 missing-symbol errors across the UI code, because several GTK/libadwaita calls don't exist in the older libraries.How
Each newer API is replaced with a behaviourally equivalent one that already exists in GTK 4.8 / libadwaita 1.2 (source-level only, no new runtime dependencies):
gtk_gl_area_set_allowed_apis(GTK 4.12)gtk_gl_area_set_use_es(area, FALSE)— keeps the desktop-GL requestgtk_css_provider_load_from_string(GTK 4.12)gtk_css_provider_load_from_data(p, data, -1)gtk_search_entry_set_placeholder_text(GTK 4.10)GtkTexteditable delegateGtkFontDialogButton(GTK 4.10)GtkFontButton(viaGtkFontChooserfont-desc)AdwAlertDialog(libadwaita 1.5)AdwMessageDialog(1.2)AdwDialog(libadwaita 1.5)AdwWindow+GtkWindow(modal, transient-for, present)AdwToolbarView(libadwaita 1.4)GtkBox(header on top, content below)AdwBanner(libadwaita 1.4)GtkRevealer+ label + optional action buttonAdwSpinRow(libadwaita 1.4)AdwActionRow+GtkSpinButtonAdwSwitchRow(libadwaita 1.4)AdwActionRow+GtkSwitchadw_combo_row_set_enable_search(libadwaita 1.4)Also adds
packaging/debian12/:install.sh— installs build deps, fetches Zig 0.15.2 (not packaged in Debian 12), builds, installs.README.md— documents the substitutions, dependencies, and the GPU note below.Testing
On Debian 12 arm64:
seance ctl ping→pong;seance ctl tree/identifywork.Caveats / help wanted:
virtio-gpuand no accelerated GL, so I had to force Mesa's software renderer (LIBGL_ALWAYS_SOFTWARE=1) to get a GL context. Thegtk_gl_area_set_use_es(FALSE)substitution preserves the original desktop-GL request, but I'd appreciate confirmation on hardware-GL arm64.Adwaita-CRITICAL ... adw_tab_view_close_page: assertion 'page_belongs_to_this_view' failedlogged once at startup. It doesn't appear related to these substitutions (it's in tab-view setup), but flagging it in case it's meaningful.Happy to adjust the approach (e.g. gate the older paths behind a libadwaita-version check / build option) if you'd prefer to keep the modern APIs as the default.
🤖 Generated with Claude Code