Bug#827125: libglfw3: build a split package for X11 and Wayland

James Cowgill jcowgill at debian.org
Fri Jun 17 20:43:04 UTC 2016


On Fri, 2016-06-17 at 01:57 +0100, Emmanuel Gil Peyrot wrote:
> On Fri, Jun 17, 2016 at 01:37:23AM +0100, James Cowgill wrote:
> > 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.

That's great!

> > 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.

This does mean that the Wayland version cannot be co-installed with
anything in Debian which (transitively) depends on the X11 version, and
also means you can't switch between the libraries safely without
recompiling any rdeps. If that's good enough for you then I'm ok with
implementing it, but it does seem less than perfect.

> > 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?

Yes that should all work, but I can only safely use Provides (or
anything else which implies that the X11 and Wayland version are
interchangeable) if the ABIs are totally identical.

Thanks,
James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20160617/4eebbacc/attachment.sig>


More information about the Pkg-games-devel mailing list