Skip to content
This repository was archived by the owner on Sep 20, 2026. It is now read-only.

formula: add Mbed-TLS/mbedtls - #471

Open
MeteorsLiu wants to merge 2 commits into
xgo-dev:mainfrom
MeteorsLiu:issue/322-mbedtls-luna
Open

MeteorsLiu wants to merge 2 commits into
xgo-dev:mainfrom
MeteorsLiu:issue/322-mbedtls-luna

Conversation

@MeteorsLiu

Copy link
Copy Markdown
Collaborator

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

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

This branch has not been deployed

No deployments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Translate Conan Center mbedtls recipe to LLAR

1 participant