Meson package¶
Added in version 0.16.
A Meson package provides support for processing a Meson supported module.
LIBFOO_TYPE = 'meson'
During the configuration stage of a Meson package, meson setup
will be
invoked to generate build files for the module. For the build stage,
meson compile
will invoke the generated build files. For the installation
stage (if enabled), meson install
will be used. Each stage can be
configured to manipulate environment variables and options used by Meson.
The default configuration built for projects is debugoptimized
. A developer
can override this option by explicitly adjusting the define option
buildtype
to, for example, debug
:
LIBFOO_CONF_DEFS = {
'buildtype': 'debug',
}
The following sections outline configuration options are available for a Meson package.
LIBFOO_BUILD_DEFS
¶
Provides a means to pass definitions into the build process. This option can is defined as a dictionary of string pairs. This field is optional.
LIBFOO_BUILD_DEFS = {
# adds "-Doption=value" to the command
'option': 'value',
}
LIBFOO_BUILD_ENV
¶
Provides a means to pass environment variables into the build process. This option is defined as a dictionary with key-value pairs where the key is the environment name and the value is the environment variable's value. This field is optional.
LIBFOO_BUILD_ENV = {
'OPTION': 'VALUE',
}
LIBFOO_BUILD_OPTS
¶
Provides a means to pass command line options into the build process. This option can be defined as a dictionary of string pairs or a list with strings -- either way defined will generate argument values to include in the build event. This field is optional.
LIBFOO_BUILD_OPTS = {
# adds "--option value" to the command
'--option': 'value',
}
# (or)
LIBFOO_BUILD_OPTS = [
# adds "--some-option" to the command
'--some-option',
]
LIBFOO_MESON_NOINSTALL
¶
Specifies whether the Meson package should skip an attempt to invoke the
install command. Ideally, projects will have an install
options configured to define how a project will install files into a target
(or staging) environment. Not all Meson projects have installation options
configured, or there can be cases where installation stage for a package to
fail due to issues with some host environments. A developer can specify this
no-install flag to skip a Meson-driven install request and manage installation
actions through other means (such as post-processing). By default, the
installation stage is invoked with a value of False
.
LIBFOO_MESON_NOINSTALL = True
LIBFOO_CONF_DEFS
¶
Provides a means to pass definitions into the configuration process. This option can is defined as a dictionary of string pairs. This field is optional.
LIBFOO_CONF_DEFS = {
# adds "-Doption=value" to the command
'option': 'value',
}
LIBFOO_CONF_ENV
¶
Provides a means to pass environment variables into the configuration process. This option is defined as a dictionary with key-value pairs where the key is the environment name and the value is the environment variable's value. This field is optional.
LIBFOO_CONF_ENV = {
'OPTION': 'VALUE',
}
LIBFOO_CONF_OPTS
¶
Provides a means to pass command line options into the configuration process. This option can be defined as a dictionary of string pairs or a list with strings -- either way defined will generate argument values to include in the configuration event. This field is optional.
LIBFOO_CONF_OPTS = {
# adds "--option value" to the command
'--option': 'value',
}
# (or)
LIBFOO_CONF_OPTS = [
# adds "--some-option" to the command
'--some-option',
]
LIBFOO_ENV
¶
Added in version 0.17.
Provides a means to pass environment variables into all stages for a package. This option is defined as a dictionary with key-value pairs where the key is the environment name and the value is the environment variable's value. This field is optional.
LIBFOO_ENV = {
'OPTION': 'VALUE',
}
LIBFOO_INSTALL_DEFS
¶
Provides a means to pass definitions into the installation process. This option can is defined as a dictionary of string pairs. This field is optional.
LIBFOO_INSTALL_DEFS = {
# adds "-Doption=value" to the command
'option': 'value',
}
LIBFOO_INSTALL_ENV
¶
Provides a means to pass environment variables into the installation process. This option is defined as a dictionary with key-value pairs where the key is the environment name and the value is the environment variable's value. This field is optional.
LIBFOO_INSTALL_ENV = {
'OPTION': 'VALUE',
}
LIBFOO_INSTALL_OPTS
¶
Provides a means to pass command line options into the installation process. This option can be defined as a dictionary of string pairs or a list with strings -- either way defined will generate argument values to include in the installation event. This field is optional.
LIBFOO_INSTALL_OPTS = {
# adds "--option value" to the command
'--option': 'value',
}
# (or)
LIBFOO_INSTALL_OPTS = [
# adds "--some-option" to the command
'--some-option',
]