|
| 1 | +# Add mcpplibs.mwrap.fribidi (fribidi-m 1.0.16) |
| 2 | + |
| 3 | +## Form |
| 4 | + |
| 5 | +- Third-party upstream [fribidi/fribidi](https://github.com/fribidi/fribidi), release 1.0.16, LGPL-2.1-or-later. |
| 6 | + The tarball (`1b1cde5b…a9ea05c`) is the one compat.fribidi 1.0.16 already pins. |
| 7 | +- Form A external mwrap module repository [mcpplibs/fribidi-m](https://github.com/mcpplibs/fribidi-m), package |
| 8 | + `mcpplibs.mwrap.fribidi`, version 1.0.16 (first release of the identity, no revision suffix), tag series |
| 9 | + `mwrap-${version}`. |
| 10 | +- Implementation ownership: the library is compat.fribidi's (a static library; its configuration and ABI are |
| 11 | + sufficient). The wrapper vendors no upstream code. It retains upstream's README.md, COPYING, AUTHORS and the |
| 12 | + Unicode Character Database notice of the data its tables come from under `upstream/`, with checksums in |
| 13 | + `upstream/documents.json`, and deploys them with its own LICENSE/NOTICE (`runtime.deploy`): the LGPL travels |
| 14 | + with every program that links FriBidi statically. |
| 15 | + |
| 16 | +## Modules |
| 17 | + |
| 18 | +- `mcpplibs.mwrap.fribidi`: every type, enumerator (FriBidiCharSet, the joining types), FRIBIDI_ENTRY function |
| 19 | + (32, deprecated included) and variable of the headers upstream installs, by `export using`, generated from the |
| 20 | + pinned headers as a C++ translation unit sees them (`FriBidiCharType`/`FriBidiParType` are `uint32_t` in C++). |
| 21 | +- `fribidi_debug_status` / `fribidi_set_debug` are declared by `fribidi-common.h` outside its `extern "C"` block, |
| 22 | + so a C++ call through the header does not link. They are adapted under their names in `mcpplibs::mwrap::fribidi`, |
| 23 | + calling the library's C functions. |
| 24 | +- `mcpplibs.mwrap.fribidi.macros`: 171 object-like macros as `inline constexpr` of the type of their C++ expansion, |
| 25 | + 55 function-like macros as constexpr function templates whose body is the macro itself (value, type and value |
| 26 | + category of the macro for every argument type; assigning macros take their argument by reference). |
| 27 | +- Stay macros, in `<mwrap/fribidi/macros.hpp>` (= `<fribidi.h>`, with `FRIBIDI_LIB_STATIC` on Windows as the |
| 28 | + module has it): declaration attributes, the `extern "C"` brackets, the deprecation pragmas and the X-macro |
| 29 | + protocol of the `*-list.h` tables. Not mapped: the 16 include guards. |
| 30 | + |
| 31 | +`tools/check_exports.py` fails when the generated sources are stale, a declaration is neither exported nor |
| 32 | +adapted, or a macro is neither mapped nor listed; every mapping is checked against the raw header in a |
| 33 | +header-mixing test. |
| 34 | + |
| 35 | +## Verification |
| 36 | + |
| 37 | +Wrapper CI (Linux GCC 16.1 and LLVM 23.1.3, macOS LLVM, Windows LLVM, all required): build, the four test |
| 38 | +programs, the export audit, and FriBidi's whole test suite on `examples/fribidi` (upstream's `fribidi` program |
| 39 | +and its two conformance runners, ported to the module): the six charset tests byte for byte, BidiTest.txt |
| 40 | +(770,241 cases) and BidiCharacterTest.txt (91,707 cases), nothing excluded. The templates job scaffolds the |
| 41 | +default `bidi` template as an installed package and runs it. |
| 42 | + |
| 43 | +Here, with the CI-pinned mcpp 2026.10.26.1 and `MCPP_INDEX_MIRROR=GLOBAL`: |
| 44 | + |
| 45 | +- `bash tests/run_members.sh fribidi-bidi`: the real release archive through the candidate index; paragraph |
| 46 | + levels with bracket pairs, log2vis with mirroring, Arabic shaping, the macros, and the side header beside the |
| 47 | + import with an X-macro table: `test result ok`. |
| 48 | +- `python3 tests/mwrap/check_installed_template.py --package mcpplibs.mwrap.fribidi@1.0.16 --deploy`: the |
| 49 | + unmodified template from the real archive, then a relocated self-contained bundle whose `licenses/fribidi/` |
| 50 | + holds the wrapper's LICENSE/NOTICE and FriBidi's COPYING, AUTHORS, README and UCD notice byte for byte. |
| 51 | + |
| 52 | +## Mirror and updates |
| 53 | + |
| 54 | +No `mcpp-res` access in this change, so the descriptor uses the GitHub release URL as a plain string (CN users |
| 55 | +fall back to it); a maintainer can add the GitCode mirror with identical bytes. `extensions.autoupdate` |
| 56 | +follows the repository's own `mwrap-${version}` tags. |
| 57 | + |
| 58 | +## Motivation |
| 59 | + |
| 60 | +openmui's text engine (openmui.text) computes bidi levels with FriBidi; through this module its native unit |
| 61 | +imports the library instead of including C headers. |
0 commit comments