On Fri, Jun 17, 2016 at 01:37:23AM +0100, James Cowgill wrote: > Control: severity -1 wishlist > Control: retitle -1 libglfw3: build a split package for X11 and Wayland > > Hi, > > On Sun, 2016-06-12 at 16:42 +0100, Emmanuel Gil Peyrot wrote: > > Package: libglfw3 > > Version: 3.2-1 > > > > The current version of GLFW supports both X11 and Wayland, but this > > is a build-time choice. It would be very useful for people on > > Wayland systems to be able to install something like `libglfw3- > > wayland' which would provide `libglfw3', and rename the current > > package to `libglfw3-x11'. > > I agree that supporting wayland is a good idea. I notice that in the > other popular toolkits (at least GTK+, Qt and SDL) wayland is detected > at runtime instead of being a build-time choice. From a distribution > perspective this would be better, and it allows the wayland > implementation to be included in the default build instead of forcing > the user to install a different package.
This is planned upstream, but not done yet. The 3.2 release added support for runtime selection of the context creation API, which was one of the other things that previously had to be selected at compile-time. > > If the package split is done, one issue is that the glfw native > functions are different in X11 and Wayland. To use the provides system, > the libraries should offer identical ABIs so some (probably dummy) > Wayland functions will need to be added to the X11 library and vice- > versa. This probably shouldn’t be a blocker, a program would then only depend on the version it was compiled against, or maybe be compiled twice in the case it uses both. > > I would like to avoid renaming the current package because it would > trigger a package transition. This is because any dependency on a > virtual package with more than one candidate needs a default choice or > APT will refuse to install it automatically (rdeps would need a > dependency like 'libglfw3-x11 | libglfw3'). Keeping the X11 package as > 'libglfw3' or possibly retaining libglfw3 as a dummy package would > avoid the transition. Is it possible to have a package being both an actual package and a virtual one? Or some kind of “provides: libglfw3” field in libglfw3-wayland that would make APT see it as a viable alternative to libglfw3 while being in conflict with it? > > > The dependencies of the Wayland backend are libwayland-client0, > > libwayland-cursor0, libwayland-egl1 and libxkbcommon0, while the > > build dependencies are extra-cmake-modules, wayland-protocols. > > Thanks. Just so you know, the runtime dependencies of most Debian > packages are calculated automatically by parsing the installed ELF > files. This means I won't have to list most of these dependencies > manually (which is really convenient). Oops, I even once made a package for some other program, I should have known better. ^^' > > James Thanks, -- Emmanuel Gil Peyrot