formula: add AcademySoftwareFoundation/openapv - #213
Conversation
There was a problem hiding this comment.
Review: openapv build recipe
This adds a well-structured llarhub build recipe for AcademySoftwareFoundation/openapv plus its versions.json. It closely follows the established strukturag/libde265 convention (cmake + license install + .pc relocation + pkg-config consumer test).
Verified correct:
filter(L31-43) — correctly rejects any option name other thanshared/fPICand validates each value isON/OFF. Stricter than libde265, and sound..pcpath handling — headers install toinclude/oapvand the static archive tolib/oapv, soincludedir(L77), the static-L$${libdir}/oapv(L87), the shared-L$${libdir}(L85), and static-only-DOAPV_STATIC_DEFINE(L80-82) all match the upstream install layout.0o755/0o644octal literals are accepted and used across sibling recipes.- Security/perf: embedded consumer source is a static constant (no injection), env vars scoped to the shared branch,
cc!/exec!use arg-vector invocation, single-pass.pcrewrite. No concerns.
Minor / optional polish (non-blocking):
- The
.pcrewrite comment says "Keep its verified flags" but the code fully rewritesCflags:/Libs:with hardcoded values (inline note). -lm -lpthreadis appended to the publicLibs:for both shared and static builds; upstream keeps these inLibs.private(static-only). Harmless on shared, but could be scoped to the static branch (inline note).target.options["shared"][0]indexing (L47-48, L117) is safe givendefaults+filter, but most sibling recipes prefer the more defensiveslices.contains(target.options["shared"], "ON")idiom.-I$${prefix}/includein Cflags (L79) is redundant since$${includedir}already resolves under it.
No critical or important issues — the recipe looks correct and ready.
| os.writeFile(filepath.join(licenseDir, "LICENSE"), os.readFile(filepath.join(ctx.SourceDir, "LICENSE"))!, 0o644)! | ||
|
|
||
| // Upstream installs oapv.pc with CMAKE_INSTALL_PREFIX-expanded paths. | ||
| // Keep its verified flags while making the installed metadata relocatable. |
There was a problem hiding this comment.
The comment says "Keep its verified flags," but the loop below actually rewrites Cflags: and Libs: entirely with hardcoded relocatable values rather than preserving the upstream flags. Consider rewording to something like "Rewrite the paths and flags to be relocatable" so the comment matches the behavior.
| libs = "-L$${libdir}/oapv -loapv" | ||
| } | ||
| if slices.contains(target.require["os"], "linux") { | ||
| libs += " -lm -lpthread" |
There was a problem hiding this comment.
-lm -lpthread is appended to the public Libs: for both shared and static builds. These are transitive runtime deps that upstream keeps in Libs.private (needed only for static linking). Harmless for the shared case (the .so already carries them), but if you want to mirror upstream semantics you could scope this append inside the if !shared branch. Non-blocking.
Translate the Conan Center openapv recipe to an LLAR formula.
Closes #42