Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xbps-src: new vopt_feature helper #44663

Merged
merged 1 commit into from
Jul 26, 2023
Merged

Conversation

cinerea0
Copy link
Contributor

Testing the changes

  • I tested the changes in this PR: briefly

I didn't check this against every template where the pattern appears, but it works in the test cases I tried.


This helper function reduces boilerplate for Meson's "feature" build options. Right now these are handled using the pattern -D<property>=$(vopt_if <option> enabled disabled), which occurs 78 times in our templates.

Note that this does not allow you to set the property to "auto", but I can't think of any situation where that would be desirable.

@classabbyamp classabbyamp added the xbps-src xbps-src related label Jun 27, 2023
@Chocimier
Copy link
Member

I would merge it but not under that name, even meson don't call that feat.
Also please join commits.

@eli-schwartz
Copy link

I would merge it but not under that name, even meson don't call that feat.

Or,

feat
noun

  • an achievement that requires great courage, skill, or strength.

@cinerea0
Copy link
Contributor Author

cinerea0 commented Jul 4, 2023

I would merge it but not under that name, even meson don't call that feat.

Since Meson refers to them as "features", I've renamed it to vopt_feature.

Also please join commits.

Done.

@eli-schwartz
Copy link

eli-schwartz commented Jul 4, 2023

Prior art: https://devmanual.gentoo.org/eclass-reference/meson.eclass/index.html#lbAF

meson_use is equivalent to vopt_bool

meson_feature is equivalent to the proposed vopt_feature

They, too, do not support defining it to auto. A Gentoo USE flag is either enabled or disabled, and besides they explicitly want to enforce that automagic dependencies do not happen, since they don't build in chroots/containers. :D

@Chocimier Chocimier changed the title xbps-src: new vopt_feat helper xbps-src: new vopt_feature helper Jul 10, 2023
@Chocimier Chocimier merged commit 5bb9d7c into void-linux:master Jul 26, 2023
@Chocimier
Copy link
Member

Awaiting PR switching to new function.

@cinerea0
Copy link
Contributor Author

Awaiting PR switching to new function.

I'll try to handle this tonight.

@cinerea0 cinerea0 deleted the vopt_feat branch July 27, 2023 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
xbps-src xbps-src related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants