Bug 279186 - devel/meson: Don't hardcode run-time dependency
Summary: devel/meson: Don't hardcode run-time dependency
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-desktop (Team)
URL:
Keywords:
Depends on:
Blocks: 279187
  Show dependency treegraph
 
Reported: 2024-05-20 22:23 UTC by Daniel Engberg
Modified: 2024-05-25 10:41 UTC (History)
2 users (show)

See Also:
vishwin: maintainer-feedback+


Attachments
Patch for meson (528 bytes, patch)
2024-05-20 22:23 UTC, Daniel Engberg
vishwin: maintainer-approval-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Engberg freebsd_committer freebsd_triage 2024-05-20 22:23:50 UTC
Created attachment 250841 [details]
Patch for meson

Meson can use both devel/ninja and devel/samurai don't hardcode any as it may cause circular dependency with USES= ninja:samurai and our framework already handles port dependencies.

Reference:
https://cgit.freebsd.org/ports/tree/Mk/Uses/meson.mk#n29
Comment 1 Charlie Li freebsd_committer freebsd_triage 2024-05-21 01:55:31 UTC
Comment on attachment 250841 [details]
Patch for meson

Not every meson consumer uses (or should use) the USES=meson framework, so this needs to remain in some fashion.
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2024-05-21 19:54:50 UTC
Given that meson can utilize both and if you "circumvent" the framework you'd still need to chose one either way for the port (as build dep) I don't see why you'd need it defined?
Comment 3 Charlie Li freebsd_committer freebsd_triage 2024-05-21 22:21:15 UTC
It is a given that a ninja implementation is needed to run builds generated by meson, so it only makes sense to enforce the run dependency on a ninja implementation (chosen by user/framework) in this port. The ability to use either ninja implementation without using the framework has worked fine.

AFAICT the conflict cases are squarely from those using USES=ninja (explicitly and implicitly). For those meson consumers that cannot use the framework, not even USES=ninja, this proposal only serves to make dependency tracking messier. Figure it out in USES=ninja.
Comment 4 Jan Beich freebsd_committer freebsd_triage 2024-05-23 01:26:35 UTC
(In reply to Daniel Engberg from comment #2)
Lots of CI configs for FreeBSD (e.g., basu, seatd, picom, libva, libwacom, wlroots) expect the following to work:

  $ pkg install meson
  $ meson setup _build
  $ meson compile -C _build

Without either ninja or samu installed "meson setup" would fail unless meson.build is very simple to support --backend=none.
Comment 5 Jan Beich freebsd_committer freebsd_triage 2024-05-23 01:43:01 UTC
> basu, seatd, picom, wlroots

Oops, bad examples: hardcode "ninja" instead of using "meson compile", so can break if "meson" switches to "samu" a la Alpine Linux.
Comment 6 Daniel Engberg freebsd_committer freebsd_triage 2024-05-25 04:07:40 UTC
Hi Jan,

Hmm... That'll at least in theory break if you change NINJA_DEFUALT to something else (which we support).

I guess we need to create some kind of flavor / subpackage variant for run-depends.
Comment 7 Charlie Li freebsd_committer freebsd_triage 2024-05-25 10:41:12 UTC
Flavours/subpackages would be overcomplicating this. USES=ninja already BINARY_ALIASes samu as ninja; moving the symlinking to devel/samurai itself is a much simpler move (at the cost of a CONFLICTS_RUN). CI configs and other invocations outside of the ports system cannot hinge on what our framework does for our own builds, so the RUN_DEPENDS needs to remain, point blank.