meson.eclass
Description
This eclass contains the default phase functions for packages which use the meson build system.
Example
Typical ebuild using meson.eclass:
EAPI=8
inherit meson
...
src_configure() {
local emesonargs=(
$(meson_use qt5)
$(meson_feature threads)
$(meson_use bindist official_branding)
)
meson_src_configure
}
...
Functions
- meson_use <USE flag> [option name]
-
Given a USE flag and meson project option, outputs a string like:
-Doption=true -Doption=false
If the project option is unspecified, it defaults to the USE flag.
- meson_feature <USE flag> [option name]
-
Given a USE flag and meson project option, outputs a string like:
-Doption=enabled -Doption=disabled
If the project option is unspecified, it defaults to the USE flag.
- meson_src_configure [extra meson arguments]
-
This is the meson_src_configure function.
- meson_src_compile [extra ninja arguments]
-
This is the meson_src_compile function.
- meson_src_test [extra meson test arguments]
-
This is the meson_src_test function.
- meson_install [extra meson install arguments]
-
Calls meson install with suitable arguments
- meson_src_install [extra meson install arguments]
-
This is the meson_src_install function.
Variables
- BUILD_DIR
-
Build directory, location where all generated files should be placed. If this isn't set, it defaults to ${WORKDIR}/${P}-build.
- EMESON_BUILDTYPE ?= plain
-
The buildtype value to pass to meson setup.
- EMESON_SOURCE
-
The location of the source files for the project; this is the source directory to pass to meson. If this isn't set, it defaults to ${S}
Function Variables
- emesonargs
-
Optional meson arguments as Bash array; this should be defined before calling meson_src_configure.
- MYMESONARGS
-
User-controlled environment variable containing arguments to be passed to meson in meson_src_configure.
Reporting Bugs
Please report bugs via https://bugs.gentoo.org/