We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4207

Summary: Include wayland protocol XML in source tree
Product: SDL Reporter: Ryan C. Gordon <icculus>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: All   

Description Ryan C. Gordon 2018-06-25 06:13:03 UTC
(vocab: Wayland "protocols" are sort of like X11 extensions, but they sit in a little glue code in your program that talks to the server on your behalf instead of an external library on the end-user's system doing that work.)

Right now the configure/cmake scripts look for wayland protocol specifications (XML files) on the user's system, and runs them through a tool that generates the appropriate C glue code for SDL to use, but this means you need a system with the latest protocol definitions (that is, a system with the latest Wayland) to build Wayland support at all without failure, even though the thing that gets built can work on any unextended version of Wayland.

Is there any reason these XML files aren't in SDL itself? The glue code it generates is just a basic API that talks to interfaces exposed at runtime, and we already handle those interfaces not existing, so long as the glue code is compiled into SDL.

If we don't want to have the XML in the source tree, we can also take some effort to fix the configure script to deal with missing protocol files and sprinkle #ifdefs around to turn them off, but it seems simpler and cleaner to just always have the functionality available unconditionally.

This hasn't been a big problem so far because we don't focus on Wayland much yet, and our development hasn't been on bleeding edge interfaces, but fixing Bug #4121 exposes this issue and it will continue to cause issues as Wayland maybe replaces X11 in some nearish future.

--ryan.
Comment 1 Ryan C. Gordon 2018-06-25 16:41:16 UTC
I did this now, in https://hg.libsdl.org/SDL/rev/1a7dec71e8e0

--ryan.