|
| 1 | +-- freedesktop.wayland-protocols-unstable — the unstable extension protocols, |
| 2 | +-- pre-generated. |
| 3 | +-- |
| 4 | +-- ───────────────────────────────────────────────────────────────────────── |
| 5 | +-- WHY THIS IS A FORK AND NOT AN INLINE DESCRIPTOR |
| 6 | +-- |
| 7 | +-- wayland-protocols ships **XML and nothing else**: 65 files under `stable/`, |
| 8 | +-- `staging/`, `unstable/` and `experimental/`, plus a pkg-config entry |
| 9 | +-- naming the directory. A consumer runs `wayland-scanner` over the ones it |
| 10 | +-- uses and compiles the result itself — there is no library to link and no |
| 11 | +-- header to include until someone generates them. |
| 12 | +-- |
| 13 | +-- So an inline descriptor has nothing to compile. The generator runs once in |
| 14 | +-- [mcpplibs/wayland-protocols](https://github.com/mcpplibs/wayland-protocols) |
| 15 | +-- and the output is checked in, which is the same shape as |
| 16 | +-- `freedesktop.wayland`'s own protocol code and for the same reason: |
| 17 | +-- precomputable output belongs in the repo, not in every consumer's build. |
| 18 | +-- No scanner runs when you build against this — `mcpp build` is the whole |
| 19 | +-- toolchain — and the fork's CI regenerates with the ECOSYSTEM's |
| 20 | +-- `freedesktop.wayland-scanner`, so the generated code cannot drift from the |
| 21 | +-- library that marshals it. |
| 22 | +-- |
| 23 | +-- ───────────────────────────────────────────────────────────────────────── |
| 24 | +-- WHY THREE PACKAGES AND NOT ONE |
| 25 | +-- |
| 26 | +-- Because all 65 in one library DOES NOT LINK, and that was measured rather |
| 27 | +-- than feared. `staging/` and `unstable/` carry the same protocol at |
| 28 | +-- different maturity levels, and the scanner emits the same symbol names: |
| 29 | +-- |
| 30 | +-- multiple definition of `zwp_linux_dmabuf_v1_interface' |
| 31 | +-- |
| 32 | +-- Counted, per exported `wl_interface`: |
| 33 | +-- |
| 34 | +-- stable n staging = 0 stable 21 exports |
| 35 | +-- stable n unstable = 13 staging 76 |
| 36 | +-- staging n unstable = 0 unstable 69 |
| 37 | +-- within any one tier = 0 |
| 38 | +-- |
| 39 | +-- The tier is exactly the boundary along which the protocols coexist, and it |
| 40 | +-- is upstream's own directory structure rather than a split invented here. A |
| 41 | +-- consumer names the tiers it needs; needing two spellings of one protocol is |
| 42 | +-- a real conflict, which is what upstream means by shipping XML. |
| 43 | +-- |
| 44 | +-- THREE UNSTABLE PROTOCOLS ARE NOT SHIPPED, and they ARE that 13-symbol |
| 45 | +-- overlap: `xdg-shell-unstable-v5`, `linux-dmabuf-unstable-v1` and |
| 46 | +-- `tablet-unstable-v2`. Each was SUPERSEDED by a stable protocol of the same |
| 47 | +-- name — upstream keeps the old spelling only for compatibility — so shipping |
| 48 | +-- both would make this package unusable beside the stable one it depends on. |
| 49 | +-- The choice is forced, not editorial. |
| 50 | +-- |
| 51 | +-- staging and unstable are NOT self-contained, and that too is measured: both |
| 52 | +-- reference `xdg_toplevel_interface`, and staging also |
| 53 | +-- `zwp_tablet_tool_v2_interface` — stable defines them. Inside the fork that |
| 54 | +-- is a path dependency on the sibling member, so this tarball is |
| 55 | +-- self-contained and a consumer does not have to know. |
| 56 | +-- |
| 57 | +-- ───────────────────────────────────────────────────────────────────────── |
| 58 | +-- THE COST OF A WHOLE TIER, MEASURED |
| 59 | +-- |
| 60 | +-- mcpp links a dependency's objects into the consumer, so naming a tier means |
| 61 | +-- carrying it. All 65 protocols compile to 270 KB of `wl_interface` tables — |
| 62 | +-- 4 KB each. The bulk of the fork is HEADERS (84,288 lines), and a header |
| 63 | +-- costs nothing until it is included. Splitting per protocol would mean 65 |
| 64 | +-- packages for 270 KB. |
| 65 | +-- |
| 66 | +-- `kind = "lib"`, not `"shared"`, and that matches upstream: there is no |
| 67 | +-- `libwayland-protocols.so` anywhere, because the marshalling tables are |
| 68 | +-- meant to be compiled INTO the program. A shared library would invent an ABI |
| 69 | +-- upstream does not have. |
| 70 | +package = { |
| 71 | + spec = "1", |
| 72 | + namespace = "freedesktop", |
| 73 | + name = "wayland-protocols-unstable", |
| 74 | + description = "wayland-protocols unstable — the zwp_*/zxdg_* protocols still in flux", |
| 75 | + licenses = {"MIT"}, |
| 76 | + repo = "https://github.com/mcpplibs/wayland-protocols", |
| 77 | + type = "package", |
| 78 | + |
| 79 | + xpm = { |
| 80 | + linux = { |
| 81 | + -- wayland-protocols' own release number. Upstream tags without a |
| 82 | + -- leading v, and so does the fork. |
| 83 | + ["1.49"] = { |
| 84 | + url = { |
| 85 | + GLOBAL = "https://github.com/mcpplibs/wayland-protocols/archive/refs/tags/1.49.tar.gz", |
| 86 | + CN = "https://gitcode.com/mcpp-res/wayland-protocols/releases/download/1.49/wayland-protocols-1.49.tar.gz", |
| 87 | + }, |
| 88 | + sha256 = "0f0f6039b9899699fb3228d5bff25e2a5e5a4792b1fa9964001f73387d7a25e4", |
| 89 | + }, |
| 90 | + }, |
| 91 | + }, |
| 92 | + |
| 93 | + mcpp = "*/mcpp/unstable/mcpp.toml", |
| 94 | +} |
0 commit comments