Page MenuHomeFreeBSD

Add yes/no option helpers for meson
ClosedPublic

Authored by kwm on Jun 6 2017, 9:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Feb 10, 6:32 PM
Unknown Object (File)
Jan 13 2025, 2:33 PM
Unknown Object (File)
Jan 8 2025, 6:39 PM
Unknown Object (File)
Jan 7 2025, 7:20 AM
Unknown Object (File)
Dec 28 2024, 3:54 AM
Unknown Object (File)
Dec 23 2024, 6:33 AM
Unknown Object (File)
Nov 24 2024, 9:44 AM
Unknown Object (File)
Nov 23 2024, 2:08 PM
Subscribers

Details

Reviewers
None
Group Reviewers
O5: Ports Framework(Owns No Changed Paths)
portmgr
Commits
rP443024: Meson is picky about the arguments of build options.
Summary

While testing a update, I found out that meson is kind of picky with it's
options. These options are defined in the meson_options.txt file.
For example the ${opt}_MESON_FALSE handler works for "boolean" options:

option('enable-docs',

type: 'boolean', value: false,
description: 'Enable generating the Epoxy API reference (depends on Doxygen)')

However if you try to feed it anything other then true/false meson
will error out. Because it doesn't match what is defined in the
meson_options.txt file.

Add a YES/NO combination for "combo" types, so we don't have the specify
the whole command for ${opt}_MESON_ON/OFF.

option('enable-egl',

type: 'combo',
choices: [ 'auto', 'yes', 'no' ],
value: 'auto',
description: 'Enable EGL support')
Test Plan

See the attached libepoxy update, which demo's the ${opt}_MESON_YES handler.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 9710
Build 10150: arc lint + arc unit

Event Timeline

Is there more than a handful number of ports that need this ?

Not yet, only the libepoxy update I attached as a demo for now. But GNOME as a whole is switching to meson as there build system of choice, so I expect it being used there enough to warrant these helpers.

Mmm, ok. Please commit the bsd.options.mk change in a separate commit.

This revision was automatically updated to reflect the committed changes.