2424-- tables generated from them by 15 (2568 vs 2583) — so an unpinned build makes
2525-- `di_info_get_make` answer differently depending on where it was compiled.
2626--
27- -- The fork pins hwdata v0.410, checks the input in beside the output, and its
28- -- CI regenerates and diffs. Same arrangement as freedesktop.libevdev with
29- -- upstream's bundled kernel headers.
30- --
31- -- NO MODULE WRAPPER, deliberately: this library's consumer is wlroots, which is
32- -- C, and the surface is 74 functions over ~360 structs. The design doc's rule
33- -- applies — the module layer is a RESULT of forking, not a reason to fork.
34- --
35- -- ⚠ C++ CONSUMERS MUST WRAP THE INCLUDES. Not one of the seven public headers
36- -- has an `extern "C"` block, so a C++ TU mangles every declaration and the link
37- -- fails with `undefined reference to di_info_get_make(di_info const*)` — naming
38- -- a symbol that is right there. Same as compat.libseat.
27+ -- The fork pins hwdata v0.410 and checks it in as an INPUT. There is no
28+ -- checked-in output and no regenerate-and-diff CI step, because there is
29+ -- nothing to keep honest: `build.mcpp` PRODUCES the table during the build.
30+ --
31+ -- NOTHING IN THIS PACKAGE NEEDS python3, sh OR ANY OTHER TOOL. `build.mcpp` is
32+ -- C++ that mcpp compiles and runs, and it does every generated artifact:
33+ --
34+ -- pnp-id-table.c 2,583 lines, into the out dir
35+ -- src/libdisplay-info.cppm the module wrapper, 206 names
36+ --
37+ -- IT IS ALSO MORE CORRECT THAN UPSTREAM'S GENERATOR. pnp.ids stores
38+ -- `DemoPad<U+00A0>Software<U+00A0>Ltd`, and U+00A0 is the two bytes c2 a0.
39+ -- Upstream reads the file as TEXT and escapes the codepoint by ordinal —
40+ -- `\240`, a single byte that is not its UTF-8 encoding, so the string a
41+ -- consumer prints is invalid UTF-8. build.mcpp escapes BYTES. Diffed over the
42+ -- whole file: 2,583 lines, identical except for the handful of non-ASCII names,
43+ -- where this one is right.
44+ --
45+ -- THE MODULE IS GENERATED, not hand-written: 206 names read out of the public
46+ -- headers, so a version bump cannot silently drop one.
47+ --
48+ -- import freedesktop.displayinfo;
49+ --
50+ -- and that also removes a real burden — not one of the seven public headers has
51+ -- an `extern "C"` block, so a C++ TU that #includes them mangles every
52+ -- declaration and fails to link with `undefined reference to
53+ -- di_info_get_make(di_info const*)`. The module does that wrapping once, inside
54+ -- the module purview, so a consumer does not. (compat.libseat has the same
55+ -- upstream problem and no module, so there the consumer still wraps.)
3956package = {
4057 spec = " 1" ,
4158 namespace = " freedesktop" ,
@@ -49,10 +66,10 @@ package = {
4966 linux = {
5067 [" 0.2.0" ] = {
5168 url = {
52- GLOBAL = " https://github.com/mcpplibs/libdisplay-info/releases/download/v0.2.0/libdisplay-info-0.2.0-mcpp .tar.gz" ,
53- CN = " https://gitcode.com/mcpp-res/libdisplay-info/releases/download/0.2.0/libdisplay-info-0.2.0-mcpp .tar.gz" ,
69+ GLOBAL = " https://github.com/mcpplibs/libdisplay-info/releases/download/v0.2.0/libdisplay-info-0.2.0-mcpp2 .tar.gz" ,
70+ CN = " https://gitcode.com/mcpp-res/libdisplay-info/releases/download/0.2.0/libdisplay-info-0.2.0-mcpp2 .tar.gz" ,
5471 },
55- sha256 = " df065a6e040799536a6c93a0202f2766b8c3388b546d0ba4a43290a89aa33ccc " ,
72+ sha256 = " 8df9a8064146b2b38378bd8b146894d084ffda43b88b43c485b954da073a7617 " ,
5673 },
5774 },
5875 },
0 commit comments