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

formula: uclouvain/openjpeg - #506

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

MeteorsLiu wants to merge 2 commits into
xgo-dev:mainfrom
MeteorsLiu:issue/249-openjpeg-luna

Conversation

@MeteorsLiu

Copy link
Copy Markdown
Collaborator

Translate the pinned Conan Center openjpeg recipe into an idiomatic LLAR Formula.

Closes #249

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

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

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

1 participant