Platform dependent but UI independent plugins

I was randomly looking at what would be necessary to create an idle source for win32 (more on that in another post) when I ran across an interesting issue.

Now that we have Pidgin and Gaim we have an odd scenario where we have platform dependent plugins that aren’t actually tied to a libpurple user interface. This isn’t exactly a new thing as we had Pidgin and Finch in the past, but those two were different enough that there wasn’t much over lap.

However, right now we have an idle-xscreensaver plugin which currently resides in pidgin/plugins as it was considered UI specific because it uses X11. But Gaim an use X11 as well. We also have the credential providers that are platform specific, KeyChain Access for macOS, WinCred for Windows, and libsecret for everything else. But these live in libpurple.

I’m thinking we should move the idle sources into libpurple/plugins as they are reusable and control them with build features so that users don’t have to disable them if their dependencies are not found.

This would then also set a precedent going forward that if something using a platform specific API like these, then it’s okay for them to go into libpurple as long as they don’t pull in a specific UI toolkit as a result and would make it easier for other users interfaces to benefit from these without needing yet another additional library/repository of plugins.

Thoughts?

I just double checked and it idle-xscreensaver does pull in gtk4-x11 for gdk_x11_display_get_xdisplay but in theory we should be able to remove the gdk specific parts as they’re just wrappers around the raw X11 code.

I went ahead and removed the GDK dependency in /r/4631.

I don’t see a problem with that since people who don’t want to pull in graphical stuff can just disable it.

1 Like

Looking at Arch Linux, I can see that many packagers prefer minimal-dependency builds (without GUI dependencies for e.g. protocol bridges). It would be nice to have the meson files organized in such a way that a libpurple3 package can be built with as well as without idle-xscreensaver. In that context, it would also be nice for a possibility to only build the plug-in separately so it can be put into a pidgin3 package.

We’re going to be splitting libpurple out at some point. So these concerns will be split up a bit.

/r/4632 has been opened to move this to libpurple and added a configuration option to build it or not.