formula: add Mbed-TLS/mbedtls - #471
MeteorsLiu wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
The new Mbed TLS thresholds have consistent source selection, option filtering, zlib wiring, relocatable pkg-config generation, and consumer tests. Linux consumer validation passed for mbedtls-2.16.12 and mbedtls-3.0.0; the local mbedtls-4.0.0 build could not complete because this environment lacks a compatible jsonschema runtime for the upstream generator.
| os.mkdirAll(licenseDir, 0o755)! | ||
| os.writeFile(filepath.join(licenseDir, "LICENSE"), os.readFile(filepath.join(ctx.SourceDir, "LICENSE"))!, 0o644)! | ||
|
|
||
| libs := ["-L$${libdir}", "-lmbedtls", "-lmbedx509", "-lmbedcrypto"] |
There was a problem hiding this comment.
[P1] Include ws2_32 in Windows link metadata
The Windows filter still permits the default static build, but this combined pkg-config contract advertises only the three Mbed TLS archives. Upstream CMake adds ws2_32 to the library link interface under WIN32; because pkgconfig.lookup is the metadata consumed by downstream static consumers, Windows users of socket/TLS APIs will otherwise get unresolved Winsock symbols. Add the Windows system library to libs here and apply the same fix to the 3.x and 4.x thresholds.
Adds LLAR Formula thresholds for mbedtls 2.x, 3.x, and 4.x with source-backed submodule setup, conditional zlib dependency, relocatable pkg-config metadata, and Conan-style C consumers.
Validated on darwin/arm64 across pinned and representative tags, retained options, cache-hit testing, and the default comparator-selected v4.2.0 tag.
Closes #322