[...] a viable FPC 322 is now back in Debian Unstable. Its package #48 and all that has changed is that gtk2 is now suggested, not a dependency. [...] Lazarus is still an issue.
could this not be solved by distributing Lazarus as a source-only package with a (user run) build script that checks for the presence of GTK2, Qt5, Qt6 and asks the user to select between the ones that are found to be present?
btw - is it technically possible for a GUI application to be built such that it can detect the available widget sets and just use whatever one is available? ie, dynamically load the necessary libraries at run-time using dlopen/etc.
In second case, "technically possible" ? Yes, absolutely. Practical ? Maybe not.
The first case ? A vastly better approach, IMHO than what we do now. The Debian Lazarus Package would just install dependencies (ie libQtPas) and a script that the end user runs, in user space, that does the downloading of source, selecting an appropriate widget set, build.
Debian packages should (must?) not install things in user space, Linux is, at heart, still a multiuser system. Users come and go. So, strict separation between user an root space. So, its a user run script. Some other larger apps do a similar thing.
So, in this model, Lazarus binaries never exist in root space. So, no issues about write protected files. The Debian Lazarus Package is small, simple, and easily maintained. Maybe several, Lazarus-Qt5, Lazarus-Qt6, Lazarus-gtk3 etc, all are really just there to pull in dependencies.
I already have a script that does much of the (user space) installing,
https://github.com/davidbannon/FPC_Laz_Install/blob/main/make-lazarus.bashSimilarly, fpcupdeluxe does a similar thing.
Davo