OK, here is what I found. And its definitely not what I expected (
but probably what Marcov was trying to tell me all along). FPC can be built on a system that does NOT have gtk2 installed. That does include the packages/gtk2 units.
I built a headless Trixie, added only libc6-dev, vim and make. Installed the sourceforge version of FPC322 from Lazarus repo (needing a deb). Then put fpc324rc1 source in a dir, and ran
The attached image (sorry, large) shows the newly created .ppu and .o files in packages/gtk2 and it shows there is no sign of gtk2 on the system.
Note : doing this experiment using using the Debian Repo fpc322 is pointless, it installs gtk2 as a dependency.
So, this negates my argument that 'we' need restructure fpc and Lazarus, it really is problem introduced by Debian adding gtk2 as a [ build | runtime ] dependency.
(We still have a problem with Lazarus, I will investigate further but its clear that by shipping gtk2 Lazarus binaries from SourceForge we send the message that its a gtk2 app.)
Davo