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

formula: add DaveGamble/cJSON - #504

Open
MeteorsLiu wants to merge 1 commit into
xgo-dev:mainfrom
MeteorsLiu:issue/253-cjson-luna
Open

MeteorsLiu wants to merge 1 commit into
xgo-dev:mainfrom
MeteorsLiu:issue/253-cjson-luna

Conversation

@MeteorsLiu

Copy link
Copy Markdown
Collaborator

Summary

Add an idiomatic LLAR Formula for DaveGamble/cJSON from the pinned Conan Center recipe. The formula preserves the v1.7.12 floor, Conan build options, v1.7.12 install patch behavior, optional cJSON_Utils output, and relocatable pkg-config metadata.

Validation

Validated with the exact LLAR main revision 9c062aa5c4b1724bfd30cb72f7e0bda136f9c078 on Darwin arm64: v1.7.12, v1.7.18, v1.7.19, utils, shared, fPIC/locales selections, cache-hit consumer testing, and rejection below the v1.7.12 floor.

Closes #253

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

Reviewed the complete fixed diff for the cJSON formula, including the Conan-derived build/install contract, option handling, pkg-config metadata, and consumer test. The Unix paths are consistent with the installed layout; the shared Windows consumer test needs one runtime-path correction noted inline.

Comment on lines +205 to +208
if target.options["shared"][0] == "ON" {
os.setenv("LD_LIBRARY_PATH", filepath.join(installDir, "lib"))!
os.setenv("DYLD_LIBRARY_PATH", filepath.join(installDir, "lib"))!
}

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] Add the Windows DLL directory to the test PATH

When shared=ON on Windows, the CMake install rules place the DLL in installDir/bin via the RUNTIME DESTINATION added above, while this test executable is created under _llar_consumer. The test only sets LD_LIBRARY_PATH and DYLD_LIBRARY_PATH, neither of which Windows uses, so exec! binary fails with a missing cjson.dll/cjson_utils.dll even though the build and link succeeded. Add installDir/bin to PATH for the Windows branch (preserving the existing PATH) before executing the consumer.

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 cjson recipe to LLAR

1 participant