build: Replace array with dict
It's more readable than "magic" indexes, and makes it easier to provide fallback values for optional entries. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2141>
This commit is contained in:
parent
372ccc3e29
commit
d6b689eaf1
@ -48,16 +48,19 @@ subdir('icons')
|
|||||||
subdir('theme')
|
subdir('theme')
|
||||||
|
|
||||||
data_resources = [
|
data_resources = [
|
||||||
['dbus-interfaces', []],
|
{'name': 'dbus-interfaces'},
|
||||||
['osk-layouts', []],
|
{'name': 'osk-layouts'},
|
||||||
['theme', theme_deps]
|
{'name': 'theme', 'deps': theme_deps}
|
||||||
]
|
]
|
||||||
foreach resource : data_resources
|
foreach resource : data_resources
|
||||||
|
name = resource.get('name')
|
||||||
|
deps = resource.get('deps', [])
|
||||||
|
|
||||||
gnome.compile_resources(
|
gnome.compile_resources(
|
||||||
'gnome-shell-' + resource[0],
|
'gnome-shell-' + name,
|
||||||
'gnome-shell-@0@.gresource.xml'.format(resource[0]),
|
'gnome-shell-@0@.gresource.xml'.format(name),
|
||||||
source_dir: resource[0],
|
source_dir: name,
|
||||||
dependencies: resource[1],
|
dependencies: deps,
|
||||||
gresource_bundle: true,
|
gresource_bundle: true,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: pkgdatadir
|
install_dir: pkgdatadir
|
||||||
|
Loading…
Reference in New Issue
Block a user