formula: uclouvain/openjpeg - #506
MeteorsLiu wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
The formula builds and its consumer smoke test passes for the exact v2.5.3 tag and the v2.5.0 boundary on Linux amd64. The installed static-library metadata is missing a required system linkage dependency, however, so the default package is not portable across the supported Unix targets.
| libs := ["-L$${libdir}", "-lopenjp2"] | ||
| if !shared { | ||
| if osName != "windows" { | ||
| libs <- "-lm" |
There was a problem hiding this comment.
[P1] Add pthread to static pkg-config linkage
With the default shared=OFF, OpenJPEG is built with OPJ_USE_THREAD=ON; the resulting libopenjp2.a contains unresolved pthread_* calls. The generated metadata here adds only -lm, so consumers on Linux systems where pthread is not folded into libc (and on FreeBSD, which the formula accepts) fail to link even though the Conan recipe declares pthread as a system library. Add the platform-appropriate pthread flag to the static libs list (or otherwise publish the complete CMake thread dependency).
Translate the pinned Conan Center openjpeg recipe into an idiomatic LLAR Formula.
Closes #249