Skip to content

Translate the Conan Center libdeflate recipe to LLAR #13

Description

@MeteorsLiu

Translate the current Conan Center libdeflate recipe into an LLAR Formula in this repository.

Source material

Goal

Add ebiggers/libdeflate to llarhub. The result should preserve the useful package semantics expressed by the Conan recipe, but it must be an idiomatic LLAR Formula rather than a line-by-line rewrite of conanfile.py.

Read and follow .agents/skills/write-formula/SKILL.md and both of its required references before editing.

Translation process

  1. Read the Conan recipe, conandata.yml, and test_package to identify the source tags, build system, package options, installed interface, and consumer verification.
  2. Inspect the actual upstream source at both v1.22 and v1.25. Treat the Conan recipe as a guide to what needs investigation, not as authority for upstream behavior.
  3. Determine whether one Formula can safely serve both tags. Choose fromVer from the verified range. Do not claim support for the separate pre_1.15 Conan recipe in this issue.
  4. Verify direct dependencies from upstream. The current Conan recipe declares none, so versions.json should not invent any. Add onRequire only if the upstream sources prove that dependency discovery is needed.
  5. Translate only build choices that materially affect dependency resolution, commands, installed output, metadata, tests, or platform support. Evaluate the Conan shared and fPIC options separately and map retained package choices to target.options. Environment requirements belong in target.require only when the Formula reads them.
  6. Implement the build with the current LLAR CMake helper. onBuild must build the selected source and install the library and public headers into ctx.outputDir. Call configure, build, and install directly because they already panic on failure.
  7. Preserve the Conan package intent of building the library without the gzip program or upstream test suite unless upstream inspection shows a different requirement. Do not copy Conan-only layout, generators, package cleanup, compatibility code, or defensive settings into the Formula.
  8. Derive ctx.setMetadata from the actual installed consumer interface. Prefer valid installed package metadata when available; do not guess linker flags from the Conan package_info block.
  9. Add onTest using the consumer behavior in the Conan test_package as the reference: compile and run a small C consumer against the installed libdeflate result. Keep its build directory independent of the onBuild scratch tree so it also works on a cache hit.
  10. Keep every module id, source tag, Formula filename, versions.json entry, matrix option, CMake definition, and test path backed by the inspected source.

Validation

Run the repository-required Formula checks and at least:

llar test -v ./ebiggers/libdeflate@v1.22
llar test -v ./ebiggers/libdeflate@v1.25

Test the default option selection and each retained output-changing option with explicit host --os and --arch values. Re-run one tested selection to verify cache-hit onTest behavior.

The pull request should contain only the module files needed for ebiggers/libdeflate; do not add a generic Conan importer or modify the Formula skill.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions