2017-11-01 21:27:13 +08:00
|
|
|
pdbgen_backup = false
|
|
|
|
pdbgen_groups = false
|
|
|
|
|
|
|
|
pdb_names = [
|
|
|
|
'brush_select',
|
|
|
|
'brush',
|
|
|
|
'brushes',
|
|
|
|
'buffer',
|
|
|
|
'channel',
|
|
|
|
'context',
|
|
|
|
'debug',
|
|
|
|
'display',
|
|
|
|
'drawable_color',
|
|
|
|
'drawable_edit',
|
|
|
|
'drawable',
|
|
|
|
'dynamics',
|
|
|
|
'edit',
|
2019-09-11 23:10:47 +08:00
|
|
|
'file',
|
2017-11-01 21:27:13 +08:00
|
|
|
'floating_sel',
|
|
|
|
'font_select',
|
|
|
|
'fonts',
|
|
|
|
'gimp',
|
|
|
|
'gimprc',
|
|
|
|
'gradient_select',
|
|
|
|
'gradient',
|
|
|
|
'gradients',
|
|
|
|
'help',
|
|
|
|
'image_color_profile',
|
|
|
|
'image_convert',
|
|
|
|
'image_grid',
|
|
|
|
'image_guides',
|
|
|
|
'image_sample_points',
|
|
|
|
'image_select',
|
|
|
|
'image_transform',
|
|
|
|
'image_undo',
|
|
|
|
'image',
|
|
|
|
'item_transform',
|
|
|
|
'item',
|
|
|
|
'layer',
|
|
|
|
'message',
|
|
|
|
'paint_tools',
|
|
|
|
'palette_select',
|
|
|
|
'palette',
|
|
|
|
'palettes',
|
|
|
|
'pattern_select',
|
|
|
|
'pattern',
|
|
|
|
'patterns',
|
|
|
|
'pdb',
|
|
|
|
'plug_in_compat',
|
|
|
|
'plug_in',
|
|
|
|
'progress',
|
|
|
|
'selection',
|
|
|
|
'text_layer',
|
|
|
|
'text_tool',
|
|
|
|
'unit',
|
|
|
|
'vectors',
|
|
|
|
]
|
|
|
|
|
|
|
|
pdb_sources = []
|
|
|
|
foreach name : pdb_names
|
|
|
|
pdb_sources += files('groups' / name + '.pdb')
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
|
|
|
|
enum_headers = [
|
|
|
|
gimpbaseenums,
|
|
|
|
appconfigenums,
|
|
|
|
appoperationsenums,
|
|
|
|
appcoreenums,
|
|
|
|
apppaintenums,
|
|
|
|
]
|
|
|
|
|
|
|
|
# Perl environment
|
|
|
|
perlsrcdir = meson.current_source_dir()
|
|
|
|
perlbindir = meson.current_build_dir()
|
|
|
|
|
|
|
|
perl_env = [
|
|
|
|
'PDBGEN_BACKUP=' + (pdbgen_backup ? '1' : '0'),
|
|
|
|
'PDBGEN_GROUPS=' + (pdbgen_groups ? '1' : '0'),
|
|
|
|
'rootme=' + perlbindir,
|
|
|
|
'srcdir=' + perlsrcdir,
|
|
|
|
'destdir=' + meson.build_root(),
|
|
|
|
'builddir=' + meson.build_root(),
|
2021-10-28 00:01:31 +08:00
|
|
|
]
|
|
|
|
perl= [
|
2017-11-01 21:27:13 +08:00
|
|
|
perl,
|
|
|
|
'-I', perlbindir,
|
|
|
|
'-I', perlsrcdir,
|
|
|
|
]
|
|
|
|
|
|
|
|
groups_pl_content = '# This file is autogenerated\n'
|
|
|
|
groups_pl_content += '@groups = qw(\n'
|
|
|
|
foreach source : pdb_names
|
|
|
|
groups_pl_content += ' '+ source +'\n'
|
|
|
|
endforeach
|
|
|
|
groups_pl_content += ');\n'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# All perl files
|
|
|
|
|
|
|
|
groups_pl = custom_target('groups.pl',
|
|
|
|
input : [ ],
|
|
|
|
output: [ 'groups.pl', ],
|
|
|
|
command: [ 'echo', groups_pl_content, ],
|
|
|
|
capture: true,
|
|
|
|
)
|
|
|
|
|
2021-11-14 19:49:30 +08:00
|
|
|
if meson.version().version_compare('>=0.57.0')
|
|
|
|
enums_pl = custom_target('enums.pl',
|
|
|
|
input : [ 'enumgen.pl', 'enums-external.pl', enum_headers, ],
|
|
|
|
output: [ 'enums.pl', ],
|
|
|
|
env: perl_env,
|
|
|
|
command: [
|
|
|
|
perl, '@INPUT0@',
|
|
|
|
enum_headers,
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
## TODO remove that ?
|
|
|
|
|
|
|
|
pdbgen = custom_target('stamp-pdbgen',
|
|
|
|
input : [
|
|
|
|
files(
|
|
|
|
'pdbgen.pl',
|
|
|
|
|
|
|
|
'app.pl',
|
|
|
|
'lib.pl',
|
|
|
|
'pdb.pl',
|
|
|
|
'stddefs.pdb',
|
|
|
|
'util.pl',
|
|
|
|
),
|
|
|
|
enums_pl,
|
|
|
|
groups_pl,
|
|
|
|
pdb_sources,
|
|
|
|
],
|
|
|
|
output: [ 'stamp-pdbgen', ],
|
|
|
|
env: perl_env,
|
|
|
|
command: [
|
|
|
|
perl, '@INPUT0@',
|
|
|
|
'app', 'lib',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
stamp_enumcode = custom_target('stamp-enum-code',
|
|
|
|
input : [ 'enumcode.pl', ],
|
|
|
|
output: [ 'stamp-enum-code', ],
|
|
|
|
env: perl_env,
|
|
|
|
command: [
|
|
|
|
perl, '@INPUT0@',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
else
|
|
|
|
# TODO: remove this workaround when we bump meson requirement to >= 0.57.0
|
|
|
|
# See MR !506.
|
|
|
|
# In the meantime, make sure the 2 if/else blocks are well synced.
|
|
|
|
env = find_program('env')
|
|
|
|
|
|
|
|
enums_pl = custom_target('enums.pl',
|
|
|
|
input : [ 'enumgen.pl', 'enums-external.pl', enum_headers, ],
|
|
|
|
output: [ 'enums.pl', ],
|
|
|
|
command: [
|
|
|
|
env, perl_env, perl, '@INPUT0@',
|
|
|
|
enum_headers,
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
pdbgen = custom_target('stamp-pdbgen',
|
|
|
|
input : [
|
|
|
|
files(
|
|
|
|
'pdbgen.pl',
|
|
|
|
|
|
|
|
'app.pl',
|
|
|
|
'lib.pl',
|
|
|
|
'pdb.pl',
|
|
|
|
'stddefs.pdb',
|
|
|
|
'util.pl',
|
|
|
|
),
|
|
|
|
enums_pl,
|
|
|
|
groups_pl,
|
|
|
|
pdb_sources,
|
|
|
|
],
|
|
|
|
output: [ 'stamp-pdbgen', ],
|
|
|
|
command: [
|
|
|
|
env, perl_env, perl, '@INPUT0@',
|
|
|
|
'app', 'lib',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
stamp_enumcode = custom_target('stamp-enum-code',
|
|
|
|
input : [ 'enumcode.pl', ],
|
|
|
|
output: [ 'stamp-enum-code', ],
|
|
|
|
command: [
|
|
|
|
env, perl_env, perl, '@INPUT0@',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
endif
|