meson: allow empty values in disabler/bindings array

This is supposed to simplify things for distro packagers and is
inspired by other projects doing this, e.g. Mesa.

The idea here is that the provided lists can now begin with a comma,
unlike before. This allows for things such as:

evas_disablers=""
if [ -z "$build_option_lottie" ]; then
    evas_disablers+=",json"
fi
if [ -z "$build_option_avif" ]; then
    evas_disablers+=",avif"
fi
...
configure_args+=" -Devas-loaders-disabler=$evas_disablers"

Previously this would fail because meson would interpret the
comma at the beginning as having an empty-string value in the
array, and checking whether the string is already empty is too
clunky.
devs/stefan/ci-exactness-codecov
Daniel Kolesa 2 years ago
parent 68dfa4db46
commit 6bf26fe74a
  1. 6
      meson_options.txt

@ -189,14 +189,14 @@ option('unmount-path',
option('evas-loaders-disabler',
type : 'array',
description : 'List of modular image/vector loaders to disable in efl',
choices : ['gst', 'pdf', 'ps', 'raw', 'svg', 'rsvg', 'xcf', 'bmp', 'dds', 'eet', 'generic', 'gif', 'ico', 'jp2k', 'jpeg', 'pmaps', 'png', 'psd', 'tga', 'tgv', 'tiff', 'wbmp', 'webp', 'xpm', 'json', 'avif'],
choices : ['', 'gst', 'pdf', 'ps', 'raw', 'svg', 'rsvg', 'xcf', 'bmp', 'dds', 'eet', 'generic', 'gif', 'ico', 'jp2k', 'jpeg', 'pmaps', 'png', 'psd', 'tga', 'tgv', 'tiff', 'wbmp', 'webp', 'xpm', 'json', 'avif'],
value : ['json', 'avif']
)
option('ecore-imf-loaders-disabler',
type : 'array',
description : 'List of input methods to disable in efl',
choices : ['xim', 'ibus', 'scim'],
choices : ['', 'xim', 'ibus', 'scim'],
value : ['ibus']
)
@ -286,7 +286,7 @@ option('nls',
option('bindings',
type : 'array',
choices : ['lua', 'cxx', 'mono'],
choices : ['', 'lua', 'cxx', 'mono'],
value : ['cxx'],
description : 'Which auto-generated language bindings for efl to enable',
)

Loading…
Cancel
Save