[dia: 89/105] #19 review: Use dictionaries instead of lists of lists.
- From: Zander <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia: 89/105] #19 review: Use dictionaries instead of lists of lists.
- Date: Mon, 28 Jan 2019 19:26:49 +0000 (UTC)
commit 6320cd2535fe584f154e20ea9125a8eec3cbbb6f
Author: Eduard Nicodei <eddnicodei gmail com>
Date: Wed Jan 23 16:36:42 2019 +0000
#19 review: Use dictionaries instead of lists of lists.
- Thanks to @jtojnar for pointing this out.
- Dictionaries allow to use optional fields (for example
to specify extra dependencies) but also explicitly
set/get 'name' and 'sources' fields.
objects/AADL/meson.build | 5 ++++-
objects/Database/meson.build | 5 ++++-
objects/ER/meson.build | 5 ++++-
objects/FS/meson.build | 5 ++++-
objects/GRAFCET/meson.build | 5 ++++-
objects/Istar/meson.build | 5 ++++-
objects/Jackson/meson.build | 5 ++++-
objects/KAOS/meson.build | 5 ++++-
objects/Misc/meson.build | 5 ++++-
objects/SADT/meson.build | 5 ++++-
objects/Sozi/meson.build | 5 ++++-
objects/UML/meson.build | 5 ++++-
objects/chronogram/meson.build | 5 ++++-
objects/custom/meson.build | 5 ++++-
objects/custom_lines/meson.build | 5 ++++-
objects/flowchart/meson.build | 5 ++++-
objects/meson.build | 6 +++---
objects/network/meson.build | 5 ++++-
objects/standard/meson.build | 5 ++++-
plug-ins/cairo/meson.build | 6 +++++-
plug-ins/cgm/meson.build | 5 ++++-
plug-ins/dxf/meson.build | 5 ++++-
plug-ins/hpgl/meson.build | 5 ++++-
plug-ins/libart/meson.build | 5 ++++-
plug-ins/meson.build | 8 ++++----
plug-ins/metapost/meson.build | 5 ++++-
plug-ins/pdf/meson.build | 10 +++++++---
plug-ins/pgf/meson.build | 5 ++++-
plug-ins/pixbuf/meson.build | 5 ++++-
plug-ins/postscript/meson.build | 10 +++++++---
plug-ins/pstricks/meson.build | 5 ++++-
plug-ins/shape/meson.build | 5 ++++-
plug-ins/svg/meson.build | 5 ++++-
plug-ins/vdx/meson.build | 5 ++++-
plug-ins/wpg/meson.build | 5 ++++-
plug-ins/xfig/meson.build | 5 ++++-
shapes/Assorted/meson.build | 5 ++++-
shapes/BPMN/meson.build | 5 ++++-
shapes/ChemEng/meson.build | 5 ++++-
shapes/Circuit/meson.build | 5 ++++-
shapes/Cisco/meson.build | 5 ++++-
shapes/Civil/meson.build | 5 ++++-
shapes/Contact/meson.build | 5 ++++-
shapes/Cybernetics/meson.build | 5 ++++-
shapes/Electric/meson.build | 5 ++++-
shapes/Gane_and_Sarson/meson.build | 5 ++++-
shapes/Lights/meson.build | 5 ++++-
shapes/Logic/meson.build | 5 ++++-
shapes/MSE/meson.build | 5 ++++-
shapes/Map/Isometric/meson.build | 7 ++++++-
shapes/Misc/meson.build | 5 ++++-
shapes/Pneumatic/meson.build | 5 ++++-
shapes/SDL/meson.build | 5 ++++-
shapes/Shape_Design/meson.build | 5 ++++-
shapes/flowchart/meson.build | 5 ++++-
shapes/jigsaw/meson.build | 5 ++++-
shapes/meson.build | 4 ++--
shapes/network/meson.build | 5 ++++-
shapes/sybase/meson.build | 5 ++++-
59 files changed, 242 insertions(+), 69 deletions(-)
---
diff --git a/objects/AADL/meson.build b/objects/AADL/meson.build
index b3cdad5e..bc286fa0 100644
--- a/objects/AADL/meson.build
+++ b/objects/AADL/meson.build
@@ -17,4 +17,7 @@ sources = files(
'edit_port_declaration.c',
)
-dia_object_desc += [['aadl_objects', sources, []]]
+dia_object_desc += {
+ 'name': 'aadl_objects',
+ 'sources': sources,
+}
diff --git a/objects/Database/meson.build b/objects/Database/meson.build
index 0c51df1d..0cb11a94 100644
--- a/objects/Database/meson.build
+++ b/objects/Database/meson.build
@@ -5,4 +5,7 @@ sources = files(
'compound.c'
)
-dia_object_desc += [['db_objects', sources, []]]
+dia_object_desc += {
+ 'name': 'db_objects',
+ 'sources': sources,
+}
diff --git a/objects/ER/meson.build b/objects/ER/meson.build
index 6e838467..d6c91199 100644
--- a/objects/ER/meson.build
+++ b/objects/ER/meson.build
@@ -6,4 +6,7 @@ sources = files(
'er.c'
)
-dia_object_desc += [['er_objects', sources, []]]
+dia_object_desc += {
+ 'name': 'er_objects',
+ 'sources': sources,
+}
diff --git a/objects/FS/meson.build b/objects/FS/meson.build
index 0243f01c..88e154f2 100644
--- a/objects/FS/meson.build
+++ b/objects/FS/meson.build
@@ -5,4 +5,7 @@ sources = files(
'function.c'
)
-dia_object_desc += [['fs_objects', sources, []]]
+dia_object_desc += {
+ 'name': 'fs_objects',
+ 'sources': sources,
+}
diff --git a/objects/GRAFCET/meson.build b/objects/GRAFCET/meson.build
index cf7be49e..d11c7d1b 100644
--- a/objects/GRAFCET/meson.build
+++ b/objects/GRAFCET/meson.build
@@ -10,4 +10,7 @@ sources = files(
'vector.c'
)
-dia_object_desc += [['grafcet_objects', sources, []]]
+dia_object_desc += {
+ 'name': 'grafcet_objects',
+ 'sources': sources,
+}
diff --git a/objects/Istar/meson.build b/objects/Istar/meson.build
index 3902c384..46eb3824 100644
--- a/objects/Istar/meson.build
+++ b/objects/Istar/meson.build
@@ -6,4 +6,7 @@ sources = files(
'link.c'
)
-dia_object_desc += [['istar_objects', sources, []]]
+dia_object_desc += {
+ 'name': 'istar_objects',
+ 'sources': sources,
+}
diff --git a/objects/Jackson/meson.build b/objects/Jackson/meson.build
index 7966e1d7..0bc8fe7a 100644
--- a/objects/Jackson/meson.build
+++ b/objects/Jackson/meson.build
@@ -5,4 +5,7 @@ sources = files(
'phenomenon.c'
)
-dia_object_desc += [['jackson_objects', sources, []]]
+dia_object_desc += {
+ 'name': 'jackson_objects',
+ 'sources': sources,
+}
diff --git a/objects/KAOS/meson.build b/objects/KAOS/meson.build
index b10de215..19dab0cb 100644
--- a/objects/KAOS/meson.build
+++ b/objects/KAOS/meson.build
@@ -6,4 +6,7 @@ sources = files(
'metaandorrel.c'
)
-dia_object_desc += [['kaos_objects', sources, []]]
+dia_object_desc += {
+ 'name': 'kaos_objects',
+ 'sources': sources,
+}
diff --git a/objects/Misc/meson.build b/objects/Misc/meson.build
index 0bd24c0d..dd744273 100644
--- a/objects/Misc/meson.build
+++ b/objects/Misc/meson.build
@@ -8,4 +8,7 @@ sources = files(
'tree.c'
)
-dia_object_desc += [['misc_objects', sources, []]]
+dia_object_desc += {
+ 'name': 'misc_objects',
+ 'sources': sources,
+}
diff --git a/objects/SADT/meson.build b/objects/SADT/meson.build
index 3c7dc5f3..78e5d418 100644
--- a/objects/SADT/meson.build
+++ b/objects/SADT/meson.build
@@ -5,4 +5,7 @@ sources = files(
'annotation.c'
)
-dia_object_desc += [['sadt_objects', sources, []]]
+dia_object_desc += {
+ 'name': 'sadt_objects',
+ 'sources': sources,
+}
diff --git a/objects/Sozi/meson.build b/objects/Sozi/meson.build
index 12968404..8429e3ba 100644
--- a/objects/Sozi/meson.build
+++ b/objects/Sozi/meson.build
@@ -7,5 +7,8 @@ if false
'sozi-media.c'
)
- dia_object_desc += [['sozi_objects', sources, []]]
+ dia_object_desc += {
+ 'name': 'sozi_objects',
+ 'sources': sources,
+ }
endif
diff --git a/objects/UML/meson.build b/objects/UML/meson.build
index 84ef28a8..235cedb1 100644
--- a/objects/UML/meson.build
+++ b/objects/UML/meson.build
@@ -36,4 +36,7 @@ sources = files(
'umlformalparameter.c'
)
-dia_object_desc += [['uml_objects', sources, []]]
+dia_object_desc += {
+ 'name': 'uml_objects',
+ 'sources': sources,
+}
diff --git a/objects/chronogram/meson.build b/objects/chronogram/meson.build
index 09abdda1..9fb71d2f 100644
--- a/objects/chronogram/meson.build
+++ b/objects/chronogram/meson.build
@@ -5,4 +5,7 @@ sources = files(
'chronoline_event.c'
)
-dia_object_desc += [['chronogram_objects', sources, []]]
+dia_object_desc += {
+ 'name': 'chronogram_objects',
+ 'sources': sources,
+}
diff --git a/objects/custom/meson.build b/objects/custom/meson.build
index ab73c0f7..358e8e40 100644
--- a/objects/custom/meson.build
+++ b/objects/custom/meson.build
@@ -6,4 +6,7 @@ sources = files(
'custom.c'
)
-dia_object_desc += [['custom_objects', sources, []]]
+dia_object_desc += {
+ 'name': 'custom_objects',
+ 'sources': sources,
+}
diff --git a/objects/custom_lines/meson.build b/objects/custom_lines/meson.build
index 875cd9c1..c6069677 100644
--- a/objects/custom_lines/meson.build
+++ b/objects/custom_lines/meson.build
@@ -4,4 +4,7 @@ sources = files(
'line_info.c'
)
-dia_object_desc += [['custom_lines_objects', sources, []]]
+dia_object_desc += {
+ 'name': 'custom_lines_objects',
+ 'sources': sources,
+}
diff --git a/objects/flowchart/meson.build b/objects/flowchart/meson.build
index 408369fe..ccda24e5 100644
--- a/objects/flowchart/meson.build
+++ b/objects/flowchart/meson.build
@@ -6,4 +6,7 @@ sources = files(
'flowchart.c'
)
-dia_object_desc += [['flowchart_objects', sources, []]]
+dia_object_desc += {
+ 'name': 'flowchart_objects',
+ 'sources': sources,
+}
diff --git a/objects/meson.build b/objects/meson.build
index 9a739a03..99ad63f5 100644
--- a/objects/meson.build
+++ b/objects/meson.build
@@ -20,9 +20,9 @@ subdir('standard')
subdir('UML')
foreach o : dia_object_desc
- library(o[0],
- o[1] + [config_h],
- dependencies: [libc_dep, libgtk_dep, libxml_dep, libm_dep] + o[2],
+ library(o.get('name'),
+ o.get('sources') + [config_h],
+ dependencies: [libc_dep, libgtk_dep, libxml_dep, libm_dep] + o.get('extra_deps', []),
link_with: libdia,
include_directories: [configuration_inc, libdia_inc],
install: true,
diff --git a/objects/network/meson.build b/objects/network/meson.build
index 5bfe48a4..bd2c5082 100644
--- a/objects/network/meson.build
+++ b/objects/network/meson.build
@@ -6,4 +6,7 @@ sources = files(
'wanlink.c'
)
-dia_object_desc += [['network_objects', sources, []]]
+dia_object_desc += {
+ 'name': 'network_objects',
+ 'sources': sources,
+}
diff --git a/objects/standard/meson.build b/objects/standard/meson.build
index 39775d63..6e8d2ade 100644
--- a/objects/standard/meson.build
+++ b/objects/standard/meson.build
@@ -16,4 +16,7 @@ sources = files(
'beziergon.c'
)
-dia_object_desc += [['standard_objects', sources + [tool_icons_h], []]]
+dia_object_desc += {
+ 'name': 'standard_objects',
+ 'sources': sources + [tool_icons_h],
+}
diff --git a/plug-ins/cairo/meson.build b/plug-ins/cairo/meson.build
index 6a40f781..d821dd2a 100644
--- a/plug-ins/cairo/meson.build
+++ b/plug-ins/cairo/meson.build
@@ -5,4 +5,8 @@ sources = files(
'diacairo-print.c'
)
-install_plugins_desc += [['cairo_filter', sources, [libcairo_dep]]]
+install_plugins_desc += {
+ 'name': 'cairo_filter',
+ 'sources': sources,
+ 'extra_deps': [libcairo_dep],
+}
diff --git a/plug-ins/cgm/meson.build b/plug-ins/cgm/meson.build
index b9aa28dd..1fe86a9d 100644
--- a/plug-ins/cgm/meson.build
+++ b/plug-ins/cgm/meson.build
@@ -1 +1,4 @@
-install_plugins_desc += [['cgm_filter', files('cgm.c'), []]]
+install_plugins_desc += {
+ 'name': 'cgm_filter',
+ 'sources': files('cgm.c'),
+}
diff --git a/plug-ins/dxf/meson.build b/plug-ins/dxf/meson.build
index 130c7175..1a51bac8 100644
--- a/plug-ins/dxf/meson.build
+++ b/plug-ins/dxf/meson.build
@@ -5,4 +5,7 @@ sources = files(
'autocad_pal.c'
)
-install_plugins_desc += [['dxf_filter', sources, []]]
+install_plugins_desc += {
+ 'name': 'dxf_filter',
+ 'sources': sources,
+}
diff --git a/plug-ins/hpgl/meson.build b/plug-ins/hpgl/meson.build
index 2ec01c8f..3de14874 100644
--- a/plug-ins/hpgl/meson.build
+++ b/plug-ins/hpgl/meson.build
@@ -1 +1,4 @@
-install_plugins_desc += [['hpgl_filter', files('hpgl.c'), []]]
+install_plugins_desc += {
+ 'name': 'hpgl_filter',
+ 'sources': files('hpgl.c'),
+}
diff --git a/plug-ins/libart/meson.build b/plug-ins/libart/meson.build
index ef54185d..17932b0b 100644
--- a/plug-ins/libart/meson.build
+++ b/plug-ins/libart/meson.build
@@ -5,4 +5,7 @@ sources = files(
'export_png.c',
)
-install_plugins_desc += [['art_filter', sources, []]]
+install_plugins_desc += {
+ 'name': 'art_filter',
+ 'sources': sources,
+}
diff --git a/plug-ins/meson.build b/plug-ins/meson.build
index 1a6ad98c..c03c9891 100644
--- a/plug-ins/meson.build
+++ b/plug-ins/meson.build
@@ -35,11 +35,11 @@ subdir('xfig')
subdir('xslt')
foreach p : install_plugins_desc
- message(p[0])
+ message(p.get('name'))
library(
- p[0],
- p[1] + [config_h],
- dependencies: [libc_dep, libgtk_dep, libm_dep, libxml_dep] + [p[2]],
+ p.get('name'),
+ p.get('sources') + [config_h],
+ dependencies: [libc_dep, libgtk_dep, libm_dep, libxml_dep] + p.get('extra_deps', []),
include_directories: [libdia_inc, configuration_inc],
link_with: [libdia],
install: true,
diff --git a/plug-ins/metapost/meson.build b/plug-ins/metapost/meson.build
index b0137be9..1b26d7bf 100644
--- a/plug-ins/metapost/meson.build
+++ b/plug-ins/metapost/meson.build
@@ -3,4 +3,7 @@ sources = files(
'render_metapost.c',
)
-install_plugins_desc += [['metapost_filter', sources, []]]
+install_plugins_desc += {
+ 'name': 'metapost_filter',
+ 'sources': sources,
+}
diff --git a/plug-ins/pdf/meson.build b/plug-ins/pdf/meson.build
index ff393edd..a04c5938 100644
--- a/plug-ins/pdf/meson.build
+++ b/plug-ins/pdf/meson.build
@@ -14,8 +14,12 @@ has_gtypes = cc.has_header(
)
if libpoppler_dep.found() and has_gtypes
- sources += [files('pdf-import.cpp')]
- deps += [libpoppler_dep]
+ sources += files('pdf-import.cpp')
+ deps += libpoppler_dep
endif
-install_plugins_desc += [['pdf_filter', sources, deps]]
+install_plugins_desc += {
+ 'name': 'pdf_filter',
+ 'sources': sources,
+ 'extra_deps': deps,
+}
diff --git a/plug-ins/pgf/meson.build b/plug-ins/pgf/meson.build
index f458eb7b..c8dde19c 100644
--- a/plug-ins/pgf/meson.build
+++ b/plug-ins/pgf/meson.build
@@ -3,4 +3,7 @@ sources = files(
'render_pgf.c',
)
-install_plugins_desc += [['pgf_filter', sources, []]]
+install_plugins_desc += {
+ 'name': 'pgf_filter',
+ 'sources': sources,
+}
diff --git a/plug-ins/pixbuf/meson.build b/plug-ins/pixbuf/meson.build
index db57769d..ef175c72 100644
--- a/plug-ins/pixbuf/meson.build
+++ b/plug-ins/pixbuf/meson.build
@@ -1 +1,4 @@
-install_plugins_desc += [['pixbuf_filter', files('pixbuf.c'), []]]
+install_plugins_desc += {
+ 'name': 'pixbuf_filter',
+ 'sources': files('pixbuf.c'),
+}
diff --git a/plug-ins/postscript/meson.build b/plug-ins/postscript/meson.build
index 81de28e6..f12b3b14 100644
--- a/plug-ins/postscript/meson.build
+++ b/plug-ins/postscript/meson.build
@@ -9,12 +9,16 @@ deps = []
if freetype_dep.found()
sources += files('diapsft2renderer.c')
- deps += [freetype_dep]
+ deps += freetype_dep
endif
if host_machine.system() == 'windows'
sources += files('win32print.c')
- deps += [cc.find_library('winspool')]
+ deps += cc.find_library('winspool')
endif
-install_plugins_desc += [['postscript_filter', sources, deps]]
+install_plugins_desc += {
+ 'name': 'postscript_filter',
+ 'sources': sources,
+ 'extra_deps': deps,
+}
diff --git a/plug-ins/pstricks/meson.build b/plug-ins/pstricks/meson.build
index f8c80612..172c9241 100644
--- a/plug-ins/pstricks/meson.build
+++ b/plug-ins/pstricks/meson.build
@@ -3,4 +3,7 @@ sources = files(
'render_pstricks.c',
)
-install_plugins_desc += [['pstricks_filter', sources, []]]
+install_plugins_desc += {
+ 'name': 'pstricks_filter',
+ 'sources': sources,
+}
diff --git a/plug-ins/shape/meson.build b/plug-ins/shape/meson.build
index 1aab2f2b..1a5726c3 100644
--- a/plug-ins/shape/meson.build
+++ b/plug-ins/shape/meson.build
@@ -3,4 +3,7 @@ sources = files(
'shape-export.c',
)
-install_plugins_desc += [['shape_filter', sources, []]]
+install_plugins_desc += {
+ 'name': 'shape_filter',
+ 'sources': sources,
+}
diff --git a/plug-ins/svg/meson.build b/plug-ins/svg/meson.build
index 3c628f46..83954540 100644
--- a/plug-ins/svg/meson.build
+++ b/plug-ins/svg/meson.build
@@ -4,4 +4,7 @@ sources = files(
'svg-import.c',
)
-install_plugins_desc += [['svg_filter', sources, []]]
+install_plugins_desc += {
+ 'name': 'svg_filter',
+ 'sources': sources,
+}
diff --git a/plug-ins/vdx/meson.build b/plug-ins/vdx/meson.build
index f67340b3..05d7ada8 100644
--- a/plug-ins/vdx/meson.build
+++ b/plug-ins/vdx/meson.build
@@ -6,4 +6,7 @@ sources = files(
'vdx-xml.c',
)
-install_plugins_desc += [['vdx_filter', sources, []]]
+install_plugins_desc += {
+ 'name': 'vdx_filter',
+ 'sources': sources,
+}
diff --git a/plug-ins/wpg/meson.build b/plug-ins/wpg/meson.build
index e148d9db..c2ef88b5 100644
--- a/plug-ins/wpg/meson.build
+++ b/plug-ins/wpg/meson.build
@@ -3,4 +3,7 @@ sources = files(
'wpg-import.c',
)
-install_plugins_desc += [['wpg_filter', sources, []]]
+install_plugins_desc += {
+ 'name': 'wpg_filter',
+ 'sources': sources,
+}
diff --git a/plug-ins/xfig/meson.build b/plug-ins/xfig/meson.build
index 75285f56..23e8ed44 100644
--- a/plug-ins/xfig/meson.build
+++ b/plug-ins/xfig/meson.build
@@ -5,4 +5,7 @@ sources = files(
'xfig-common.c',
)
-install_plugins_desc += [['xfig_filter', sources, []]]
+install_plugins_desc += {
+ 'name': 'xfig_filter',
+ 'sources': sources,
+}
diff --git a/shapes/Assorted/meson.build b/shapes/Assorted/meson.build
index 42d8e1b7..d27382c5 100644
--- a/shapes/Assorted/meson.build
+++ b/shapes/Assorted/meson.build
@@ -83,4 +83,7 @@ shape_sources = files(
'triangle-rightangle.shape'
)
-shapes += [[shape_sources, 'Assorted']]
+shapes += {
+ 'name': 'Assorted',
+ 'sources': shape_sources,
+}
diff --git a/shapes/BPMN/meson.build b/shapes/BPMN/meson.build
index 7d7c01b7..2af534d6 100644
--- a/shapes/BPMN/meson.build
+++ b/shapes/BPMN/meson.build
@@ -85,4 +85,7 @@ shape_sources = files(
'Transaction.shape',
)
-shapes += [[shape_sources, 'BPMN']]
+shapes += {
+ 'name': 'BPMN',
+ 'sources': shape_sources,
+}
diff --git a/shapes/ChemEng/meson.build b/shapes/ChemEng/meson.build
index 29e28580..628e2232 100644
--- a/shapes/ChemEng/meson.build
+++ b/shapes/ChemEng/meson.build
@@ -107,4 +107,7 @@ shape_sources = files(
'wcoolv.shape',
)
-shapes += [[shape_sources, 'ChemEng']]
+shapes += {
+ 'name': 'ChemEng',
+ 'sources': shape_sources,
+}
diff --git a/shapes/Circuit/meson.build b/shapes/Circuit/meson.build
index a9198b70..5260d4fa 100644
--- a/shapes/Circuit/meson.build
+++ b/shapes/Circuit/meson.build
@@ -65,4 +65,7 @@ shape_sources = files(
'xtal_v.png',
)
-shapes += [[shape_sources, 'Circuit']]
+shapes += {
+ 'name': 'Circuit',
+ 'sources': shape_sources,
+}
diff --git a/shapes/Cisco/meson.build b/shapes/Cisco/meson.build
index 68a4e6da..7b54c47e 100644
--- a/shapes/Cisco/meson.build
+++ b/shapes/Cisco/meson.build
@@ -669,4 +669,7 @@ shape_sources = files(
'www_server.png'
)
-shapes += [[shape_sources, 'Cisco']]
+shapes += {
+ 'name': 'Cisco',
+ 'sources': shape_sources,
+}
diff --git a/shapes/Civil/meson.build b/shapes/Civil/meson.build
index 26747e68..a2888605 100644
--- a/shapes/Civil/meson.build
+++ b/shapes/Civil/meson.build
@@ -53,4 +53,7 @@ shape_sources = files(
'water_level.png'
)
-shapes += [[shape_sources, 'Civil']]
+shapes += {
+ 'name': 'Civil',
+ 'sources': shape_sources,
+}
diff --git a/shapes/Contact/meson.build b/shapes/Contact/meson.build
index ff850c02..46acf80f 100644
--- a/shapes/Contact/meson.build
+++ b/shapes/Contact/meson.build
@@ -33,4 +33,7 @@ shape_sources = files(
'l_souts.png'
)
-shapes += [[shape_sources, 'Contact']]
+shapes += {
+ 'name': 'Contact',
+ 'sources': shape_sources,
+}
diff --git a/shapes/Cybernetics/meson.build b/shapes/Cybernetics/meson.build
index 3b6f9ea5..3ae83282 100644
--- a/shapes/Cybernetics/meson.build
+++ b/shapes/Cybernetics/meson.build
@@ -61,4 +61,7 @@ shape_sources = files(
't-sens.shape'
)
-shapes += [[shape_sources, 'Cybernetics']]
+shapes += {
+ 'name': 'Cybernetics',
+ 'sources': shape_sources,
+}
diff --git a/shapes/Electric/meson.build b/shapes/Electric/meson.build
index 6ce4e237..de5a80a9 100644
--- a/shapes/Electric/meson.build
+++ b/shapes/Electric/meson.build
@@ -31,4 +31,7 @@ shape_sources = files(
'vrelay.png'
)
-shapes += [[shape_sources, 'Electric']]
+shapes += {
+ 'name': 'Electric',
+ 'sources': shape_sources,
+}
diff --git a/shapes/Gane_and_Sarson/meson.build b/shapes/Gane_and_Sarson/meson.build
index 0328efcf..8afdd00f 100644
--- a/shapes/Gane_and_Sarson/meson.build
+++ b/shapes/Gane_and_Sarson/meson.build
@@ -9,4 +9,7 @@ shape_sources = files(
'process.png'
)
-shapes += [[shape_sources, 'Gane_and_Sarson']]
+shapes += {
+ 'name': 'Gane_and_Sarson',
+ 'sources': shape_sources,
+}
diff --git a/shapes/Lights/meson.build b/shapes/Lights/meson.build
index d67f1d5f..d3985633 100644
--- a/shapes/Lights/meson.build
+++ b/shapes/Lights/meson.build
@@ -27,4 +27,7 @@ shape_sources = files(
'Structure.png'
)
-shapes += [[shape_sources, 'Lights']]
+shapes += {
+ 'name': 'Lights',
+ 'sources': shape_sources,
+}
diff --git a/shapes/Logic/meson.build b/shapes/Logic/meson.build
index b4520d56..1dab4a48 100644
--- a/shapes/Logic/meson.build
+++ b/shapes/Logic/meson.build
@@ -19,4 +19,7 @@ shape_sources = files(
'xor.png'
)
-shapes += [[shape_sources, 'Logic']]
+shapes += {
+ 'name': 'Logic',
+ 'sources': shape_sources,
+}
diff --git a/shapes/MSE/meson.build b/shapes/MSE/meson.build
index 2ec54878..29d41607 100644
--- a/shapes/MSE/meson.build
+++ b/shapes/MSE/meson.build
@@ -13,4 +13,7 @@ shape_sources = files(
'tacsat.png'
)
-shapes += [[shape_sources, 'MSE']]
+shapes += {
+ 'name': 'MSE',
+ 'sources': shape_sources,
+}
diff --git a/shapes/Map/Isometric/meson.build b/shapes/Map/Isometric/meson.build
index ce854e35..d0662116 100644
--- a/shapes/Map/Isometric/meson.build
+++ b/shapes/Map/Isometric/meson.build
@@ -51,5 +51,10 @@ shape_sources = files(
'Tree1.shape',
)
-shapes += [[shape_sources, join_paths('Map', 'Isometric')]]
+# TODO: There is no need to join paths. Can we avoid it?
+name = join_paths('Map', 'Isometric')
+shapes += {
+ 'sources': shape_sources,
+ 'name': name,
+}
diff --git a/shapes/Misc/meson.build b/shapes/Misc/meson.build
index dcb66f2a..2f573f65 100644
--- a/shapes/Misc/meson.build
+++ b/shapes/Misc/meson.build
@@ -9,4 +9,7 @@ shape_sources = files(
'expensible-node.png'
)
-shapes += [[shape_sources, 'Misc']]
+shapes += {
+ 'name': 'Misc',
+ 'sources': shape_sources,
+}
diff --git a/shapes/Pneumatic/meson.build b/shapes/Pneumatic/meson.build
index 9a51cdba..dab5374d 100644
--- a/shapes/Pneumatic/meson.build
+++ b/shapes/Pneumatic/meson.build
@@ -41,4 +41,7 @@ shape_sources = files(
'cnx.png'
)
-shapes += [[shape_sources, 'Pneumatic']]
+shapes += {
+ 'name': 'Pneumatic',
+ 'sources': shape_sources,
+}
diff --git a/shapes/SDL/meson.build b/shapes/SDL/meson.build
index 83b7649a..b46ebe7c 100644
--- a/shapes/SDL/meson.build
+++ b/shapes/SDL/meson.build
@@ -35,4 +35,7 @@ shape_sources = files(
'task.png'
)
-shapes += [[shape_sources, 'SDL']]
+shapes += {
+ 'name': 'SDL',
+ 'sources': shape_sources,
+}
diff --git a/shapes/Shape_Design/meson.build b/shapes/Shape_Design/meson.build
index 6a3bc076..9edfbf2f 100644
--- a/shapes/Shape_Design/meson.build
+++ b/shapes/Shape_Design/meson.build
@@ -5,4 +5,7 @@ shape_sources = files(
'mainconnectionpoint.shape'
)
-shapes += [[shape_sources, 'Shape_Design']]
+shapes += {
+ 'name': 'Shape_Design',
+ 'sources': shape_sources,
+}
diff --git a/shapes/flowchart/meson.build b/shapes/flowchart/meson.build
index 891da4fb..d57e0695 100644
--- a/shapes/flowchart/meson.build
+++ b/shapes/flowchart/meson.build
@@ -52,4 +52,7 @@ shape_sources = files(
)
#TODO: the folder should be capitalised as well.
-shapes += [[shape_sources, 'Flowchart']]
+shapes += {
+ 'name': 'Flowchart',
+ 'sources': shape_sources,
+}
diff --git a/shapes/jigsaw/meson.build b/shapes/jigsaw/meson.build
index f5fdb39f..9b63eb5f 100644
--- a/shapes/jigsaw/meson.build
+++ b/shapes/jigsaw/meson.build
@@ -33,4 +33,7 @@ shape_sources = files(
'part_oooo.png'
)
-shapes += [[shape_sources, 'jigsaw']]
+shapes += {
+ 'name': 'jigsaw',
+ 'sources': shape_sources,
+}
diff --git a/shapes/meson.build b/shapes/meson.build
index 5bd4cf7d..d7ce4138 100644
--- a/shapes/meson.build
+++ b/shapes/meson.build
@@ -27,7 +27,7 @@ subdir('sybase')
foreach shape_info : shapes
install_data(
- shape_info[0],
- install_dir: join_paths(shapesdir, shape_info[1])
+ shape_info.get('sources'),
+ install_dir: join_paths(shapesdir, shape_info.get('name'))
)
endforeach
diff --git a/shapes/network/meson.build b/shapes/network/meson.build
index 72138e45..409d55af 100644
--- a/shapes/network/meson.build
+++ b/shapes/network/meson.build
@@ -67,4 +67,7 @@ shape_sources = files(
'patch-panel.png'
)
-shapes += [[shape_sources, 'network']]
+shapes += {
+ 'name': 'network',
+ 'sources': shape_sources,
+}
diff --git a/shapes/sybase/meson.build b/shapes/sybase/meson.build
index 932e4ce1..930fe29b 100644
--- a/shapes/sybase/meson.build
+++ b/shapes/sybase/meson.build
@@ -13,4 +13,7 @@ shape_sources = files(
'stableq.png'
)
-shapes += [[shape_sources, 'sybase']]
+shapes += {
+ 'name': 'sybase',
+ 'sources': shape_sources,
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]