[gimp/meson: 1/9] Add basic Meson files. * **/meson.build * meson_options.txt * *version.h{.in} * tools/generate_chang



commit ce4dc2ac9636ee3b9c8b1a4d927d1ac9ec59c24f
Author: Félix Piédallu <felix piedallu me>
Date:   Wed Nov 1 14:27:13 2017 +0100

    Add basic Meson files.
    * **/meson.build
    * meson_options.txt
    * *version.h{.in}
    * tools/generate_changelog.sh : custom script to easily gen changelog.
    * app/tests/create_test_env.sh
    * Fix default install directories, according to 
https://github.com/mesonbuild/meson/issues/1637#issuecomment-338281018
    Successful build of libgimp*
    
    TODO : find workaround for icons+subdir generation.
    
    MingW support:
    * Use pygobject-codegen instead of pygtk-codegen
    * mypaint-brushes not available, setting as non-required (for now)

 app/actions/meson.build                        |  107 ++
 app/config/meson.build                         |   75 ++
 app/core/meson.build                           |  228 ++++
 app/dialogs/meson.build                        |   67 ++
 app/display/meson.build                        |  107 ++
 app/file/meson.build                           |   18 +
 app/gegl/meson.build                           |   35 +
 app/git-version.h.in                           |    5 +
 app/gui/meson.build                            |   37 +
 app/menus/meson.build                          |   22 +
 app/meson.build                                |  159 +++
 app/operations/layer-modes-legacy/meson.build  |   31 +
 app/operations/layer-modes/meson.build         |   29 +
 app/operations/meson.build                     |   63 +
 app/operations/tests/meson.build               |   10 +
 app/paint/meson.build                          |   58 +
 app/pdb/meson.build                            |   92 ++
 app/plug-in/meson.build                        |   51 +
 app/propgui/meson.build                        |   27 +
 app/tests/create_test_env.sh                   |   29 +
 app/tests/meson.build                          |   92 ++
 app/text/meson.build                           |   38 +
 app/tools/meson.build                          |  125 ++
 app/vectors/meson.build                        |   26 +
 app/widgets/meson.build                        |  239 ++++
 app/xcf/meson.build                            |   20 +
 build/windows/installer/lang/extractlang.sh    |   11 +
 build/windows/installer/lang/meson.build       |   56 +
 build/windows/installer/meson.build            |    1 +
 build/windows/meson.build                      |   13 +
 cursors/meson.build                            |  135 +++
 data/brushes/meson.build                       |   22 +
 data/dynamics/meson.build                      |   16 +
 data/environ/meson.build                       |    3 +
 data/gradients/meson.build                     |   93 ++
 data/images/meson.build                        |   11 +
 data/interpreters/meson.build                  |    3 +
 data/meson.build                               |   11 +
 data/palettes/meson.build                      |   47 +
 data/patterns/meson.build                      |   25 +
 data/tags/meson.build                          |   33 +
 data/tips/meson.build                          |   48 +
 data/tool-presets/meson.build                  |   20 +
 desktop/meson.build                            |  112 ++
 devel-docs/app/meson.build                     |   42 +
 devel-docs/libgimp/meson.build                 |   58 +
 devel-docs/libgimpbase/meson.build             |   45 +
 devel-docs/libgimpcolor/meson.build            |   38 +
 devel-docs/libgimpconfig/meson.build           |   41 +
 devel-docs/libgimpmath/meson.build             |   38 +
 devel-docs/libgimpmodule/meson.build           |   38 +
 devel-docs/libgimpthumb/meson.build            |   40 +
 devel-docs/libgimpwidgets/meson.build          |   61 +
 devel-docs/meson.build                         |   12 +
 devel-docs/tools/meson.build                   |   30 +
 docs/meson.build                               |   62 +
 etc/meson.build                                |   12 +
 icons/Color/meson.build                        |   59 +
 icons/Legacy/meson.build                       |  556 +++++++++
 icons/Symbolic-Inverted/meson.build            |   70 ++
 icons/Symbolic/meson.build                     |   59 +
 icons/meson.build                              | 1117 ++++++++++++++++++
 libgimp/meson.build                            |  316 +++++
 libgimpbase/gimpversion.h.in                   |   65 +
 libgimpbase/meson.build                        |  119 ++
 libgimpcolor/meson.build                       |   71 ++
 libgimpconfig/meson.build                      |   70 ++
 libgimpmath/meson.build                        |   38 +
 libgimpmodule/meson.build                      |   36 +
 libgimpthumb/meson.build                       |   88 ++
 libgimpwidgets/meson.build                     |  217 ++++
 m4macros/meson.build                           |    5 +
 menus/meson.build                              |   70 ++
 meson.build                                    | 1501 ++++++++++++++++++++++++
 meson_options.txt                              |   34 +
 modules/meson.build                            |   98 ++
 pdb/meson.build                                |  151 +++
 plug-ins/common/meson.build                    |  525 +++++++++
 plug-ins/file-bmp/meson.build                  |   37 +
 plug-ins/file-exr/meson.build                  |   40 +
 plug-ins/file-faxg3/meson.build                |   36 +
 plug-ins/file-fits/meson.build                 |   36 +
 plug-ins/file-fli/meson.build                  |   36 +
 plug-ins/file-ico/meson.build                  |   38 +
 plug-ins/file-jpeg/meson.build                 |   40 +
 plug-ins/file-psd/meson.build                  |   41 +
 plug-ins/file-raw/meson.build                  |   51 +
 plug-ins/file-sgi/meson.build                  |   36 +
 plug-ins/file-tiff/meson.build                 |   38 +
 plug-ins/file-webp/meson.build                 |   42 +
 plug-ins/flame/meson.build                     |   38 +
 plug-ins/fractal-explorer/examples/meson.build |   37 +
 plug-ins/fractal-explorer/meson.build          |   38 +
 plug-ins/gfig/gfig-examples/meson.build        |   14 +
 plug-ins/gfig/images/meson.build               |   36 +
 plug-ins/gfig/meson.build                      |   54 +
 plug-ins/gimpressionist/Brushes/meson.build    |   66 +
 plug-ins/gimpressionist/Paper/meson.build      |   16 +
 plug-ins/gimpressionist/Presets/meson.build    |   32 +
 plug-ins/gimpressionist/meson.build            |   61 +
 plug-ins/gradient-flare/flares/meson.build     |   11 +
 plug-ins/gradient-flare/meson.build            |   37 +
 plug-ins/help-browser/meson.build              |   43 +
 plug-ins/help/meson.build                      |   40 +
 plug-ins/ifs-compose/meson.build               |   37 +
 plug-ins/imagemap/images/meson.build           |   30 +
 plug-ins/imagemap/meson.build                  |  159 +++
 plug-ins/lighting/images/meson.build           |   30 +
 plug-ins/lighting/meson.build                  |   44 +
 plug-ins/map-object/meson.build                |   42 +
 plug-ins/meson.build                           |   33 +
 plug-ins/metadata/meson.build                  |   73 ++
 plug-ins/pagecurl/meson.build                  |   69 ++
 plug-ins/print/meson.build                     |   47 +
 plug-ins/pygimp/doc/meson.build                |   25 +
 plug-ins/pygimp/meson.build                    |  128 ++
 plug-ins/pygimp/plug-ins/meson.build           |   20 +
 plug-ins/screenshot/meson.build                |   34 +
 plug-ins/script-fu/ftx/meson.build             |   12 +
 plug-ins/script-fu/meson.build                 |   68 ++
 plug-ins/script-fu/scripts/images/meson.build  |    9 +
 plug-ins/script-fu/scripts/meson.build         |   67 ++
 plug-ins/script-fu/tinyscheme/meson.build      |   16 +
 plug-ins/selection-to-path/meson.build         |   47 +
 plug-ins/twain/meson.build                     |   41 +
 plug-ins/ui/meson.build                        |   13 +
 po-libgimp/meson.build                         |    1 +
 po-plug-ins/meson.build                        |    1 +
 po-python/meson.build                          |    1 +
 po-script-fu/meson.build                       |    1 +
 po-tags/meson.build                            |    1 +
 po-tips/meson.build                            |    2 +
 po-windows-installer/meson.build               |    2 +
 po/meson.build                                 |    2 +
 themes/meson.build                             |   25 +
 tools/generate_changelog.sh                    |   35 +
 tools/meson.build                              |   50 +
 137 files changed, 10391 insertions(+), 0 deletions(-)
---
diff --git a/app/actions/meson.build b/app/actions/meson.build
new file mode 100644
index 0000000..0f81ce1
--- /dev/null
+++ b/app/actions/meson.build
@@ -0,0 +1,107 @@
+libappactions_sources = [
+  'actions.c',
+  'brush-editor-actions.c',
+  'brushes-actions.c',
+  'buffers-actions.c',
+  'buffers-commands.c',
+  'channels-actions.c',
+  'channels-commands.c',
+  'colormap-actions.c',
+  'colormap-commands.c',
+  'context-actions.c',
+  'context-commands.c',
+  'cursor-info-actions.c',
+  'cursor-info-commands.c',
+  'dashboard-actions.c',
+  'dashboard-commands.c',
+  'data-commands.c',
+  'data-editor-commands.c',
+  'debug-actions.c',
+  'debug-commands.c',
+  'dialogs-actions.c',
+  'dialogs-commands.c',
+  'dock-actions.c',
+  'dock-commands.c',
+  'dockable-actions.c',
+  'dockable-commands.c',
+  'documents-actions.c',
+  'documents-commands.c',
+  'drawable-actions.c',
+  'drawable-commands.c',
+  'dynamics-actions.c',
+  'dynamics-editor-actions.c',
+  'edit-actions.c',
+  'edit-commands.c',
+  'error-console-actions.c',
+  'error-console-commands.c',
+  'file-actions.c',
+  'file-commands.c',
+  'filters-actions.c',
+  'filters-commands.c',
+  'fonts-actions.c',
+  'fonts-commands.c',
+  'gimpgeglprocedure.c',
+  'gradient-editor-actions.c',
+  'gradient-editor-commands.c',
+  'gradients-actions.c',
+  'gradients-commands.c',
+  'help-actions.c',
+  'help-commands.c',
+  'image-actions.c',
+  'image-commands.c',
+  'images-actions.c',
+  'images-commands.c',
+  'items-actions.c',
+  'items-commands.c',
+  'layers-actions.c',
+  'layers-commands.c',
+  'mypaint-brushes-actions.c',
+  'palette-editor-actions.c',
+  'palette-editor-commands.c',
+  'palettes-actions.c',
+  'palettes-commands.c',
+  'patterns-actions.c',
+  'plug-in-actions.c',
+  'plug-in-commands.c',
+  'procedure-commands.c',
+  'quick-mask-actions.c',
+  'quick-mask-commands.c',
+  'sample-points-actions.c',
+  'sample-points-commands.c',
+  'select-actions.c',
+  'select-commands.c',
+  'templates-actions.c',
+  'templates-commands.c',
+  'text-editor-actions.c',
+  'text-editor-commands.c',
+  'text-tool-actions.c',
+  'text-tool-commands.c',
+  'tool-options-actions.c',
+  'tool-options-commands.c',
+  'tool-preset-editor-actions.c',
+  'tool-preset-editor-commands.c',
+  'tool-presets-actions.c',
+  'tool-presets-commands.c',
+  'tools-actions.c',
+  'tools-commands.c',
+  'vectors-actions.c',
+  'vectors-commands.c',
+  'view-actions.c',
+  'view-commands.c',
+  'window-actions.c',
+  'window-commands.c',
+  'windows-actions.c',
+  'windows-commands.c',
+]
+
+
+libappactions = static_library('appactions',
+  libappactions_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-Actions"',
+  ],
+  dependencies: [
+    gegl, gdk_pixbuf, gtk2,
+  ],
+)
diff --git a/app/config/meson.build b/app/config/meson.build
new file mode 100644
index 0000000..cd17f1a
--- /dev/null
+++ b/app/config/meson.build
@@ -0,0 +1,75 @@
+
+appconfigenums = custom_target('config-enums.c',
+  input : [ 'config-enums.h', ],
+  output: [ 'config-enums.c', ],
+  command: app_mkenums_custom_target_command,
+  capture: true,
+)
+
+libappconfig_sources = [
+  'gimpconfig-dump.c',
+  'gimpconfig-file.c',
+  'gimpconfig-utils.c',
+  'gimpcoreconfig.c',
+  'gimpdialogconfig.c',
+  'gimpdisplayconfig.c',
+  'gimpdisplayoptions.c',
+  'gimpgeglconfig.c',
+  'gimpguiconfig.c',
+  'gimplangrc.c',
+  'gimppluginconfig.c',
+  'gimprc-deserialize.c',
+  'gimprc-serialize.c',
+  'gimprc-unknown.c',
+  'gimprc.c',
+  'gimpxmlparser.c',
+  appconfigenums,
+]
+
+libappconfig = static_library('appconfig',
+  libappconfig_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-Config"',
+    mypaint_args,
+  ],
+  dependencies: [
+    cairo, gegl, gdk_pixbuf, gio, gio_specific, gtk2, libmypaint, mypaint_brushes,
+  ],
+)
+
+test('app-config',
+  executable('test-config',
+    [ 'test-config.c', app_debug_files, ],
+    include_directories: [ rootInclude, rootAppInclude, ],
+
+    dependencies: [
+      gegl, gio, gio_specific,
+    ],
+    link_with: [
+      libgimpbase,
+      libgimpconfig,
+      libgimpcolor,
+      libgimpmath,
+      libgimpmodule,
+      libgimpthumb,
+
+      libappcore,
+      libappconfig,
+      libappfile,
+      libappgegl,
+      libappinternalprocs,
+      libapplayermodes,
+      libapplayermodeslegacy,
+      libappoperations,
+      libapppaint,
+      libapppdb,
+      libappplugin,
+      libapptext,
+      libappvectors,
+      libappxcf,
+    ],
+    install: false,
+  ),
+  suite: 'app'
+)
diff --git a/app/core/meson.build b/app/core/meson.build
new file mode 100644
index 0000000..0bca8db
--- /dev/null
+++ b/app/core/meson.build
@@ -0,0 +1,228 @@
+
+appcoreenums = custom_target('core-enums',
+  input : [ 'core-enums.h', ],
+  output: [ 'core-enums.c', ],
+  command: app_mkenums_custom_target_command,
+  capture: true,
+)
+
+appcoremarshal = gnome.genmarshal('gimpmarshal',
+  prefix: 'gimp_marshal',
+  sources: 'gimpmarshal.list',
+  install_header: false,
+)
+
+
+
+libappcore_sources = [
+  'gimp-batch.c',
+  'gimp-cairo.c',
+  'gimp-contexts.c',
+  'gimp-data-factories.c',
+  'gimp-edit.c',
+  'gimp-filter-history.c',
+  'gimp-gradients.c',
+  'gimp-gui.c',
+  'gimp-internal-data.c',
+  'gimp-memsize.c',
+  'gimp-modules.c',
+  'gimp-palettes.c',
+  'gimp-parasites.c',
+  'gimp-tags.c',
+  'gimp-templates.c',
+  'gimp-transform-resize.c',
+  'gimp-transform-utils.c',
+  'gimp-units.c',
+  'gimp-user-install.c',
+  'gimp-utils.c',
+  'gimp.c',
+  'gimpbezierdesc.c',
+  'gimpboundary.c',
+  'gimpbrush-boundary.c',
+  'gimpbrush-load.c',
+  'gimpbrush-transform.c',
+  'gimpbrush.c',
+  'gimpbrushcache.c',
+  'gimpbrushclipboard.c',
+  'gimpbrushgenerated-load.c',
+  'gimpbrushgenerated-save.c',
+  'gimpbrushgenerated.c',
+  'gimpbrushpipe-load.c',
+  'gimpbrushpipe.c',
+  'gimpbuffer.c',
+  'gimpchannel-combine.c',
+  'gimpchannel-select.c',
+  'gimpchannel.c',
+  'gimpchannelpropundo.c',
+  'gimpchannelundo.c',
+  'gimpcontainer-filter.c',
+  'gimpcontainer.c',
+  'gimpcontext.c',
+  'gimpcoords-interpolate.c',
+  'gimpcoords.c',
+  'gimpcurve-load.c',
+  'gimpcurve-map.c',
+  'gimpcurve-save.c',
+  'gimpcurve.c',
+  'gimpdashpattern.c',
+  'gimpdata.c',
+  'gimpdatafactory.c',
+  'gimpdocumentlist.c',
+  'gimpdrawable-blend.c',
+  'gimpdrawable-bucket-fill.c',
+  'gimpdrawable-combine.c',
+  'gimpdrawable-equalize.c',
+  'gimpdrawable-fill.c',
+  'gimpdrawable-filters.c',
+  'gimpdrawable-floating-selection.c',
+  'gimpdrawable-foreground-extract.c',
+  'gimpdrawable-histogram.c',
+  'gimpdrawable-levels.c',
+  'gimpdrawable-offset.c',
+  'gimpdrawable-operation.c',
+  'gimpdrawable-preview.c',
+  'gimpdrawable-shadow.c',
+  'gimpdrawable-stroke.c',
+  'gimpdrawable-transform.c',
+  'gimpdrawable.c',
+  'gimpdrawablefilter.c',
+  'gimpdrawablemodundo.c',
+  'gimpdrawablestack.c',
+  'gimpdrawableundo.c',
+  'gimpdynamics-load.c',
+  'gimpdynamics-save.c',
+  'gimpdynamics.c',
+  'gimpdynamicsoutput.c',
+  'gimperror.c',
+  'gimpfilloptions.c',
+  'gimpfilter.c',
+  'gimpfilteredcontainer.c',
+  'gimpfilterstack.c',
+  'gimpfloatingselectionundo.c',
+  'gimpgradient-load.c',
+  'gimpgradient-save.c',
+  'gimpgradient.c',
+  'gimpgrid.c',
+  'gimpgrouplayer.c',
+  'gimpgrouplayerundo.c',
+  'gimpguide.c',
+  'gimpguideundo.c',
+  'gimphistogram.c',
+  'gimpidtable.c',
+  'gimpimage-arrange.c',
+  'gimpimage-color-profile.c',
+  'gimpimage-colormap.c',
+  'gimpimage-convert-indexed.c',
+  'gimpimage-convert-precision.c',
+  'gimpimage-convert-type.c',
+  'gimpimage-crop.c',
+  'gimpimage-duplicate.c',
+  'gimpimage-flip.c',
+  'gimpimage-grid.c',
+  'gimpimage-guides.c',
+  'gimpimage-item-list.c',
+  'gimpimage-merge.c',
+  'gimpimage-metadata.c',
+  'gimpimage-new.c',
+  'gimpimage-pick-color.c',
+  'gimpimage-pick-item.c',
+  'gimpimage-preview.c',
+  'gimpimage-quick-mask.c',
+  'gimpimage-resize.c',
+  'gimpimage-rotate.c',
+  'gimpimage-sample-points.c',
+  'gimpimage-scale.c',
+  'gimpimage-snap.c',
+  'gimpimage-symmetry.c',
+  'gimpimage-undo-push.c',
+  'gimpimage-undo.c',
+  'gimpimage.c',
+  'gimpimagefile.c',
+  'gimpimageundo.c',
+  'gimpitem-exclusive.c',
+  'gimpitem-linked.c',
+  'gimpitem-preview.c',
+  'gimpitem.c',
+  'gimpitempropundo.c',
+  'gimpitemstack.c',
+  'gimpitemtree.c',
+  'gimpitemundo.c',
+  'gimplayer-floating-selection.c',
+  'gimplayer-new.c',
+  'gimplayer.c',
+  'gimplayermask.c',
+  'gimplayermaskpropundo.c',
+  'gimplayermaskundo.c',
+  'gimplayerpropundo.c',
+  'gimplayerstack.c',
+  'gimplayerundo.c',
+  'gimplist.c',
+  'gimpmaskundo.c',
+  'gimpmybrush-load.c',
+  'gimpmybrush.c',
+  'gimpobject.c',
+  'gimppaintinfo.c',
+  'gimppalette-import.c',
+  'gimppalette-load.c',
+  'gimppalette-save.c',
+  'gimppalette.c',
+  'gimppalettemru.c',
+  'gimpparamspecs-desc.c',
+  'gimpparamspecs-duplicate.c',
+  'gimpparamspecs.c',
+  'gimpparasitelist.c',
+  'gimppattern-load.c',
+  'gimppattern.c',
+  'gimppatternclipboard.c',
+  'gimppdbprogress.c',
+  'gimppickable-auto-shrink.c',
+  'gimppickable-contiguous-region.c',
+  'gimppickable.c',
+  'gimpprogress.c',
+  'gimpprojectable.c',
+  'gimpprojection.c',
+  'gimpsamplepoint.c',
+  'gimpsamplepointundo.c',
+  'gimpscanconvert.c',
+  'gimpselection.c',
+  'gimpsettings.c',
+  'gimpstrokeoptions.c',
+  'gimpsubprogress.c',
+  'gimpsymmetry-mandala.c',
+  'gimpsymmetry-mirror.c',
+  'gimpsymmetry-tiling.c',
+  'gimpsymmetry.c',
+  'gimptag.c',
+  'gimptagcache.c',
+  'gimptagged.c',
+  'gimptaggedcontainer.c',
+  'gimptempbuf.c',
+  'gimptemplate.c',
+  'gimptilehandlerprojectable.c',
+  'gimptoolinfo.c',
+  'gimptooloptions.c',
+  'gimptoolpreset-load.c',
+  'gimptoolpreset-save.c',
+  'gimptoolpreset.c',
+  'gimptreehandler.c',
+  'gimpundo.c',
+  'gimpundostack.c',
+  'gimpunit.c',
+  'gimpviewable.c',
+  appcoreenums,
+  appcoremarshal,
+  cursors_sources,
+  pickers_sources,
+  icons_core_sources,
+]
+
+libappcore = static_library('appcore',
+  libappcore_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-Core"',
+  ],
+  dependencies: [
+    cairo, gegl, gdk_pixbuf, libmypaint, gexiv2, math
+  ],
+)
diff --git a/app/dialogs/meson.build b/app/dialogs/meson.build
new file mode 100644
index 0000000..00e52f0
--- /dev/null
+++ b/app/dialogs/meson.build
@@ -0,0 +1,67 @@
+libappdialogs_sources = [
+  'about-dialog.c',
+  'action-search-dialog.c',
+  'channel-options-dialog.c',
+  'color-profile-dialog.c',
+  'color-profile-import-dialog.c',
+  'convert-indexed-dialog.c',
+  'convert-precision-dialog.c',
+  'data-delete-dialog.c',
+  'dialogs-constructors.c',
+  'dialogs.c',
+  'fade-dialog.c',
+  'file-open-dialog.c',
+  'file-open-location-dialog.c',
+  'file-save-dialog.c',
+  'fill-dialog.c',
+  'grid-dialog.c',
+  'image-merge-layers-dialog.c',
+  'image-new-dialog.c',
+  'image-properties-dialog.c',
+  'image-scale-dialog.c',
+  'input-devices-dialog.c',
+  'item-options-dialog.c',
+  'keyboard-shortcuts-dialog.c',
+  'layer-add-mask-dialog.c',
+  'layer-options-dialog.c',
+  'lebl-dialog.c',
+  'module-dialog.c',
+  'offset-dialog.c',
+  'palette-import-dialog.c',
+  'preferences-dialog-utils.c',
+  'preferences-dialog.c',
+  'print-size-dialog.c',
+  'quit-dialog.c',
+  'resize-dialog.c',
+  'resolution-calibrate-dialog.c',
+  'scale-dialog.c',
+  'stroke-dialog.c',
+  'template-options-dialog.c',
+  'tips-dialog.c',
+  'tips-parser.c',
+  'user-install-dialog.c',
+  'vectors-export-dialog.c',
+  'vectors-import-dialog.c',
+  'vectors-options-dialog.c',
+  gitversion_h,
+]
+
+# Auto-generated sources
+libappdialogs_sources += [
+  custom_target('authors.h',
+    input : [ 'authors.xsl', join_paths(meson.source_root(), 'authors.xml') ],
+    output: [ 'authors.h' ],
+    command: [ xsltproc, '-o', '@OUTPUT@', '@INPUT0@', '@INPUT1@' ],
+  )
+]
+
+libappdialogs = static_library('appdialogs',
+  libappdialogs_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-Dialogs"',
+  ],
+  dependencies: [
+    gegl, gtk2,
+  ],
+)
diff --git a/app/display/meson.build b/app/display/meson.build
new file mode 100644
index 0000000..bc8f763
--- /dev/null
+++ b/app/display/meson.build
@@ -0,0 +1,107 @@
+
+appdisplayenums = custom_target('display-enums.c',
+  input : [ 'display-enums.h', ],
+  output: [ 'display-enums.c', ],
+  command: app_mkenums_custom_target_command,
+  capture: true,
+)
+
+libappdisplay_sources = [
+  'gimpcanvas-style.c',
+  'gimpcanvas.c',
+  'gimpcanvasarc.c',
+  'gimpcanvasboundary.c',
+  'gimpcanvasbufferpreview.c',
+  'gimpcanvascorner.c',
+  'gimpcanvascursor.c',
+  'gimpcanvasgrid.c',
+  'gimpcanvasgroup.c',
+  'gimpcanvasguide.c',
+  'gimpcanvashandle.c',
+  'gimpcanvasitem-utils.c',
+  'gimpcanvasitem.c',
+  'gimpcanvaslayerboundary.c',
+  'gimpcanvasline.c',
+  'gimpcanvaspassepartout.c',
+  'gimpcanvaspath.c',
+  'gimpcanvaspen.c',
+  'gimpcanvaspolygon.c',
+  'gimpcanvasprogress.c',
+  'gimpcanvasproxygroup.c',
+  'gimpcanvasrectangle.c',
+  'gimpcanvasrectangleguides.c',
+  'gimpcanvassamplepoint.c',
+  'gimpcanvastextcursor.c',
+  'gimpcanvastransformguides.c',
+  'gimpcanvastransformpreview.c',
+  'gimpcursorview.c',
+  'gimpdisplay-foreach.c',
+  'gimpdisplay-handlers.c',
+  'gimpdisplay.c',
+  'gimpdisplayshell-actions.c',
+  'gimpdisplayshell-appearance.c',
+  'gimpdisplayshell-autoscroll.c',
+  'gimpdisplayshell-callbacks.c',
+  'gimpdisplayshell-close.c',
+  'gimpdisplayshell-cursor.c',
+  'gimpdisplayshell-dnd.c',
+  'gimpdisplayshell-draw.c',
+  'gimpdisplayshell-expose.c',
+  'gimpdisplayshell-filter-dialog.c',
+  'gimpdisplayshell-filter.c',
+  'gimpdisplayshell-grab.c',
+  'gimpdisplayshell-handlers.c',
+  'gimpdisplayshell-icon.c',
+  'gimpdisplayshell-items.c',
+  'gimpdisplayshell-layer-select.c',
+  'gimpdisplayshell-profile.c',
+  'gimpdisplayshell-progress.c',
+  'gimpdisplayshell-render.c',
+  'gimpdisplayshell-rotate-dialog.c',
+  'gimpdisplayshell-rotate.c',
+  'gimpdisplayshell-rulers.c',
+  'gimpdisplayshell-scale-dialog.c',
+  'gimpdisplayshell-scale.c',
+  'gimpdisplayshell-scroll.c',
+  'gimpdisplayshell-scrollbars.c',
+  'gimpdisplayshell-selection.c',
+  'gimpdisplayshell-title.c',
+  'gimpdisplayshell-tool-events.c',
+  'gimpdisplayshell-transform.c',
+  'gimpdisplayshell-utils.c',
+  'gimpdisplayshell.c',
+  'gimpdisplayxfer.c',
+  'gimpimagewindow.c',
+  'gimpmotionbuffer.c',
+  'gimpmultiwindowstrategy.c',
+  'gimpnavigationeditor.c',
+  'gimpscalecombobox.c',
+  'gimpsinglewindowstrategy.c',
+  'gimpstatusbar.c',
+  'gimptoolcompass.c',
+  'gimptooldialog.c',
+  'gimptoolgui.c',
+  'gimptoolhandlegrid.c',
+  'gimptoolline.c',
+  'gimptoolpath.c',
+  'gimptoolpolygon.c',
+  'gimptoolrectangle.c',
+  'gimptoolrotategrid.c',
+  'gimptoolsheargrid.c',
+  'gimptooltransformgrid.c',
+  'gimptoolwidget.c',
+  appdisplayenums,
+  appcoremarshal,
+  gitversion_h,
+]
+
+libappdisplay = static_library('appdisplay',
+  libappdisplay_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-Display"',
+  ],
+  dependencies: [
+    gegl, gtk2,
+  ],
+)
diff --git a/app/file/meson.build b/app/file/meson.build
new file mode 100644
index 0000000..76ce411
--- /dev/null
+++ b/app/file/meson.build
@@ -0,0 +1,18 @@
+libappfile_sources = [
+  'file-import.c',
+  'file-open.c',
+  'file-remote.c',
+  'file-save.c',
+  'file-utils.c',
+]
+
+libappfile = static_library('appfile',
+  libappfile_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-File"',
+  ],
+  dependencies: [
+    gegl, gdk_pixbuf,
+  ],
+)
diff --git a/app/gegl/meson.build b/app/gegl/meson.build
new file mode 100644
index 0000000..a7a99fb
--- /dev/null
+++ b/app/gegl/meson.build
@@ -0,0 +1,35 @@
+
+appgeglenums = custom_target('gimp-gegl-enums.c',
+  input : [ 'gimp-gegl-enums.h', ],
+  output: [ 'gimp-gegl-enums.c', ],
+  command: app_mkenums_custom_target_command,
+  capture: true,
+)
+
+libappgegl_sources = [
+  'gimp-babl-compat.c',
+  'gimp-babl.c',
+  'gimp-gegl-apply-operation.c',
+  'gimp-gegl-loops-sse2.c',
+  'gimp-gegl-loops.c',
+  'gimp-gegl-mask-combine.c',
+  'gimp-gegl-mask.c',
+  'gimp-gegl-nodes.c',
+  'gimp-gegl-tile-compat.c',
+  'gimp-gegl-utils.c',
+  'gimp-gegl.c',
+  'gimpapplicator.c',
+  'gimptilehandlervalidate.c',
+  appgeglenums,
+]
+
+libappgegl = static_library('appgegl',
+  libappgegl_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-GEGL"',
+  ],
+  dependencies: [
+    cairo, gegl, gdk_pixbuf,
+  ],
+)
diff --git a/app/git-version.h.in b/app/git-version.h.in
new file mode 100644
index 0000000..2adb447
--- /dev/null
+++ b/app/git-version.h.in
@@ -0,0 +1,5 @@
+#pragma once
+
+#define GIMP_GIT_VERSION          "@GIMP_GIT_VERSION@"
+#define GIMP_GIT_VERSION_ABBREV   "@GIMP_GIT_VERSION_ABBREV@"
+#define GIMP_GIT_LAST_COMMIT_YEAR "@GIMP_GIT_LAST_COMMIT_YEAR@"
diff --git a/app/gui/meson.build b/app/gui/meson.build
new file mode 100644
index 0000000..bab8c8b
--- /dev/null
+++ b/app/gui/meson.build
@@ -0,0 +1,37 @@
+
+gimpdbusservice_gen = gnome.gdbus_codegen(
+  'gimpdbusservice-generated',
+  'dbus-service.xml',
+  interface_prefix: 'org.gimp.GIMP.',
+  namespace: 'GimpDBusService',
+)
+
+libappgui_sources = [
+  'gimpdbusservice.c',
+  'gimpuiconfigurer.c',
+  'gui-message.c',
+  'gui-unique.c',
+  'gui-vtable.c',
+  'gui.c',
+  'icon-themes.c',
+  'session.c',
+  'splash.c',
+  'themes.c',
+  gimpdbusservice_gen,
+]
+
+# Workaround for generated header included in other directories.
+configInclude = include_directories('.')
+
+
+libappgui = static_library('appgui',
+  libappgui_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-GUI"',
+  ],
+  dependencies: [
+    cairo, dbus_glib, gegl, gdk_pixbuf, gio_specific, gtk2
+  ],
+  install: false,
+)
diff --git a/app/menus/meson.build b/app/menus/meson.build
new file mode 100644
index 0000000..bd5ee74
--- /dev/null
+++ b/app/menus/meson.build
@@ -0,0 +1,22 @@
+libappmenus_sources = [
+  'dockable-menu.c',
+  'file-menu.c',
+  'filters-menu.c',
+  'image-menu.c',
+  'menus.c',
+  'plug-in-menus.c',
+  'tool-options-menu.c',
+  'window-menu.c',
+  'windows-menu.c',
+]
+
+libappmenus = static_library('appmenus',
+  libappmenus_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-Menus"',
+  ],
+  dependencies: [
+    gegl, gtk2
+  ],
+)
diff --git a/app/meson.build b/app/meson.build
new file mode 100644
index 0000000..3f7664f
--- /dev/null
+++ b/app/meson.build
@@ -0,0 +1,159 @@
+rootAppInclude = include_directories('.')
+
+app_mkenums_custom_target_command = [
+  gimp_mkenums,
+  '--fhead','#include "config.h"\n'
+          + '#include <gio/gio.h>\n'
+          + '#include "libgimpbase/gimpbase.h"\n'
+          + '#include "core/core-enums.h"\n'
+          + '#include "@INPUT@"\n'
+          + '#include "gimp-intl.h"\n',
+  gimp_mkenums_custom_target_commonargs,
+]
+
+subdir('actions')
+subdir('core')
+subdir('dialogs')
+subdir('display')
+subdir('file')
+subdir('gegl')
+subdir('gui')
+subdir('menus')
+subdir('operations')
+subdir('paint')
+subdir('pdb')
+subdir('plug-in')
+subdir('propgui')
+subdir('text')
+subdir('tools')
+subdir('vectors')
+subdir('widgets')
+subdir('xcf')
+
+
+app_debug_files = files(
+  'gimp-debug.c',
+  'gimp-log.c',
+)
+
+# Top-level library
+app_cflags = [
+  '-DG_LOG_DOMAIN="Gimp"',
+  '-DGIMP_APP_GLUE_COMPILATION',
+]
+
+libapp_sources = [
+  'app.c',
+  'errors.c',
+  'gimp-debug.c',
+  'gimp-log.c',
+  'gimp-version.c',
+  'language.c',
+  'sanity.c',
+  'signals.c',
+  'tests.c',
+  'unique.c',
+  gitversion_h,
+  gimpdbusservice_gen,
+]
+
+libapp = static_library('app',
+  libapp_sources,
+  include_directories: [ rootInclude, rootAppInclude, configInclude, ],
+  c_args: app_cflags,
+  dependencies: [
+    gegl, gdk_pixbuf, gtk2,
+  ],
+)
+
+
+# Those subdirs need to link againts the first ones
+subdir('config')
+subdir('tests')
+
+
+
+app_links = [
+  libappconfig,
+  libappcore,
+  libappfile,
+  libappgegl,
+  libappinternalprocs,
+  libapplayermodes,
+  libapplayermodeslegacy,
+  libappoperations,
+  libapppaint,
+  libapppdb,
+  libappplugin,
+  libapptext,
+  libappvectors,
+  libappxcf,
+  libgimpbase,
+  libgimpcolor,
+  libgimpconfig,
+  libgimpmath,
+  libgimpmodule,
+  libgimpthumb,
+]
+
+app_gui_links = [
+  libappactions,
+  libappdialogs,
+  libappdisplay,
+  libappgui,
+  libappmenus,
+  libapppropgui,
+  libapptools,
+  libappwidgets,
+  libgimpwidgets,
+]
+
+app_deps = [
+  gio, gtk2, pangocairo, pangoft2, gegl, lcms, gexiv2, drmingw,
+]
+
+# Executables
+
+rc_name = 'gimp-'+ app_version
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_app_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(rc_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(rc_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+gimpconsole_exe = executable('gimp-console-'+app_version,
+  libapp_sources + [ 'main.c', rc_file, ],
+  c_args: app_cflags + [ '-DGIMP_CONSOLE_COMPILATION', ],
+  include_directories: [ rootInclude, ],
+  dependencies: app_deps,
+  link_with: app_links,
+  install: true,
+)
+
+rc_name = 'gimp-console-'+ app_version
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_app_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(rc_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(rc_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+gimpmain_exe = executable('gimp-'+app_version,
+  libapp_sources + [ 'main.c', rc_file, ],
+  c_args: app_cflags + [ ],
+  include_directories: [ rootInclude, ],
+  dependencies: app_deps,
+  link_with: app_links + app_gui_links,
+  install: true,
+)
diff --git a/app/operations/layer-modes-legacy/meson.build b/app/operations/layer-modes-legacy/meson.build
new file mode 100644
index 0000000..c27f3e0
--- /dev/null
+++ b/app/operations/layer-modes-legacy/meson.build
@@ -0,0 +1,31 @@
+libapplayermodeslegacy_sources = [
+  'gimpoperationadditionlegacy.c',
+  'gimpoperationburnlegacy.c',
+  'gimpoperationdarkenonlylegacy.c',
+  'gimpoperationdifferencelegacy.c',
+  'gimpoperationdividelegacy.c',
+  'gimpoperationdodgelegacy.c',
+  'gimpoperationgrainextractlegacy.c',
+  'gimpoperationgrainmergelegacy.c',
+  'gimpoperationhardlightlegacy.c',
+  'gimpoperationhslcolorlegacy.c',
+  'gimpoperationhsvhuelegacy.c',
+  'gimpoperationhsvsaturationlegacy.c',
+  'gimpoperationhsvvaluelegacy.c',
+  'gimpoperationlightenonlylegacy.c',
+  'gimpoperationmultiplylegacy.c',
+  'gimpoperationscreenlegacy.c',
+  'gimpoperationsoftlightlegacy.c',
+  'gimpoperationsubtractlegacy.c',
+]
+
+libapplayermodeslegacy = static_library('applayermodeslegacy',
+  libapplayermodeslegacy_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-Layer-Modes-Legacy"',
+  ],
+  dependencies: [
+    cairo, gegl, gdk_pixbuf,
+  ],
+)
diff --git a/app/operations/layer-modes/meson.build b/app/operations/layer-modes/meson.build
new file mode 100644
index 0000000..3d5c039
--- /dev/null
+++ b/app/operations/layer-modes/meson.build
@@ -0,0 +1,29 @@
+libapplayermodes_sources = [
+  'gimp-layer-modes.c',
+  'gimpoperationantierase.c',
+  'gimpoperationbehind.c',
+  'gimpoperationdissolve.c',
+  'gimpoperationerase.c',
+  'gimpoperationlayermode-blend.c',
+  'gimpoperationlayermode-composite-sse2.c',
+  'gimpoperationlayermode-composite.c',
+  'gimpoperationlayermode.c',
+  'gimpoperationmerge.c',
+  'gimpoperationnormal-sse2.c',
+  'gimpoperationnormal-sse4.c',
+  'gimpoperationnormal.c',
+  'gimpoperationpassthrough.c',
+  'gimpoperationreplace.c',
+  'gimpoperationsplit.c',
+]
+
+libapplayermodes = static_library('applayermodes',
+  libapplayermodes_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-Layer-Modes"',
+  ],
+  dependencies: [
+    cairo, gegl, gdk_pixbuf,
+  ],
+)
diff --git a/app/operations/meson.build b/app/operations/meson.build
new file mode 100644
index 0000000..cf381de
--- /dev/null
+++ b/app/operations/meson.build
@@ -0,0 +1,63 @@
+
+appoperationsenums = custom_target('operations-enums.c',
+  input : [ 'operations-enums.h', ],
+  output: [ 'operations-enums.c', ],
+  command: app_mkenums_custom_target_command,
+  capture: true,
+)
+
+
+libappoperations_sources = [
+  'gimp-operation-config.c',
+  'gimp-operations.c',
+  'gimpbrightnesscontrastconfig.c',
+  'gimpcageconfig.c',
+  'gimpcolorbalanceconfig.c',
+  'gimpcurvesconfig.c',
+  'gimphuesaturationconfig.c',
+  'gimplevelsconfig.c',
+  'gimpoperationblend.c',
+  'gimpoperationborder.c',
+  'gimpoperationbrightnesscontrast.c',
+  'gimpoperationbuffersourcevalidate.c',
+  'gimpoperationcagecoefcalc.c',
+  'gimpoperationcagetransform.c',
+  'gimpoperationcolorbalance.c',
+  'gimpoperationcolorize.c',
+  'gimpoperationcomposecrop.c',
+  'gimpoperationcurves.c',
+  'gimpoperationdesaturate.c',
+  'gimpoperationequalize.c',
+  'gimpoperationflood.c',
+  'gimpoperationgrow.c',
+  'gimpoperationhistogramsink.c',
+  'gimpoperationhuesaturation.c',
+  'gimpoperationlevels.c',
+  'gimpoperationmaskcomponents.c',
+  'gimpoperationpointfilter.c',
+  'gimpoperationposterize.c',
+  'gimpoperationprofiletransform.c',
+  'gimpoperationscalarmultiply.c',
+  'gimpoperationsemiflatten.c',
+  'gimpoperationsetalpha.c',
+  'gimpoperationshapeburst.c',
+  'gimpoperationshrink.c',
+  'gimpoperationthreshold.c',
+  'gimpoperationthresholdalpha.c',
+  appoperationsenums
+]
+
+libappoperations = static_library('appoperations',
+  libappoperations_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-Operations"',
+  ],
+  dependencies: [
+    cairo, gegl, gdk_pixbuf,
+  ],
+)
+
+subdir('layer-modes')
+subdir('layer-modes-legacy')
+subdir('tests')
diff --git a/app/operations/tests/meson.build b/app/operations/tests/meson.build
new file mode 100644
index 0000000..65bc8b6
--- /dev/null
+++ b/app/operations/tests/meson.build
@@ -0,0 +1,10 @@
+
+executable('test-operations',
+  'test-operations.c',
+  include_directories: [ rootInclude, rootAppInclude, ],
+
+  dependencies: [
+    cairo, gegl, gdk_pixbuf, glib, pangocairo, pangoft2,
+  ],
+  build_by_default: false,
+)
diff --git a/app/paint/meson.build b/app/paint/meson.build
new file mode 100644
index 0000000..e59ef75
--- /dev/null
+++ b/app/paint/meson.build
@@ -0,0 +1,58 @@
+
+apppaintenums = custom_target('paint-enums.c',
+  input : [ 'paint-enums.h', ],
+  output: [ 'paint-enums.c', ],
+  command: app_mkenums_custom_target_command,
+  capture: true,
+)
+
+
+libapppaint_sources = [
+  'gimp-paint.c',
+  'gimpairbrush.c',
+  'gimpairbrushoptions.c',
+  'gimpbrushcore.c',
+  'gimpclone.c',
+  'gimpcloneoptions.c',
+  'gimpconvolve.c',
+  'gimpconvolveoptions.c',
+  'gimpdodgeburn.c',
+  'gimpdodgeburnoptions.c',
+  'gimperaser.c',
+  'gimperaseroptions.c',
+  'gimpheal.c',
+  'gimpink-blob.c',
+  'gimpink.c',
+  'gimpinkoptions.c',
+  'gimpinkundo.c',
+  'gimpmybrushcore.c',
+  'gimpmybrushoptions.c',
+  'gimpmybrushsurface.c',
+  'gimppaintbrush.c',
+  'gimppaintcore-loops.c',
+  'gimppaintcore-stroke.c',
+  'gimppaintcore.c',
+  'gimppaintcoreundo.c',
+  'gimppaintoptions.c',
+  'gimppencil.c',
+  'gimppenciloptions.c',
+  'gimpperspectiveclone.c',
+  'gimpperspectivecloneoptions.c',
+  'gimpsmudge.c',
+  'gimpsmudgeoptions.c',
+  'gimpsourcecore.c',
+  'gimpsourceoptions.c',
+  apppaintenums,
+  appcoremarshal,
+]
+
+libapppaint = static_library('apppaint',
+  libapppaint_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-Paint"',
+  ],
+  dependencies: [
+    cairo, gegl, gdk_pixbuf, libmypaint,
+  ],
+)
diff --git a/app/pdb/meson.build b/app/pdb/meson.build
new file mode 100644
index 0000000..941b502
--- /dev/null
+++ b/app/pdb/meson.build
@@ -0,0 +1,92 @@
+libapppdb_sources = [
+  'gimp-pdb-compat.c',
+  'gimppdb-query.c',
+  'gimppdb-utils.c',
+  'gimppdb.c',
+  'gimppdbcontext.c',
+  'gimppdberror.c',
+  'gimpprocedure.c',
+  appcoremarshal,
+]
+libappinternalprocs_sources = [
+  'brush-cmds.c',
+  'brush-select-cmds.c',
+  'brushes-cmds.c',
+  'buffer-cmds.c',
+  'channel-cmds.c',
+  'color-cmds.c',
+  'context-cmds.c',
+  'debug-cmds.c',
+  'display-cmds.c',
+  'drawable-cmds.c',
+  'drawable-color-cmds.c',
+  'drawable-transform-cmds.c',
+  'dynamics-cmds.c',
+  'edit-cmds.c',
+  'fileops-cmds.c',
+  'floating-sel-cmds.c',
+  'font-select-cmds.c',
+  'fonts-cmds.c',
+  'gimp-cmds.c',
+  'gimprc-cmds.c',
+  'gradient-cmds.c',
+  'gradient-select-cmds.c',
+  'gradients-cmds.c',
+  'help-cmds.c',
+  'image-cmds.c',
+  'image-color-profile-cmds.c',
+  'image-convert-cmds.c',
+  'image-grid-cmds.c',
+  'image-guides-cmds.c',
+  'image-sample-points-cmds.c',
+  'image-select-cmds.c',
+  'image-transform-cmds.c',
+  'image-undo-cmds.c',
+  'internal-procs.c',
+  'item-cmds.c',
+  'item-transform-cmds.c',
+  'layer-cmds.c',
+  'message-cmds.c',
+  'paint-tools-cmds.c',
+  'palette-cmds.c',
+  'palette-select-cmds.c',
+  'palettes-cmds.c',
+  'paths-cmds.c',
+  'pattern-cmds.c',
+  'pattern-select-cmds.c',
+  'patterns-cmds.c',
+  'plug-in-cmds.c',
+  'plug-in-compat-cmds.c',
+  'procedural-db-cmds.c',
+  'progress-cmds.c',
+  'selection-cmds.c',
+  'selection-tools-cmds.c',
+  'text-layer-cmds.c',
+  'text-tool-cmds.c',
+  'transform-tools-cmds.c',
+  'unit-cmds.c',
+  'vectors-cmds.c',
+]
+
+libapppdb = static_library('apppdb',
+  libapppdb_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-PDB"',
+  ],
+  dependencies: [
+    cairo, gegl, gdk_pixbuf,
+  ],
+)
+
+
+libappinternalprocs = static_library('appinternalprocs',
+  libappinternalprocs_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-PDB"',
+  ],
+  dependencies: [
+    cairo, gegl, gdk_pixbuf,
+  ],
+)
diff --git a/app/plug-in/meson.build b/app/plug-in/meson.build
new file mode 100644
index 0000000..8527cfc
--- /dev/null
+++ b/app/plug-in/meson.build
@@ -0,0 +1,51 @@
+
+apppluginenums = custom_target('plug-in-enums.c',
+  input : [ 'plug-in-enums.h', ],
+  output: [ 'plug-in-enums.c', ],
+  command: app_mkenums_custom_target_command,
+  capture: true,
+)
+
+
+libappplugin_sources = [
+  'gimpenvirontable.c',
+  'gimpinterpreterdb.c',
+  'gimpplugin-cleanup.c',
+  'gimpplugin-context.c',
+  'gimpplugin-message.c',
+  'gimpplugin-progress.c',
+  'gimpplugin.c',
+  'gimpplugindebug.c',
+  'gimpplugindef.c',
+  'gimppluginerror.c',
+  'gimppluginmanager-call.c',
+  'gimppluginmanager-data.c',
+  'gimppluginmanager-file-procedure.c',
+  'gimppluginmanager-file.c',
+  'gimppluginmanager-help-domain.c',
+  'gimppluginmanager-locale-domain.c',
+  'gimppluginmanager-menu-branch.c',
+  'gimppluginmanager-query.c',
+  'gimppluginmanager-restore.c',
+  'gimppluginmanager.c',
+  'gimppluginprocedure.c',
+  'gimppluginprocframe.c',
+  'gimppluginshm.c',
+  'gimptemporaryprocedure.c',
+  'plug-in-menu-path.c',
+  'plug-in-params.c',
+  'plug-in-rc.c',
+  apppluginenums,
+  appcoremarshal,
+]
+
+libappplugin = static_library('appplug-in',
+  libappplugin_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-Plug-In"',
+  ],
+  dependencies: [
+    cairo, gegl, gdk_pixbuf,
+  ],
+)
diff --git a/app/propgui/meson.build b/app/propgui/meson.build
new file mode 100644
index 0000000..1c64c73
--- /dev/null
+++ b/app/propgui/meson.build
@@ -0,0 +1,27 @@
+libapppropgui_sources = [
+  'gimppropgui-channel-mixer.c',
+  'gimppropgui-color-balance.c',
+  'gimppropgui-color-rotate.c',
+  'gimppropgui-color-to-alpha.c',
+  'gimppropgui-convolution-matrix.c',
+  'gimppropgui-diffraction-patterns.c',
+  'gimppropgui-eval.c',
+  'gimppropgui-generic.c',
+  'gimppropgui-hue-saturation.c',
+  'gimppropgui-shadows-highlights.c',
+  'gimppropgui-spiral.c',
+  'gimppropgui-supernova.c',
+  'gimppropgui-utils.c',
+  'gimppropgui.c',
+]
+
+libapppropgui = static_library('apppropgui',
+  libapppropgui_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-PropGUI"',
+  ],
+  dependencies: [
+    gegl, gtk2,
+  ],
+)
diff --git a/app/tests/create_test_env.sh b/app/tests/create_test_env.sh
new file mode 100644
index 0000000..4bf5bfd
--- /dev/null
+++ b/app/tests/create_test_env.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# Copy tests resources
+for dir in files gimpdir gimpdir-empty; do
+    rm -rf "${MESON_BUILD_ROOT}/${MESON_SUBDIR}/${dir}"
+    cp -r "${MESON_SOURCE_ROOT}/${MESON_SUBDIR}/${dir}" \
+        "${MESON_BUILD_ROOT}/${MESON_SUBDIR}"
+done
+
+# Link to Color icon theme for tests
+IconsRoot="${MESON_SOURCE_ROOT}/icons/Color"
+IconsDirs=$(find "${IconsRoot}" -name [0-9]* -type d -printf '%f\n' | sort -n)
+for dir in ${IconsDirs} ; do
+    mkdir  "${MESON_BUILD_ROOT}/${MESON_SUBDIR}/gimp-test-icon-theme/hicolor/${dir}x${dir}" -p
+    LnName="${MESON_BUILD_ROOT}/${MESON_SUBDIR}/gimp-test-icon-theme/hicolor/${dir}x${dir}/apps"
+    rm -rf "${LnName}"
+    ln -s "${IconsRoot}/${dir}" "${LnName}"
+done
+
+LnName="${MESON_BUILD_ROOT}/${MESON_SUBDIR}/gimp-test-icon-theme/hicolor/index.theme"
+rm -rf "${LnName}"
+ln -s "${IconsRoot}/index.theme" "${LnName}"
+
+
+# Create output dirs
+rm -rf "${MESON_BUILD_ROOT}/${MESON_SUBDIR}/gimpdir-output"
+for dir in brushes gradients patterns; do
+    mkdir -p "${MESON_BUILD_ROOT}/${MESON_SUBDIR}/gimpdir-output/${dir}"
+done
diff --git a/app/tests/meson.build b/app/tests/meson.build
new file mode 100644
index 0000000..a466baa
--- /dev/null
+++ b/app/tests/meson.build
@@ -0,0 +1,92 @@
+
+apptests_includes = [
+  rootInclude, rootAppInclude
+]
+apptests_deps = [
+  pangocairo, pangoft2, gtk2, dbus_glib, gegl,
+]
+apptests_links = [
+  libapp,
+  libappactions,
+  libappconfig,
+  libappcore,
+  libappdialogs,
+  libappdialogs,
+  libappdisplay,
+  libappfile,
+  libappgegl,
+  libappgui,
+  libappinternalprocs,
+  libapplayermodes,
+  libapplayermodeslegacy,
+  libappmenus,
+  libappoperations,
+  libapppaint,
+  libapppdb,
+  libappplugin,
+  libapppropgui,
+  libapptext,
+  libapptools,
+  libappvectors,
+  libappwidgets,
+  libappxcf,
+  libgimpbase,
+  libgimpcolor,
+  libgimpconfig,
+  libgimpmath,
+  libgimpmodule,
+  libgimpthumb,
+  libgimpwidgets,
+]
+
+
+libapptestutils_sources = [
+  'gimp-app-test-utils.c',
+  'gimp-test-session-utils.c',
+]
+
+libapptestutils = static_library('apptestutils',
+  libapptestutils_sources,
+  include_directories: apptests_includes,
+  dependencies: apptests_deps,
+  link_with: apptests_links,
+)
+
+apptests_links += libapptestutils
+
+
+app_tests = [
+  'core',
+  'gimpidtable',
+  'save-and-export',
+  'session-2-6-compatibility',
+  'session-2-8-compatibility-multi-window',
+  'session-2-8-compatibility-single-window',
+  'single-window-mode',
+  'tools',
+  'ui',
+  'xcf',
+]
+
+foreach test_name : app_tests
+  test_exe = executable(test_name,
+    'test-@0@.c'.format(test_name),
+    include_directories: apptests_includes,
+    dependencies: apptests_deps,
+    link_with: apptests_links,
+  )
+
+  test(test_name,
+    test_exe,
+    env: [
+      'GIMP_TESTING_ABS_TOP_SRCDIR='  + meson.build_root(),
+      'GIMP_TESTING_ABS_TOP_BUILDDIR='+ meson.build_root(),
+      'GIMP_TESTING_PLUGINDIRS=' + join_paths(meson.build_root(), 'plug-ins', 'common'),
+      'GIMP_TESTING_PLUGINDIRS_BASENAME_IGNORES=mkgen.pl',
+    ],
+    suite: 'app',
+  )
+
+endforeach
+
+run_target('create_test_env', command: find_program('create_test_env.sh'))
diff --git a/app/text/meson.build b/app/text/meson.build
new file mode 100644
index 0000000..a6ae8f5
--- /dev/null
+++ b/app/text/meson.build
@@ -0,0 +1,38 @@
+
+apptextenums = custom_target('text-enums.c',
+  input : [ 'text-enums.h', ],
+  output: [ 'text-enums.c', ],
+  command: app_mkenums_custom_target_command,
+  capture: true,
+)
+
+libapptext_sources = [
+  'gimp-fonts.c',
+  'gimpfont.c',
+  'gimpfontlist.c',
+  'gimptext-compat.c',
+  'gimptext-parasite.c',
+  'gimptext-vectors.c',
+  'gimptext-xlfd.c',
+  'gimptext.c',
+  'gimptextlayer-transform.c',
+  'gimptextlayer-xcf.c',
+  'gimptextlayer.c',
+  'gimptextlayout-render.c',
+  'gimptextlayout.c',
+  'gimptextundo.c',
+  apptextenums,
+  appcoremarshal,
+]
+
+
+libapptext = static_library('apptext',
+  libapptext_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-Text"',
+  ],
+  dependencies: [
+    gegl, gdk_pixbuf, harfbuzz, pangocairo, pangoft2,
+  ],
+)
diff --git a/app/tools/meson.build b/app/tools/meson.build
new file mode 100644
index 0000000..5e5110b
--- /dev/null
+++ b/app/tools/meson.build
@@ -0,0 +1,125 @@
+
+apptoolsenums = custom_target('tools-enums.c',
+  input : [ 'tools-enums.h', ],
+  output: [ 'tools-enums.c', ],
+  command: app_mkenums_custom_target_command,
+  capture: true,
+)
+
+libapptools_sources = [
+  'gimp-tools.c',
+  'gimpairbrushtool.c',
+  'gimpalignoptions.c',
+  'gimpaligntool.c',
+  'gimpblendoptions.c',
+  'gimpblendtool-editor.c',
+  'gimpblendtool.c',
+  'gimpbrightnesscontrasttool.c',
+  'gimpbrushtool.c',
+  'gimpbucketfilloptions.c',
+  'gimpbucketfilltool.c',
+  'gimpbycolorselecttool.c',
+  'gimpcageoptions.c',
+  'gimpcagetool.c',
+  'gimpcloneoptions-gui.c',
+  'gimpclonetool.c',
+  'gimpcoloroptions.c',
+  'gimpcolorpickeroptions.c',
+  'gimpcolorpickertool.c',
+  'gimpcolortool.c',
+  'gimpconvolvetool.c',
+  'gimpcropoptions.c',
+  'gimpcroptool.c',
+  'gimpcurvestool.c',
+  'gimpdodgeburntool.c',
+  'gimpdrawtool.c',
+  'gimpeditselectiontool.c',
+  'gimpellipseselecttool.c',
+  'gimperasertool.c',
+  'gimpfilteroptions.c',
+  'gimpfiltertool-settings.c',
+  'gimpfiltertool-widgets.c',
+  'gimpfiltertool.c',
+  'gimpflipoptions.c',
+  'gimpfliptool.c',
+  'gimpforegroundselectoptions.c',
+  'gimpforegroundselecttool.c',
+  'gimpforegroundselecttoolundo.c',
+  'gimpfreeselecttool.c',
+  'gimpfuzzyselecttool.c',
+  'gimpgegltool.c',
+  'gimpgenerictransformtool.c',
+  'gimpguidetool.c',
+  'gimphandletransformoptions.c',
+  'gimphandletransformtool.c',
+  'gimphealtool.c',
+  'gimphistogramoptions.c',
+  'gimpinkoptions-gui.c',
+  'gimpinktool.c',
+  'gimpiscissorsoptions.c',
+  'gimpiscissorstool.c',
+  'gimplevelstool.c',
+  'gimpmagnifyoptions.c',
+  'gimpmagnifytool.c',
+  'gimpmeasureoptions.c',
+  'gimpmeasuretool.c',
+  'gimpmoveoptions.c',
+  'gimpmovetool.c',
+  'gimpmybrushoptions-gui.c',
+  'gimpmybrushtool.c',
+  'gimpnpointdeformationoptions.c',
+  'gimpnpointdeformationtool.c',
+  'gimpoperationtool.c',
+  'gimppaintbrushtool.c',
+  'gimppaintoptions-gui.c',
+  'gimppainttool.c',
+  'gimppenciltool.c',
+  'gimpperspectiveclonetool.c',
+  'gimpperspectivetool.c',
+  'gimprectangleoptions.c',
+  'gimprectangleselectoptions.c',
+  'gimprectangleselecttool.c',
+  'gimpregionselectoptions.c',
+  'gimpregionselecttool.c',
+  'gimprotatetool.c',
+  'gimpsamplepointtool.c',
+  'gimpscaletool.c',
+  'gimpseamlesscloneoptions.c',
+  'gimpseamlessclonetool.c',
+  'gimpselectionoptions.c',
+  'gimpselectiontool.c',
+  'gimpsheartool.c',
+  'gimpsmudgetool.c',
+  'gimpsourcetool.c',
+  'gimptextoptions.c',
+  'gimptexttool-editor.c',
+  'gimptexttool.c',
+  'gimpthresholdtool.c',
+  'gimptilehandleriscissors.c',
+  'gimptool-progress.c',
+  'gimptool.c',
+  'gimptoolcontrol.c',
+  'gimptooloptions-gui.c',
+  'gimptransformoptions.c',
+  'gimptransformtool.c',
+  'gimptransformtoolundo.c',
+  'gimpunifiedtransformtool.c',
+  'gimpvectoroptions.c',
+  'gimpvectortool.c',
+  'gimpwarpoptions.c',
+  'gimpwarptool.c',
+  'tool_manager.c',
+  apptoolsenums,
+  appcoremarshal,
+]
+
+libapptools = static_library('apptools',
+  libapptools_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-Tools"',
+  ],
+  dependencies: [
+    gegl, gtk2,
+  ],
+)
diff --git a/app/vectors/meson.build b/app/vectors/meson.build
new file mode 100644
index 0000000..9519493
--- /dev/null
+++ b/app/vectors/meson.build
@@ -0,0 +1,26 @@
+libappvectors_sources = [
+  'gimpanchor.c',
+  'gimpbezierstroke.c',
+  'gimpstroke-new.c',
+  'gimpstroke.c',
+  'gimpvectors-compat.c',
+  'gimpvectors-export.c',
+  'gimpvectors-import.c',
+  'gimpvectors-preview.c',
+  'gimpvectors-warp.c',
+  'gimpvectors.c',
+  'gimpvectorsmodundo.c',
+  'gimpvectorspropundo.c',
+  'gimpvectorsundo.c',
+]
+
+libappvectors = static_library('appvectors',
+  libappvectors_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-Vectors"',
+  ],
+  dependencies: [
+    cairo, gegl, gdk_pixbuf,
+  ],
+)
diff --git a/app/widgets/meson.build b/app/widgets/meson.build
new file mode 100644
index 0000000..1a910d6
--- /dev/null
+++ b/app/widgets/meson.build
@@ -0,0 +1,239 @@
+
+appwidgetsenums = custom_target('widgets-enums.c',
+  input : [ 'widgets-enums.h', ],
+  output: [ 'widgets-enums.c', ],
+  command: app_mkenums_custom_target_command,
+  capture: true,
+)
+
+
+libappwidgets_sources = [
+  'gimpaction-history.c',
+  'gimpaction.c',
+  'gimpactioneditor.c',
+  'gimpactionfactory.c',
+  'gimpactiongroup.c',
+  'gimpactionview.c',
+  'gimpblobeditor.c',
+  'gimpbrusheditor.c',
+  'gimpbrushfactoryview.c',
+  'gimpbrushselect.c',
+  'gimpbuffersourcebox.c',
+  'gimpbufferview.c',
+  'gimpcairo-wilber.c',
+  'gimpcellrendererbutton.c',
+  'gimpcellrendererdashes.c',
+  'gimpcellrendererviewable.c',
+  'gimpchanneltreeview.c',
+  'gimpcircle.c',
+  'gimpclipboard.c',
+  'gimpcolorbar.c',
+  'gimpcolordialog.c',
+  'gimpcolordisplayeditor.c',
+  'gimpcoloreditor.c',
+  'gimpcolorframe.c',
+  'gimpcolorhistory.c',
+  'gimpcolormapeditor.c',
+  'gimpcolorpanel.c',
+  'gimpcolorselectorpalette.c',
+  'gimpcombotagentry.c',
+  'gimpcomponenteditor.c',
+  'gimpcontainerbox.c',
+  'gimpcontainercombobox.c',
+  'gimpcontainereditor.c',
+  'gimpcontainerentry.c',
+  'gimpcontainergridview.c',
+  'gimpcontainericonview.c',
+  'gimpcontainerpopup.c',
+  'gimpcontainertreestore.c',
+  'gimpcontainertreeview-dnd.c',
+  'gimpcontainertreeview.c',
+  'gimpcontainerview-utils.c',
+  'gimpcontainerview.c',
+  'gimpcontrollereditor.c',
+  'gimpcontrollerinfo.c',
+  'gimpcontrollerkeyboard.c',
+  'gimpcontrollerlist.c',
+  'gimpcontrollermouse.c',
+  'gimpcontrollers.c',
+  'gimpcontrollerwheel.c',
+  'gimpcriticaldialog.c',
+  'gimpcursor.c',
+  'gimpcurveview.c',
+  'gimpdashboard.c',
+  'gimpdasheditor.c',
+  'gimpdataeditor.c',
+  'gimpdatafactoryview.c',
+  'gimpdeviceeditor.c',
+  'gimpdeviceinfo-coords.c',
+  'gimpdeviceinfo.c',
+  'gimpdeviceinfoeditor.c',
+  'gimpdevicemanager.c',
+  'gimpdevices.c',
+  'gimpdevicestatus.c',
+  'gimpdial.c',
+  'gimpdialogfactory.c',
+  'gimpdnd-xds.c',
+  'gimpdnd.c',
+  'gimpdock.c',
+  'gimpdockable.c',
+  'gimpdockbook.c',
+  'gimpdockcolumns.c',
+  'gimpdockcontainer.c',
+  'gimpdocked.c',
+  'gimpdockwindow.c',
+  'gimpdocumentview.c',
+  'gimpdrawabletreeview.c',
+  'gimpdynamicseditor.c',
+  'gimpdynamicsfactoryview.c',
+  'gimpdynamicsoutputeditor.c',
+  'gimpeditor.c',
+  'gimpenumaction.c',
+  'gimperrorconsole.c',
+  'gimperrordialog.c',
+  'gimpexportdialog.c',
+  'gimpfgbgeditor.c',
+  'gimpfgbgview.c',
+  'gimpfiledialog.c',
+  'gimpfileprocview.c',
+  'gimpfilleditor.c',
+  'gimpfontselect.c',
+  'gimpfontview.c',
+  'gimpgradienteditor.c',
+  'gimpgradientselect.c',
+  'gimpgrideditor.c',
+  'gimphandlebar.c',
+  'gimphelp.c',
+  'gimphistogrambox.c',
+  'gimphistogrameditor.c',
+  'gimphistogramview.c',
+  'gimpiconpicker.c',
+  'gimpiconsizescale.c',
+  'gimpimagecommenteditor.c',
+  'gimpimageeditor.c',
+  'gimpimageparasiteview.c',
+  'gimpimageprofileview.c',
+  'gimpimagepropview.c',
+  'gimpimageview.c',
+  'gimpitemtreeview.c',
+  'gimplanguagecombobox.c',
+  'gimplanguageentry.c',
+  'gimplanguagestore-parser.c',
+  'gimplanguagestore.c',
+  'gimplayermodebox.c',
+  'gimplayermodecombobox.c',
+  'gimplayertreeview.c',
+  'gimpmenudock.c',
+  'gimpmenufactory.c',
+  'gimpmessagebox.c',
+  'gimpmessagedialog.c',
+  'gimpmeter.c',
+  'gimpnavigationview.c',
+  'gimpopendialog.c',
+  'gimpoverlaybox.c',
+  'gimpoverlaychild.c',
+  'gimpoverlaydialog.c',
+  'gimpoverlayframe.c',
+  'gimppaletteeditor.c',
+  'gimppaletteselect.c',
+  'gimppaletteview.c',
+  'gimppanedbox.c',
+  'gimppatternfactoryview.c',
+  'gimppatternselect.c',
+  'gimppdbdialog.c',
+  'gimppickablebutton.c',
+  'gimppickablepopup.c',
+  'gimppixbuf.c',
+  'gimppluginview.c',
+  'gimppolar.c',
+  'gimppopup.c',
+  'gimpprefsbox.c',
+  'gimpprocedureaction.c',
+  'gimpprogressbox.c',
+  'gimpprogressdialog.c',
+  'gimppropwidgets.c',
+  'gimpradioaction.c',
+  'gimprender.c',
+  'gimpsamplepointeditor.c',
+  'gimpsavedialog.c',
+  'gimpscalebutton.c',
+  'gimpsearchpopup.c',
+  'gimpselectiondata.c',
+  'gimpselectioneditor.c',
+  'gimpsessioninfo-aux.c',
+  'gimpsessioninfo-book.c',
+  'gimpsessioninfo-dock.c',
+  'gimpsessioninfo-dockable.c',
+  'gimpsessioninfo.c',
+  'gimpsessionmanaged.c',
+  'gimpsettingsbox.c',
+  'gimpsettingseditor.c',
+  'gimpsizebox.c',
+  'gimpspinscale.c',
+  'gimpstringaction.c',
+  'gimpstrokeeditor.c',
+  'gimpsymmetryeditor.c',
+  'gimptagentry.c',
+  'gimptagpopup.c',
+  'gimptemplateeditor.c',
+  'gimptemplateview.c',
+  'gimptextbuffer-serialize.c',
+  'gimptextbuffer.c',
+  'gimptexteditor.c',
+  'gimptextproxy.c',
+  'gimptextstyleeditor.c',
+  'gimptexttag.c',
+  'gimpthumbbox.c',
+  'gimptoggleaction.c',
+  'gimptoolbox-color-area.c',
+  'gimptoolbox-dnd.c',
+  'gimptoolbox-image-area.c',
+  'gimptoolbox-indicator-area.c',
+  'gimptoolbox.c',
+  'gimptooleditor.c',
+  'gimptooloptionseditor.c',
+  'gimptoolpalette.c',
+  'gimptoolpreseteditor.c',
+  'gimptoolpresetfactoryview.c',
+  'gimptranslationstore.c',
+  'gimpuimanager.c',
+  'gimpundoeditor.c',
+  'gimpvectorstreeview.c',
+  'gimpview-popup.c',
+  'gimpview.c',
+  'gimpviewablebox.c',
+  'gimpviewablebutton.c',
+  'gimpviewabledialog.c',
+  'gimpviewrenderer-frame.c',
+  'gimpviewrenderer-utils.c',
+  'gimpviewrenderer.c',
+  'gimpviewrendererbrush.c',
+  'gimpviewrendererbuffer.c',
+  'gimpviewrendererdrawable.c',
+  'gimpviewrenderergradient.c',
+  'gimpviewrendererimage.c',
+  'gimpviewrendererimagefile.c',
+  'gimpviewrendererlayer.c',
+  'gimpviewrendererpalette.c',
+  'gimpviewrenderervectors.c',
+  'gimpwidgets-constructors.c',
+  'gimpwidgets-utils.c',
+  'gimpwindow.c',
+  'gimpwindowstrategy.c',
+  'gtkhwrapbox.c',
+  'gtkwrapbox.c',
+  appwidgetsenums,
+  appcoremarshal,
+]
+
+
+libappwidgets = static_library('appwidgets',
+  libappwidgets_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-Widgets"',
+  ],
+  dependencies: [
+    gegl, gtk2,
+  ],
+)
diff --git a/app/xcf/meson.build b/app/xcf/meson.build
new file mode 100644
index 0000000..28975d9
--- /dev/null
+++ b/app/xcf/meson.build
@@ -0,0 +1,20 @@
+libappxcf_sources = [
+  'xcf-load.c',
+  'xcf-read.c',
+  'xcf-save.c',
+  'xcf-seek.c',
+  'xcf-utils.c',
+  'xcf-write.c',
+  'xcf.c',
+]
+
+libappxcf = static_library('appxcf',
+  libappxcf_sources,
+  include_directories: [ rootInclude, rootAppInclude, ],
+  c_args: [
+    '-DG_LOG_DOMAIN="Gimp-XCF"',
+  ],
+  dependencies: [
+    cairo, gegl, gdk_pixbuf, zlib
+  ],
+)
diff --git a/build/windows/installer/lang/extractlang.sh b/build/windows/installer/lang/extractlang.sh
new file mode 100644
index 0000000..a1cad74
--- /dev/null
+++ b/build/windows/installer/lang/extractlang.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+prefix=$1
+encoding=$2
+infile=$3
+
+#replace [] with \[\]
+prefix=$(echo "$prefix" | sed 's/[][]/\\\0/g')
+
+#echo to stdout
+sed '/^\w\+'"$prefix"'=/{s/\(.\)'"$prefix"'/\1/;n};/^\w.*=/d' "$infile" \
+| iconv -f UTF-8 -t "$encoding"
diff --git a/build/windows/installer/lang/meson.build b/build/windows/installer/lang/meson.build
new file mode 100644
index 0000000..6a42a06
--- /dev/null
+++ b/build/windows/installer/lang/meson.build
@@ -0,0 +1,56 @@
+isl_input = custom_target('setup.isl',
+  input : 'setup.isl.in',
+  output: 'setup.isl',
+  command: [
+    intltool_merge,
+    '--desktop-style',
+    '--utf8',
+    '--multiple-output',
+    '--cache=' + join_paths('@OUTDIR@', 'intltool-merge-cache'),
+    po_windows_installer_dir,
+    '@INPUT@',
+    '@OUTPUT@',
+  ]
+)
+
+languages = [
+  [ 'ca',   '[ca]',     'WINDOWS-1252', ],
+  [ 'da',   '[da]',     'WINDOWS-1252', ],
+  [ 'de',   '[de]',     'WINDOWS-1252', ],
+  [ 'el',   '[el]',     'WINDOWS-1253', ],
+  [ 'en',   '',         'WINDOWS-1252', ],
+  [ 'eo',   '[eo]',     'ISO-8859-3',   ],
+  [ 'es',   '[es]',     'WINDOWS-1252', ],
+  [ 'eu',   '[eu]',     'WINDOWS-1252', ],
+  [ 'fr',   '[fr]',     'WINDOWS-1252', ],
+  [ 'hu',   '[hu]',     'WINDOWS-1250', ],
+  [ 'id',   '[id]',     'ISO-8859-1',   ],
+  [ 'is',   '[is]',     'WINDOWS-1252', ],
+  [ 'it',   '[it]',     'WINDOWS-1252', ],
+  [ 'nl',   '[nl]',     'WINDOWS-1252', ],
+  [ 'pl',   '[pl]',     'WINDOWS-1250', ],
+  [ 'pt_BR','[pt_BR]',  'WINDOWS-1252', ],
+  [ 'ru',   '[ru]',     'WINDOWS-1251', ],
+  [ 'sl',   '[sl]',     'WINDOWS-1250', ],
+  [ 'sv',   '[sv]',     'WINDOWS-1252', ],
+  [ 'tr',   '[tr]',     'WINDOWS-1254', ],
+]
+
+extractlang = find_program('extractlang.sh')
+
+all_isl = []
+foreach language : languages
+  code    = language[0]
+  prefix  = language[1]
+  encoding= language[2]
+
+  islfile = '@0  setup isl'.format(code)
+
+  all_isl += custom_target(islfile,
+    input : isl_input,
+    output: islfile,
+    command: [ extractlang, prefix, encoding, '@INPUT@' ],
+    capture: true,
+    build_by_default: true,
+  )
+endforeach
diff --git a/build/windows/installer/meson.build b/build/windows/installer/meson.build
new file mode 100644
index 0000000..55564fb
--- /dev/null
+++ b/build/windows/installer/meson.build
@@ -0,0 +1 @@
+subdir('lang')
diff --git a/build/windows/meson.build b/build/windows/meson.build
new file mode 100644
index 0000000..28362f6
--- /dev/null
+++ b/build/windows/meson.build
@@ -0,0 +1,13 @@
+# Windows specific
+
+gimp_plugins_rc = configure_file(
+  input : 'gimp-plug-ins.rc.in',
+  output: 'gimp-plug-ins.rc',
+  configuration: versionconfig,
+)
+
+gimp_app_rc = configure_file(
+  input : 'gimp.rc.in',
+  output: 'gimp.rc',
+  configuration: versionconfig,
+)
diff --git a/cursors/meson.build b/cursors/meson.build
new file mode 100644
index 0000000..d563f1b
--- /dev/null
+++ b/cursors/meson.build
@@ -0,0 +1,135 @@
+tool_cursors = [
+  'cursor-bad.png',
+  'cursor-color-picker.png',
+  'cursor-corner-bottom-left.png',
+  'cursor-corner-bottom-right.png',
+  'cursor-corner-bottom.png',
+  'cursor-corner-left.png',
+  'cursor-corner-right.png',
+  'cursor-corner-top-left.png',
+  'cursor-corner-top-right.png',
+  'cursor-corner-top.png',
+  'cursor-crosshair-small.png',
+  'cursor-crosshair.png',
+  'cursor-mouse.png',
+  'cursor-move.png',
+  'cursor-none.png',
+  'cursor-side-bottom-left.png',
+  'cursor-side-bottom-right.png',
+  'cursor-side-bottom.png',
+  'cursor-side-left.png',
+  'cursor-side-right.png',
+  'cursor-side-top-left.png',
+  'cursor-side-top-right.png',
+  'cursor-side-top.png',
+  'cursor-zoom.png',
+
+  'modifier-anchor.png',
+  'modifier-background.png',
+  'modifier-bad.png',
+  'modifier-control.png',
+  'modifier-foreground.png',
+  'modifier-intersect.png',
+  'modifier-join.png',
+  'modifier-minus.png',
+  'modifier-move.png',
+  'modifier-pattern.png',
+  'modifier-plus.png',
+  'modifier-resize.png',
+  'modifier-select.png',
+
+  'tool-airbrush.png',
+  'tool-blend.png',
+  'tool-blur.png',
+  'tool-bucket-fill.png',
+  'tool-burn.png',
+  'tool-clone.png',
+  'tool-color-picker.png',
+  'tool-crop.png',
+  'tool-dodge.png',
+  'tool-ellipse-select.png',
+  'tool-eraser.png',
+  'tool-flip-horizontal.png',
+  'tool-flip-vertical.png',
+  'tool-free-select.png',
+  'tool-fuzzy-select.png',
+  'tool-hand.png',
+  'tool-heal.png',
+  'tool-ink.png',
+  'tool-iscissors.png',
+  'tool-measure.png',
+  'tool-move.png',
+  'tool-paintbrush.png',
+  'tool-paths-anchor.png',
+  'tool-paths-control.png',
+  'tool-paths-segment.png',
+  'tool-paths.png',
+  'tool-pencil.png',
+  'tool-perspective.png',
+  'tool-polygon-select.png',
+  'tool-rect-select.png',
+  'tool-resize.png',
+  'tool-rotate.png',
+  'tool-shear.png',
+  'tool-smudge.png',
+  'tool-text.png',
+  'tool-warp.png',
+  'tool-zoom.png',
+]
+
+color_picker_cursors = [
+  'cursor-color-picker.png',
+]
+
+# Build xml files, in source dir, at Meson-runtime
+# TODO : versionning, or write in build dir
+
+cursors_resourcename = 'gimp-tool-cursors'
+cursors_xml_content  = '<?xml version="1.0" encoding="UTF-8"?>\n'
+cursors_xml_content += '<gresources>\n'
+cursors_xml_content += '  <gresource prefix="/org/gimp/tool-cursors">\n'
+foreach cursor : tool_cursors
+  cursors_xml_content+='    <file preprocess="to-pixdata">'+ cursor +'</file>\n'
+endforeach
+cursors_xml_content += '  </gresource>\n'
+cursors_xml_content += '</gresources>\n'
+
+cursors_xml = configure_file(
+  output: cursors_resourcename + '.gresource.xml',
+  command: [ 'echo', cursors_xml_content ],
+  capture: true,
+)
+
+
+pickers_resourcename = 'gimp-color-picker-cursors'
+pickers_xml_content  = '<?xml version="1.0" encoding="UTF-8"?>\n'
+pickers_xml_content += '<gresources>\n'
+pickers_xml_content += '  <gresource prefix="/org/gimp/color-picker-cursors">\n'
+foreach cursor : color_picker_cursors
+  pickers_xml_content+='    <file preprocess="to-pixdata">'+ cursor +'</file>\n'
+endforeach
+pickers_xml_content += '  </gresource>\n'
+pickers_xml_content += '  <gresource prefix="/org/gimp/color-picker-cursors-raw">\n'
+foreach cursor : color_picker_cursors
+  pickers_xml_content+='    <file                        >'+ cursor +'</file>\n'
+endforeach
+pickers_xml_content += '  </gresource>\n'
+pickers_xml_content += '</gresources>\n'
+
+pickers_xml = configure_file(
+  output: pickers_resourcename + '.gresource.xml',
+  command: [ 'echo', pickers_xml_content ],
+  capture: true,
+)
+
+cursors_sources = gnome.compile_resources(
+  cursors_resourcename,
+  cursors_xml,
+  c_name: cursors_resourcename.underscorify(),
+)
+
+pickers_sources = gnome.compile_resources(
+  pickers_resourcename,
+  pickers_xml,
+  c_name: pickers_resourcename.underscorify(),
+)
diff --git a/data/brushes/meson.build b/data/brushes/meson.build
new file mode 100644
index 0000000..ccf5bdd
--- /dev/null
+++ b/data/brushes/meson.build
@@ -0,0 +1,22 @@
+brushes_types = [
+  'Basic',
+  'gimp-obsolete-files',
+  'Legacy',
+  'Media',
+  'Sketch',
+  'Splatters',
+  'Texture',
+]
+
+foreach brushes_type : brushes_types
+
+  install_subdir(brushes_type,
+    install_dir: join_paths(gimpdatadir, 'brushes'),
+    exclude_files: [
+      '.gitignore',
+      'Makefile.am',
+      'Makefile.in',
+    ],
+  )
+
+endforeach
diff --git a/data/dynamics/meson.build b/data/dynamics/meson.build
new file mode 100644
index 0000000..c9b7736
--- /dev/null
+++ b/data/dynamics/meson.build
@@ -0,0 +1,16 @@
+
+install_subdir('.',
+  install_dir: join_paths(gimpdatadir, 'dynamics'),
+  exclude_files: [
+    '.gitignore',
+    'meson.build',
+    'Makefile.am',
+    'Makefile.in',
+    'Basic/.gitignore',
+    'Basic/Makefile.am',
+    'Basic/Makefile.in',
+    'FX/.gitignore',
+    'FX/Makefile.am',
+    'FX/Makefile.in',
+  ],
+)
diff --git a/data/environ/meson.build b/data/environ/meson.build
new file mode 100644
index 0000000..83fd2d8
--- /dev/null
+++ b/data/environ/meson.build
@@ -0,0 +1,3 @@
+install_data('default.env',
+  install_dir: join_paths(gimpplugindir, 'environ')
+)
\ No newline at end of file
diff --git a/data/gradients/meson.build b/data/gradients/meson.build
new file mode 100644
index 0000000..4a88574
--- /dev/null
+++ b/data/gradients/meson.build
@@ -0,0 +1,93 @@
+gradients = [
+  'Abstract_1.ggr',
+  'Abstract_2.ggr',
+  'Abstract_3.ggr',
+  'Aneurism.ggr',
+  'Blinds.ggr',
+  'Blue_Green.ggr',
+  'Browns.ggr',
+  'Brushed_Aluminium.ggr',
+  'Burning_Paper.ggr',
+  'Burning_Transparency.ggr',
+  'Caribbean_Blues.ggr',
+  'CD_Half.ggr',
+  'CD.ggr',
+  'Coffee.ggr',
+  'Cold_Steel_2.ggr',
+  'Cold_Steel.ggr',
+  'Crown_molding.ggr',
+  'Dark_1.ggr',
+  'Deep_Sea.ggr',
+  'Default.ggr',
+  'Flare_Glow_Angular_1.ggr',
+  'Flare_Glow_Radial_1.ggr',
+  'Flare_Glow_Radial_2.ggr',
+  'Flare_Glow_Radial_3.ggr',
+  'Flare_Glow_Radial_4.ggr',
+  'Flare_Radial_101.ggr',
+  'Flare_Radial_102.ggr',
+  'Flare_Radial_103.ggr',
+  'Flare_Rays_Radial_1.ggr',
+  'Flare_Rays_Radial_2.ggr',
+  'Flare_Rays_Size_1.ggr',
+  'Flare_Sizefac_101.ggr',
+  'Four_bars.ggr',
+  'Full_saturation_spectrum_CCW.ggr',
+  'Full_saturation_spectrum_CW.ggr',
+  'Golden.ggr',
+  'Greens.ggr',
+  'Horizon_1.ggr',
+  'Horizon_2.ggr',
+  'Incandescent.ggr',
+  'Land_1.ggr',
+  'Land_and_Sea.ggr',
+  'Metallic_Something.ggr',
+  'Nauseating_Headache.ggr',
+  'Neon_Cyan.ggr',
+  'Neon_Green.ggr',
+  'Neon_Yellow.ggr',
+  'Pastel_Rainbow.ggr',
+  'Pastels.ggr',
+  'Purples.ggr',
+  'Radial_Eyeball_Blue.ggr',
+  'Radial_Eyeball_Brown.ggr',
+  'Radial_Eyeball_Green.ggr',
+  'Radial_Glow_1.ggr',
+  'Radial_Rainbow_Hoop.ggr',
+  'Rounded_edge.ggr',
+  'Shadows_1.ggr',
+  'Shadows_2.ggr',
+  'Shadows_3.ggr',
+  'Skyline_polluted.ggr',
+  'Skyline.ggr',
+  'Square_Wood_Frame.ggr',
+  'Sunrise.ggr',
+  'Three_bars_sin.ggr',
+  'Tropical_Colors.ggr',
+  'Tube_Red.ggr',
+  'Wood_1.ggr',
+  'Wood_2.ggr',
+  'Yellow_Contrast.ggr',
+  'Yellow_Orange.ggr',
+]
+
+
+gradients_obsolete = [
+  'French_flag.ggr',
+  'French_flag_smooth.ggr',
+  'German_flag.ggr',
+  'German_flag_smooth.ggr',
+  'Mexican_flag.ggr',
+  'Mexican_flag_smooth.ggr',
+  'Romanian_flag.ggr',
+  'Romanian_flag_smooth.ggr',
+]
+
+install_data(
+  gradients,
+  install_dir: join_paths(gimpdatadir, 'gradients'),
+)
+install_data(
+  gradients_obsolete,
+  install_dir: join_paths(gimpdatadir, 'gradients', 'gimp-obsolete-files'),
+)
diff --git a/data/images/meson.build b/data/images/meson.build
new file mode 100644
index 0000000..2c03c04
--- /dev/null
+++ b/data/images/meson.build
@@ -0,0 +1,11 @@
+
+images = [
+  'gimp-splash.png',
+  'wilber.png',
+]
+images += stable ? 'gimp-logo.png' : 'gimp-devel-logo.png'
+
+install_data(
+  images,
+  install_dir: join_paths(gimpdatadir, 'images'),
+)
\ No newline at end of file
diff --git a/data/interpreters/meson.build b/data/interpreters/meson.build
new file mode 100644
index 0000000..34738ea
--- /dev/null
+++ b/data/interpreters/meson.build
@@ -0,0 +1,3 @@
+install_data('default.interp',
+  install_dir: join_paths(gimpplugindir, 'interpreters')
+)
\ No newline at end of file
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..1c31fad
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,11 @@
+subdir('brushes')
+subdir('dynamics')
+subdir('environ')
+subdir('gradients')
+subdir('images')
+subdir('interpreters')
+subdir('palettes')
+subdir('patterns')
+subdir('tags')
+subdir('tips')
+subdir('tool-presets')
diff --git a/data/palettes/meson.build b/data/palettes/meson.build
new file mode 100644
index 0000000..1c8861b
--- /dev/null
+++ b/data/palettes/meson.build
@@ -0,0 +1,47 @@
+
+palettes = [
+  'Bears.gpl',
+  'Bgold.gpl',
+  'Blues.gpl',
+  'Borders.gpl',
+  'Browns_And_Yellows.gpl',
+  'Caramel.gpl',
+  'Cascade.gpl',
+  'China.gpl',
+  'Coldfire.gpl',
+  'Cool_Colors.gpl',
+  'Cranes.gpl',
+  'Dark_pastels.gpl',
+  'Default.gpl',
+  'Ega.gpl',
+  'Firecode.gpl',
+  'Gold.gpl',
+  'Grayblue.gpl',
+  'Grays.gpl',
+  'GrayViolet.gpl',
+  'Greens.gpl',
+  'Hilite.gpl',
+  'Khaki.gpl',
+  'Lights.gpl',
+  'Muted.gpl',
+  'Named_Colors.gpl',
+  'News3.gpl',
+  'Op2.gpl',
+  'Paintjet.gpl',
+  'Pastels.gpl',
+  'Plasma.gpl',
+  'Reds.gpl',
+  'Reds_And_Purples.gpl',
+  'Royal.gpl',
+  'Tango.gpl',
+  'Topographic.gpl',
+  'Visibone.gpl',
+  'Visibone_2.gpl',
+  'Volcano.gpl',
+  'Warm_Colors.gpl',
+  'Web.gpl',
+]
+
+install_data(palettes,
+  install_dir: join_paths(gimpdatadir, 'palettes'),
+)
\ No newline at end of file
diff --git a/data/patterns/meson.build b/data/patterns/meson.build
new file mode 100644
index 0000000..29d11ce
--- /dev/null
+++ b/data/patterns/meson.build
@@ -0,0 +1,25 @@
+patterns_types = [
+  'Animal',
+  'Fabric',
+  'Food',
+  'Legacy',
+  'Paper',
+  'Plant',
+  'Sky',
+  'Stone',
+  'Water',
+  'Wood',
+]
+
+foreach patterns_type : patterns_types
+
+  install_subdir(patterns_type,
+    install_dir: join_paths(gimpdatadir, 'patterns'),
+    exclude_files: [
+      '.gitignore',
+      'Makefile.am',
+      'Makefile.in',
+    ],
+  )
+
+endforeach
diff --git a/data/tags/meson.build b/data/tags/meson.build
new file mode 100644
index 0000000..b6b4b6c
--- /dev/null
+++ b/data/tags/meson.build
@@ -0,0 +1,33 @@
+
+xmlfilename = 'gimp-tags-default.xml'
+
+gimp_tags_default = custom_target(xmlfilename,
+  input : [ xmlfilename+'.in', ],
+  output: [ xmlfilename, ],
+
+  command: [
+    intltool_merge,
+    potags_dir,
+    '@INPUT@',
+    '@OUTPUT@',
+    '--xml-style',
+    '--utf8',
+    '--cache='+join_paths('@OUTDIR@', 'intltool-merge-cache'),
+  ],
+  install: true,
+  install_dir: join_paths(gimpdatadir, 'tags'),
+)
+
+
+custom_target('validate-tags',
+  input : [ gimp_tags_default, ],
+  output: [ 'validate-tags' ],
+  command: [
+    xmllint,
+    '--noout',
+    '--path', meson.current_source_dir(),
+    '--valid', '@INPUT@',
+  ],
+  build_always: false,
+  build_by_default: false,
+)
diff --git a/data/tips/meson.build b/data/tips/meson.build
new file mode 100644
index 0000000..ac70d2d
--- /dev/null
+++ b/data/tips/meson.build
@@ -0,0 +1,48 @@
+
+xmlfilename = 'gimp-tips.xml'
+
+gimp_tips = custom_target(xmlfilename,
+  input : [ xmlfilename+'.in', ],
+  output: [ xmlfilename, ],
+
+  command: [
+    intltool_merge,
+    potips_dir,
+    '@INPUT@',
+    '@OUTPUT@',
+    '--xml-style',
+    '--utf8',
+    '--cache='+join_paths('@OUTDIR@', 'intltool-merge-cache'),
+  ],
+  install: true,
+  install_dir: join_paths(gimpdatadir, 'tips'),
+)
+
+
+custom_target('validate-tips',
+  input : [ gimp_tips, ],
+  output: [ 'validate-tips' ],
+  command: [
+    xmllint,
+    '--noout',
+    '--path', meson.current_source_dir(),
+    '--valid', '@INPUT@',
+  ],
+  build_always: false,
+  build_by_default: false,
+)
+
+custom_target('fortunes-tips',
+  input : [ gimp_tips, 'fortunes.xsl', ],
+  output: [ 'fortunes-tips' ],
+  command: [
+    xsltproc,
+    '--stringparam', 'lang', 'en',
+    '--path', meson.current_source_dir(),
+    '--output', '@OUTPUT@',
+    '@INPUT1@',
+    '@INPUT0@',
+  ],
+  build_always: false,
+  build_by_default: false,
+)
diff --git a/data/tool-presets/meson.build b/data/tool-presets/meson.build
new file mode 100644
index 0000000..4d29eaf
--- /dev/null
+++ b/data/tool-presets/meson.build
@@ -0,0 +1,20 @@
+tools_presets_types = [
+  'Crop',
+  'FX',
+  'Paint',
+  'Selection',
+  'Sketch',
+]
+
+foreach tools_presets_type : tools_presets_types
+
+  install_subdir(tools_presets_type,
+    install_dir: join_paths(gimpdatadir, 'tools-presets'),
+    exclude_files: [
+      '.gitignore',
+      'Makefile.am',
+      'Makefile.in',
+    ],
+  )
+
+endforeach
diff --git a/desktop/meson.build b/desktop/meson.build
new file mode 100644
index 0000000..c784506
--- /dev/null
+++ b/desktop/meson.build
@@ -0,0 +1,112 @@
+sizes = [
+  '16',
+  '22',
+  '24',
+  '32',
+  '48',
+  '64',
+  '256',
+]
+
+foreach size : sizes
+  sizedir = size+'x'+size
+  install_data(join_paths(sizedir, 'gimp.png'),
+    install_dir: join_paths(
+      get_option('datadir'), 'icons', 'hicolor', sizedir, 'apps'
+    )
+  )
+endforeach
+
+desktopfilename = 'gimp.desktop'
+
+desktop_conf = configuration_data()
+desktop_conf.set('GIMP_APP_VERSION', app_version)
+desktop_conf.set('GIMP_COMMAND', gimp_command)
+desktop_conf.set('GIMP_VERSION', gimp_version)
+desktop_conf.set('MIME_TYPES', ';'.join(MIMEtypes))
+
+desktopfilein = configure_file(
+  input : desktopfilename+'.in.in',
+  output: desktopfilename+'.in',
+  configuration: desktop_conf,
+)
+
+desktopfile = custom_target(desktopfilename,
+  input : [ desktopfilein, ],
+  output: [ desktopfilename, ],
+  command: [
+    intltool_merge,
+    po_dir,
+    '@INPUT@',
+    '@OUTPUT@',
+    '--desktop-style',
+    '--utf8',
+    '--cache='+join_paths('@OUTDIR@', 'intltool-merge-cache'),
+  ],
+  install: true,
+  install_dir: join_paths(get_option('datadir'), 'applications'),
+)
+
+appdatafilename = 'org.gimp.GIMP.appdata.xml'
+appdatafile = custom_target(appdatafilename,
+  input : [ appdatafilename+'.in.in', ],
+  output: [ appdatafilename, ],
+  command: [
+    intltool_merge,
+    po_dir,
+    '@INPUT@',
+    '@OUTPUT@',
+    '--xml-style',
+    '--utf8',
+    '--cache='+join_paths('@OUTDIR@', 'intltool-merge-cache'),
+  ],
+  install: true,
+  install_dir: join_paths(get_option('datadir'), 'appdata'),
+)
+
+metainfofilename = 'gimp-data-extras.metainfo.xml'
+metainfofile = custom_target(metainfofilename,
+  input : [ metainfofilename+'.in', ],
+  output: [ metainfofilename, ],
+  command: [
+    intltool_merge,
+    po_dir,
+    '@INPUT@',
+    '@OUTPUT@',
+    '--xml-style',
+    '--utf8',
+    '--cache='+join_paths('@OUTDIR@', 'intltool-merge-cache'),
+  ],
+  install: true,
+  install_dir: join_paths(get_option('datadir'), 'appdata'),
+)
+
+custom_target('validate-desktop',
+  input : [ desktopfile, ],
+  output: [ 'validate-desktop' ],
+  command: [
+    desktop_validate, '@INPUT@',
+  ],
+  build_always: false,
+  build_by_default: false,
+)
+
+if appstream_util.found()
+  test('appdata_file',
+    appstream_util,
+    args: [ 'validate-relax', appdatafile ],
+    env: [
+      'GIMP_TESTING_ABS_TOP_BUILDDIR=' + meson.build_root(),
+    ],
+    suite: 'desktop',
+  )
+
+  test('metainfo_file',
+    appstream_util,
+    args: [ 'validate-relax', metainfofile ],
+    env: [
+      'GIMP_TESTING_ABS_TOP_BUILDDIR=' + meson.build_root(),
+    ],
+    suite: 'desktop',
+  )
+endif
diff --git a/devel-docs/app/meson.build b/devel-docs/app/meson.build
new file mode 100644
index 0000000..f09f546
--- /dev/null
+++ b/devel-docs/app/meson.build
@@ -0,0 +1,42 @@
+module_name = 'app'
+
+version_data = configuration_data()
+version_data.set('GIMP_VERSION', gimp_version)
+configure_file(
+  input : 'version.in',
+  output: 'version',
+  configuration: version_data,
+)
+
+gnome.gtkdoc(module_name,
+  content_files: [],
+  dependencies: [
+    fontconfig, freetype2, gtk2, harfbuzz, pangocairo,
+  ],
+  fixxref_args:  [
+    '--extra-dir=' + join_paths(meson.current_build_dir(), '..', 'libgimpbase',    'html'),
+    '--extra-dir=' + join_paths(meson.current_build_dir(), '..', 'libgimpcolor',   'html'),
+    '--extra-dir=' + join_paths(meson.current_build_dir(), '..', 'libgimpconfig',  'html'),
+    '--extra-dir=' + join_paths(meson.current_build_dir(), '..', 'libgimpmath',    'html'),
+    '--extra-dir=' + join_paths(meson.current_build_dir(), '..', 'libgimpwidgets', 'html'),
+  ],
+  gobject_typesfile: join_paths(meson.current_source_dir(), module_name + '.types'),
+  scanobjs_args: [
+    '--cflags=-I'+ meson.source_root(),
+  ],
+  ignore_headers: [
+    'gimp-intl.h',
+    'gimpdbusservice-glue.h',
+    'gimphelp-ids.h',
+    'gimpimage-convert-data.h',
+    'gimpimage-convert-fsdither.h',
+    'gimprc-blurbs.h',
+  ],
+  html_assets: [],
+  html_args: [],
+  main_sgml: module_name + '-docs.sgml',
+  src_dir: join_paths(meson.source_root(), module_name),
+
+  install: true,
+  # install_dir: ,
+)
diff --git a/devel-docs/libgimp/meson.build b/devel-docs/libgimp/meson.build
new file mode 100644
index 0000000..72ee9e6
--- /dev/null
+++ b/devel-docs/libgimp/meson.build
@@ -0,0 +1,58 @@
+module_name = 'libgimp'
+
+version_data = configuration_data()
+version_data.set('GIMP_VERSION', gimp_version)
+configure_file(
+  input : 'version.in',
+  output: 'version',
+  configuration: version_data,
+)
+
+gimp_dep = declare_dependency(
+  include_directories: rootInclude,
+  link_with: [
+    libgimp,
+    libgimpui,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ]
+)
+
+gnome.gtkdoc(module_name,
+  main_sgml: module_name + '-docs.sgml',
+  gobject_typesfile: join_paths(meson.current_source_dir(), module_name + '.types'),
+  src_dir: join_paths(meson.source_root(), module_name),
+
+  content_files: [
+  ],
+  ignore_headers: [
+    'gimptilebackendplugin.h',
+    'gimpunit_pdb.h',
+    'gimpunitcache.h',
+    'libgimp-intl.h',
+    'stdplugins-intl.h',
+  ],
+
+  dependencies: [
+    fontconfig, freetype2, gtk2, harfbuzz, pangocairo,
+    gimp_dep,
+  ],
+  scanobjs_args: [
+  ],
+  scan_args: [
+    '--deprecated-guards=GIMP_DISABLE_DEPRECATED',
+  ],
+  mkdb_args: [
+    '--name-space=gimp',
+  ],
+  fixxref_args:  [
+  ],
+  html_assets: [
+  ],
+  html_args: [
+  ],
+)
diff --git a/devel-docs/libgimpbase/meson.build b/devel-docs/libgimpbase/meson.build
new file mode 100644
index 0000000..0eeed60
--- /dev/null
+++ b/devel-docs/libgimpbase/meson.build
@@ -0,0 +1,45 @@
+module_name = 'libgimpbase'
+
+version_data = configuration_data()
+version_data.set('GIMP_VERSION', gimp_version)
+configure_file(
+  input : 'version.in',
+  output: 'version',
+  configuration: version_data,
+)
+
+gnome.gtkdoc(module_name,
+  main_sgml: module_name + '-docs.sgml',
+  gobject_typesfile: join_paths(meson.current_source_dir(), module_name + '.types'),
+  src_dir: join_paths(meson.source_root(), module_name),
+
+  content_files: [
+  ],
+  ignore_headers: [
+    'gimpbase-private.h',
+    'gimpbase.h',
+    'gimpcompatenums.h',
+    'gimpprotocol.h',
+    'gimpreloc.h',
+    'gimpwin32-io.h',
+    'gimpwire.h',
+  ],
+
+  dependencies: [
+    fontconfig, freetype2, gtk2, harfbuzz, pangocairo,
+  ],
+  scanobjs_args: [
+  ],
+  scan_args: [
+    '--deprecated-guards=GIMP_DISABLE_DEPRECATED',
+  ],
+  mkdb_args: [
+    '--name-space=gimp',
+  ],
+  fixxref_args:  [
+  ],
+  html_assets: [
+  ],
+  html_args: [
+  ],
+)
diff --git a/devel-docs/libgimpcolor/meson.build b/devel-docs/libgimpcolor/meson.build
new file mode 100644
index 0000000..c5bf87f
--- /dev/null
+++ b/devel-docs/libgimpcolor/meson.build
@@ -0,0 +1,38 @@
+module_name = 'libgimpcolor'
+
+version_data = configuration_data()
+version_data.set('GIMP_VERSION', gimp_version)
+configure_file(
+  input : 'version.in',
+  output: 'version',
+  configuration: version_data,
+)
+
+gnome.gtkdoc(module_name,
+  main_sgml: module_name + '-docs.sgml',
+  gobject_typesfile: join_paths(meson.current_source_dir(), module_name + '.types'),
+  src_dir: join_paths(meson.source_root(), module_name),
+
+  content_files: [
+  ],
+  ignore_headers: [
+  ],
+
+  dependencies: [
+    fontconfig, freetype2, gtk2, harfbuzz, pangocairo,
+  ],
+  scanobjs_args: [
+  ],
+  scan_args: [
+    '--deprecated-guards=GIMP_DISABLE_DEPRECATED',
+  ],
+  mkdb_args: [
+    '--name-space=gimp',
+  ],
+  fixxref_args:  [
+  ],
+  html_assets: [
+  ],
+  html_args: [
+  ],
+)
diff --git a/devel-docs/libgimpconfig/meson.build b/devel-docs/libgimpconfig/meson.build
new file mode 100644
index 0000000..015f48b
--- /dev/null
+++ b/devel-docs/libgimpconfig/meson.build
@@ -0,0 +1,41 @@
+module_name = 'libgimpconfig'
+
+version_data = configuration_data()
+version_data.set('GIMP_VERSION', gimp_version)
+configure_file(
+  input : 'version.in',
+  output: 'version',
+  configuration: version_data,
+)
+
+gnome.gtkdoc(module_name,
+  main_sgml: module_name + '-docs.sgml',
+  gobject_typesfile: join_paths(meson.current_source_dir(), module_name + '.types'),
+  src_dir: join_paths(meson.source_root(), module_name),
+
+  content_files: [
+  ],
+  ignore_headers: [
+  ],
+
+  dependencies: [
+    fontconfig, freetype2, gtk2, harfbuzz, pangocairo,
+  ],
+  scanobjs_args: [
+  ],
+  scan_args: [
+    '--deprecated-guards=GIMP_DISABLE_DEPRECATED',
+  ],
+  mkdb_args: [
+    '--name-space=gimp',
+  ],
+  fixxref_args:  [
+    '--extra-dir='+ join_paths(meson.current_build_dir(), '..', 'libgimpbase',  'html'),
+    '--extra-dir='+ join_paths(meson.current_build_dir(), '..', 'libgimpcolor', 'html'),
+    '--extra-dir='+ join_paths(meson.current_build_dir(), '..', 'libgimpmath',  'html'),
+  ],
+  html_assets: [
+  ],
+  html_args: [
+  ],
+)
diff --git a/devel-docs/libgimpmath/meson.build b/devel-docs/libgimpmath/meson.build
new file mode 100644
index 0000000..5361d40
--- /dev/null
+++ b/devel-docs/libgimpmath/meson.build
@@ -0,0 +1,38 @@
+module_name = 'libgimpmath'
+
+version_data = configuration_data()
+version_data.set('GIMP_VERSION', gimp_version)
+configure_file(
+  input : 'version.in',
+  output: 'version',
+  configuration: version_data,
+)
+
+gnome.gtkdoc(module_name,
+  main_sgml: module_name + '-docs.sgml',
+  gobject_typesfile: join_paths(meson.current_source_dir(), module_name + '.types'),
+  src_dir: join_paths(meson.source_root(), module_name),
+
+  content_files: [
+  ],
+  ignore_headers: [
+  ],
+
+  dependencies: [
+    fontconfig, freetype2, gtk2, harfbuzz, pangocairo,
+  ],
+  scanobjs_args: [
+  ],
+  scan_args: [
+    '--deprecated-guards=GIMP_DISABLE_DEPRECATED',
+  ],
+  mkdb_args: [
+    '--name-space=gimp',
+  ],
+  fixxref_args:  [
+  ],
+  html_assets: [
+  ],
+  html_args: [
+  ],
+)
diff --git a/devel-docs/libgimpmodule/meson.build b/devel-docs/libgimpmodule/meson.build
new file mode 100644
index 0000000..4ac636b
--- /dev/null
+++ b/devel-docs/libgimpmodule/meson.build
@@ -0,0 +1,38 @@
+module_name = 'libgimpmodule'
+
+version_data = configuration_data()
+version_data.set('GIMP_VERSION', gimp_version)
+configure_file(
+  input : 'version.in',
+  output: 'version',
+  configuration: version_data,
+)
+
+gnome.gtkdoc(module_name,
+  main_sgml: module_name + '-docs.sgml',
+  gobject_typesfile: join_paths(meson.current_source_dir(), module_name + '.types'),
+  src_dir: join_paths(meson.source_root(), module_name),
+
+  content_files: [
+  ],
+  ignore_headers: [
+  ],
+
+  dependencies: [
+    fontconfig, freetype2, gtk2, harfbuzz, pangocairo,
+  ],
+  scanobjs_args: [
+  ],
+  scan_args: [
+    '--deprecated-guards=GIMP_DISABLE_DEPRECATED',
+  ],
+  mkdb_args: [
+    '--name-space=gimp',
+  ],
+  fixxref_args:  [
+  ],
+  html_assets: [
+  ],
+  html_args: [
+  ],
+)
diff --git a/devel-docs/libgimpthumb/meson.build b/devel-docs/libgimpthumb/meson.build
new file mode 100644
index 0000000..f25ae75
--- /dev/null
+++ b/devel-docs/libgimpthumb/meson.build
@@ -0,0 +1,40 @@
+module_name = 'libgimpthumb'
+
+version_data = configuration_data()
+version_data.set('GIMP_VERSION', gimp_version)
+configure_file(
+  input : 'version.in',
+  output: 'version',
+  configuration: version_data,
+)
+
+gnome.gtkdoc(module_name,
+  main_sgml: module_name + '-docs.sgml',
+  gobject_typesfile: join_paths(meson.current_source_dir(), module_name + '.types'),
+  src_dir: join_paths(meson.source_root(), module_name),
+
+  content_files: [
+  ],
+  ignore_headers: [
+    'libgimpthumb.h',
+  ],
+
+  dependencies: [
+    fontconfig, freetype2, gtk2, harfbuzz, pangocairo,
+  ],
+  scanobjs_args: [
+  ],
+  scan_args: [
+    '--deprecated-guards=GIMP_DISABLE_DEPRECATED',
+  ],
+  mkdb_args: [
+    '--name-space=gimp',
+  ],
+  fixxref_args:  [
+    '--extra-dir='+ join_paths(meson.current_build_dir(), '..', 'libgimpmath',  'html'),
+  ],
+  html_assets: [
+  ],
+  html_args: [
+  ],
+)
diff --git a/devel-docs/libgimpwidgets/meson.build b/devel-docs/libgimpwidgets/meson.build
new file mode 100644
index 0000000..3f23f35
--- /dev/null
+++ b/devel-docs/libgimpwidgets/meson.build
@@ -0,0 +1,61 @@
+module_name = 'libgimpwidgets'
+
+version_data = configuration_data()
+version_data.set('GIMP_VERSION', gimp_version)
+configure_file(
+  input : 'version.in',
+  output: 'version',
+  configuration: version_data,
+)
+
+gnome.gtkdoc(module_name,
+  main_sgml: module_name + '-docs.sgml',
+  gobject_typesfile: join_paths(meson.current_source_dir(), module_name + '.types'),
+  src_dir: join_paths(meson.source_root(), module_name),
+
+  content_files: [
+    'visual-index.html'
+  ],
+  ignore_headers: [
+    'gimpcolorprofilestore-private.h',
+    'gimpeevl.h',
+    'gimpwidgets-private.h',
+  ],
+
+  dependencies: [
+    fontconfig, freetype2, gtk2, harfbuzz, pangocairo,
+  ],
+  scanobjs_args: [
+    '--type-init-func="do { void babl_init (void); babl_init (); } while (0)"',
+  ],
+  scan_args: [
+    '--deprecated-guards=GIMP_DISABLE_DEPRECATED',
+  ],
+  mkdb_args: [
+    '--name-space=gimp',
+  ],
+  fixxref_args:  [
+    '--extra-dir='+ join_paths(meson.current_build_dir(), '..', 'libgimp',      'html'),
+    '--extra-dir='+ join_paths(meson.current_build_dir(), '..', 'libgimpbase',  'html'),
+    '--extra-dir='+ join_paths(meson.current_build_dir(), '..', 'libgimpcolor', 'html'),
+    '--extra-dir='+ join_paths(meson.current_build_dir(), '..', 'libgimpconfig','html'),
+    '--extra-dir='+ join_paths(meson.current_build_dir(), '..', 'libgimpmath',  'html'),
+  ],
+  html_assets: [
+    # '$(top_srcdir)/icons/Color/12/gimp-*.png',
+    # '$(top_srcdir)/icons/Color/16/gimp-*.png',
+    # '$(top_srcdir)/icons/Color/18/gimp-*.png',
+    # '$(top_srcdir)/icons/Color/20/gimp-*.png',
+    # '$(top_srcdir)/icons/Color/22/gimp-*.png',
+    # '$(top_srcdir)/icons/Color/24/gimp-*.png',
+    # '$(top_srcdir)/icons/Color/32/gimp-*.png',
+    # '$(top_srcdir)/icons/Color/48/gimp-*.png',
+    # '$(top_srcdir)/icons/Color/64/gimp-*.png',
+    # '$(top_srcdir)/icons/Color/128/gimp-*.png',
+    # '$(top_srcdir)/icons/Color/192/gimp-*.png',
+    # '$(top_srcdir)/icons/Color/256/gimp-*.png',
+    # '$(srcdir)/images/gimp-widget-*.png',
+  ],
+  html_args: [
+  ],
+)
diff --git a/devel-docs/meson.build b/devel-docs/meson.build
new file mode 100644
index 0000000..9afbab7
--- /dev/null
+++ b/devel-docs/meson.build
@@ -0,0 +1,12 @@
+if gtkdoc_scan.found()
+  # subdir('app')
+  # subdir('libgimp')
+  # subdir('libgimpbase')
+  # subdir('libgimpcolor')
+  # subdir('libgimpconfig')
+  # subdir('libgimpmath')
+  # subdir('libgimpmodule')
+  # subdir('libgimpthumb')
+  # subdir('libgimpwidgets')
+  subdir('tools')
+endif
diff --git a/devel-docs/tools/meson.build b/devel-docs/tools/meson.build
new file mode 100644
index 0000000..5e58c54
--- /dev/null
+++ b/devel-docs/tools/meson.build
@@ -0,0 +1,30 @@
+if have_doc_shooter
+
+doc_shooter_sources = [
+  'shadow.c',
+  'shooter.c',
+  'units.c',
+  'widgets.c',
+]
+
+doc_shooter = executable('doc-shooter',
+  doc_shooter_sources,
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gdk_pixbuf, gegl, math, x11, xext,
+  ],
+  c_args: [
+    '-DTOP_SRCDIR="' + meson.source_root() + '"',
+  ],
+  link_with: [
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpmodule,
+    libgimpwidgets,
+  ],
+  install: false,
+)
+
+endif
diff --git a/docs/meson.build b/docs/meson.build
new file mode 100644
index 0000000..134184e
--- /dev/null
+++ b/docs/meson.build
@@ -0,0 +1,62 @@
+
+# Configure_file is just here to rename the files
+manconf = configuration_data()
+manconf.set('GIMP_VERSION',   gimp_version)
+manconf.set('gimpdatadir',    join_paths(prefix, gimpdatadir))
+manconf.set('gimplocaledir',  join_paths(prefix, localedir))
+manconf.set('gimpplugindir',  join_paths(prefix, gimpplugindir))
+manconf.set('manpage_gimpdir', '\fB$XDG_CONFIG_HOME\fP/' + join_paths(gimpdir, user_version))
+manconf.set('gimpsysconfdir', gimpsysconfdir)
+
+
+man_files = [
+  configure_file(
+    input : 'gimptool.1.in',
+    output: 'gimptool-' + api_version + '.1',
+    configuration: manconf,
+  ),
+  configure_file(
+    input : 'gimptool.1.in',
+    output: 'gimptool.1',
+    configuration: manconf,
+  ),
+
+  configure_file(
+    input : 'gimprc.5.in',
+    output: 'gimprc-' + app_version + '.5',
+    configuration: manconf,
+  ),
+  configure_file(
+    input : 'gimprc.5.in',
+    output: 'gimprc.5',
+    configuration: manconf,
+  ),
+]
+
+if enable_console_bin
+  man_files += configure_file(
+    input : 'gimp.1.in',
+    output: 'gimp-console-' + app_version + '.1',
+    configuration: manconf,
+  )
+  man_files += configure_file(
+    input : 'gimp.1.in',
+    output: 'gimp-console.1',
+    configuration: manconf,
+  )
+endif
+
+if enable_default_bin
+  man_files +=  configure_file(
+    input : 'gimp.1.in',
+    output: 'gimp-' + app_version + '.1',
+    configuration: manconf,
+  )
+  man_files +=  configure_file(
+    input : 'gimp.1.in',
+    output: 'gimp.1',
+    configuration: manconf,
+  )
+endif
+
+install_man(man_files)
diff --git a/etc/meson.build b/etc/meson.build
new file mode 100644
index 0000000..fb21c5a
--- /dev/null
+++ b/etc/meson.build
@@ -0,0 +1,12 @@
+install_data(
+  [
+    'controllerrc',
+    'gimprc',
+    'gtkrc',
+    'menurc',
+    'sessionrc',
+    'templaterc',
+    'unitrc',
+  ],
+  install_dir: gimpsysconfdir,
+)
diff --git a/icons/Color/meson.build b/icons/Color/meson.build
new file mode 100644
index 0000000..c11d083
--- /dev/null
+++ b/icons/Color/meson.build
@@ -0,0 +1,59 @@
+
+install_data('index.theme',
+  install_dir: join_paths(gimpiconsdir, theme)
+)
+
+foreach icon_info : all_icons
+  icons_dir = icon_info[0]
+  icons_list= icon_info[1]
+  install_data(icons_list,
+    install_dir: join_paths(gimpiconsdir, theme, icons_dir, 'apps')
+  )
+endforeach
+
+
+icons_core = [ '64/gimp-question.png', ]
+icons_imgs = [ '64/gimp-wilber-eek.png', ]
+
+resourcename = 'gimp-core-pixbufs'
+xml_content  = '<?xml version="1.0" encoding="UTF-8"?>\n'
+xml_content += '<gresources>\n'
+xml_content += '  <gresource prefix="/org/gimp/icons">\n'
+foreach file : icons_core
+  xml_content+='    <file preprocess="to-pixdata">'+ file +'</file>\n'
+endforeach
+xml_content += '  </gresource>\n'
+xml_content += '</gresources>\n'
+
+xml_file = configure_file(
+  output: resourcename + '.gresource.xml',
+  command: [ 'echo', xml_content ],
+  capture: true,
+)
+icons_core_sources = gnome.compile_resources(
+  resourcename,
+  xml_file,
+  c_name: resourcename.underscorify(),
+)
+
+
+resourcename = 'gimp-icon-pixbufs'
+xml_content  = '<?xml version="1.0" encoding="UTF-8"?>\n'
+xml_content += '<gresources>\n'
+xml_content += '  <gresource prefix="/org/gimp/icons">\n'
+foreach file : icons_imgs
+  xml_content+='    <file preprocess="to-pixdata">'+ file +'</file>\n'
+endforeach
+xml_content += '  </gresource>\n'
+xml_content += '</gresources>\n'
+
+xml_file = configure_file(
+  output: resourcename + '.gresource.xml',
+  command: [ 'echo', xml_content ],
+  capture: true,
+)
+icons_imgs_sources = gnome.compile_resources(
+  resourcename,
+  xml_file,
+  c_name: resourcename.underscorify(),
+)
diff --git a/icons/Legacy/meson.build b/icons/Legacy/meson.build
new file mode 100644
index 0000000..43afa81
--- /dev/null
+++ b/icons/Legacy/meson.build
@@ -0,0 +1,556 @@
+
+install_data('index.theme',
+  install_dir: join_paths(gimpiconsdir, theme)
+)
+
+legacy_icons_12 = [
+  '12/gimp-close.png',
+  '12/gimp-default-colors.png',
+  '12/gimp-linked.png',
+  '12/gimp-menu-left.png',
+  '12/gimp-menu-right.png',
+  '12/gimp-quick-mask-off.png',
+  '12/gimp-quick-mask-on.png',
+  '12/gimp-swap-colors.png',
+  '12/gimp-visible.png',
+  '12/gimp-zoom-follow-window.png',
+]
+legacy_icons_16 = [
+  '16/gimp-anchor.png',
+  '16/gimp-cap-butt.png',
+  '16/gimp-cap-round.png',
+  '16/gimp-cap-square.png',
+  '16/gimp-center.png',
+  '16/gimp-channel-alpha.png',
+  '16/gimp-channel-blue.png',
+  '16/gimp-channel-gray.png',
+  '16/gimp-channel-green.png',
+  '16/gimp-channel-indexed.png',
+  '16/gimp-channel-red.png',
+  '16/gimp-channel.png',
+  '16/gimp-channels.png',
+  '16/gimp-color-pick-from-screen.png',
+  '16/gimp-color-triangle.png',
+  '16/gimp-colormap.png',
+  '16/gimp-controller-keyboard.png',
+  '16/gimp-controller-linux-input.png',
+  '16/gimp-controller-midi.png',
+  '16/gimp-controller-wheel.png',
+  '16/gimp-controller.png',
+  '16/gimp-convert-grayscale.png',
+  '16/gimp-convert-indexed.png',
+  '16/gimp-convert-rgb.png',
+  '16/gimp-cursor.png',
+  '16/gimp-curve-free.png',
+  '16/gimp-curve-smooth.png',
+  '16/gimp-device-status.png',
+  '16/gimp-display-filter-colorblind.png',
+  '16/gimp-display-filter-contrast.png',
+  '16/gimp-display-filter-gamma.png',
+  '16/gimp-display-filter-lcms.png',
+  '16/gimp-display-filter-proof.png',
+  '16/gimp-display-filter.png',
+  '16/gimp-duplicate.png',
+  '16/gimp-dynamics.png',
+  '16/gimp-flip-horizontal.png',
+  '16/gimp-flip-vertical.png',
+  '16/gimp-floating-selection.png',
+  '16/gimp-gegl.png',
+  '16/gimp-gradient-bilinear.png',
+  '16/gimp-gradient-conical-asymmetric.png',
+  '16/gimp-gradient-conical-symmetric.png',
+  '16/gimp-gradient-linear.png',
+  '16/gimp-gradient-radial.png',
+  '16/gimp-gradient-shapeburst-angular.png',
+  '16/gimp-gradient-shapeburst-dimpled.png',
+  '16/gimp-gradient-shapeburst-spherical.png',
+  '16/gimp-gradient-spiral-anticlockwise.png',
+  '16/gimp-gradient-spiral-clockwise.png',
+  '16/gimp-gradient-square.png',
+  '16/gimp-grid.png',
+  '16/gimp-histogram-linear.png',
+  '16/gimp-histogram-logarithmic.png',
+  '16/gimp-histogram.png',
+  '16/gimp-image.png',
+  '16/gimp-images.png',
+  '16/gimp-info.png',
+  '16/gimp-input-device.png',
+  '16/gimp-invert.png',
+  '16/gimp-join-bevel.png',
+  '16/gimp-join-miter.png',
+  '16/gimp-join-round.png',
+  '16/gimp-landscape.png',
+  '16/gimp-layer-mask.png',
+  '16/gimp-layer-to-imagesize.png',
+  '16/gimp-layer.png',
+  '16/gimp-layers.png',
+  '16/gimp-list.png',
+  '16/gimp-merge-down.png',
+  '16/gimp-move-to-screen.png',
+  '16/gimp-navigation.png',
+  '16/gimp-paste-as-new.png',
+  '16/gimp-paste-into.png',
+  '16/gimp-path-stroke.png',
+  '16/gimp-path.png',
+  '16/gimp-paths.png',
+  '16/gimp-plugin.png',
+  '16/gimp-portrait.png',
+  '16/gimp-prefs-folders-brushes.png',
+  '16/gimp-prefs-folders-dynamics.png',
+  '16/gimp-prefs-folders-environ.png',
+  '16/gimp-prefs-folders-fonts.png',
+  '16/gimp-prefs-folders-gradients.png',
+  '16/gimp-prefs-folders-icon-themes.png',
+  '16/gimp-prefs-folders-interp.png',
+  '16/gimp-prefs-folders-modules.png',
+  '16/gimp-prefs-folders-palettes.png',
+  '16/gimp-prefs-folders-patterns.png',
+  '16/gimp-prefs-folders-plug-ins.png',
+  '16/gimp-prefs-folders-scripts.png',
+  '16/gimp-prefs-folders-themes.png',
+  '16/gimp-prefs-folders-tool-plug-ins.png',
+  '16/gimp-prefs-folders-tool-presets.png',
+  '16/gimp-prefs-folders-tools.png',
+  '16/gimp-prefs-icon-theme.png',
+  '16/gimp-prefs-image-windows.png',
+  '16/gimp-prefs-interface.png',
+  '16/gimp-prefs-theme.png',
+  '16/gimp-prefs-toolbox.png',
+  '16/gimp-prefs-window-management.png',
+  '16/gimp-print-resolution.png',
+  '16/gimp-reset.png',
+  '16/gimp-reshow-filter.png',
+  '16/gimp-resize.png',
+  '16/gimp-rotate-180.png',
+  '16/gimp-rotate-270.png',
+  '16/gimp-rotate-90.png',
+  '16/gimp-sample-point.png',
+  '16/gimp-scale.png',
+  '16/gimp-selection-add.png',
+  '16/gimp-selection-all.png',
+  '16/gimp-selection-border.png',
+  '16/gimp-selection-grow.png',
+  '16/gimp-selection-intersect.png',
+  '16/gimp-selection-none.png',
+  '16/gimp-selection-replace.png',
+  '16/gimp-selection-shrink.png',
+  '16/gimp-selection-stroke.png',
+  '16/gimp-selection-subtract.png',
+  '16/gimp-selection-to-channel.png',
+  '16/gimp-selection-to-path.png',
+  '16/gimp-selection.png',
+  '16/gimp-shape-circle.png',
+  '16/gimp-shape-diamond.png',
+  '16/gimp-shape-square.png',
+  '16/gimp-template.png',
+  '16/gimp-text-layer.png',
+  '16/gimp-toilet-paper.png',
+  '16/gimp-tool-airbrush.png',
+  '16/gimp-tool-align.png',
+  '16/gimp-tool-blend.png',
+  '16/gimp-tool-blur.png',
+  '16/gimp-tool-brightness-contrast.png',
+  '16/gimp-tool-bucket-fill.png',
+  '16/gimp-tool-by-color-select.png',
+  '16/gimp-tool-cage.png',
+  '16/gimp-tool-clone.png',
+  '16/gimp-tool-color-balance.png',
+  '16/gimp-tool-color-picker.png',
+  '16/gimp-tool-colorize.png',
+  '16/gimp-tool-crop.png',
+  '16/gimp-tool-curves.png',
+  '16/gimp-tool-desaturate.png',
+  '16/gimp-tool-dodge.png',
+  '16/gimp-tool-ellipse-select.png',
+  '16/gimp-tool-eraser.png',
+  '16/gimp-tool-flip.png',
+  '16/gimp-tool-foreground-select.png',
+  '16/gimp-tool-free-select.png',
+  '16/gimp-tool-fuzzy-select.png',
+  '16/gimp-tool-handle-transform.png',
+  '16/gimp-tool-heal.png',
+  '16/gimp-tool-hue-saturation.png',
+  '16/gimp-tool-ink.png',
+  '16/gimp-tool-iscissors.png',
+  '16/gimp-tool-levels.png',
+  '16/gimp-tool-measure.png',
+  '16/gimp-tool-move.png',
+  '16/gimp-tool-mypaint-brush.png',
+  '16/gimp-tool-n-point-deformation.png',
+  '16/gimp-tool-options.png',
+  '16/gimp-tool-paintbrush.png',
+  '16/gimp-tool-path.png',
+  '16/gimp-tool-pencil.png',
+  '16/gimp-tool-perspective-clone.png',
+  '16/gimp-tool-perspective.png',
+  '16/gimp-tool-posterize.png',
+  '16/gimp-tool-preset.png',
+  '16/gimp-tool-rect-select.png',
+  '16/gimp-tool-rotate.png',
+  '16/gimp-tool-scale.png',
+  '16/gimp-tool-seamless-clone.png',
+  '16/gimp-tool-shear.png',
+  '16/gimp-tool-smudge.png',
+  '16/gimp-tool-text.png',
+  '16/gimp-tool-threshold.png',
+  '16/gimp-tool-unified-transform.png',
+  '16/gimp-tool-warp.png',
+  '16/gimp-tool-zoom.png',
+  '16/gimp-tools.png',
+  '16/gimp-transparency.png',
+  '16/gimp-undo-history.png',
+  '16/gimp-user-manual.png',
+  '16/gimp-video.png',
+  '16/gimp-warning.png',
+  '16/gimp-web.png',
+  '16/gimp-wilber.png',
+  '16/gtk-edit.png',
+]
+legacy_icons_18 = [
+  '18/gimp-color-picker-black.png',
+  '18/gimp-color-picker-gray.png',
+  '18/gimp-color-picker-white.png',
+]
+legacy_icons_20 = [
+  '20/gimp-linked.png',
+  '20/gimp-visible.png',
+]
+legacy_icons_22 = [
+  '22/gimp-char-picker.png',
+  '22/gimp-dynamics.png',
+  '22/gimp-histogram.png',
+  '22/gimp-input-device.png',
+  '22/gimp-letter-spacing.png',
+  '22/gimp-line-spacing.png',
+  '22/gimp-path.png',
+  '22/gimp-paths.png',
+  '22/gimp-prefs-color-management.png',
+  '22/gimp-prefs-controllers.png',
+  '22/gimp-prefs-default-grid.png',
+  '22/gimp-prefs-display.png',
+  '22/gimp-prefs-folders-brushes.png',
+  '22/gimp-prefs-folders-dynamics.png',
+  '22/gimp-prefs-folders-environ.png',
+  '22/gimp-prefs-folders-fonts.png',
+  '22/gimp-prefs-folders-gradients.png',
+  '22/gimp-prefs-folders-icon-themes.png',
+  '22/gimp-prefs-folders-interp.png',
+  '22/gimp-prefs-folders-modules.png',
+  '22/gimp-prefs-folders-palettes.png',
+  '22/gimp-prefs-folders-patterns.png',
+  '22/gimp-prefs-folders-plug-ins.png',
+  '22/gimp-prefs-folders-scripts.png',
+  '22/gimp-prefs-folders-themes.png',
+  '22/gimp-prefs-folders-tool-plug-ins.png',
+  '22/gimp-prefs-folders-tool-presets.png',
+  '22/gimp-prefs-folders-tools.png',
+  '22/gimp-prefs-folders.png',
+  '22/gimp-prefs-help-system.png',
+  '22/gimp-prefs-icon-theme.png',
+  '22/gimp-prefs-image-title.png',
+  '22/gimp-prefs-image-windows.png',
+  '22/gimp-prefs-input-devices.png',
+  '22/gimp-prefs-interface.png',
+  '22/gimp-prefs-new-image.png',
+  '22/gimp-prefs-playground.png',
+  '22/gimp-prefs-session.png',
+  '22/gimp-prefs-system-resources.png',
+  '22/gimp-prefs-theme.png',
+  '22/gimp-prefs-tool-options.png',
+  '22/gimp-prefs-toolbox.png',
+  '22/gimp-prefs-window-management.png',
+  '22/gimp-tool-preset.png',
+  '22/gimp-wilber.png',
+]
+legacy_tools_22 = [
+  '22/gimp-gegl.png',
+  '22/gimp-tool-airbrush.png',
+  '22/gimp-tool-align.png',
+  '22/gimp-tool-blend.png',
+  '22/gimp-tool-blur.png',
+  '22/gimp-tool-brightness-contrast.png',
+  '22/gimp-tool-bucket-fill.png',
+  '22/gimp-tool-by-color-select.png',
+  '22/gimp-tool-cage.png',
+  '22/gimp-tool-clone.png',
+  '22/gimp-tool-color-balance.png',
+  '22/gimp-tool-color-picker.png',
+  '22/gimp-tool-colorize.png',
+  '22/gimp-tool-crop.png',
+  '22/gimp-tool-curves.png',
+  '22/gimp-tool-desaturate.png',
+  '22/gimp-tool-dodge.png',
+  '22/gimp-tool-ellipse-select.png',
+  '22/gimp-tool-eraser.png',
+  '22/gimp-tool-flip.png',
+  '22/gimp-tool-foreground-select.png',
+  '22/gimp-tool-free-select.png',
+  '22/gimp-tool-fuzzy-select.png',
+  '22/gimp-tool-handle-transform.png',
+  '22/gimp-tool-heal.png',
+  '22/gimp-tool-hue-saturation.png',
+  '22/gimp-tool-ink.png',
+  '22/gimp-tool-iscissors.png',
+  '22/gimp-tool-levels.png',
+  '22/gimp-tool-measure.png',
+  '22/gimp-tool-move.png',
+  '22/gimp-tool-mypaint-brush.png',
+  '22/gimp-tool-n-point-deformation.png',
+  '22/gimp-tool-paintbrush.png',
+  '22/gimp-tool-path.png',
+  '22/gimp-tool-pencil.png',
+  '22/gimp-tool-perspective-clone.png',
+  '22/gimp-tool-perspective.png',
+  '22/gimp-tool-posterize.png',
+  '22/gimp-tool-rect-select.png',
+  '22/gimp-tool-rotate.png',
+  '22/gimp-tool-scale.png',
+  '22/gimp-tool-seamless-clone.png',
+  '22/gimp-tool-shear.png',
+  '22/gimp-tool-smudge.png',
+  '22/gimp-tool-text.png',
+  '22/gimp-tool-threshold.png',
+  '22/gimp-tool-unified-transform.png',
+  '22/gimp-tool-warp.png',
+  '22/gimp-tool-zoom.png',
+]
+legacy_icons_24 = [
+  '24/gimp-center.png',
+  '24/gimp-channel-alpha.png',
+  '24/gimp-channel-blue.png',
+  '24/gimp-channel-gray.png',
+  '24/gimp-channel-green.png',
+  '24/gimp-channel-indexed.png',
+  '24/gimp-channel-red.png',
+  '24/gimp-channel.png',
+  '24/gimp-channels.png',
+  '24/gimp-colormap.png',
+  '24/gimp-controller-keyboard.png',
+  '24/gimp-controller-linux-input.png',
+  '24/gimp-controller-midi.png',
+  '24/gimp-controller-wheel.png',
+  '24/gimp-controller.png',
+  '24/gimp-cursor.png',
+  '24/gimp-device-status.png',
+  '24/gimp-display-filter-colorblind.png',
+  '24/gimp-display-filter-contrast.png',
+  '24/gimp-display-filter-gamma.png',
+  '24/gimp-display-filter-lcms.png',
+  '24/gimp-display-filter-proof.png',
+  '24/gimp-display-filter.png',
+  '24/gimp-floating-selection.png',
+  '24/gimp-gravity-east.png',
+  '24/gimp-gravity-north-east.png',
+  '24/gimp-gravity-north-west.png',
+  '24/gimp-gravity-north.png',
+  '24/gimp-gravity-south-east.png',
+  '24/gimp-gravity-south-west.png',
+  '24/gimp-gravity-south.png',
+  '24/gimp-gravity-west.png',
+  '24/gimp-hcenter.png',
+  '24/gimp-hchain-broken.png',
+  '24/gimp-hchain.png',
+  '24/gimp-hfill.png',
+  '24/gimp-image.png',
+  '24/gimp-images.png',
+  '24/gimp-info.png',
+  '24/gimp-layer-mask.png',
+  '24/gimp-layer.png',
+  '24/gimp-layers.png',
+  '24/gimp-move-to-screen.png',
+  '24/gimp-print-resolution.png',
+  '24/gimp-sample-point.png',
+  '24/gimp-template.png',
+  '24/gimp-text-dir-ltr.png',
+  '24/gimp-text-dir-rtl.png',
+  '24/gimp-text-layer.png',
+  '24/gimp-toilet-paper.png',
+  '24/gimp-tool-options.png',
+  '24/gimp-tools.png',
+  '24/gimp-transparency.png',
+  '24/gimp-undo-history.png',
+  '24/gimp-user-manual.png',
+  '24/gimp-vcenter.png',
+  '24/gimp-vchain-broken.png',
+  '24/gimp-vchain.png',
+  '24/gimp-vfill.png',
+  '24/gimp-video.png',
+  '24/gimp-warning.png',
+  '24/gimp-web.png',
+]
+legacy_icons_32 = [
+  '32/gimp-channel-alpha.png',
+  '32/gimp-channel-blue.png',
+  '32/gimp-channel-gray.png',
+  '32/gimp-channel-green.png',
+  '32/gimp-channel-indexed.png',
+  '32/gimp-channel-red.png',
+  '32/gimp-channel.png',
+  '32/gimp-floating-selection.png',
+  '32/gimp-image.png',
+  '32/gimp-layer-mask.png',
+  '32/gimp-layer.png',
+  '32/gimp-text-layer.png',
+  '32/gimp-user-manual.png',
+  '32/gimp-wilber.png',
+]
+legacy_icons_48 = [
+  '48/gimp-channel-alpha.png',
+  '48/gimp-channel-blue.png',
+  '48/gimp-channel-gray.png',
+  '48/gimp-channel-green.png',
+  '48/gimp-channel-indexed.png',
+  '48/gimp-channel-red.png',
+  '48/gimp-channel.png',
+  '48/gimp-floating-selection.png',
+  '48/gimp-image.png',
+  '48/gimp-layer-mask.png',
+  '48/gimp-layer.png',
+  '48/gimp-prefs-color-management.png',
+  '48/gimp-prefs-controllers.png',
+  '48/gimp-prefs-default-comment.png',
+  '48/gimp-prefs-default-grid.png',
+  '48/gimp-prefs-display.png',
+  '48/gimp-prefs-folders-brushes.png',
+  '48/gimp-prefs-folders-dynamics.png',
+  '48/gimp-prefs-folders-environ.png',
+  '48/gimp-prefs-folders-fonts.png',
+  '48/gimp-prefs-folders-gradients.png',
+  '48/gimp-prefs-folders-icon-themes.png',
+  '48/gimp-prefs-folders-interp.png',
+  '48/gimp-prefs-folders-modules.png',
+  '48/gimp-prefs-folders-palettes.png',
+  '48/gimp-prefs-folders-patterns.png',
+  '48/gimp-prefs-folders-plug-ins.png',
+  '48/gimp-prefs-folders-scripts.png',
+  '48/gimp-prefs-folders-themes.png',
+  '48/gimp-prefs-folders-tool-plug-ins.png',
+  '48/gimp-prefs-folders-tool-presets.png',
+  '48/gimp-prefs-folders-tools.png',
+  '48/gimp-prefs-folders.png',
+  '48/gimp-prefs-help-system.png',
+  '48/gimp-prefs-icon-theme.png',
+  '48/gimp-prefs-image-title.png',
+  '48/gimp-prefs-image-windows.png',
+  '48/gimp-prefs-input-devices.png',
+  '48/gimp-prefs-interface.png',
+  '48/gimp-prefs-new-image.png',
+  '48/gimp-prefs-playground.png',
+  '48/gimp-prefs-session.png',
+  '48/gimp-prefs-system-resources.png',
+  '48/gimp-prefs-theme.png',
+  '48/gimp-prefs-tool-options.png',
+  '48/gimp-prefs-toolbox.png',
+  '48/gimp-prefs-window-management.png',
+  '48/gimp-text-layer.png',
+  '48/gimp-wilber.png',
+]
+legacy_icons_64 = [
+  '64/gimp-error.png',
+  '64/gimp-frame.png',
+  '64/gimp-info.png',
+  '64/gimp-question.png',
+  '64/gimp-texture.png',
+  '64/gimp-user-manual.png',
+  '64/gimp-warning.png',
+  '64/gimp-wilber-eek.png',
+  '64/gimp-wilber-outline.png',
+  '64/gimp-wilber.png',
+]
+legacy_icons_96 = [
+  '96/gimp-wilber-outline.png',
+  '96/gimp-wilber.png',
+]
+legacy_icons_128 = [
+  '128/gimp-wilber-outline.png',
+  '128/gimp-wilber.png',
+]
+legacy_icons_192 = [
+  '192/gimp-wilber-outline.png',
+  '192/gimp-wilber.png',
+]
+legacy_icons_256 = [
+  '256/gimp-wilber-outline.png',
+  '256/gimp-wilber.png',
+]
+
+all_legacy_icons = [
+  [ '12x12',    legacy_icons_12 ],
+  [ '16x16',    legacy_icons_16 ],
+  [ '18x18',    legacy_icons_18 ],
+  [ '20x20',    legacy_icons_20 ],
+  [ '22x22',    legacy_icons_22 ],
+  [ '24x24',    legacy_icons_24 ],
+  [ '32x32',    legacy_icons_32 ],
+  [ '48x48',    legacy_icons_48 ],
+  [ '64x64',    legacy_icons_64 ],
+  [ '96x96',    legacy_icons_96 ],
+  [ '128x128',  legacy_icons_128 ],
+  [ '192x192',  legacy_icons_192 ],
+  [ '256x256',  legacy_icons_256 ],
+]
+all_legacy_tools = [
+  [ '22x22',    legacy_tools_22 ],
+]
+
+foreach icon_info : all_legacy_icons
+  icons_dir = icon_info[0]
+  icons_list= icon_info[1]
+  install_data(icons_list,
+    install_dir: join_paths(gimpiconsdir, theme, icons_dir, 'apps')
+  )
+endforeach
+foreach icon_info : all_legacy_tools
+  icons_dir = icon_info[0]
+  icons_list= icon_info[1]
+  install_data(icons_list,
+  install_dir: join_paths(gimpiconsdir, theme, icons_dir, 'tools')
+  )
+endforeach
+
+
+icons_core = [ '64/gimp-question.png', ]
+icons_imgs = [ '64/gimp-wilber-eek.png', ]
+
+resourcename = 'gimp-core-pixbufs'
+xml_content  = '<?xml version="1.0" encoding="UTF-8"?>\n'
+xml_content += '<gresources>\n'
+xml_content += '  <gresource prefix="/org/gimp/icons">\n'
+foreach file : icons_core
+  xml_content+='    <file preprocess="to-pixdata">'+ file +'</file>\n'
+endforeach
+xml_content += '  </gresource>\n'
+xml_content += '</gresources>\n'
+
+xml_file = configure_file(
+  output: resourcename + '.gresource.xml',
+  command: [ 'echo', xml_content ],
+  capture: true,
+)
+# icons_core_sources = gnome.compile_resources(
+#   resourcename,
+#   xml_file,
+#   c_name: resourcename.underscorify(),
+# )
+
+
+resourcename = 'gimp-icon-pixbufs'
+xml_content  = '<?xml version="1.0" encoding="UTF-8"?>\n'
+xml_content += '<gresources>\n'
+xml_content += '  <gresource prefix="/org/gimp/icons">\n'
+foreach file : icons_imgs
+  xml_content+='    <file preprocess="to-pixdata">'+ file +'</file>\n'
+endforeach
+xml_content += '  </gresource>\n'
+xml_content += '</gresources>\n'
+
+xml_file = configure_file(
+  output: resourcename + '.gresource.xml',
+  command: [ 'echo', xml_content ],
+  capture: true,
+)
+# icons_imgs_sources = gnome.compile_resources(
+#   resourcename,
+#   xml_file,
+#   c_name: resourcename.underscorify(),
+# )
diff --git a/icons/Symbolic-Inverted/meson.build b/icons/Symbolic-Inverted/meson.build
new file mode 100644
index 0000000..660075f
--- /dev/null
+++ b/icons/Symbolic-Inverted/meson.build
@@ -0,0 +1,70 @@
+
+install_data('index.theme',
+  install_dir: join_paths(gimpiconsdir, theme)
+)
+
+foreach icon_info : all_icons
+  icons_dir = icon_info[0]
+  icons_list= icon_info[1]
+
+  # generated_icons_list = []
+  # foreach icon : icons_list
+  #   generated_icons_list += custom_target(
+  #     'gen_symbolic_'+icon.underscorify(),
+  #     input : join_paths('..', 'Symbolic', icon),
+  #     output: icon,
+  #     command: [ invert_svg, '@INPUT@', '@OUTPUT@' ]
+  #   )
+  # endforeach
+  #
+  # install_data(generated_icons_list,
+  #   install_dir: join_paths(gimpiconsdir, theme, icons_dir, 'apps')
+  # )
+endforeach
+
+
+icons_core = [ '64/gimp-question.png', ]
+icons_imgs = [ '64/gimp-wilber-eek.png', ]
+
+resourcename = 'gimp-core-pixbufs'
+xml_content  = '<?xml version="1.0" encoding="UTF-8"?>\n'
+xml_content += '<gresources>\n'
+xml_content += '  <gresource prefix="/org/gimp/icons">\n'
+foreach file : icons_core
+  xml_content+='    <file preprocess="to-pixdata">'+ file +'</file>\n'
+endforeach
+xml_content += '  </gresource>\n'
+xml_content += '</gresources>\n'
+
+xml_file = configure_file(
+  output: resourcename + '.gresource.xml',
+  command: [ 'echo', xml_content ],
+  capture: true,
+)
+# icons_core_sources = gnome.compile_resources(
+#   resourcename,
+#   xml_file,
+#   c_name: resourcename.underscorify(),
+# )
+
+
+resourcename = 'gimp-icon-pixbufs'
+xml_content  = '<?xml version="1.0" encoding="UTF-8"?>\n'
+xml_content += '<gresources>\n'
+xml_content += '  <gresource prefix="/org/gimp/icons">\n'
+foreach file : icons_imgs
+  xml_content+='    <file preprocess="to-pixdata">'+ file +'</file>\n'
+endforeach
+xml_content += '  </gresource>\n'
+xml_content += '</gresources>\n'
+
+xml_file = configure_file(
+  output: resourcename + '.gresource.xml',
+  command: [ 'echo', xml_content ],
+  capture: true,
+)
+# icons_imgs_sources = gnome.compile_resources(
+#   resourcename,
+#   xml_file,
+#   c_name: resourcename.underscorify(),
+# )
diff --git a/icons/Symbolic/meson.build b/icons/Symbolic/meson.build
new file mode 100644
index 0000000..826126b
--- /dev/null
+++ b/icons/Symbolic/meson.build
@@ -0,0 +1,59 @@
+
+install_data('index.theme',
+  install_dir: join_paths(gimpiconsdir, theme)
+)
+
+foreach icon_info : all_icons
+  icons_dir = icon_info[0]
+  icons_list= icon_info[1]
+  install_data(icons_list,
+    install_dir: join_paths(gimpiconsdir, theme, icons_dir, 'apps')
+  )
+endforeach
+
+
+icons_core = [ '64/gimp-question.png', ]
+icons_imgs = [ '64/gimp-wilber-eek.png', ]
+
+resourcename = 'gimp-core-pixbufs'
+xml_content  = '<?xml version="1.0" encoding="UTF-8"?>\n'
+xml_content += '<gresources>\n'
+xml_content += '  <gresource prefix="/org/gimp/icons">\n'
+foreach file : icons_core
+  xml_content+='    <file preprocess="to-pixdata">'+ file +'</file>\n'
+endforeach
+xml_content += '  </gresource>\n'
+xml_content += '</gresources>\n'
+
+xml_file = configure_file(
+  output: resourcename + '.gresource.xml',
+  command: [ 'echo', xml_content ],
+  capture: true,
+)
+# icons_core_sources = gnome.compile_resources(
+#   resourcename,
+#   xml_file,
+#   c_name: resourcename.underscorify(),
+# )
+
+
+resourcename = 'gimp-icon-pixbufs'
+xml_content  = '<?xml version="1.0" encoding="UTF-8"?>\n'
+xml_content += '<gresources>\n'
+xml_content += '  <gresource prefix="/org/gimp/icons">\n'
+foreach file : icons_imgs
+  xml_content+='    <file preprocess="to-pixdata">'+ file +'</file>\n'
+endforeach
+xml_content += '  </gresource>\n'
+xml_content += '</gresources>\n'
+
+xml_file = configure_file(
+  output: resourcename + '.gresource.xml',
+  command: [ 'echo', xml_content ],
+  capture: true,
+)
+# icons_imgs_sources = gnome.compile_resources(
+#   resourcename,
+#   xml_file,
+#   c_name: resourcename.underscorify(),
+# )
diff --git a/icons/meson.build b/icons/meson.build
new file mode 100644
index 0000000..ec93c7d
--- /dev/null
+++ b/icons/meson.build
@@ -0,0 +1,1117 @@
+
+vector_scalable = [
+  'scalable/dialog-information.svg',
+  'scalable/document-new.svg',
+  'scalable/document-open-recent.svg',
+  'scalable/document-open.svg',
+  'scalable/document-print.svg',
+  'scalable/document-revert.svg',
+  'scalable/document-save-as.svg',
+  'scalable/document-save.svg',
+  'scalable/edit-clear.svg',
+  'scalable/edit-copy.svg',
+  'scalable/edit-cut.svg',
+  'scalable/edit-delete.svg',
+  'scalable/edit-paste.svg',
+  'scalable/edit-redo.svg',
+  'scalable/edit-undo.svg',
+  'scalable/folder-new.svg',
+  'scalable/folder.svg',
+  'scalable/format-indent-more.svg',
+  'scalable/format-justify-center.svg',
+  'scalable/format-justify-fill.svg',
+  'scalable/format-justify-left.svg',
+  'scalable/format-justify-right.svg',
+  'scalable/gimp-anchor.svg',
+  'scalable/gimp-business-card.svg',
+  'scalable/gimp-cap-butt.svg',
+  'scalable/gimp-cap-round.svg',
+  'scalable/gimp-cap-square.svg',
+  'scalable/gimp-center.svg',
+  'scalable/gimp-channel-alpha.svg',
+  'scalable/gimp-channel-blue.svg',
+  'scalable/gimp-channel-gray.svg',
+  'scalable/gimp-channel-green.svg',
+  'scalable/gimp-channel-indexed.svg',
+  'scalable/gimp-channel-red.svg',
+  'scalable/gimp-channel.svg',
+  'scalable/gimp-channels.svg',
+  'scalable/gimp-char-picker.svg',
+  'scalable/gimp-clipboard.svg',
+  'scalable/gimp-close-all.svg',
+  'scalable/gimp-close.svg',
+  'scalable/gimp-color-cmyk.svg',
+  'scalable/gimp-color-pick-from-screen.svg',
+  'scalable/gimp-color-picker-black.svg',
+  'scalable/gimp-color-picker-gray.svg',
+  'scalable/gimp-color-picker-white.svg',
+  'scalable/gimp-color-space-linear.svg',
+  'scalable/gimp-color-space-perceptual.svg',
+  'scalable/gimp-color-triangle.svg',
+  'scalable/gimp-color-water.svg',
+  'scalable/gimp-colormap.svg',
+  'scalable/gimp-controller-keyboard.svg',
+  'scalable/gimp-controller-linux-input.svg',
+  'scalable/gimp-controller-midi.svg',
+  'scalable/gimp-controller-wheel.svg',
+  'scalable/gimp-controller.svg',
+  'scalable/gimp-convert-grayscale.svg',
+  'scalable/gimp-convert-indexed.svg',
+  'scalable/gimp-convert-rgb.svg',
+  'scalable/gimp-cursor.svg',
+  'scalable/gimp-curve-free.svg',
+  'scalable/gimp-curve-smooth.svg',
+  'scalable/gimp-dashboard.svg',
+  'scalable/gimp-default-colors.svg',
+  'scalable/gimp-device-status.svg',
+  'scalable/gimp-display-filter-clip-warning.svg',
+  'scalable/gimp-display-filter-colorblind.svg',
+  'scalable/gimp-display-filter-contrast.svg',
+  'scalable/gimp-display-filter-gamma.svg',
+  'scalable/gimp-display-filter-lcms.svg',
+  'scalable/gimp-display-filter-proof.svg',
+  'scalable/gimp-display-filter.svg',
+  'scalable/gimp-display.svg',
+  'scalable/gimp-duplicate.svg',
+  'scalable/gimp-dynamics.svg',
+  'scalable/gimp-error.svg',
+  'scalable/gimp-file-manager.svg',
+  'scalable/gimp-flip-horizontal.svg',
+  'scalable/gimp-flip-vertical.svg',
+  'scalable/gimp-floating-selection.svg',
+  'scalable/gimp-gegl.svg',
+  'scalable/gimp-gradient-bilinear.svg',
+  'scalable/gimp-gradient-conical-asymmetric.svg',
+  'scalable/gimp-gradient-conical-symmetric.svg',
+  'scalable/gimp-gradient-linear.svg',
+  'scalable/gimp-gradient-radial.svg',
+  'scalable/gimp-gradient-shapeburst-angular.svg',
+  'scalable/gimp-gradient-shapeburst-dimpled.svg',
+  'scalable/gimp-gradient-shapeburst-spherical.svg',
+  'scalable/gimp-gradient-spiral-anticlockwise.svg',
+  'scalable/gimp-gradient-spiral-clockwise.svg',
+  'scalable/gimp-gradient-square.svg',
+  'scalable/gimp-gravity-east.svg',
+  'scalable/gimp-gravity-north-east.svg',
+  'scalable/gimp-gravity-north-west.svg',
+  'scalable/gimp-gravity-north.svg',
+  'scalable/gimp-gravity-south-east.svg',
+  'scalable/gimp-gravity-south-west.svg',
+  'scalable/gimp-gravity-south.svg',
+  'scalable/gimp-gravity-west.svg',
+  'scalable/gimp-grid.svg',
+  'scalable/gimp-group-layer.svg',
+  'scalable/gimp-hcenter.svg',
+  'scalable/gimp-hchain-broken.svg',
+  'scalable/gimp-hchain.svg',
+  'scalable/gimp-hfill.svg',
+  'scalable/gimp-histogram-linear.svg',
+  'scalable/gimp-histogram-logarithmic.svg',
+  'scalable/gimp-histogram.svg',
+  'scalable/gimp-image-open.svg',
+  'scalable/gimp-image-reload.svg',
+  'scalable/gimp-image.svg',
+  'scalable/gimp-images.svg',
+  'scalable/gimp-info.svg',
+  'scalable/gimp-input-device.svg',
+  'scalable/gimp-invert.svg',
+  'scalable/gimp-join-bevel.svg',
+  'scalable/gimp-join-miter.svg',
+  'scalable/gimp-join-round.svg',
+  'scalable/gimp-landscape.svg',
+  'scalable/gimp-layer-mask.svg',
+  'scalable/gimp-layer-to-imagesize.svg',
+  'scalable/gimp-layer.svg',
+  'scalable/gimp-layers.svg',
+  'scalable/gimp-letter-spacing.svg',
+  'scalable/gimp-line-spacing.svg',
+  'scalable/gimp-linked.svg',
+  'scalable/gimp-list.svg',
+  'scalable/gimp-menu-left.svg',
+  'scalable/gimp-menu-right.svg',
+  'scalable/gimp-merge-down.svg',
+  'scalable/gimp-move-to-screen.svg',
+  'scalable/gimp-navigation.svg',
+  'scalable/gimp-paste-as-new.svg',
+  'scalable/gimp-paste-into.svg',
+  'scalable/gimp-path-stroke.svg',
+  'scalable/gimp-path.svg',
+  'scalable/gimp-paths.svg',
+  'scalable/gimp-pattern.svg',
+  'scalable/gimp-plugin.svg',
+  'scalable/gimp-portrait.svg',
+  'scalable/gimp-prefs-color-management.svg',
+  'scalable/gimp-prefs-controllers.svg',
+  'scalable/gimp-prefs-default-comment.svg',
+  'scalable/gimp-prefs-default-grid.svg',
+  'scalable/gimp-prefs-display.svg',
+  'scalable/gimp-prefs-folders-brushes.svg',
+  'scalable/gimp-prefs-folders-dynamics.svg',
+  'scalable/gimp-prefs-folders-environ.svg',
+  'scalable/gimp-prefs-folders-fonts.svg',
+  'scalable/gimp-prefs-folders-gradients.svg',
+  'scalable/gimp-prefs-folders-icon-themes.svg',
+  'scalable/gimp-prefs-folders-interp.svg',
+  'scalable/gimp-prefs-folders-modules.svg',
+  'scalable/gimp-prefs-folders-mypaint-brushes.svg',
+  'scalable/gimp-prefs-folders-palettes.svg',
+  'scalable/gimp-prefs-folders-patterns.svg',
+  'scalable/gimp-prefs-folders-plug-ins.svg',
+  'scalable/gimp-prefs-folders-scripts.svg',
+  'scalable/gimp-prefs-folders-themes.svg',
+  'scalable/gimp-prefs-folders-tool-plug-ins.svg',
+  'scalable/gimp-prefs-folders-tool-presets.svg',
+  'scalable/gimp-prefs-folders-tools.svg',
+  'scalable/gimp-prefs-folders.svg',
+  'scalable/gimp-prefs-help-system.svg',
+  'scalable/gimp-prefs-icon-theme.svg',
+  'scalable/gimp-prefs-image-title.svg',
+  'scalable/gimp-prefs-image-windows-appearance.svg',
+  'scalable/gimp-prefs-image-windows-snapping.svg',
+  'scalable/gimp-prefs-image-windows.svg',
+  'scalable/gimp-prefs-import-export.svg',
+  'scalable/gimp-prefs-input-devices.svg',
+  'scalable/gimp-prefs-interface.svg',
+  'scalable/gimp-prefs-new-image.svg',
+  'scalable/gimp-prefs-playground.svg',
+  'scalable/gimp-prefs-session.svg',
+  'scalable/gimp-prefs-system-resources.svg',
+  'scalable/gimp-prefs-theme.svg',
+  'scalable/gimp-prefs-tool-options.svg',
+  'scalable/gimp-prefs-toolbox.svg',
+  'scalable/gimp-prefs-window-management.svg',
+  'scalable/gimp-question.svg',
+  'scalable/gimp-quick-mask-off.svg',
+  'scalable/gimp-quick-mask-on.svg',
+  'scalable/gimp-reset.svg',
+  'scalable/gimp-reshow-filter.svg',
+  'scalable/gimp-resize.svg',
+  'scalable/gimp-rotate-180.svg',
+  'scalable/gimp-rotate-270.svg',
+  'scalable/gimp-rotate-90.svg',
+  'scalable/gimp-sample-point.svg',
+  'scalable/gimp-scale.svg',
+  'scalable/gimp-selection-add.svg',
+  'scalable/gimp-selection-all.svg',
+  'scalable/gimp-selection-border.svg',
+  'scalable/gimp-selection-grow.svg',
+  'scalable/gimp-selection-intersect.svg',
+  'scalable/gimp-selection-none.svg',
+  'scalable/gimp-selection-replace.svg',
+  'scalable/gimp-selection-shrink.svg',
+  'scalable/gimp-selection-stroke.svg',
+  'scalable/gimp-selection-subtract.svg',
+  'scalable/gimp-selection-to-channel.svg',
+  'scalable/gimp-selection-to-path.svg',
+  'scalable/gimp-selection.svg',
+  'scalable/gimp-shape-circle.svg',
+  'scalable/gimp-shape-diamond.svg',
+  'scalable/gimp-shape-square.svg',
+  'scalable/gimp-shred.svg',
+  'scalable/gimp-smartphone.svg',
+  'scalable/gimp-swap-colors.svg',
+  'scalable/gimp-symmetry.svg',
+  'scalable/gimp-template.svg',
+  'scalable/gimp-text-dir-ltr.svg',
+  'scalable/gimp-text-dir-rtl.svg',
+  'scalable/gimp-text-layer.svg',
+  'scalable/gimp-toilet-paper.svg',
+  'scalable/gimp-tool-airbrush.svg',
+  'scalable/gimp-tool-align.svg',
+  'scalable/gimp-tool-blend.svg',
+  'scalable/gimp-tool-blur.svg',
+  'scalable/gimp-tool-brightness-contrast.svg',
+  'scalable/gimp-tool-bucket-fill.svg',
+  'scalable/gimp-tool-by-color-select.svg',
+  'scalable/gimp-tool-cage.svg',
+  'scalable/gimp-tool-clone.svg',
+  'scalable/gimp-tool-color-balance.svg',
+  'scalable/gimp-tool-color-picker.svg',
+  'scalable/gimp-tool-color-temperature.svg',
+  'scalable/gimp-tool-colorize.svg',
+  'scalable/gimp-tool-crop.svg',
+  'scalable/gimp-tool-curves.svg',
+  'scalable/gimp-tool-desaturate.svg',
+  'scalable/gimp-tool-dodge.svg',
+  'scalable/gimp-tool-ellipse-select.svg',
+  'scalable/gimp-tool-eraser.svg',
+  'scalable/gimp-tool-exposure.svg',
+  'scalable/gimp-tool-flip.svg',
+  'scalable/gimp-tool-foreground-select.svg',
+  'scalable/gimp-tool-free-select.svg',
+  'scalable/gimp-tool-fuzzy-select.svg',
+  'scalable/gimp-tool-handle-transform.svg',
+  'scalable/gimp-tool-heal.svg',
+  'scalable/gimp-tool-hue-saturation.svg',
+  'scalable/gimp-tool-ink.svg',
+  'scalable/gimp-tool-iscissors.svg',
+  'scalable/gimp-tool-levels.svg',
+  'scalable/gimp-tool-measure.svg',
+  'scalable/gimp-tool-move.svg',
+  'scalable/gimp-tool-mypaint-brush.svg',
+  'scalable/gimp-tool-n-point-deformation.svg',
+  'scalable/gimp-tool-options.svg',
+  'scalable/gimp-tool-paintbrush.svg',
+  'scalable/gimp-tool-path.svg',
+  'scalable/gimp-tool-pencil.svg',
+  'scalable/gimp-tool-perspective-clone.svg',
+  'scalable/gimp-tool-perspective.svg',
+  'scalable/gimp-tool-posterize.svg',
+  'scalable/gimp-tool-preset.svg',
+  'scalable/gimp-tool-rect-select.svg',
+  'scalable/gimp-tool-rotate.svg',
+  'scalable/gimp-tool-scale.svg',
+  'scalable/gimp-tool-seamless-clone.svg',
+  'scalable/gimp-tool-shadows-highlights.svg',
+  'scalable/gimp-tool-shear.svg',
+  'scalable/gimp-tool-smudge.svg',
+  'scalable/gimp-tool-text.svg',
+  'scalable/gimp-tool-threshold.svg',
+  'scalable/gimp-tool-unified-transform.svg',
+  'scalable/gimp-tool-warp.svg',
+  'scalable/gimp-tool-zoom.svg',
+  'scalable/gimp-tools.svg',
+  'scalable/gimp-transparency.svg',
+  'scalable/gimp-undo-history.svg',
+  'scalable/gimp-user-manual.svg',
+  'scalable/gimp-vcenter.svg',
+  'scalable/gimp-vchain-broken.svg',
+  'scalable/gimp-vchain.svg',
+  'scalable/gimp-vfill.svg',
+  'scalable/gimp-video.svg',
+  'scalable/gimp-visible.svg',
+  'scalable/gimp-warning.svg',
+  'scalable/gimp-web.svg',
+  'scalable/gimp-wilber-eek.svg',
+  'scalable/gimp-wilber-outline.svg',
+  'scalable/gimp-wilber.svg',
+  'scalable/gimp-zoom-follow-window.svg',
+  'scalable/go-bottom.svg',
+  'scalable/go-down.svg',
+  'scalable/go-first.svg',
+  'scalable/go-home.svg',
+  'scalable/go-last.svg',
+  'scalable/go-next.svg',
+  'scalable/go-previous.svg',
+  'scalable/go-top.svg',
+  'scalable/go-up.svg',
+  'scalable/gtk-cancel.svg',
+  'scalable/gtk-edit.svg',
+  'scalable/gtk-no.svg',
+  'scalable/gtk-ok.svg',
+  'scalable/gtk-select-color.svg',
+  'scalable/gtk-select-font.svg',
+  'scalable/gtk-yes.svg',
+  'scalable/help-about.svg',
+  'scalable/list-add.svg',
+  'scalable/list-remove.svg',
+  'scalable/media-floppy.svg',
+  'scalable/media-optical.svg',
+  'scalable/media-playback-pause.svg',
+  'scalable/media-playback-start.svg',
+  'scalable/media-seek-backward.svg',
+  'scalable/media-skip-backward.svg',
+  'scalable/media-skip-forward.svg',
+  'scalable/preferences-system.svg',
+  'scalable/process-stop.svg',
+  'scalable/system-run.svg',
+  'scalable/view-fullscreen.svg',
+  'scalable/view-refresh.svg',
+  'scalable/window-close.svg',
+  'scalable/window-new.svg',
+  'scalable/zoom-fit-best.svg',
+  'scalable/zoom-in.svg',
+  'scalable/zoom-original.svg',
+  'scalable/zoom-out.svg',
+]
+vector_24 = [
+  '24/dialog-information.svg',
+  '24/document-print.svg',
+  '24/gimp-business-card.svg',
+  '24/gimp-center.svg',
+  '24/gimp-channel-alpha.svg',
+  '24/gimp-channel-blue.svg',
+  '24/gimp-channel-gray.svg',
+  '24/gimp-channel-green.svg',
+  '24/gimp-channel-indexed.svg',
+  '24/gimp-channel-red.svg',
+  '24/gimp-channel.svg',
+  '24/gimp-channels.svg',
+  '24/gimp-char-picker.svg',
+  '24/gimp-color-space-linear.svg',
+  '24/gimp-color-space-perceptual.svg',
+  '24/gimp-colormap.svg',
+  '24/gimp-controller-keyboard.svg',
+  '24/gimp-controller-linux-input.svg',
+  '24/gimp-controller-midi.svg',
+  '24/gimp-controller-wheel.svg',
+  '24/gimp-controller.svg',
+  '24/gimp-cursor.svg',
+  '24/gimp-device-status.svg',
+  '24/gimp-display-filter-clip-warning.svg',
+  '24/gimp-display-filter-colorblind.svg',
+  '24/gimp-display-filter-contrast.svg',
+  '24/gimp-display-filter-gamma.svg',
+  '24/gimp-display-filter-lcms.svg',
+  '24/gimp-display-filter-proof.svg',
+  '24/gimp-display-filter.svg',
+  '24/gimp-display.svg',
+  '24/gimp-dynamics.svg',
+  '24/gimp-error.svg',
+  '24/gimp-floating-selection.svg',
+  '24/gimp-gegl.svg',
+  '24/gimp-grid.svg',
+  '24/gimp-histogram.svg',
+  '24/gimp-image.svg',
+  '24/gimp-images.svg',
+  '24/gimp-info.svg',
+  '24/gimp-landscape.svg',
+  '24/gimp-layer-mask.svg',
+  '24/gimp-layer.svg',
+  '24/gimp-layers.svg',
+  '24/gimp-letter-spacing.svg',
+  '24/gimp-line-spacing.svg',
+  '24/gimp-move-to-screen.svg',
+  '24/gimp-navigation.svg',
+  '24/gimp-path.svg',
+  '24/gimp-paths.svg',
+  '24/gimp-portrait.svg',
+  '24/gimp-prefs-color-management.svg',
+  '24/gimp-prefs-controllers.svg',
+  '24/gimp-prefs-default-comment.svg',
+  '24/gimp-prefs-default-grid.svg',
+  '24/gimp-prefs-display.svg',
+  '24/gimp-prefs-folders-brushes.svg',
+  '24/gimp-prefs-folders-dynamics.svg',
+  '24/gimp-prefs-folders-environ.svg',
+  '24/gimp-prefs-folders-fonts.svg',
+  '24/gimp-prefs-folders-gradients.svg',
+  '24/gimp-prefs-folders-icon-themes.svg',
+  '24/gimp-prefs-folders-interp.svg',
+  '24/gimp-prefs-folders-modules.svg',
+  '24/gimp-prefs-folders-mypaint-brushes.svg',
+  '24/gimp-prefs-folders-palettes.svg',
+  '24/gimp-prefs-folders-patterns.svg',
+  '24/gimp-prefs-folders-plug-ins.svg',
+  '24/gimp-prefs-folders-scripts.svg',
+  '24/gimp-prefs-folders-themes.svg',
+  '24/gimp-prefs-folders-tool-plug-ins.svg',
+  '24/gimp-prefs-folders-tool-presets.svg',
+  '24/gimp-prefs-folders-tools.svg',
+  '24/gimp-prefs-folders.svg',
+  '24/gimp-prefs-help-system.svg',
+  '24/gimp-prefs-icon-theme.svg',
+  '24/gimp-prefs-image-title.svg',
+  '24/gimp-prefs-image-windows-appearance.svg',
+  '24/gimp-prefs-image-windows-snapping.svg',
+  '24/gimp-prefs-image-windows.svg',
+  '24/gimp-prefs-import-export.svg',
+  '24/gimp-prefs-input-devices.svg',
+  '24/gimp-prefs-interface.svg',
+  '24/gimp-prefs-new-image.svg',
+  '24/gimp-prefs-playground.svg',
+  '24/gimp-prefs-session.svg',
+  '24/gimp-prefs-system-resources.svg',
+  '24/gimp-prefs-theme.svg',
+  '24/gimp-prefs-tool-options.svg',
+  '24/gimp-prefs-toolbox.svg',
+  '24/gimp-prefs-window-management.svg',
+  '24/gimp-question.svg',
+  '24/gimp-resize.svg',
+  '24/gimp-sample-point.svg',
+  '24/gimp-scale.svg',
+  '24/gimp-selection.svg',
+  '24/gimp-smartphone.svg',
+  '24/gimp-symmetry.svg',
+  '24/gimp-template.svg',
+  '24/gimp-text-layer.svg',
+  '24/gimp-tool-airbrush.svg',
+  '24/gimp-tool-align.svg',
+  '24/gimp-tool-blend.svg',
+  '24/gimp-tool-blur.svg',
+  '24/gimp-tool-brightness-contrast.svg',
+  '24/gimp-tool-bucket-fill.svg',
+  '24/gimp-tool-by-color-select.svg',
+  '24/gimp-tool-cage.svg',
+  '24/gimp-tool-clone.svg',
+  '24/gimp-tool-color-balance.svg',
+  '24/gimp-tool-color-picker.svg',
+  '24/gimp-tool-colorize.svg',
+  '24/gimp-tool-crop.svg',
+  '24/gimp-tool-curves.svg',
+  '24/gimp-tool-desaturate.svg',
+  '24/gimp-tool-dodge.svg',
+  '24/gimp-tool-ellipse-select.svg',
+  '24/gimp-tool-eraser.svg',
+  '24/gimp-tool-exposure.svg',
+  '24/gimp-tool-flip.svg',
+  '24/gimp-tool-foreground-select.svg',
+  '24/gimp-tool-free-select.svg',
+  '24/gimp-tool-fuzzy-select.svg',
+  '24/gimp-tool-handle-transform.svg',
+  '24/gimp-tool-heal.svg',
+  '24/gimp-tool-hue-saturation.svg',
+  '24/gimp-tool-ink.svg',
+  '24/gimp-tool-iscissors.svg',
+  '24/gimp-tool-levels.svg',
+  '24/gimp-tool-measure.svg',
+  '24/gimp-tool-mypaint-brush.svg',
+  '24/gimp-tool-n-point-deformation.svg',
+  '24/gimp-tool-options.svg',
+  '24/gimp-tool-paintbrush.svg',
+  '24/gimp-tool-path.svg',
+  '24/gimp-tool-pencil.svg',
+  '24/gimp-tool-perspective-clone.svg',
+  '24/gimp-tool-perspective.svg',
+  '24/gimp-tool-posterize.svg',
+  '24/gimp-tool-preset.svg',
+  '24/gimp-tool-rect-select.svg',
+  '24/gimp-tool-rotate.svg',
+  '24/gimp-tool-scale.svg',
+  '24/gimp-tool-seamless-clone.svg',
+  '24/gimp-tool-shadows-highlights.svg',
+  '24/gimp-tool-shear.svg',
+  '24/gimp-tool-smudge.svg',
+  '24/gimp-tool-text.svg',
+  '24/gimp-tool-threshold.svg',
+  '24/gimp-tool-unified-transform.svg',
+  '24/gimp-tool-warp.svg',
+  '24/gimp-tool-zoom.svg',
+  '24/gimp-tools.svg',
+  '24/gimp-transparency.svg',
+  '24/gimp-undo-history.svg',
+  '24/gimp-user-manual.svg',
+  '24/gimp-video.svg',
+  '24/gimp-warning.svg',
+  '24/gimp-web.svg',
+  '24/gimp-wilber.svg',
+  '24/gtk-select-color.svg',
+  '24/media-floppy.svg',
+  '24/media-optical.svg',
+]
+bitmap_12 = [
+  '12/gimp-close.png',
+  '12/gimp-default-colors.png',
+  '12/gimp-linked.png',
+  '12/gimp-menu-left.png',
+  '12/gimp-menu-right.png',
+  '12/gimp-quick-mask-off.png',
+  '12/gimp-quick-mask-on.png',
+  '12/gimp-swap-colors.png',
+  '12/gimp-visible.png',
+  '12/gimp-zoom-follow-window.png',
+]
+bitmap_16 = [
+  '16/dialog-information.png',
+  '16/document-new.png',
+  '16/document-open-recent.png',
+  '16/document-open.png',
+  '16/document-print.png',
+  '16/document-revert.png',
+  '16/document-save-as.png',
+  '16/document-save.png',
+  '16/edit-clear.png',
+  '16/edit-copy.png',
+  '16/edit-cut.png',
+  '16/edit-delete.png',
+  '16/edit-paste.png',
+  '16/edit-redo.png',
+  '16/edit-undo.png',
+  '16/folder-new.png',
+  '16/folder.png',
+  '16/gimp-anchor.png',
+  '16/gimp-business-card.png',
+  '16/gimp-cap-butt.png',
+  '16/gimp-cap-round.png',
+  '16/gimp-cap-square.png',
+  '16/gimp-center.png',
+  '16/gimp-channel-alpha.png',
+  '16/gimp-channel-blue.png',
+  '16/gimp-channel-gray.png',
+  '16/gimp-channel-green.png',
+  '16/gimp-channel-indexed.png',
+  '16/gimp-channel-red.png',
+  '16/gimp-channel.png',
+  '16/gimp-channels.png',
+  '16/gimp-char-picker.png',
+  '16/gimp-clipboard.png',
+  '16/gimp-close-all.png',
+  '16/gimp-color-cmyk.png',
+  '16/gimp-color-pick-from-screen.png',
+  '16/gimp-color-space-linear.png',
+  '16/gimp-color-space-perceptual.png',
+  '16/gimp-color-triangle.png',
+  '16/gimp-color-water.png',
+  '16/gimp-colormap.png',
+  '16/gimp-controller-keyboard.png',
+  '16/gimp-controller-linux-input.png',
+  '16/gimp-controller-midi.png',
+  '16/gimp-controller-wheel.png',
+  '16/gimp-controller.png',
+  '16/gimp-convert-grayscale.png',
+  '16/gimp-convert-indexed.png',
+  '16/gimp-convert-rgb.png',
+  '16/gimp-cursor.png',
+  '16/gimp-curve-free.png',
+  '16/gimp-curve-smooth.png',
+  '16/gimp-dashboard.png',
+  '16/gimp-device-status.png',
+  '16/gimp-display-filter-clip-warning.png',
+  '16/gimp-display-filter-colorblind.png',
+  '16/gimp-display-filter-contrast.png',
+  '16/gimp-display-filter-gamma.png',
+  '16/gimp-display-filter-lcms.png',
+  '16/gimp-display-filter-proof.png',
+  '16/gimp-display-filter.png',
+  '16/gimp-display.png',
+  '16/gimp-duplicate.png',
+  '16/gimp-dynamics.png',
+  '16/gimp-error.png',
+  '16/gimp-file-manager.png',
+  '16/gimp-flip-horizontal.png',
+  '16/gimp-flip-vertical.png',
+  '16/gimp-floating-selection.png',
+  '16/gimp-gegl.png',
+  '16/gimp-gradient-bilinear.png',
+  '16/gimp-gradient-conical-asymmetric.png',
+  '16/gimp-gradient-conical-symmetric.png',
+  '16/gimp-gradient-linear.png',
+  '16/gimp-gradient-radial.png',
+  '16/gimp-gradient-shapeburst-angular.png',
+  '16/gimp-gradient-shapeburst-dimpled.png',
+  '16/gimp-gradient-shapeburst-spherical.png',
+  '16/gimp-gradient-spiral-anticlockwise.png',
+  '16/gimp-gradient-spiral-clockwise.png',
+  '16/gimp-gradient-square.png',
+  '16/gimp-grid.png',
+  '16/gimp-group-layer.png',
+  '16/gimp-histogram-linear.png',
+  '16/gimp-histogram-logarithmic.png',
+  '16/gimp-histogram.png',
+  '16/gimp-image-open.png',
+  '16/gimp-image-reload.png',
+  '16/gimp-image.png',
+  '16/gimp-images.png',
+  '16/gimp-info.png',
+  '16/gimp-input-device.png',
+  '16/gimp-invert.png',
+  '16/gimp-join-bevel.png',
+  '16/gimp-join-miter.png',
+  '16/gimp-join-round.png',
+  '16/gimp-landscape.png',
+  '16/gimp-layer-mask.png',
+  '16/gimp-layer-to-imagesize.png',
+  '16/gimp-layer.png',
+  '16/gimp-layers.png',
+  '16/gimp-list.png',
+  '16/gimp-merge-down.png',
+  '16/gimp-move-to-screen.png',
+  '16/gimp-navigation.png',
+  '16/gimp-paste-as-new.png',
+  '16/gimp-paste-into.png',
+  '16/gimp-path-stroke.png',
+  '16/gimp-path.png',
+  '16/gimp-paths.png',
+  '16/gimp-pattern.png',
+  '16/gimp-plugin.png',
+  '16/gimp-portrait.png',
+  '16/gimp-prefs-folders-brushes.png',
+  '16/gimp-prefs-folders-dynamics.png',
+  '16/gimp-prefs-folders-environ.png',
+  '16/gimp-prefs-folders-fonts.png',
+  '16/gimp-prefs-folders-gradients.png',
+  '16/gimp-prefs-folders-icon-themes.png',
+  '16/gimp-prefs-folders-interp.png',
+  '16/gimp-prefs-folders-modules.png',
+  '16/gimp-prefs-folders-mypaint-brushes.png',
+  '16/gimp-prefs-folders-palettes.png',
+  '16/gimp-prefs-folders-patterns.png',
+  '16/gimp-prefs-folders-plug-ins.png',
+  '16/gimp-prefs-folders-scripts.png',
+  '16/gimp-prefs-folders-themes.png',
+  '16/gimp-prefs-folders-tool-plug-ins.png',
+  '16/gimp-prefs-folders-tool-presets.png',
+  '16/gimp-prefs-folders-tools.png',
+  '16/gimp-prefs-icon-theme.png',
+  '16/gimp-prefs-image-windows.png',
+  '16/gimp-prefs-import-export.png',
+  '16/gimp-prefs-interface.png',
+  '16/gimp-prefs-theme.png',
+  '16/gimp-prefs-toolbox.png',
+  '16/gimp-prefs-window-management.png',
+  '16/gimp-question.png',
+  '16/gimp-reset.png',
+  '16/gimp-reshow-filter.png',
+  '16/gimp-resize.png',
+  '16/gimp-rotate-180.png',
+  '16/gimp-rotate-270.png',
+  '16/gimp-rotate-90.png',
+  '16/gimp-sample-point.png',
+  '16/gimp-scale.png',
+  '16/gimp-selection-add.png',
+  '16/gimp-selection-all.png',
+  '16/gimp-selection-border.png',
+  '16/gimp-selection-grow.png',
+  '16/gimp-selection-intersect.png',
+  '16/gimp-selection-none.png',
+  '16/gimp-selection-replace.png',
+  '16/gimp-selection-shrink.png',
+  '16/gimp-selection-stroke.png',
+  '16/gimp-selection-subtract.png',
+  '16/gimp-selection-to-channel.png',
+  '16/gimp-selection-to-path.png',
+  '16/gimp-selection.png',
+  '16/gimp-shape-circle.png',
+  '16/gimp-shape-diamond.png',
+  '16/gimp-shape-square.png',
+  '16/gimp-shred.png',
+  '16/gimp-smartphone.png',
+  '16/gimp-symmetry.png',
+  '16/gimp-template.png',
+  '16/gimp-text-layer.png',
+  '16/gimp-toilet-paper.png',
+  '16/gimp-tool-airbrush.png',
+  '16/gimp-tool-align.png',
+  '16/gimp-tool-blend.png',
+  '16/gimp-tool-blur.png',
+  '16/gimp-tool-brightness-contrast.png',
+  '16/gimp-tool-bucket-fill.png',
+  '16/gimp-tool-by-color-select.png',
+  '16/gimp-tool-cage.png',
+  '16/gimp-tool-clone.png',
+  '16/gimp-tool-color-balance.png',
+  '16/gimp-tool-color-picker.png',
+  '16/gimp-tool-color-temperature.png',
+  '16/gimp-tool-colorize.png',
+  '16/gimp-tool-crop.png',
+  '16/gimp-tool-curves.png',
+  '16/gimp-tool-desaturate.png',
+  '16/gimp-tool-dodge.png',
+  '16/gimp-tool-ellipse-select.png',
+  '16/gimp-tool-eraser.png',
+  '16/gimp-tool-exposure.png',
+  '16/gimp-tool-flip.png',
+  '16/gimp-tool-foreground-select.png',
+  '16/gimp-tool-free-select.png',
+  '16/gimp-tool-fuzzy-select.png',
+  '16/gimp-tool-handle-transform.png',
+  '16/gimp-tool-heal.png',
+  '16/gimp-tool-hue-saturation.png',
+  '16/gimp-tool-ink.png',
+  '16/gimp-tool-iscissors.png',
+  '16/gimp-tool-levels.png',
+  '16/gimp-tool-measure.png',
+  '16/gimp-tool-move.png',
+  '16/gimp-tool-mypaint-brush.png',
+  '16/gimp-tool-n-point-deformation.png',
+  '16/gimp-tool-options.png',
+  '16/gimp-tool-paintbrush.png',
+  '16/gimp-tool-path.png',
+  '16/gimp-tool-pencil.png',
+  '16/gimp-tool-perspective-clone.png',
+  '16/gimp-tool-perspective.png',
+  '16/gimp-tool-posterize.png',
+  '16/gimp-tool-preset.png',
+  '16/gimp-tool-rect-select.png',
+  '16/gimp-tool-rotate.png',
+  '16/gimp-tool-scale.png',
+  '16/gimp-tool-seamless-clone.png',
+  '16/gimp-tool-shadows-highlights.png',
+  '16/gimp-tool-shear.png',
+  '16/gimp-tool-smudge.png',
+  '16/gimp-tool-text.png',
+  '16/gimp-tool-threshold.png',
+  '16/gimp-tool-unified-transform.png',
+  '16/gimp-tool-warp.png',
+  '16/gimp-tool-zoom.png',
+  '16/gimp-tools.png',
+  '16/gimp-transparency.png',
+  '16/gimp-undo-history.png',
+  '16/gimp-user-manual.png',
+  '16/gimp-video.png',
+  '16/gimp-warning.png',
+  '16/gimp-web.png',
+  '16/gimp-wilber.png',
+  '16/go-bottom.png',
+  '16/go-down.png',
+  '16/go-first.png',
+  '16/go-home.png',
+  '16/go-last.png',
+  '16/go-next.png',
+  '16/go-previous.png',
+  '16/go-top.png',
+  '16/go-up.png',
+  '16/gtk-cancel.png',
+  '16/gtk-edit.png',
+  '16/gtk-no.png',
+  '16/gtk-ok.png',
+  '16/gtk-select-color.png',
+  '16/gtk-select-font.png',
+  '16/gtk-yes.png',
+  '16/help-about.png',
+  '16/list-add.png',
+  '16/list-remove.png',
+  '16/media-floppy.png',
+  '16/media-optical.png',
+  '16/media-playback-pause.png',
+  '16/media-playback-start.png',
+  '16/media-seek-backward.png',
+  '16/media-skip-backward.png',
+  '16/media-skip-forward.png',
+  '16/preferences-system.png',
+  '16/process-stop.png',
+  '16/system-run.png',
+  '16/view-fullscreen.png',
+  '16/view-refresh.png',
+  '16/window-close.png',
+  '16/window-new.png',
+  '16/zoom-fit-best.png',
+  '16/zoom-in.png',
+  '16/zoom-original.png',
+  '16/zoom-out.png',
+]
+bitmap_18 = [
+  '18/gimp-color-picker-black.png',
+  '18/gimp-color-picker-gray.png',
+  '18/gimp-color-picker-white.png',
+]
+bitmap_20 = [
+  '20/gimp-linked.png',
+  '20/gimp-visible.png',
+]
+bitmap_22 = [
+  '22/folder.png',
+  '22/format-indent-more.png',
+  '22/format-justify-center.png',
+  '22/format-justify-fill.png',
+  '22/format-justify-left.png',
+  '22/format-justify-right.png',
+  '22/gimp-char-picker.png',
+  '22/gimp-dynamics.png',
+  '22/gimp-histogram.png',
+  '22/gimp-input-device.png',
+  '22/gimp-landscape.png',
+  '22/gimp-letter-spacing.png',
+  '22/gimp-line-spacing.png',
+  '22/gimp-path.png',
+  '22/gimp-paths.png',
+  '22/gimp-portrait.png',
+  '22/gimp-prefs-color-management.png',
+  '22/gimp-prefs-controllers.png',
+  '22/gimp-prefs-default-grid.png',
+  '22/gimp-prefs-display.png',
+  '22/gimp-prefs-folders-brushes.png',
+  '22/gimp-prefs-folders-dynamics.png',
+  '22/gimp-prefs-folders-environ.png',
+  '22/gimp-prefs-folders-fonts.png',
+  '22/gimp-prefs-folders-gradients.png',
+  '22/gimp-prefs-folders-icon-themes.png',
+  '22/gimp-prefs-folders-interp.png',
+  '22/gimp-prefs-folders-modules.png',
+  '22/gimp-prefs-folders-mypaint-brushes.png',
+  '22/gimp-prefs-folders-palettes.png',
+  '22/gimp-prefs-folders-patterns.png',
+  '22/gimp-prefs-folders-plug-ins.png',
+  '22/gimp-prefs-folders-scripts.png',
+  '22/gimp-prefs-folders-themes.png',
+  '22/gimp-prefs-folders-tool-plug-ins.png',
+  '22/gimp-prefs-folders-tool-presets.png',
+  '22/gimp-prefs-folders-tools.png',
+  '22/gimp-prefs-folders.png',
+  '22/gimp-prefs-help-system.png',
+  '22/gimp-prefs-icon-theme.png',
+  '22/gimp-prefs-image-title.png',
+  '22/gimp-prefs-image-windows-appearance.png',
+  '22/gimp-prefs-image-windows-snapping.png',
+  '22/gimp-prefs-image-windows.png',
+  '22/gimp-prefs-import-export.png',
+  '22/gimp-prefs-input-devices.png',
+  '22/gimp-prefs-interface.png',
+  '22/gimp-prefs-new-image.png',
+  '22/gimp-prefs-playground.png',
+  '22/gimp-prefs-session.png',
+  '22/gimp-prefs-system-resources.png',
+  '22/gimp-prefs-theme.png',
+  '22/gimp-prefs-tool-options.png',
+  '22/gimp-prefs-toolbox.png',
+  '22/gimp-prefs-window-management.png',
+  '22/gimp-tool-preset.png',
+  '22/gimp-wilber.png',
+]
+bitmap_24 = [
+  '24/dialog-information.png',
+  '24/document-print.png',
+  '24/gimp-business-card.png',
+  '24/gimp-center.png',
+  '24/gimp-channel-alpha.png',
+  '24/gimp-channel-blue.png',
+  '24/gimp-channel-gray.png',
+  '24/gimp-channel-green.png',
+  '24/gimp-channel-indexed.png',
+  '24/gimp-channel-red.png',
+  '24/gimp-channel.png',
+  '24/gimp-channels.png',
+  '24/gimp-colormap.png',
+  '24/gimp-controller-keyboard.png',
+  '24/gimp-controller-linux-input.png',
+  '24/gimp-controller-midi.png',
+  '24/gimp-controller-wheel.png',
+  '24/gimp-controller.png',
+  '24/gimp-cursor.png',
+  '24/gimp-device-status.png',
+  '24/gimp-display-filter-colorblind.png',
+  '24/gimp-display-filter-contrast.png',
+  '24/gimp-display-filter-gamma.png',
+  '24/gimp-display-filter-lcms.png',
+  '24/gimp-display-filter-proof.png',
+  '24/gimp-display-filter.png',
+  '24/gimp-display.png',
+  '24/gimp-error.png',
+  '24/gimp-floating-selection.png',
+  '24/gimp-gegl.png',
+  '24/gimp-gravity-east.png',
+  '24/gimp-gravity-north-east.png',
+  '24/gimp-gravity-north-west.png',
+  '24/gimp-gravity-north.png',
+  '24/gimp-gravity-south-east.png',
+  '24/gimp-gravity-south-west.png',
+  '24/gimp-gravity-south.png',
+  '24/gimp-gravity-west.png',
+  '24/gimp-grid.png',
+  '24/gimp-hcenter.png',
+  '24/gimp-hchain-broken.png',
+  '24/gimp-hchain.png',
+  '24/gimp-hfill.png',
+  '24/gimp-image.png',
+  '24/gimp-images.png',
+  '24/gimp-info.png',
+  '24/gimp-layer-mask.png',
+  '24/gimp-layer.png',
+  '24/gimp-layers.png',
+  '24/gimp-move-to-screen.png',
+  '24/gimp-navigation.png',
+  '24/gimp-question.png',
+  '24/gimp-resize.png',
+  '24/gimp-sample-point.png',
+  '24/gimp-scale.png',
+  '24/gimp-selection.png',
+  '24/gimp-smartphone.png',
+  '24/gimp-symmetry.png',
+  '24/gimp-template.png',
+  '24/gimp-text-dir-ltr.png',
+  '24/gimp-text-dir-rtl.png',
+  '24/gimp-text-layer.png',
+  '24/gimp-toilet-paper.png',
+  '24/gimp-tool-airbrush.png',
+  '24/gimp-tool-align.png',
+  '24/gimp-tool-blend.png',
+  '24/gimp-tool-blur.png',
+  '24/gimp-tool-brightness-contrast.png',
+  '24/gimp-tool-bucket-fill.png',
+  '24/gimp-tool-by-color-select.png',
+  '24/gimp-tool-cage.png',
+  '24/gimp-tool-clone.png',
+  '24/gimp-tool-color-balance.png',
+  '24/gimp-tool-color-picker.png',
+  '24/gimp-tool-colorize.png',
+  '24/gimp-tool-crop.png',
+  '24/gimp-tool-curves.png',
+  '24/gimp-tool-desaturate.png',
+  '24/gimp-tool-dodge.png',
+  '24/gimp-tool-ellipse-select.png',
+  '24/gimp-tool-eraser.png',
+  '24/gimp-tool-flip.png',
+  '24/gimp-tool-foreground-select.png',
+  '24/gimp-tool-free-select.png',
+  '24/gimp-tool-fuzzy-select.png',
+  '24/gimp-tool-handle-transform.png',
+  '24/gimp-tool-heal.png',
+  '24/gimp-tool-hue-saturation.png',
+  '24/gimp-tool-ink.png',
+  '24/gimp-tool-iscissors.png',
+  '24/gimp-tool-levels.png',
+  '24/gimp-tool-measure.png',
+  '24/gimp-tool-move.png',
+  '24/gimp-tool-mypaint-brush.png',
+  '24/gimp-tool-n-point-deformation.png',
+  '24/gimp-tool-options.png',
+  '24/gimp-tool-paintbrush.png',
+  '24/gimp-tool-path.png',
+  '24/gimp-tool-pencil.png',
+  '24/gimp-tool-perspective-clone.png',
+  '24/gimp-tool-perspective.png',
+  '24/gimp-tool-posterize.png',
+  '24/gimp-tool-preset.png',
+  '24/gimp-tool-rect-select.png',
+  '24/gimp-tool-rotate.png',
+  '24/gimp-tool-scale.png',
+  '24/gimp-tool-seamless-clone.png',
+  '24/gimp-tool-shear.png',
+  '24/gimp-tool-smudge.png',
+  '24/gimp-tool-text.png',
+  '24/gimp-tool-threshold.png',
+  '24/gimp-tool-unified-transform.png',
+  '24/gimp-tool-warp.png',
+  '24/gimp-tool-zoom.png',
+  '24/gimp-tools.png',
+  '24/gimp-transparency.png',
+  '24/gimp-undo-history.png',
+  '24/gimp-user-manual.png',
+  '24/gimp-vcenter.png',
+  '24/gimp-vchain-broken.png',
+  '24/gimp-vchain.png',
+  '24/gimp-vfill.png',
+  '24/gimp-video.png',
+  '24/gimp-warning.png',
+  '24/gimp-web.png',
+  '24/gtk-select-color.png',
+  '24/media-floppy.png',
+  '24/media-optical.png',
+]
+bitmap_32 = [
+  '32/gimp-channel-alpha.png',
+  '32/gimp-channel-blue.png',
+  '32/gimp-channel-gray.png',
+  '32/gimp-channel-green.png',
+  '32/gimp-channel-indexed.png',
+  '32/gimp-channel-red.png',
+  '32/gimp-channel.png',
+  '32/gimp-floating-selection.png',
+  '32/gimp-image.png',
+  '32/gimp-layer-mask.png',
+  '32/gimp-layer.png',
+  '32/gimp-text-layer.png',
+  '32/gimp-user-manual.png',
+  '32/gimp-wilber.png',
+]
+bitmap_48 = [
+  '48/folder.png',
+  '48/gimp-channel-alpha.png',
+  '48/gimp-channel-blue.png',
+  '48/gimp-channel-gray.png',
+  '48/gimp-channel-green.png',
+  '48/gimp-channel-indexed.png',
+  '48/gimp-channel-red.png',
+  '48/gimp-channel.png',
+  '48/gimp-floating-selection.png',
+  '48/gimp-image.png',
+  '48/gimp-layer-mask.png',
+  '48/gimp-layer.png',
+  '48/gimp-prefs-color-management.png',
+  '48/gimp-prefs-controllers.png',
+  '48/gimp-prefs-default-comment.png',
+  '48/gimp-prefs-default-grid.png',
+  '48/gimp-prefs-display.png',
+  '48/gimp-prefs-folders-brushes.png',
+  '48/gimp-prefs-folders-dynamics.png',
+  '48/gimp-prefs-folders-environ.png',
+  '48/gimp-prefs-folders-fonts.png',
+  '48/gimp-prefs-folders-gradients.png',
+  '48/gimp-prefs-folders-icon-themes.png',
+  '48/gimp-prefs-folders-interp.png',
+  '48/gimp-prefs-folders-modules.png',
+  '48/gimp-prefs-folders-mypaint-brushes.png',
+  '48/gimp-prefs-folders-palettes.png',
+  '48/gimp-prefs-folders-patterns.png',
+  '48/gimp-prefs-folders-plug-ins.png',
+  '48/gimp-prefs-folders-scripts.png',
+  '48/gimp-prefs-folders-themes.png',
+  '48/gimp-prefs-folders-tool-plug-ins.png',
+  '48/gimp-prefs-folders-tool-presets.png',
+  '48/gimp-prefs-folders-tools.png',
+  '48/gimp-prefs-folders.png',
+  '48/gimp-prefs-help-system.png',
+  '48/gimp-prefs-icon-theme.png',
+  '48/gimp-prefs-image-title.png',
+  '48/gimp-prefs-image-windows-appearance.png',
+  '48/gimp-prefs-image-windows-snapping.png',
+  '48/gimp-prefs-image-windows.png',
+  '48/gimp-prefs-import-export.png',
+  '48/gimp-prefs-input-devices.png',
+  '48/gimp-prefs-interface.png',
+  '48/gimp-prefs-new-image.png',
+  '48/gimp-prefs-playground.png',
+  '48/gimp-prefs-session.png',
+  '48/gimp-prefs-system-resources.png',
+  '48/gimp-prefs-theme.png',
+  '48/gimp-prefs-tool-options.png',
+  '48/gimp-prefs-toolbox.png',
+  '48/gimp-prefs-window-management.png',
+  '48/gimp-text-layer.png',
+  '48/gimp-wilber.png',
+]
+bitmap_64 = [
+  '64/dialog-information.png',
+  '64/gimp-user-manual.png',
+  '64/gimp-wilber-eek.png',
+  '64/gimp-wilber-outline.png',
+  '64/gimp-wilber.png',
+]
+bitmap_64system = [
+  '64/gimp-error.png',
+  '64/gimp-frame.png',
+  '64/gimp-info.png',
+  '64/gimp-question.png',
+  '64/gimp-texture.png',
+  '64/gimp-warning.png',
+]
+bitmap_96 = [
+  '96/gimp-wilber-outline.png',
+  '96/gimp-wilber.png',
+]
+bitmap_128 = [
+  '128/folder.png',
+  '128/gimp-wilber-outline.png',
+  '128/gimp-wilber.png',
+]
+bitmap_192 = [
+  '192/gimp-wilber-outline.png',
+  '192/gimp-wilber.png',
+]
+bitmap_256 = [
+  '256/folder.png',
+  '256/gimp-wilber-outline.png',
+  '256/gimp-wilber.png',
+]
+
+if have_vector_icons
+  all_icons = [
+    [ '24x24',    vector_24 ],
+    [ '64x64',    bitmap_64system ],
+    [ 'scalable', vector_scalable ],
+  ]
+else
+  all_icons = [
+    [ '12x12',    bitmap_12 ],
+    [ '16x16',    bitmap_16 ],
+    [ '18x18',    bitmap_18 ],
+    [ '20x20',    bitmap_20 ],
+    [ '22x22',    bitmap_22 ],
+    [ '24x24',    bitmap_24 ],
+    [ '32x32',    bitmap_32 ],
+    [ '48x48',    bitmap_48 ],
+    [ '64x64',    bitmap_64 + bitmap_64system ],
+    [ '96x96',    bitmap_96 ],
+    [ '128x128',  bitmap_128 ],
+    [ '192x192',  bitmap_192 ],
+    [ '256x256',  bitmap_256 ],
+  ]
+endif
+
+
+gimpiconsdir = join_paths(gimpdatadir, 'icons')
+
+themes = [
+  'Color',
+  'Legacy',
+  'Symbolic',
+  'Symbolic-Inverted',
+]
+
+foreach theme : themes
+  subdir(theme)
+endforeach
+
+install_data('index.theme',
+  install_dir: join_paths(gimpiconsdir, 'hicolor')
+)
diff --git a/libgimp/meson.build b/libgimp/meson.build
new file mode 100644
index 0000000..a306f6f
--- /dev/null
+++ b/libgimp/meson.build
@@ -0,0 +1,316 @@
+
+gimpenums_notail = custom_target('gimpenums.c.notail',
+  input : [ 'gimpenums.h', ],
+  output: [ 'gimpenums.c.notail', ],
+  command: [
+    gimp_mkenums,
+    '--fhead','#include "config.h"\n'
+            + '#include <gio/gio.h>\n'
+            + '#undef GIMP_DISABLE_DEPRECATED\n'
+            + '#include "libgimpbase/gimpbase.h"\n'
+            + '#include "libgimpbase/gimpbase-private.h"\n'
+            + '#include "libgimpconfig/gimpconfigenums.h"\n'
+            + '#include "gimpenums.h"\n',
+    gimp_mkenums_custom_target_commonargs,
+  ],
+  capture: true,
+)
+
+gimpenums = custom_target('gimpenums.c',
+  input : [ gimpenums_notail, 'gimpenums.c.tail', ],
+  output: [ 'gimpenums.c', ],
+  command: [ 'cat', '@INPUT@' ],
+  capture: true,
+)
+
+gimpuimarshal = gnome.genmarshal('gimpuimarshal',
+  prefix: '_gimpui_marshal',
+  sources: 'gimpuimarshal.list',
+  install_header: false,
+)
+
+libgimp_top_pdbwrappers = [
+  'gimp_pdb.c',
+  'gimpbrush_pdb.c',
+  'gimpbrushes_pdb.c',
+  'gimpbrushselect_pdb.c',
+  'gimpbuffer_pdb.c',
+  'gimpchannel_pdb.c',
+  'gimpcolor_pdb.c',
+  'gimpcontext_pdb.c',
+  'gimpdebug_pdb.c',
+  'gimpdisplay_pdb.c',
+  'gimpdrawable_pdb.c',
+  'gimpdrawablecolor_pdb.c',
+  'gimpdrawabletransform_pdb.c',
+  'gimpdynamics_pdb.c',
+  'gimpedit_pdb.c',
+  'gimpfileops_pdb.c',
+  'gimpfloatingsel_pdb.c',
+  'gimpfonts_pdb.c',
+  'gimpfontselect_pdb.c',
+  'gimpgimprc_pdb.c',
+  'gimpgradient_pdb.c',
+  'gimpgradients_pdb.c',
+  'gimpgradientselect_pdb.c',
+  'gimphelp_pdb.c',
+  'gimpimage_pdb.c',
+  'gimpimagecolorprofile_pdb.c',
+  'gimpimageconvert_pdb.c',
+  'gimpimagegrid_pdb.c',
+  'gimpimageguides_pdb.c',
+  'gimpimagesamplepoints_pdb.c',
+  'gimpimageselect_pdb.c',
+  'gimpimagetransform_pdb.c',
+  'gimpimageundo_pdb.c',
+  'gimpitem_pdb.c',
+  'gimpitemtransform_pdb.c',
+  'gimplayer_pdb.c',
+  'gimpmessage_pdb.c',
+  'gimppainttools_pdb.c',
+  'gimppalette_pdb.c',
+  'gimppalettes_pdb.c',
+  'gimppaletteselect_pdb.c',
+  'gimppaths_pdb.c',
+  'gimppattern_pdb.c',
+  'gimppatterns_pdb.c',
+  'gimppatternselect_pdb.c',
+  'gimpplugin_pdb.c',
+  'gimpproceduraldb_pdb.c',
+  'gimpprogress_pdb.c',
+  'gimpselection_pdb.c',
+  'gimpselectiontools_pdb.c',
+  'gimptextlayer_pdb.c',
+  'gimptexttool_pdb.c',
+  'gimptransformtools_pdb.c',
+  'gimpunit_pdb.c',
+  'gimpvectors_pdb.c',
+]
+
+libgimp_top_pdbheaders = [
+  'gimp_pdb_headers.h',
+  'gimp_pdb.h',
+  'gimpbrush_pdb.h',
+  'gimpbrushes_pdb.h',
+  'gimpbrushselect_pdb.h',
+  'gimpbuffer_pdb.h',
+  'gimpchannel_pdb.h',
+  'gimpcolor_pdb.h',
+  'gimpcontext_pdb.h',
+  'gimpdebug_pdb.h',
+  'gimpdisplay_pdb.h',
+  'gimpdrawable_pdb.h',
+  'gimpdrawablecolor_pdb.h',
+  'gimpdrawabletransform_pdb.h',
+  'gimpdynamics_pdb.h',
+  'gimpedit_pdb.h',
+  'gimpfileops_pdb.h',
+  'gimpfloatingsel_pdb.h',
+  'gimpfonts_pdb.h',
+  'gimpfontselect_pdb.h',
+  'gimpgimprc_pdb.h',
+  'gimpgradient_pdb.h',
+  'gimpgradients_pdb.h',
+  'gimpgradientselect_pdb.h',
+  'gimphelp_pdb.h',
+  'gimpimage_pdb.h',
+  'gimpimagecolorprofile_pdb.h',
+  'gimpimageconvert_pdb.h',
+  'gimpimagegrid_pdb.h',
+  'gimpimageguides_pdb.h',
+  'gimpimagesamplepoints_pdb.h',
+  'gimpimageselect_pdb.h',
+  'gimpimagetransform_pdb.h',
+  'gimpimageundo_pdb.h',
+  'gimpitem_pdb.h',
+  'gimpitemtransform_pdb.h',
+  'gimplayer_pdb.h',
+  'gimpmessage_pdb.h',
+  'gimppainttools_pdb.h',
+  'gimppalette_pdb.h',
+  'gimppalettes_pdb.h',
+  'gimppaletteselect_pdb.h',
+  'gimppaths_pdb.h',
+  'gimppattern_pdb.h',
+  'gimppatterns_pdb.h',
+  'gimppatternselect_pdb.h',
+  'gimpplugin_pdb.h',
+  'gimpproceduraldb_pdb.h',
+  'gimpprogress_pdb.h',
+  'gimpselection_pdb.h',
+  'gimpselectiontools_pdb.h',
+  'gimptextlayer_pdb.h',
+  'gimptexttool_pdb.h',
+  'gimptransformtools_pdb.h',
+  'gimpunit_pdb.h',
+  'gimpvectors_pdb.h',
+]
+
+libgimp_top_sources = [
+  'gimp.c',
+  'gimpbrushes.c',
+  'gimpbrushselect.c',
+  'gimpchannel.c',
+  'gimpdrawable.c',
+  'gimpedit.c',
+  'gimpfontselect.c',
+  'gimpgimprc.c',
+  'gimpgradients.c',
+  'gimpgradientselect.c',
+  'gimpimage.c',
+  'gimpimagecolorprofile.c',
+  'gimplayer.c',
+  'gimppalette.c',
+  'gimppalettes.c',
+  'gimppaletteselect.c',
+  'gimppatterns.c',
+  'gimppatternselect.c',
+  'gimppixbuf.c',
+  'gimppixelfetcher.c',
+  'gimppixelrgn.c',
+  'gimpplugin.c',
+  'gimpproceduraldb.c',
+  'gimpprogress.c',
+  'gimpregioniterator.c',
+  'gimpselection.c',
+  'gimptile.c',
+  'gimptilebackendplugin.c',
+  'gimpunitcache.c',
+  'gimpvectors.c',
+  gimpenums,
+  libgimp_top_pdbwrappers,
+]
+
+libgimpui_sources = [
+  'gimpaspectpreview.c',
+  'gimpbrushmenu.c',
+  'gimpbrushselectbutton.c',
+  'gimpdrawablepreview.c',
+  'gimpexport.c',
+  'gimpfontmenu.c',
+  'gimpfontselectbutton.c',
+  'gimpgradientmenu.c',
+  'gimpgradientselectbutton.c',
+  'gimpimagecombobox.c',
+  'gimpimagemetadata.c',
+  'gimpitemcombobox.c',
+  'gimpmenu.c',
+  'gimppalettemenu.c',
+  'gimppaletteselectbutton.c',
+  'gimppatternmenu.c',
+  'gimppatternselectbutton.c',
+  'gimpprocbrowserdialog.c',
+  'gimpprocview.c',
+  'gimpprogressbar.c',
+  'gimpselectbutton.c',
+  'gimpui.c',
+  'gimpzoompreview.c',
+  gimpuimarshal,
+]
+
+libgimp_top_headers = [
+  'gimp.h',
+  'gimpaspectpreview.h',
+  'gimpbrushes.h',
+  'gimpbrushmenu.h',
+  'gimpbrushselect.h',
+  'gimpbrushselectbutton.h',
+  'gimpchannel.h',
+  'gimpdrawable.h',
+  'gimpdrawablepreview.h',
+  'gimpedit.h',
+  'gimpenums.h',
+  'gimpexport.h',
+  'gimpfontmenu.h',
+  'gimpfontselect.h',
+  'gimpfontselectbutton.h',
+  'gimpgimprc.h',
+  'gimpgradientmenu.h',
+  'gimpgradients.h',
+  'gimpgradientselect.h',
+  'gimpgradientselectbutton.h',
+  'gimpimage.h',
+  'gimpimagecolorprofile.h',
+  'gimpimagecombobox.h',
+  'gimpimagemetadata.h',
+  'gimpitemcombobox.h',
+  'gimplayer.h',
+  'gimpmenu.h',
+  'gimppalette.h',
+  'gimppalettemenu.h',
+  'gimppalettes.h',
+  'gimppaletteselect.h',
+  'gimppaletteselectbutton.h',
+  'gimppatternmenu.h',
+  'gimppatterns.h',
+  'gimppatternselect.h',
+  'gimppatternselectbutton.h',
+  'gimppixbuf.h',
+  'gimppixelfetcher.h',
+  'gimppixelrgn.h',
+  'gimpplugin.h',
+  'gimpprocbrowserdialog.h',
+  'gimpproceduraldb.h',
+  'gimpprocview.h',
+  'gimpprogress.h',
+  'gimpprogressbar.h',
+  'gimpregioniterator.h',
+  'gimpselectbutton.h',
+  'gimpselection.h',
+  'gimptile.h',
+  'gimptypes.h',
+  'gimpui.h',
+  'gimpuitypes.h',
+  'gimpvectors.h',
+  'gimpzoompreview.h',
+  libgimp_top_pdbheaders,
+]
+
+
+libgimp_top_cflags = [
+  '-DG_LOG_DOMAIN="LibGimp"',
+  '-DGIMP_COMPILATION',
+]
+
+libgimp = library('gimp-'+ api_version,
+  libgimp_top_sources,
+  include_directories: rootInclude,
+  dependencies: [
+    gegl, gexiv2, gtk2, drmingw,
+  ],
+  c_args:     [ libgimp_top_cflags, ],
+  link_with:  [
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+  ],
+  vs_module_defs: 'gimp.def',
+  install: true,
+  version: so_version,
+)
+
+
+libgimpui = library('gimpui-'+ api_version,
+  libgimpui_sources,
+  include_directories: rootInclude,
+  dependencies: [
+    gegl, gexiv2, gtk2,
+  ],
+  c_args:     [ libgimp_top_cflags, ],
+  link_with:  [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpmodule,
+    libgimpwidgets,
+  ],
+  vs_module_defs: 'gimpui.def',
+  install: true,
+  version: so_version,
+)
+
+
+install_headers(
+  libgimp_top_headers,
+  subdir: join_paths(gimp_api_name, 'libgimp'),
+)
diff --git a/libgimpbase/gimpversion.h.in b/libgimpbase/gimpversion.h.in
new file mode 100644
index 0000000..3dd9b95
--- /dev/null
+++ b/libgimpbase/gimpversion.h.in
@@ -0,0 +1,65 @@
+#pragma once
+
+// gimpversion.h.in -> gimpversion.h
+// This file is configured by Meson. Please modify meson.build files.
+
+#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
+#error "Only <libgimpbase/gimpbase.h> can be included directly."
+#endif
+
+G_BEGIN_DECLS
+
+
+/**
+ * SECTION: gimpversion
+ * @title: gimpversion
+ * @short_description: Macros and constants useful for determining
+ *                     GIMP's version number and capabilities.
+ *
+ * Macros and constants useful for determining GIMP's version number and
+ * capabilities.
+ **/
+
+/**
+ * GIMP_MAJOR_VERSION:
+ *
+ * The major GIMP version number.
+ **/
+#define GIMP_MAJOR_VERSION                              (@GIMP_MAJOR_VERSION@)
+
+/**
+ * GIMP_MINOR_VERSION:
+ *
+ * The minor GIMP version number.
+ **/
+#define GIMP_MINOR_VERSION                              (@GIMP_MINOR_VERSION@)
+
+/**
+ * GIMP_MICRO_VERSION:
+ *
+ * The micro GIMP version number.
+ **/
+#define GIMP_MICRO_VERSION                              (@GIMP_MICRO_VERSION@)
+
+/**
+ * GIMP_VERSION:
+ *
+ * The GIMP version as a string.
+ **/
+#define GIMP_VERSION                                    "@GIMP_VERSION@"
+
+/**
+ * GIMP_API_VERSION:
+ *
+ * Since: 2.2
+ **/
+#define GIMP_API_VERSION                                "@GIMP_API_VERSION@"
+
+#define GIMP_CHECK_VERSION(major, minor, micro) \
+    (GIMP_MAJOR_VERSION > (major) || \
+     (GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION > (minor)) || \
+     (GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION == (minor) && \
+      GIMP_MICRO_VERSION >= (micro)))
+
+
+G_END_DECLS
diff --git a/libgimpbase/meson.build b/libgimpbase/meson.build
new file mode 100644
index 0000000..7c39090
--- /dev/null
+++ b/libgimpbase/meson.build
@@ -0,0 +1,119 @@
+
+gimpversion = configure_file(
+  input : 'gimpversion.h.in',
+  output: 'gimpversion.h',
+  configuration: versionconfig,
+)
+
+
+gimpbaseenums = custom_target('gimpbaseenums.c',
+  input : [ 'gimpbaseenums.h', ],
+  output: [ 'gimpbaseenums.c', ],
+  command: [
+    gimp_mkenums,
+    '--fhead','#include "config.h"\n'
+            + '#include <glib-object.h>\n'
+            + '#undef GIMP_DISABLE_DEPRECATED\n'
+            + '#include "gimpbasetypes.h"\n'
+            + '#include "libgimp/libgimp-intl.h"\n',
+    gimp_mkenums_custom_target_commonargs,
+  ],
+  capture: true,
+)
+gimpcompatenums = custom_target('gimpcompatenums.c',
+  input : [ 'gimpcompatenums.h', ],
+  output: [ 'gimpcompatenums.c', ],
+  command: [
+    gimp_mkenums,
+    '--fhead','#include "config.h"\n'
+            + '#include <glib-object.h>\n'
+            + '#include "gimpbasetypes.h"\n'
+            + '#include "@INPUT@"\n'
+            + '#include "libgimp/libgimp-intl.h"\n',
+    gimp_mkenums_custom_target_commonargs,
+  ],
+  capture: true,
+)
+
+libgimpbase_sources = [
+  'gimpbase-private.c',
+  'gimpbasetypes.c',
+  'gimpchecks.c',
+  'gimpcpuaccel.c',
+  'gimpdatafiles.c',
+  'gimpenv.c',
+  'gimpmemsize.c',
+  'gimpmetadata.c',
+  'gimpparasite.c',
+  'gimpparasiteio.c',
+  'gimpprotocol.c',
+  'gimprectangle.c',
+  'gimpreloc.c',
+  'gimpsignal.c',
+  'gimpunit.c',
+  'gimputils.c',
+  'gimpvaluearray.c',
+  'gimpwire.c',
+  gimpbaseenums,
+  gimpcompatenums,
+  gimpversion,
+]
+
+libgimpbase_headers = [
+  'gimpbase.h',
+  'gimpbaseenums.h',
+  'gimpbasetypes.h',
+  'gimpcpuaccel.h',
+  'gimplimits.h',
+  'gimpparam.h',
+  'gimpchecks.h',
+  'gimpdatafiles.h',
+  'gimpenv.h',
+  'gimpmemsize.h',
+  'gimpmetadata.h',
+  'gimpparasite.h',
+  'gimpparasiteio.h',
+  'gimprectangle.h',
+  'gimpsignal.h',
+  'gimpunit.h',
+  'gimputils.h',
+  'gimpvaluearray.h',
+  gimpversion,
+]
+
+libgimpbase_cflags = [
+  '-DG_LOG_DOMAIN="LibGimpBase"',
+  '-DGIMP_BASE_COMPILATION',
+]
+
+libgimpbase = library('gimpbase-' + api_version,
+  libgimpbase_sources,
+  include_directories: rootInclude,
+  dependencies: [
+    gexiv2, gio, math,
+  ],
+  c_args:     [ libgimpbase_cflags, ],
+  vs_module_defs: 'gimpbase.def',
+  install: true,
+  version: so_version,
+)
+
+install_headers(
+  libgimpbase_headers,
+  subdir: join_paths(gimp_api_name, 'libgimpbase'),
+)
+
+
+# Test program, not installed
+executable('test-cpu-accel',
+  'test-cpu-accel.c',
+  include_directories: rootInclude,
+  dependencies: [
+    glib,
+  ],
+  c_args:     [ libgimpbase_cflags, ],
+  link_with:  [
+    libgimpbase,
+  ],
+  install: false,
+)
diff --git a/libgimpcolor/meson.build b/libgimpcolor/meson.build
new file mode 100644
index 0000000..6723f83
--- /dev/null
+++ b/libgimpcolor/meson.build
@@ -0,0 +1,71 @@
+libgimpcolor_sources = [
+  'gimpadaptivesupersample.c',
+  'gimpbilinear.c',
+  'gimpcairo.c',
+  'gimpcmyk.c',
+  'gimpcolormanaged.c',
+  'gimpcolorprofile.c',
+  'gimpcolorspace.c',
+  'gimpcolortransform.c',
+  'gimphsl.c',
+  'gimphsv.c',
+  'gimppixbuf.c',
+  'gimprgb-parse.c',
+  'gimprgb.c',
+]
+
+libgimpcolor_headers = [
+  'gimpcolor.h',
+  'gimpcolortypes.h',
+  'gimpadaptivesupersample.h',
+  'gimpbilinear.h',
+  'gimpcairo.h',
+  'gimpcmyk.h',
+  'gimpcolormanaged.h',
+  'gimpcolorprofile.h',
+  'gimpcolorspace.h',
+  'gimpcolortransform.h',
+  'gimphsl.h',
+  'gimphsv.h',
+  'gimppixbuf.h',
+  'gimprgb.h',
+]
+
+libgimpcolor_cflags = [
+  '-DG_LOG_DOMAIN="LibGimpColor"',
+  '-DGIMP_COLOR_COMPILATION',
+]
+
+
+libgimpcolor = library('gimpcolor-' + api_version,
+  libgimpcolor_sources,
+  include_directories: rootInclude,
+  dependencies: [
+    cairo, gdk_pixbuf, gegl, lcms, math,
+  ],
+  c_args:     [ libgimpcolor_cflags, ],
+  link_with:  [ libgimpbase, ],
+  vs_module_defs: 'gimpcolor.def',
+  install: true,
+  version: so_version,
+)
+
+install_headers(
+  libgimpcolor_headers,
+  subdir: join_paths(gimp_api_name, 'libgimpcolor'),
+)
+
+
+# Test program, not installed
+executable('test-color-parser',
+  'test-color-parser.c',
+  include_directories: rootInclude,
+  dependencies: [
+    cairo, gdk_pixbuf, gegl, lcms, math,
+    babl,
+    # glib,
+  ],
+  c_args:     [ libgimpcolor_cflags, ],
+  link_with:  [ libgimpbase, libgimpcolor, ],
+  install: false,
+)
diff --git a/libgimpconfig/meson.build b/libgimpconfig/meson.build
new file mode 100644
index 0000000..d8ee9ed
--- /dev/null
+++ b/libgimpconfig/meson.build
@@ -0,0 +1,70 @@
+
+gimpconfigenums = custom_target('gimpconfigenums.c',
+  input : [ 'gimpconfigenums.h', ],
+  output: [ 'gimpconfigenums.c', ],
+  command: [
+    gimp_mkenums,
+    '--fhead','#include "config.h"\n'
+            + '#include <gio/gio.h>\n'
+            + '#include "libgimpbase/gimpbase.h"\n'
+            + '#include "@INPUT@"\n'
+            + '#include "libgimp/libgimp-intl.h"\n',
+    gimp_mkenums_custom_target_commonargs,
+  ],
+  capture: true,
+)
+
+
+libgimpconfig_sources = [
+  'gimpcolorconfig.c',
+  'gimpconfig-deserialize.c',
+  'gimpconfig-error.c',
+  'gimpconfig-iface.c',
+  'gimpconfig-path.c',
+  'gimpconfig-serialize.c',
+  'gimpconfig-utils.c',
+  'gimpconfigwriter.c',
+  'gimpscanner.c',
+  gimpconfigenums
+]
+
+libgimpconfig_headers = [
+  'gimpcolorconfig.h',
+  'gimpconfig-deserialize.h',
+  'gimpconfig-error.h',
+  'gimpconfig-iface.h',
+  'gimpconfig-params.h',
+  'gimpconfig-path.h',
+  'gimpconfig-serialize.h',
+  'gimpconfig-utils.h',
+  'gimpconfig.h',
+  'gimpconfigenums.h',
+  'gimpconfigtypes.h',
+  'gimpconfigwriter.h',
+  'gimpscanner.h',
+]
+
+libgimpconfig = library('gimpconfig-' + api_version,
+  libgimpconfig_sources,
+  include_directories: rootInclude,
+  dependencies: [
+    cairo, gdk_pixbuf, gegl, gio, gio_specific,
+  ],
+  c_args:     [
+    '-DG_LOG_DOMAIN="LibGimpConfig"',
+    '-DGIMP_CONFIG_COMPILATION',
+  ],
+  link_with:  [
+    libgimpbase,
+    libgimpcolor,
+    libgimpmath,
+  ],
+  vs_module_defs: 'gimpconfig.def',
+  install: true,
+  version: so_version,
+)
+
+install_headers(
+  libgimpconfig_headers,
+  subdir: join_paths(gimp_api_name, 'libgimpconfig'),
+)
diff --git a/libgimpmath/meson.build b/libgimpmath/meson.build
new file mode 100644
index 0000000..c277d73
--- /dev/null
+++ b/libgimpmath/meson.build
@@ -0,0 +1,38 @@
+
+libgimpmath_sources = [
+  'gimpmatrix.c',
+  'gimpmd5.c',
+  'gimpvector.c',
+]
+
+libgimpmath_headers = [
+  'gimpmath.h',
+  'gimpmathtypes.h',
+  'gimpmatrix.h',
+  'gimpmd5.h',
+  'gimpvector.h',
+]
+
+
+libgimpmath = library('gimpmath-' + api_version,
+  libgimpmath_sources,
+  include_directories: rootInclude,
+  dependencies: [
+    glib, gobject, math,
+  ],
+  c_args:     [
+    '-DG_LOG_DOMAIN="LibGimpMath"',
+    '-DGIMP_MATH_COMPILATION',
+  ],
+  link_with:  [
+    libgimpbase,
+  ],
+  vs_module_defs: 'gimpmath.def',
+  install: true,
+  version: so_version,
+)
+
+install_headers(
+  libgimpmath_headers,
+  subdir: join_paths(gimp_api_name, 'libgimpmath'),
+)
diff --git a/libgimpmodule/meson.build b/libgimpmodule/meson.build
new file mode 100644
index 0000000..5ce4720
--- /dev/null
+++ b/libgimpmodule/meson.build
@@ -0,0 +1,36 @@
+
+libgimpmodule_sources = [
+  'gimpmodule.c',
+  'gimpmoduledb.c',
+]
+
+libgimpmodule_headers = [
+  'gimpmodule.h',
+  'gimpmoduledb.h',
+  'gimpmoduletypes.h',
+]
+
+
+libgimpmodule = library('gimpmodule-' + api_version,
+  libgimpmodule_sources,
+  include_directories: rootInclude,
+  dependencies: [
+    gio, glib, gmodule,
+  ],
+  c_args:     [
+    '-DG_LOG_DOMAIN="LibGimpModule"',
+    '-DGIMP_MODULE_COMPILATION',
+  ],
+  link_with:  [
+    libgimpbase,
+    libgimpconfig,
+  ],
+  vs_module_defs: 'gimpmodule.def',
+  install: true,
+  version: so_version,
+)
+
+install_headers(
+  libgimpmodule_headers,
+  subdir: join_paths(gimp_api_name, 'libgimpmodule'),
+)
diff --git a/libgimpthumb/meson.build b/libgimpthumb/meson.build
new file mode 100644
index 0000000..2724c71
--- /dev/null
+++ b/libgimpthumb/meson.build
@@ -0,0 +1,88 @@
+
+gimpthumbenums = custom_target('gimpthumb-enums.c',
+  input : [ 'gimpthumb-enums.h', ],
+  output: [ 'gimpthumb-enums.c', ],
+  command: [
+    gimp_mkenums,
+    '--fhead','#include "config.h"\n'+
+              '#include <glib-object.h>\n'+
+              '#include "gimpthumb-enums.h"\n',
+    '--fprod','/* enumerations from "@filename@" */\n',
+    '--vhead','GType\n'+
+              '@enum_name@_get_type (void)\n'+
+              '{\n'+
+              '  static const G@Type@Value values[] =\n'+
+              '  {',
+    '--vprod','    { @VALUENAME@, @valuedesc@, "@valuenick@" },',
+    '--vtail','    { 0, NULL, NULL }\n'+
+              '  };\n'+
+              '\n'+
+              '  static GType type = 0;\n'+
+              '\n'+
+              '  if (G_UNLIKELY (! type))\n'+
+              '    type = g_@type@_register_static ("@EnumName@", values);\n'+
+              '\n'+
+              '  return type;\n'+
+              '}\n',
+    '@INPUT@',
+  ],
+  capture: true,
+)
+
+libgimpthumb_sources = [
+  'gimpthumb-error.c',
+  'gimpthumb-utils.c',
+  'gimpthumbnail.c',
+  gimpthumbenums,
+]
+
+libgimpthumb_headers = [
+  'gimpthumb-enums.h',
+  'gimpthumb-error.h',
+  'gimpthumb-types.h',
+  'gimpthumb-utils.h',
+  'gimpthumb.h',
+  'gimpthumbnail.h',
+]
+
+
+libgimpthumb_cflags = [
+  '-DG_LOG_DOMAIN="LibGimpThumb"',
+  '-DGIMP_THUMB_COMPILATION',
+]
+
+libgimpthumb = library('gimpthumb-'+ api_version,
+  libgimpthumb_sources,
+  include_directories: rootInclude,
+  dependencies: [
+    gdk_pixbuf, glib, gio, gobject,
+  ],
+  c_args:     [ libgimpthumb_cflags, ],
+  link_with:  [
+    libgimpbase,
+  ],
+  vs_module_defs: 'gimpthumb.def',
+  install: true,
+  version: so_version,
+)
+
+install_headers(
+  libgimpthumb_headers,
+  subdir: join_paths(gimp_api_name, 'libgimpthumb'),
+)
+
+
+# Test program, not installed
+gimp_thumbnail_list = executable('gimp-thumbnail-list',
+  'gimp-thumbnail-list.c',
+  include_directories: rootInclude,
+  dependencies: [
+    gdk_pixbuf,
+  ],
+  c_args:     [ libgimpthumb_cflags, ],
+  link_with:  [
+    libgimpbase,
+    libgimpthumb,
+  ],
+  install: false,
+)
diff --git a/libgimpwidgets/meson.build b/libgimpwidgets/meson.build
new file mode 100644
index 0000000..f4dd748
--- /dev/null
+++ b/libgimpwidgets/meson.build
@@ -0,0 +1,217 @@
+
+gimpwidgetsenums = custom_target('gimpwidgetsenums.c',
+  input : [ 'gimpwidgetsenums.h', ],
+  output: [ 'gimpwidgetsenums.c', ],
+  command: [
+    gimp_mkenums,
+    '--fhead','#include "config.h"\n'
+            + '#include <gio/gio.h>\n'
+            + '#include "libgimpbase/gimpbase.h"\n'
+            + '#include "@INPUT@"\n'
+            + '#include "libgimp/libgimp-intl.h"\n',
+    gimp_mkenums_custom_target_commonargs,
+  ],
+  capture: true,
+)
+
+gimpwidgetsmarshal = gnome.genmarshal('gimpwidgetsmarshal',
+  prefix: '_gimp_widgets_marshal',
+  sources: 'gimpwidgetsmarshal.list',
+  install_header: false,
+)
+
+libgimpwidgets_sources = [
+  'gimp3migration.c',
+  'gimpbrowser.c',
+  'gimpbutton.c',
+  'gimpcairo-utils.c',
+  'gimpcellrenderercolor.c',
+  'gimpcellrenderertoggle.c',
+  'gimpchainbutton.c',
+  'gimpcolorarea.c',
+  'gimpcolorbutton.c',
+  'gimpcolordisplay.c',
+  'gimpcolordisplaystack.c',
+  'gimpcolorhexentry.c',
+  'gimpcolornotebook.c',
+  'gimpcolorprofilechooserdialog.c',
+  'gimpcolorprofilecombobox.c',
+  'gimpcolorprofilestore.c',
+  'gimpcolorprofileview.c',
+  'gimpcolorscale.c',
+  'gimpcolorscales.c',
+  'gimpcolorselect.c',
+  'gimpcolorselection.c',
+  'gimpcolorselector.c',
+  'gimpcontroller.c',
+  'gimpdialog.c',
+  'gimpeevl.c',
+  'gimpenumcombobox.c',
+  'gimpenumlabel.c',
+  'gimpenumstore.c',
+  'gimpenumwidgets.c',
+  'gimpfileentry.c',
+  'gimpframe.c',
+  'gimphelpui.c',
+  'gimphintbox.c',
+  'gimpicons.c',
+  'gimpintcombobox.c',
+  'gimpintstore.c',
+  'gimpmemsizeentry.c',
+  'gimpnumberpairentry.c',
+  'gimpoffsetarea.c',
+  'gimpoldwidgets.c',
+  'gimppageselector.c',
+  'gimppatheditor.c',
+  'gimppickbutton.c',
+  'gimppixmap.c',
+  'gimppreview.c',
+  'gimppreviewarea.c',
+  'gimppropwidgets.c',
+  'gimpquerybox.c',
+  'gimpruler.c',
+  'gimpscaleentry.c',
+  'gimpscrolledpreview.c',
+  'gimpsizeentry.c',
+  'gimpstringcombobox.c',
+  'gimpunitcombobox.c',
+  'gimpunitmenu.c',
+  'gimpunitstore.c',
+  'gimpwidgets-error.c',
+  'gimpwidgets-private.c',
+  'gimpwidgets.c',
+  'gimpwidgetsutils.c',
+  'gimpzoommodel.c',
+  gimpwidgetsenums,
+  gimpwidgetsmarshal,
+  icons_imgs_sources,
+]
+
+libgimpwidgets_headers = [
+  'gimp3migration.h',
+  'gimpbrowser.h',
+  'gimpbutton.h',
+  'gimpcairo-utils.h',
+  'gimpcellrenderercolor.h',
+  'gimpcellrenderertoggle.h',
+  'gimpchainbutton.h',
+  'gimpcolorarea.h',
+  'gimpcolorbutton.h',
+  'gimpcolordisplay.h',
+  'gimpcolordisplaystack.h',
+  'gimpcolorhexentry.h',
+  'gimpcolornotebook.h',
+  'gimpcolorprofilechooserdialog.h',
+  'gimpcolorprofilecombobox.h',
+  'gimpcolorprofilestore.h',
+  'gimpcolorprofileview.h',
+  'gimpcolorscale.h',
+  'gimpcolorscales.h',
+  'gimpcolorselect.h',
+  'gimpcolorselection.h',
+  'gimpcolorselector.h',
+  'gimpcontroller.h',
+  'gimpdialog.h',
+  'gimpenumcombobox.h',
+  'gimpenumlabel.h',
+  'gimpenumstore.h',
+  'gimpenumwidgets.h',
+  'gimpfileentry.h',
+  'gimpframe.h',
+  'gimphelpui.h',
+  'gimphintbox.h',
+  'gimpicons.h',
+  'gimpintcombobox.h',
+  'gimpintstore.h',
+  'gimpmemsizeentry.h',
+  'gimpnumberpairentry.h',
+  'gimpoffsetarea.h',
+  'gimpoldwidgets.h',
+  'gimppageselector.h',
+  'gimppatheditor.h',
+  'gimppickbutton.h',
+  'gimppixmap.h',
+  'gimppreview.h',
+  'gimppreviewarea.h',
+  'gimppropwidgets.h',
+  'gimpquerybox.h',
+  'gimpruler.h',
+  'gimpscaleentry.h',
+  'gimpscrolledpreview.h',
+  'gimpsizeentry.h',
+  'gimpstringcombobox.h',
+  'gimpunitcombobox.h',
+  'gimpunitmenu.h',
+  'gimpunitstore.h',
+  'gimpwidgets-error.h',
+  'gimpwidgets.h',
+  'gimpwidgetsenums.h',
+  'gimpwidgetstypes.h',
+  'gimpwidgetsutils.h',
+  'gimpzoommodel.h',
+]
+
+
+libgimpwidgets_cflags = [
+  '-DG_LOG_DOMAIN="LibGimpWidgets"',
+  '-DGIMP_WIDGETS_COMPILATION',
+]
+
+if gtk2_macos.found()
+  libgimpwidgets_sources += [
+    'gimppickbutton-quartz.c',
+  ]
+else
+  libgimpwidgets_sources += [
+    'gimppickbutton-default.c',
+    'gimppickbutton-kwin.c',
+  ]
+endif
+
+libgimpwidgets = library('gimpwidgets-'+ api_version,
+  libgimpwidgets_sources,
+  include_directories: rootInclude,
+  dependencies: [
+    gegl, gtk2, lcms, math
+  ],
+  c_args:     [ libgimpwidgets_cflags, ],
+  link_with:  [
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+  ],
+  vs_module_defs: 'gimpwidgets.def',
+  install: true,
+  version: so_version,
+)
+
+install_headers(
+  libgimpwidgets_headers,
+  subdir: join_paths(gimp_api_name, 'libgimpwidgets'),
+)
+
+
+# Test programs, not installed
+
+test_preview_area = executable('test-preview-area',
+  'test-preview-area.c',
+  include_directories: rootInclude,
+  dependencies: [
+    gtk2,
+  ],
+  c_args:     [ libgimpwidgets_cflags, ],
+  link_with:  [ libgimpwidgets, ],
+  install: false,
+  build_by_default: false,
+)
+
+test_eevl = executable('test-eevl',
+  'test-eevl.c',
+  include_directories: rootInclude,
+  dependencies: [
+    glib, gtk2,
+  ],
+  c_args:     [ libgimpwidgets_cflags, ],
+  link_with:  [ libgimpwidgets, ],
+  install: false,
+)
diff --git a/m4macros/meson.build b/m4macros/meson.build
new file mode 100644
index 0000000..17eeaaf
--- /dev/null
+++ b/m4macros/meson.build
@@ -0,0 +1,5 @@
+install_data([
+    gimp_api_name + '.m4',
+  ],
+  install_dir: join_paths(get_option('datadir'), 'aclocal')
+)
diff --git a/menus/meson.build b/menus/meson.build
new file mode 100644
index 0000000..8d60050
--- /dev/null
+++ b/menus/meson.build
@@ -0,0 +1,70 @@
+menus_dir = join_paths(prefix, gimpdatadir, 'menus')
+
+menus_files = [
+  'brush-editor-menu.xml',
+  'brushes-menu.xml',
+  'buffers-menu.xml',
+  'channels-menu.xml',
+  'colormap-menu.xml',
+  'cursor-info-menu.xml',
+  'dashboard-menu.xml',
+  'documents-menu.xml',
+  'dynamics-editor-menu.xml',
+  'dynamics-menu.xml',
+  'error-console-menu.xml',
+  'fonts-menu.xml',
+  'gradient-editor-menu.xml',
+  'gradients-menu.xml',
+  'images-menu.xml',
+  'layers-menu.xml',
+  'mypaint-brushes-menu.xml',
+  'palette-editor-menu.xml',
+  'palettes-menu.xml',
+  'patterns-menu.xml',
+  'quick-mask-menu.xml',
+  'sample-points-menu.xml',
+  'selection-menu.xml',
+  'templates-menu.xml',
+  'text-editor-toolbar.xml',
+  'text-tool-menu.xml',
+  'tool-options-menu.xml',
+  'tool-preset-editor-menu.xml',
+  'tool-presets-menu.xml',
+  'undo-menu.xml',
+  'vectors-menu.xml',
+]
+
+install_data(menus_files,
+  install_dir: menus_dir,
+)
+
+unstable_menus_args = stable ? [] : [ '--stringparam', 'unstable-menus', 'yes' ]
+
+foreach menu_filegen : [ 'dockable-menu.xml', 'image-menu.xml', ]
+  menus_files += custom_target(menu_filegen,
+    input : [ menu_filegen +'.in', 'menus.xsl', ],
+    output: [ menu_filegen ],
+    command: [
+      xsltproc,
+      '--xinclude',
+      unstable_menus_args,
+      '--output', '@OUTPUT@',
+      '@INPUT1@',
+      '@INPUT0@',
+    ],
+    install: true,
+    install_dir: menus_dir,
+  )
+endforeach
+
+
+custom_target('validate_menus',
+  input : [ menus_files, ],
+  output: [ 'validate_menus', ],
+  command: [
+    xmllint,
+    '--noout',
+    '--path', meson.current_source_dir(),
+    '@INPUT@',
+  ],
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..a1d81e2
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,1501 @@
+# Meson build file
+
+# http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP
+project('gimp', ['c', 'cpp'], version: '2.9.9',
+  meson_version: '>=0.44.0',
+  default_options: [
+    'sysconfdir=/etc',
+    'localstatedir=/var',
+    'sharedstatedir=/var/lib'
+  ],
+)
+
+conf = configuration_data()
+
+################################################################################
+######
+#     # #####   ####       # ######  ####  #####      # #    # ######  ####
+#     # #    # #    #      # #      #    #   #        # ##   # #      #    #
+######  #    # #    #      # #####  #        #        # # #  # #####  #    #
+#       #####  #    #      # #      #        #        # #  # # #      #    #
+#       #   #  #    # #    # #      #    #   #        # #   ## #      #    #
+#       #    #  ####   ####  ######  ####    #        # #    # #       ####
+
+
+
+prettyname = 'GIMP'
+full_name  = 'GNU Image Manipulation Program'
+
+# Making releases on the stable branch:
+#   micro_version += 1
+#   interface_age += 1
+
+version  = meson.project_version().split('.')
+major_version = version[0].to_int()
+minor_version = version[1].to_int()
+micro_version = version[2].to_int()
+interface_age = 0
+
+api_version   = '@0@.0'  .format(major_version)
+app_version   = '@0@.@1@'.format(major_version, minor_version)
+user_version  = '@0@.@1@'.format(major_version, minor_version)
+gimp_version  = '@0@.@1@.@2@'.format(major_version, minor_version, micro_version)
+
+gimp_command  = 'gimp-' + app_version
+gimp_api_name = 'gimp-' + api_version
+package_string  = prettyname + ' ' + gimp_version
+
+gettext_package = 'gimp20'
+conf.set_quoted('GETTEXT_PACKAGE', gettext_package)
+
+
+# TODO cleanup all this versions mess
+binary_age = 100 * minor_version + micro_version
+
+lt_current = 100 * minor_version + micro_version - interface_age
+lt_revision = interface_age
+lt_age = binary_age - interface_age
+lt_version_info = '@0@:@1@:@2@'.format(lt_current, lt_revision, lt_age)
+lt_current_minus_age = lt_current - lt_age
+
+so_version = '@0@.@1@.@2@'.format(lt_revision, lt_current, lt_current_minus_age)
+
+
+stable = (minor_version % 2 == 0)
+conf.set10('GIMP_UNSTABLE', not stable)
+
+versionconfig = configuration_data()
+versionconfig.set('GIMP_FULL_NAME',     full_name)
+versionconfig.set('GIMP_MAJOR_VERSION', major_version)
+versionconfig.set('GIMP_MINOR_VERSION', minor_version)
+versionconfig.set('GIMP_MICRO_VERSION', micro_version)
+versionconfig.set('GIMP_VERSION',       gimp_version)
+versionconfig.set('GIMP_API_VERSION',   api_version)
+
+
+################################################################################
+# Get configuration and Meson modules
+
+pkgconfig = import('pkgconfig')
+i18n      = import('i18n')
+gnome     = import('gnome')
+pythonmod = import('python3')
+
+cc        = meson.get_compiler('c')
+cxx       = meson.get_compiler('cpp')
+prefix    = get_option('prefix')
+buildtype = get_option('buildtype')
+
+
+################################################################################
+# Host system detection
+
+ #####
+#     # #   #  ####  ##### ###### #    #
+#        # #  #        #   #      ##  ##
+ #####    #    ####    #   #####  # ## #
+      #   #        #   #   #      #    #
+#     #   #   #    #   #   #      #    #
+ #####    #    ####    #   ###### #    #
+
+
+cpu = host_machine.cpu().to_lower()
+
+arch_x86_64 = (cpu == 'x86_64')
+arch_x86    = (cpu.startswith('i') and cpu.endswith('86')) or arch_x86_64
+arch_ppc64  = (cpu == 'ppc64' or cpu == 'powerpc64')
+arch_ppc    = (cpu == 'ppc'   or cpu == 'powerpc') or arch_ppc64
+
+if not (arch_x86 or arch_ppc)
+  error('Unknown host architecture')
+endif
+
+conf.set10('ARCH_X86',    arch_x86)
+conf.set10('ARCH_X86_64', arch_x86_64)
+conf.set10('ARCH_PPC',    arch_ppc)
+conf.set10('ARCH_PPC64',  arch_ppc64)
+
+
+host_os = host_machine.system().to_lower()
+message('Host os: ' + host_os)
+
+platform_win32 = (
+  host_os.contains('mingw') or
+  host_os.contains('cygwin') or
+  host_os.contains('windows')
+)
+
+platform_osx = (
+  host_os.contains('machten') or
+  host_os.contains('rhapsody') or
+  host_os.contains('darwin')
+)
+
+conf.set('PLATFORM_OSX', platform_osx)
+
+if platform_win32
+  windows = import('windows')
+  # AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
+  # AM_CONDITIONAL(MS_LIB_AVAILABLE, test "x$ms_librarian" = xyes)
+  # add_project_link_arguments(
+  #   '-Wl,--large-address-aware',
+  #   language: [ 'c', 'cpp' ]
+  # )
+endif
+# dirs_separator = platform_win32 ? '\\' : '/'
+# path_separator = platform_win32 ? ';'  : ':'
+
+
+if cc.version() == '7.2.0'
+  warning('''
+    GCC 7.2.0 has a serious bug affecting GEGL/GIMP. We advise
+    against using this version of the compiler (previous and
+    further versions are fine).
+    See https://bugzilla.gnome.org/show_bug.cgi?id=787222
+  ''')
+endif
+
+
+
+################################################################################
+# Compiler CPU extensions for optimizations
+
+ #####  ######  #     #    #######
+#     # #     # #     #    #     # #####  ##### # #    #  ####
+#       #     # #     #    #     # #    #   #   # ##  ## #
+#       ######  #     #    #     # #    #   #   # # ## #  ####
+#       #       #     #    #     # #####    #   # #    #      #
+#     # #       #     #    #     # #        #   # #    # #    #
+ #####  #        #####     ####### #        #   # #    #  ####
+
+
+if (get_option('buildtype') == 'release' or
+    get_option('buildtype') == 'debugoptimized')
+
+  # Check for compiler CPU extensions
+  cpuext_args = [
+    '-mfpmath=sse',
+    '-mmmx',
+    '-msse',
+    '-msse2',
+    '-msse4.1',
+  ]
+  add_project_arguments(cc .get_supported_arguments(cpuext_args), language: 'c')
+  add_project_arguments(cxx.get_supported_arguments(cpuext_args), language: 'cpp')
+
+  conf.set10('USE_MMX',                   cc.has_argument('-mmmx'))
+  conf.set10('USE_SSE',                   cc.has_argument('-msse'))
+  conf.set10('COMPILE_SSE2_INTRINISICS',  cc.has_argument('-msse2'))
+  conf.set10('COMPILE_SSE4_1_INTRINISICS',cc.has_argument('-msse4.1'))
+
+
+  have_altivec        = false
+  have_altivec_sysctl = false
+  if arch_ppc
+    altivec_args = cc.get_supported_arguments([
+      '-faltivec',
+      '-maltivec',
+      '-mabi=altivec',
+    ])
+
+    if altivec_args != []
+      add_project_arguments     (altivec_args, language: [ 'c', 'cpp'])
+      add_project_link_arguments(altivec_args, language: [ 'c', 'cpp'])
+
+      if host_os.contains('darwin')
+        have_altivec = true
+        have_altivec_sysctl = true
+      elif cc.compiles('''
+        int main() { asm ("vand %v0, %v0, %v0"); return 0; }
+        ''')
+        have_altivec = true
+      endif
+    endif
+  endif
+  conf.set('HAVE_ALTIVEC_SYSCTL', have_altivec_sysctl)
+  conf.set('USE_ALTIVEC',         have_altivec)
+
+endif
+
+################################################################################
+# Mandatory Dependencies
+
+######
+#     # ###### #####  ###### #    # #####  ###### #    #  ####  # ######  ####
+#     # #      #    # #      ##   # #    # #      ##   # #    # # #      #
+#     # #####  #    # #####  # #  # #    # #####  # #  # #      # #####   ####
+#     # #      #####  #      #  # # #    # #      #  # # #      # #           #
+#     # #      #      #      #   ## #    # #      #   ## #    # # #      #    #
+######  ###### #      ###### #    # #####  ###### #    #  ####  # ######  ####
+
+
+
+math              = cc.find_library('m')
+
+atk               = dependency('atk',                version: '>=2.2.0')
+
+babl_minver       = '>=0.1.42'
+babl              = dependency('babl',               version: babl_minver)
+
+cairo_minver      = '>=1.12.2'
+cairo             = dependency('cairo',              version: cairo_minver)
+
+dbus_glib         = dependency('dbus-glib-1')
+
+fontconfig_minver = platform_win32 ? '>=2.11.1'         : '>=2.2.0'
+# fontconfig_name   = platform_win32 ? 'fontconfig_win32' : 'fontconfig'
+fontconfig_name   = 'fontconfig'
+fontconfig        = dependency(fontconfig_name,      version: fontconfig_minver)
+
+freetype2         = dependency('freetype2',          version: '>=2.1.7')
+
+gdk_pixbuf_minver = '>=2.30.8'
+gdk_pixbuf        = dependency('gdk-pixbuf-2.0',     version: gdk_pixbuf_minver)
+
+gegl_minver       = '>=0.3.29'
+gegl              = dependency('gegl-0.3',           version: gegl_minver)
+
+gexiv2            = dependency('gexiv2',             version: '>=0.10.6')
+
+gio               = dependency('gio-2.0')
+gio_specific_name = platform_win32 ? 'gio-windows-2.0' : 'gio-unix-2.0'
+gio_specific      = dependency(gio_specific_name)
+
+glib              = dependency('glib-2.0',           version: '>=2.54.2')
+gobject           = dependency('gobject-2.0',        version: '>=2.54.2')
+gmodule           = dependency('gmodule-no-export-2.0')
+
+gtk2_minver       = '>=2.24.32'
+gtk2              = dependency('gtk+-2.0',           version: gtk2_minver)
+
+harfbuzz          = dependency('harfbuzz',           version: '>=0.9.19')
+lcms              = dependency('lcms2',              version: '>=2.8')
+
+libmypaint_name   = platform_win32 ? 'libmypaint' : 'libmypaint-1.3'
+libmypaint        = dependency(libmypaint_name,      version: '>=1.3.0')
+libmypaint_brushes= dependency('mypaint-brushes-1.0',required: false)
+# Mypaint-brushes not available on MingW
+# TODO should be removed when MingW adds them
+mypaint_brushes = libmypaint_brushes.found() ? [
+  libmypaint_brushes,
+] : []
+mypaint_args    = libmypaint_brushes.found() ? [] : [
+  '-DMYPAINT_BRUSHES_DIR="/usr/share/mypaint-data/1.0/brushes"',
+]
+
+pangocairo        = dependency('pangocairo',         version: '>=1.29.4')
+pangoft2          = dependency('pangoft2',           version: '>=1.29.4')
+rsvg              = dependency('librsvg-2.0',        version: '>=2.40.6')
+
+
+
+################################################################################
+# Check for GLib Networking
+
+glib_networking_works_run = cc.run(
+  '''#include <gio/gio.h>
+  int main() {
+    return !g_tls_backend_supports_tls (g_tls_backend_get_default ());
+  }''',
+  dependencies: gio,
+)
+glib_networking_works =(glib_networking_works_run.compiled()
+                    and glib_networking_works_run.returncode() == 0)
+
+if not glib_networking_works
+  if is_cross_build()
+    warning('''
+      Test for glib-networking cannot be performed while cross-compiling.
+      Make sure glib-networking is installed, otherwise GIMP will not be able
+      to display the remote help pages through the help browser, nor will it
+      be able to open remote HTTPS (or other protocol using SSL/TLS) files.
+      HTTPS is becoming the expected standard and should not be considered
+      optional anymore.
+    ''')
+  else
+    error('Test for glib-networking failed. This is required.')
+  endif
+endif
+
+################################################################################
+# Check if Pango is built with a recent fontconfig
+
+pango_check_run = cc.run(
+  '''#include <fontconfig/fontconfig.h>
+  int main() {
+    FcObjectSet *os; os = FcObjectSetBuild (FC_FAMILY, FC_WIDTH);
+  }''',
+  dependencies: fontconfig,
+)
+pango_check =(pango_check_run.compiled()
+          and pango_check_run.returncode() == 0)
+
+if not pango_check
+  warning('\n  *** '.join([
+  'You have a fontconfig >= fontconfig_required_version installed on your',
+  'system, but your Pango library is using an older version. This old version',
+  'is probably in /usr/X11R6. Look at the above output, and note that the',
+  'result for FONTCONFIG_CFLAGS is not in the result for PANGOCAIRO_CFLAGS,',
+  'and that there is likely an extra -I line, other than the ones for GLIB,',
+  'Freetype, and Pango itself. That\'s where your old fontconfig files are.',
+  'Rebuild pango, and make sure that it uses the newer fontconfig.',
+  'The easiest way be sure of this is to simply get rid of the old',
+  'fontconfig. When you rebuild pango, make sure the result for',
+  'FONTCONFIG_CFLAGS is the same as the result here.',
+  ]))
+endif
+
+################################################################################
+# Optional Dependencies
+
+libsocket         = cc.find_library('socket', required: false)
+conf.set('HAVE_LIBSOCKET', libsocket.found())
+
+
+################################################################################
+# Check for Dr. Mingw
+
+drmingw = dependency('', required: false)
+if platform_win32
+  exchndl = cc.find_library('exchndl')
+  exchndl_fn = cc.has_function('ExcHndlSetLogFileNameA', dependencies: exchndl)
+  if exchndl.found() and exchndl_fn
+    drmingw = declare_dependency(dependencies: exchndl)
+  endif
+endif
+conf.set('HAVE_EXCHNDL', drmingw.found())
+
+
+################################################################################
+# Check for x11 support
+
+x11_target = gtk2.get_pkgconfig_variable('target') == 'x11'
+
+x11   = x11_target ? dependency('x11')    : dependency('', required: false)
+xmu   = x11_target ? dependency('xmu')    : dependency('', required: false)
+xt    = x11_target ? dependency('xt')     : dependency('', required: false)
+xext  = x11_target ? dependency('xext')   : dependency('', required: false)
+xfixes= x11_target ? dependency('xfixes') : dependency('', required: false)
+conf.set('HAVE_XFIXES', xfixes.found())
+
+if x11_target
+  foreach header : [ 'X11/Xmu/WinUtil.h', 'X11/extensions/shape.h', ]
+    if not cc.has_header(header, dependencies: [ xext, xmu ])
+      error('x11 install does not provide required header ' + header)
+    endif
+  endforeach
+
+  foreach function : [ 'XmuClientWindow', 'XShapeGetRectangles', ]
+    if not cc.has_function(function, dependencies: [ xext, xmu ])
+      error('x11 install does not provide required function ' + function)
+    endif
+  endforeach
+endif
+conf.set('HAVE_X11_EXTENSIONS_SHAPE_H', cc.has_header('X11/extensions/shape.h'))
+conf.set('HAVE_X11_XMU_WINUTIL_H',      cc.has_header('X11/Xmu/WinUtil.h'))
+
+
+# Features requiring x11
+
+have_doc_shooter= x11_target
+have_print      = get_option('with-print')
+have_screenshot = get_option('with-screenshot')
+if have_print and not x11_target
+  error('Printing requires x libs')
+endif
+if have_screenshot and not x11_target
+  error('Screenshot requires x libs')
+endif
+
+
+################################################################################
+# The list of MIME types that are supported by plug-ins
+
+MIMEtypes = [
+  'image/bmp',
+  'image/g3fax',
+  'image/gif',
+  'image/svg+xml',
+  'image/x-compressed-xcf',
+  'image/x-fits',
+  'image/x-gimp-gbr',
+  'image/x-gimp-gih',
+  'image/x-gimp-pat',
+  'image/x-pcx',
+  'image/x-portable-anymap',
+  'image/x-portable-bitmap',
+  'image/x-portable-graymap',
+  'image/x-portable-pixmap',
+  'image/x-psd',
+  'image/x-sgi',
+  'image/x-tga',
+  'image/x-xbitmap',
+  'image/x-xcf',
+  'image/x-xwindowdump',
+]
+
+
+
+libtiff = dependency('libtiff-4', required: false)
+if libtiff.found()
+  MIMEtypes += 'image/tiff'
+endif
+
+
+libjpeg = dependency('libjpeg', required: false)
+if libjpeg.found()
+  MIMEtypes += 'image/jpeg'
+endif
+conf.set('HAVE_LIBJPEG', libjpeg.found())
+
+
+zlib = dependency('zlib', required: false)
+if zlib.found()
+  MIMEtypes += 'image/x-psp'
+endif
+
+
+bz2 = cc.find_library('bz2', required: false)
+
+
+liblzma = dependency('liblzma', version: '>=5.0.0', required: false)
+
+
+if get_option('with-ghostscript')
+  ghostscript = cc.find_library('gs')
+  MIMEtypes += 'application/postscript'
+else
+  ghostscript = dependency('', required: false)
+endif
+
+
+libpng = dependency('libpng', version: '>=1.6.25', required: false)
+if libpng.found()
+  MIMEtypes += [ 'image/png', 'image/x-icon']
+endif
+
+
+if get_option('with-mng')
+  libmng = cc.find_library('mng')
+else
+  libmng = dependency('', required: false)
+endif
+
+
+if get_option('with-aa')
+  libaa = cc.find_library('aa')
+else
+  libaa = dependency('', required: false)
+endif
+
+
+if get_option('with-xpm')
+  libxpm = dependency('xpm')
+  MIMEtypes += 'image/x-xpixmap'
+else
+  libxpm = dependency('', required: false)
+endif
+
+
+if get_option('with-openexr')
+  openexr = dependency('OpenEXR', version: '>=1.6.1')
+  MIMEtypes += 'image/x-exr'
+else
+  openexr = dependency('', required: false)
+endif
+
+
+if get_option('with-webp')
+  webp_deps = [
+    dependency('libwebp',     version: '>=0.6.0'),
+    dependency('libwebpmux',  version: '>=0.6.0'),
+    dependency('libwebpdemux',version: '>=0.6.0'),
+  ]
+  webp = declare_dependency(
+    dependencies: webp_deps,
+    version: webp_deps[0].version(),
+  )
+  MIMEtypes += 'image/x-webp'
+else
+  webp = dependency('', required: false)
+endif
+
+
+if get_option('with-webkit')
+  webkit = dependency('webkit-1.0', version: '>=1.6.1')
+else
+  webkit = dependency('', required: false)
+endif
+conf.set('HAVE_WEBKIT', webkit.found())
+
+
+if get_option('with-poppler')
+  # All modern distributions have at least this version and CJK/Cyrillic
+  # support should not be considered as "second-zone citizen".
+  poppler = [
+    dependency('poppler-glib', version: '>=0.44.0'),
+    dependency('poppler-data', version: '>=0.4.7'),
+  ]
+else
+  poppler = dependency('', required: false)
+endif
+
+
+if get_option('with-cairo-pdf')
+  cairopdf = dependency('cairo-pdf', version: '>=1.12.2')
+else
+  cairopdf = dependency('', required: false)
+endif
+
+
+# PDF import support is a granted feature.
+MIMEtypes += 'application/pdf'
+
+
+if get_option('with-wmf')
+  wmf = dependency('libwmf', version: '>=0.2.8')
+  MIMEtypes += [ 'image/x-wmf', ]
+else
+  wmf = dependency('', required: false)
+endif
+
+
+if get_option('with-jasper')
+  jasper = cc.find_library('jasper')
+  MIMEtypes += [ 'image/jp2', 'image/jpeg2000', 'image/jpx', ]
+else
+  jasper =
+endif
+
+
+if get_option('with-xcursor')
+  xmc = dependency('xcursor')
+  MIMEtypes += [ 'image/x-xcursor', ]
+else
+  xmc = dependency('', required: false)
+endif
+
+
+if get_option('with-alsa')
+  alsa = dependency('alsa', version: '>=1.0.0')
+else
+  alsa = dependency('', required: false)
+endif
+conf.set('HAVE_ALSA', alsa.found())
+
+
+have_linuxinput = get_option('with-linux-input')
+if have_linuxinput and not cc.has_header('linux/input.h')
+  error('linux/input.h header not found.')
+endif
+
+# DirectX DirectInput
+directx_sdk_path = get_option('with-directx-sdk')
+if directx_sdk_path != '' and platform_win32
+  if directx_sdk_path.contains(' ')
+    warning('''
+    The DirectX SDK should be accessible through a path without spaces.
+    Use MSYS mounts.
+    Ignoring your with-directx-sdk switch.
+    ''')
+  elif directx_sdk_path.contains('\\')
+    warning('''
+    Use plain (forward) slashes only for the DirectX SDK path.
+    Ignoring your with-directx-sdk switch.
+    ''')
+  else
+    directx = declare_dependency(
+      link_with: cc.find_library('dxguid',
+                    dirs:  join_paths(directx_sdk_path, 'Lib', 'x86')),
+      include_directories: join_paths(directx_sdk_path, 'Include'),
+    )
+  endif
+else
+  directx = dependency('', required: false)
+endif
+conf.set('HAVE_DX_DINPUT', directx.found())
+
+
+if get_option('with-gudev')
+  gudev = dependency('gudev-1.0', version: '>=167')
+else
+  gudev = dependency('', required: false)
+endif
+conf.set('HAVE_LIBGUDEV', gudev.found())
+
+
+################################################################################
+# Email sending
+email_message = false
+
+sendmail_choice = get_option('with-sendmail')
+if not [ '', 'false', 'no', ].contains(sendmail_choice)
+  sendmail_path = (
+    [ 'true', 'yes' ].contains(sendmail_choice) ? 'sendmail' : sendmail_choice
+  )
+  sendmail = find_program(sendmail_path, required: false)
+  if sendmail.found()
+    sendmail_path = sendmail.path()
+  else
+    warning('''
+      Sendmail specified but not found. It should be installed at runtime!
+    ''')
+  endif
+
+  email_message = '@0@ (@1@)'.format(true, sendmail_path)
+  conf.set_quoted('SENDMAIL', sendmail_path)
+else
+  xdg_email_path = 'xdg-email'
+  xdg_email = find_program(xdg_email_path, required: false)
+  if xdg_email.found()
+    xdg_email_path = xdg_email.path()
+  else
+    warning('''
+      Sendmail specified but not found. It should be installed at runtime!
+    ''')
+  endif
+
+  email_message = '@0@ (@1@)'.format(true, xdg_email_path)
+endif
+
+
+################################################################################
+# ISO codes
+
+isocodes = dependency('iso-codes')
+isocodes_prefix = isocodes.get_pkgconfig_variable('prefix')
+isocodes_location = join_paths(
+  isocodes_prefix, get_option('datadir'), 'xml', 'iso-codes'
+)
+isocodes_localedir= join_paths(
+  isocodes_prefix, get_option('datadir'), 'locale'
+)
+conf.set('HAVE_ISO_CODES', isocodes.found())
+
+
+################################################################################
+# Program tools
+
+#######
+   #     ####   ####  #       ####
+   #    #    # #    # #      #
+   #    #    # #    # #       ####
+   #    #    # #    # #           #
+   #    #    # #    # #      #    #
+   #     ####   ####  ######  ####
+
+
+
+perl = find_program('perl5', 'perl', 'perl5.005', 'perl5.004', 'perl')
+
+
+# python
+have_python = get_option('with-python')
+if have_python
+  python2 = find_program('python2')
+
+  libpython2= dependency('python2',       version: '>=2.5.0')
+  pygobject = dependency('pygobject-2.0', version: '>=2.10.4')
+  pygtk2    = dependency('pygtk-2.0',     version: '>=2.10.4')
+  pycairo   = dependency('pycairo',       version: '>=1.0.2')
+
+  pygobjectcodegen = find_program('pygobject-codegen-2.0')
+  pygtk_defsdir = pygtk2.get_pkgconfig_variable('defsdir')
+endif
+
+
+# Script-fu
+have_scriptfu = get_option('with-script-fu')
+
+
+# Check for GTK Mac Integration
+if platform_osx and (gtk2.get_pkgconfig_variable('target') == 'xquartz')
+  gtk2_macos = dependency('gtk-mac-integration-gtk2', version: '>=2.0.0',
+    required: false
+  )
+  if not gtk2_macos.found()
+    gtk2_macos = dependency('gtk-mac-integration', version: '>=2.0.0')
+  endif
+else
+  gtk2_macos = dependency('', required: false)
+endif
+
+# Check for XML tools
+xmllint             = find_program('xmllint', required: false)
+xsltproc            = find_program('xsltproc',required: false)
+intltool_merge      = find_program('intltool-merge')
+desktop_validate    = find_program('desktop-file-validate')
+gdk_pixbuf_csource  = find_program('gdk-pixbuf-csource')
+
+if get_option('with-appdata-test')
+  appstream_util = find_program('appstream-util')
+else
+  appstream_util = dependency('', required: false)
+endif
+
+
+# Check for vector icons
+have_vector_icons = get_option('with-vec-icons')
+if have_vector_icons
+  # shared-mime-info is needed to correctly detect SVG files
+  # (except on Windows, apparently).
+  if platform_win32
+    warning('''
+      You enabled vector icons on Win32. Make sure to run:
+      $ gdk-pixbuf-query-loaders.exe --update-cache
+      on the target machine (this command generates loaders.cache)
+      so that GdkPixbuf knows where to find the SVG loader.
+    ''')
+  else
+    shared_mime_info = dependency('shared-mime-info')
+  endif
+endif
+
+if get_option('with-xvfb-run')
+  xvfb_run = find_program('xvfb-run')
+else
+  xvfb_run = dependency('', required: false)
+endif
+conf.set('HAVE_XVFB_RUN', xvfb_run.found())
+
+
+if get_option('with-gtk-doc')
+  gtkdoc_scan = find_program('gtkdoc-scan', required : true)
+else
+  gtkdoc_scan = dependency('', required: false)
+endif
+
+enable_default_bin = get_option('enable-default-bin')
+enable_console_bin = get_option('enable-console-bin')
+
+
+# Possibly change default gimpdir from $XDG_CONFIG_HOME/GIMP/gimp_user_version
+gimpdir = get_option('gimpdir')
+if gimpdir == ''
+  # Default value
+  gimpdir = meson.project_name().to_upper()
+endif
+
+project_subdir = join_paths(meson.project_name(), api_version)
+gimpdatadir    = join_paths(get_option('datadir'),    project_subdir)
+gimpplugindir  = join_paths(get_option('libdir'),     project_subdir)
+gimpsysconfdir = join_paths(get_option('sysconfdir'), project_subdir)
+gimpmanpagedir = gimpdir
+localedir      = join_paths(get_option('datadir'), 'locale')
+
+
+
+# Disable deprecated APIs
+add_project_arguments([
+  '-DGIMP_DISABLE_DEPRECATED',
+  '-DBABL_DISABLE_DEPRECATED',
+  '-DGSEAL_ENABLE'
+  ],
+  language: 'c',
+)
+
+if glib.version().version_compare('>=2.43')
+  add_project_arguments([
+    '-DG_DISABLE_DEPRECATED',
+    ],
+    language: 'c',
+  )
+endif
+if gtk2.version().version_compare('>=2.26')
+  add_project_arguments([
+    '-DGDK_DISABLE_DEPRECATED',
+    '-DGTK_DISABLE_DEPRECATED',
+    ],
+    language: 'c',
+  )
+endif
+if glib.version().version_compare('>=1.32')
+  add_project_arguments([
+    '-DPANGO_DISABLE_DEPRECATED',
+    ],
+    language: 'c',
+  )
+endif
+
+
+# Require multihead safe API
+add_project_arguments([
+  '-DGDK_MULTIHEAD_SAFE',
+  '-DGTK_MULTIHEAD_SAFE',
+  ],
+  language: 'c',
+)
+
+
+# Check for internal tools
+defcheck            = find_program(join_paths('tools','defcheck.py'))
+extract_vector_icon = find_program(join_paths('tools','extract-vector-icon.sh'))
+generate_changelog  = find_program(join_paths('tools','generate_changelog.sh'))
+generate_news       = find_program(join_paths('tools','generate-news'))
+gimppath2svg        = find_program(join_paths('tools','gimppath2svg.py'))
+module_dependencies = find_program(join_paths('tools','module-dependencies.py'))
+
+gimp_mkenums        = find_program(join_paths('tools', 'gimp-mkenums'))
+gimp_mkenums_custom_target_commonargs = [
+  '--fprod','/* enumerations from "@basename@" */\n',
+  '--vhead','GType\n'+
+            '@enum_name@_get_type (void)\n'+
+            '{\n'+
+            '  static const G@Type@Value values[] =\n'+
+            '  {',
+  '--vprod','    { @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
+  '--vtail','    { 0, NULL, NULL }\n'+
+            '  };\n',
+  '--dhead','  static const Gimp@Type@Desc descs[] =\n'+
+            '  {',
+  '--dprod','    {\n'+
+            '      @VALUENAME@, @valuedesc@, @valuehelp@\n'+
+            '    },\n'+
+            '    @if (\'@valueabbrev@\' ne \'NULL\')@\n'+
+            '    /* Translators:\n'+
+            '       this is an abbreviated version of @valueudesc@.\n'+
+            '       Keep it short. */\n'+
+            '    { @VALUENAME@, @valueabbrev@, NULL },\n'+
+            '    @endif@',
+  '--dtail','    { 0, NULL, NULL }\n'+
+            '  };\n'+
+            '\n'+
+            '  static GType type = 0;\n'+
+            '\n'+
+            '  if (G_UNLIKELY (! type))\n'+
+            '    {\n'+
+            '      type = g_@type@_register_static ("@EnumName@", values);\n'+
+            '      gimp_type_set_translation_context (type, "@enumnick@");\n'+
+            '      gimp_@type@_set_value_descriptions (type, descs);\n'+
+            '    }\n'+
+            '\n'+
+            '  return type;\n'+
+            '}\n',
+  '@INPUT@',
+]
+
+
+conf.set('ENABLE_NLS',   true)
+conf.set('HAVE_GETTEXT', true)
+
+# localedir = join_paths(get_option('prefix'), get_option('localedir'))
+
+
+
+
+################################################################################
+# CFlags
+
+ #####  #######
+#     # #       #        ##    ####   ####
+#       #       #       #  #  #    # #
+#       #####   #      #    # #       ####
+#       #       #      ###### #  ###      #
+#     # #       #      #    # #    # #    #
+ #####  #       ###### #    #  ####   ####
+
+
+
+if get_option('profiling') and cc.get_id() == 'gcc'
+  add_project_arguments     ('-pg', language: [ 'c', 'cpp', ])
+  add_project_link_arguments('-pg', language: [ 'c', 'cpp', ])
+endif
+
+if get_option('ansi')
+  add_project_arguments('-ansi', '-pedantic', language: [ 'c', 'cpp', ])
+endif
+
+warning_cflags = [
+  '-fdiagnostics-show-option',
+  '-fno-common',
+
+  '-Wdeclaration-after-statement',
+  '-Wformat-security',
+  '-Winit-self',
+  '-Wlogical-op',
+  '-Wmissing-declarations',
+  '-Wmissing-format-attribute',
+  '-Wold-style-definition',
+  '-Wpointer-arith',
+  '-Wreturn-type',
+  '-Wtype-limits',
+
+  # You can uncomment this to debug with less warning outputs
+  # '-Wno-deprecated-declarations',
+
+  '-Werror=implicit-function-declaration',
+  '-Werror=strict-prototypes',
+]
+add_project_arguments(cc .get_supported_arguments(warning_cflags), language: 'c')
+add_project_arguments(cxx.get_supported_arguments(warning_cflags), language: 'cpp')
+
+# Ensure MSVC-compatible struct packing convention is used when
+# compiling for Win32 with gcc.
+if platform_win32 and cc.get_id() == 'gcc'
+  msvc_compat_args = cc.first_supported_argument([
+    '-fnative-struct',
+    '-mms-bitfielads',
+  ])
+  if msvc_compat_args == []
+    warning('''
+      GCC does not support '-fnative-struct' nor '-mms-bitfields'.
+      Build will be incompatible with GTK+ DLLs.
+    ''')
+  endif
+  add_project_arguments(msvc_compat_args, language: [ 'c', 'cpp' ])
+endif
+
+
+conf.set('HAVE__NL_MEASUREMENT_MEASUREMENT',
+  cc.compiles('''
+    #include<langinfo.h>
+    int main() {
+      char c = *((unsigned char *)  nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
+    }
+  ''')
+)
+
+
+
+################################################################################
+# Miscelaneous configuration
+
+#     #
+##   ## #  ####   ####
+# # # # # #      #    #
+#  #  # #  ####  #
+#     # #      # #
+#     # # #    # #    #
+#     # #  ####   ####
+
+
+
+# Enable support for multiprocessing
+conf.set10('ENABLE_MP', get_option('enable-multiproc'))
+
+# Check for available functions
+foreach fn : [
+    'alloca',
+    'backtrace',
+    'bind_textdomain_codeset',
+    'dcgettext',
+    'difftime',
+    'finite',
+    'finite',
+    'fsync',
+    'getaddrinfo',
+    'getnameinfo',
+    'gettext',
+    'isfinite',
+    'mmap',
+    'rint',
+    'vprintf',
+  ]
+  macro_name = 'HAVE_' + fn.to_upper().underscorify()
+  conf.set(macro_name, cc.has_function(fn) ? 1 : false)
+endforeach
+
+
+# Check for available headers
+foreach header : [
+    'alloca.h',
+    'dlfcn.h',
+    'execinfo.h',
+    'ieeefp.h',
+    'inttypes.h',
+    'locale.h',
+    'math.h',
+    'memory.h',
+    # 'sys/mman.h',
+    # 'sys/ipc.h',
+    # 'sys/shm.h',
+    'stdint.h',
+    'stdlib.h',
+    'string.h',
+    'strings.h',
+    'sys/param.h',
+    'sys/select.h',
+    'sys/stat.h',
+    'sys/time.h',
+    'sys/times.h',
+    'sys/types.h',
+    'sys/wait.h',
+    'unistd.h',
+  ]
+  macro_name = 'HAVE_' + header.to_upper().underscorify()
+  conf.set(macro_name, cc.has_header(header) ? 1 : false)
+endforeach
+
+conf.set('HAVE_MMAN_H', cc.has_header('sys/mman.h'))
+conf.set('HAVE_IPC_H',  cc.has_header('sys/ipc.h'))
+conf.set('HAVE_SHM_H',  cc.has_header('sys/shm.h'))
+
+
+################################################################################
+# Check for shared memory handling
+
+shmem_choice = get_option('shmem-type')
+if shmem_choice == 'auto'
+  shmem_choice = 'sysv'
+
+  # MacOS X has broken SysV shm
+  if platform_osx
+    shmem_choice = 'posix'
+  endif
+  if platform_win32
+    shmem_choice = 'win32'
+  endif
+endif
+
+if shmem_choice == 'sysv'
+  check_ip_rmid_deferred_release = cc.run('''
+  #include <sys/types.h>
+  #include <sys/ipc.h>
+  #include <sys/shm.h>
+  int main() {
+    int id = shmget(IPC_PRIVATE, 4, IPC_CREAT | 0600);
+    if (id == -1)
+      exit(2);
+
+    char *shmaddr = shmat(id, 0, 0);
+    shmctl(id, IPC_RMID, 0);
+    if ((char*) shmat(id, 0, 0) == (char*) -1) {
+      shmdt(shmaddr);
+      exit(1);
+    }
+    shmdt(shmaddr);
+    shmdt(shmaddr);
+    exit(0);
+  }
+  ''').returncode() == 0
+  conf.set('IPC_RMID_DEFERRED_RELEASE', check_ip_rmid_deferred_release)
+  conf.set('USE_SYSV_SHM', true)
+elif shmem_choice == 'posix'
+  conf.set('USE_POSIX_SHM', true)
+endif
+
+
+conf.set('NO_FD_SET',
+  not platform_win32
+  and not cc.compiles('''
+    #include <sys/types.h>
+    int main() { fd_set readMask, writeMask; return 0; }
+  ''')
+)
+
+
+
+# GCC attributes
+conf.set('HAVE_FUNC_ATTRIBUTE_DESTRUCTOR',
+  cc.compiles('''__attribute__ ((destructor)) void destructor_fn(void) { }''')
+)
+
+
+
+
+################################################################################
+# Set/regroup common CFlags for subdirs
+
+######
+#     # ###### ###### # #    # ######  ####
+#     # #      #      # ##   # #      #
+#     # #####  #####  # # #  # #####   ####
+#     # #      #      # #  # # #           #
+#     # #      #      # #   ## #      #    #
+######  ###### #      # #    # ######  ####
+
+# Global arguments
+# Should be moved into config.h someday
+
+config_defines = [
+  # Compiler
+  '-DCC='                   +'"'+ cc.get_id()           +'"',
+  '-DCC_VERSION='           +'"'+ cc.version()          +'"',
+
+  # Names
+  '-DGIMP_PACKAGE='         +'"'+ meson.project_name()  +'"',
+  '-DPACKAGE_NAME='         +'"'+ meson.project_name()  +'"',
+  '-DPACKAGE_STRING='       +'"'+ package_string        +'"',
+  '-DGIMP_COMMAND='         +'"'+ gimp_command          +'"',
+
+  # Versions
+  '-DGIMP_APP_VERSION='     +'"'+ app_version           +'"',
+  '-DGIMP_DATA_VERSION='    +'"'+ api_version           +'"',
+  '-DGIMP_PLUGIN_VERSION='  +'"'+ api_version           +'"',
+  '-DGIMP_TOOL_VERSION='    +'"'+ api_version           +'"',
+
+  '-DGIMP_SYSCONF_VERSION=' +'"'+ api_version           +'"',
+  '-DGIMP_USER_VERSION='    +'"'+ user_version          +'"',
+  '-DGIMP_APP_VERSION_STRING="' + app_version           +'"',
+
+  # Directories
+  '-DPREFIX='         +'"'+ prefix                +'"',
+  '-DEXEC_PREFIX='    +'"'+ prefix                +'"',
+  '-DGIMPDIR='        +'"'+ gimpdir               +'"',
+  '-DSYSCONFDIR='     +'"'+ gimpsysconfdir        +'"',
+  '-DDATADIR='        +'"'+ join_paths(prefix, gimpdatadir)    +'"',
+  '-DGIMPDATADIR='    +'"'+ join_paths(prefix, gimpdatadir)    +'"',
+  '-DGIMPPLUGINDIR='  +'"'+ join_paths(prefix, gimpplugindir)  +'"',
+  '-DPLUGINDIR='      +'"'+ join_paths(prefix, gimpplugindir)  +'"',
+  '-DLOCALEDIR='      +'"'+ join_paths(prefix, localedir)      +'"',
+
+  '-DLOCALSTATEDIR='  +'"'+ get_option('localstatedir')        +'"',
+  '-DSHAREDSTATEDIR=' +'"'+ get_option('sharedstatedir')       +'"', # /usr/com?
+  '-DSYSCONFDIR='     +'"'+ get_option('sysconfdir')           +'"',
+  '-DBINDIR='         +'"'+ join_paths(prefix, get_option('bindir'))       +'"',
+  '-DDATAROOTDIR='    +'"'+ join_paths(prefix, get_option('datadir'))      +'"',
+  '-DINFODIR='        +'"'+ join_paths(prefix, get_option('infodir'))      +'"',
+  '-DLIBDIR='         +'"'+ join_paths(prefix, get_option('libdir'))       +'"',
+  '-DLIBEXECDIR='     +'"'+ join_paths(prefix, get_option('libexecdir'))   +'"',
+  '-DMANDIR='         +'"'+ join_paths(prefix, get_option('mandir'))       +'"',
+  '-DSBINDIR='        +'"'+ join_paths(prefix, get_option('sbindir'))      +'"',
+  '-DSYSDATADIR='     +'"'+ join_paths(prefix, get_option('datadir'))      +'"',
+
+  # Third-party/Misc
+  '-DISO_CODES_LOCATION='   +'"'+ isocodes_location  +'"',
+  '-DISO_CODES_LOCALEDIR='  +'"'+ isocodes_localedir +'"',
+
+  '-DHAVE_CONFIG_H',
+]
+
+add_project_arguments(
+  config_defines,
+  language: [ 'c', 'cpp', ],
+)
+
+if platform_osx
+  # libgimp_cflags += '-xobjective-c'
+  # libgimp_lflags += ['-framework', 'Cocoa']
+endif
+
+
+rootInclude = include_directories('.')
+appInclude  = include_directories('app')
+
+
+################################################################################
+# Generate files
+
+  #####                                   #######
+ #     #  ####  #    # ###### #  ####     #       # #      ######  ####
+ #       #    # ##   # #      # #    #    #       # #      #      #
+ #       #    # # #  # #####  # #         #####   # #      #####   ####
+ #       #    # #  # # #      # #  ###    #       # #      #           #
+ #     # #    # #   ## #      # #    #    #       # #      #      #    #
+  #####   ####  #    # #      #  ####     #       # ###### ######  ####
+
+
+
+gitversion_h1 = vcs_tag(
+  input : 'app/git-version.h.in',
+  output: 'git-version.h.in.1',
+  command: [ 'git', 'describe', '--always', ],
+  replace_string: '@GIMP_GIT_VERSION@',
+  fallback: '',
+)
+gitversion_h2 = vcs_tag(
+  input : gitversion_h1,
+  output: 'git-version.h.in.2',
+  command: [ 'git', 'rev-parse', '--short', 'HEAD', ],
+  replace_string: '@GIMP_GIT_VERSION_ABBREV@',
+  fallback: '',
+)
+gitversion_h = vcs_tag(
+  input : gitversion_h2,
+  output: 'git-version.h',
+  command: [ 'git', 'log', '-n1', '--date=format:%Y', '--pretty=%cd', ],
+  replace_string: '@GIMP_GIT_LAST_COMMIT_YEAR@',
+  fallback: '',
+)
+
+
+install_conf = configuration_data()
+install_conf.set('GIMP_APP_VERSION', app_version)
+install_conf.set('GIMP_PKGCONFIG_VERSION', gimp_version)
+install_conf.set('GIMP_VERSION', gimp_version)
+install_conf.set('ATK_REQUIRED_VERSION',          atk         .version())
+install_conf.set('BABL_REQUIRED_VERSION',         babl        .version())
+install_conf.set('CAIRO_PDF_REQUIRED_VERSION',    cairopdf    .version())
+install_conf.set('CAIRO_REQUIRED_VERSION',        cairo       .version())
+install_conf.set('FONTCONFIG_REQUIRED_VERSION',   fontconfig  .version())
+install_conf.set('FONTCONFIG_WIN32_RECOMMENDED_VERSION', fontconfig.version())
+install_conf.set('FREETYPE2_REQUIRED_VERSION',    freetype2   .version())
+install_conf.set('GDK_PIXBUF_REQUIRED_VERSION',   gdk_pixbuf  .version())
+install_conf.set('GEGL_REQUIRED_VERSION',         gegl        .version())
+install_conf.set('GLIB_REQUIRED_VERSION',         glib        .version())
+install_conf.set('GTK_REQUIRED_VERSION',          gtk2        .version())
+install_conf.set('HARFBUZZ_REQUIRED_VERSION',     harfbuzz    .version())
+install_conf.set('INTLTOOL_REQUIRED_VERSION',     '0.40.1')
+install_conf.set('LCMS_REQUIRED_VERSION',         lcms        .version())
+install_conf.set('LIBLZMA_REQUIRED_VERSION',      liblzma     .version())
+install_conf.set('LIBMYPAINT_REQUIRED_VERSION',   libmypaint  .version())
+install_conf.set('LIBPNG_REQUIRED_VERSION',       libpng      .version())
+install_conf.set('OPENEXR_REQUIRED_VERSION',      openexr     .version())
+install_conf.set('PANGOCAIRO_REQUIRED_VERSION',   pangocairo  .version())
+install_conf.set('POPPLER_DATA_REQUIRED_VERSION', poppler[1]  .version())
+install_conf.set('POPPLER_REQUIRED_VERSION',      poppler[0]  .version())
+install_conf.set('PYTHON2_REQUIRED_VERSION',      '2.5.0')
+install_conf.set('RSVG_REQUIRED_VERSION',         rsvg        .version())
+install_conf.set('WEBKIT_REQUIRED_VERSION',       webkit      .version())
+install_conf.set('WEBP_REQUIRED_VERSION',         webp        .version())
+install_conf.set('WMF_REQUIRED_VERSION',          wmf         .version())
+install_conf.set('XGETTEXT_RECOMMENDED_VERSION', '0.19')
+
+configure_file(
+  input : 'INSTALL.in',
+  output: 'INSTALL',
+  configuration: install_conf
+)
+
+
+configure_file(
+  output: 'config.h',
+  configuration: conf
+)
+
+
+pkgconfig.generate(filebase: 'gimp-' + api_version,
+  name: prettyname,
+  description: 'GIMP Library',
+  version: gimp_version,
+  requires: [
+    'gdk-pixbuf-2.0 ' + gdk_pixbuf_minver,
+    'cairo '          + cairo_minver,
+    'gegl-0.3 '       + gegl_minver,
+  ],
+  libraries: [
+    '-L${libdir}',
+    '-lgimp-'       + api_version,
+    '-lgimpmath-'   + api_version,
+    '-lgimpconfig-' + api_version,
+    '-lgimpcolor-'  + api_version,
+    '-lgimpbase-'   + api_version,
+  ],
+  subdirs: [
+    gimp_api_name,
+  ],
+  variables: [
+    'datarootdir='    +'${prefix}/'+ get_option('datadir'),
+    'gimpdatadir='    +'${prefix}/'+ gimpdatadir,
+    'gimplibdir='     +'${prefix}/'+ gimpplugindir,
+    'gimpsysconfdir=' + gimpsysconfdir,
+    'gimplocaledir='  +'${prefix}/'+ localedir,
+  ],
+)
+
+pkgconfig.generate(filebase: 'gimpthumb-' + api_version,
+  name: 'GIMP Thumb',
+  description: 'GIMP Thumbnail Library',
+  version: gimp_version,
+  requires: [
+    'gdk-pixbuf-2.0 ' + gdk_pixbuf_minver,
+  ],
+  libraries: [
+    '-L${libdir}',
+    '-lgimpthumb-'  + api_version,
+  ],
+  subdirs: [
+    gimp_api_name,
+  ],
+)
+
+pkgconfig.generate(filebase: 'gimpui-' + api_version,
+  name: 'GIMP UI',
+  description: 'GIMP User Interface Library',
+  version: gimp_version,
+  requires: [
+    'gimp-' + api_version + ' >= ' + app_version,
+    'gtk+-2.0 ' + gtk2_minver,
+  ],
+  libraries: [
+    '-L${libdir}',
+    '-lgimpui-'  + api_version,
+    '-lgimpwidgets-' + api_version,
+    '-lgimpmodule-'  + api_version,
+  ],
+  subdirs: [
+    gimp_api_name,
+  ],
+)
+
+
+################################################################################
+# Miscelaneous targets
+
+
+ #     #                    #######
+ ##   ## #  ####   ####        #      ##   #####   ####  ###### #####  ####
+ # # # # # #      #    #       #     #  #  #    # #    # #        #   #
+ #  #  # #  ####  #            #    #    # #    # #      #####    #    ####
+ #     # #      # #            #    ###### #####  #  ### #        #        #
+ #     # # #    # #    #       #    #    # #   #  #    # #        #   #    #
+ #     # #  ####   ####        #    #    # #    #  ####  ######   #    ####
+
+
+
+if xsltproc.found()
+  custom_target('AUTHORS',
+    input : [ 'authors.xsl', 'authors.xml', ],
+    output: 'AUTHORS',
+    command: [
+      xsltproc,
+      '-o', '@OUTPUT@',
+      '@INPUT@',
+    ],
+    build_by_default: false,
+  )
+  custom_target('authors.md',
+    input : [ 'authors4gimp-web.xsl', 'authors.xml', ],
+    output: 'authors.md',
+    command: [
+      xsltproc,
+      '--stringparam', 'today', '`date --iso-8601=seconds`',
+      '-o', '@OUTPUT@',
+      '@INPUT@',
+    ],
+    build_by_default: false,
+  )
+endif
+
+if xmllint.found()
+  custom_target('validate-authors',
+    input : [ 'authors.xml', ],
+    output: [ 'validate-authors', ],
+    command: [
+      xmllint,
+      '--noout',
+      '--valid', '@INPUT@',
+    ],
+    build_by_default: false,
+  )
+endif
+
+if python2.found()
+  # TODO this python script is waiting for autotools directory/files structure
+  custom_target('check-defs',
+    input : [ ],
+    output: [ 'check-defs', ],
+    command: [
+      python2,
+      join_paths(meson.source_root(), 'tools','defcheck.py'),
+      meson.source_root(),
+    ],
+    build_by_default: false,
+  )
+endif
+
+custom_target('Changelog',
+  input : [ ],
+  output: [ 'Changelog', ],
+  command: [
+    generate_changelog,
+    meson.source_root(),
+    '@OUTPUT@'
+  ],
+  build_by_default: false,
+)
+
+
+################################################################################
+# Subdirs
+
+  #####
+ #     # #    # #####  #####  # #####   ####
+ #       #    # #    # #    # # #    # #
+  #####  #    # #####  #    # # #    #  ####
+       # #    # #    # #    # # #####       #
+ #     # #    # #    # #    # # #   #  #    #
+  #####   ####  #####  #####  # #    #  ####
+
+if platform_win32
+  subdir('build/windows')
+
+  if get_option('windows-installer')
+    subdir('po-windows-installer')
+    subdir('build/windows/installer')
+  endif
+endif
+
+# Tools
+subdir('libgimpbase')
+subdir('tools')
+
+# Translations
+subdir('po')
+subdir('po-libgimp')
+subdir('po-plug-ins')
+subdir('po-python')
+subdir('po-script-fu')
+subdir('po-tags')
+subdir('po-tips')
+# Data / Desktop / xml files
+subdir('cursors')
+subdir('data')
+subdir('desktop')
+subdir('etc')
+subdir('icons')
+subdir('m4macros')
+subdir('menus')
+subdir('themes')
+
+# Libraries (order here is important!)
+subdir('libgimpcolor')
+subdir('libgimpmath')
+subdir('libgimpconfig')
+subdir('libgimpmodule')
+subdir('libgimpthumb')
+subdir('libgimpwidgets')
+subdir('libgimp')
+
+# Executables, plugins
+subdir('modules')
+subdir('plug-ins')
+subdir('app')
+subdir('pdb')
+
+# Docs
+subdir('devel-docs')
+subdir('docs')
+
+
+################################################################################
+
+message('''
+Extra Binaries:
+  gimp-console:        @0@'''.format(enable_console_bin) +'''
+
+Optional Features:
+  Language selection:  @0@'''.format(isocodes.found()) +'''
+  Vector icons:        @0@'''.format(have_vector_icons) +'''
+  Dr. Mingw (Win32):   @0@'''.format(drmingw.found()) +'''
+
+Optional Plug-Ins:
+  Ascii Art:           @0@'''.format(libaa.found()) +'''
+  Ghostscript:         @0@'''.format(ghostscript.found()) +'''
+  Help Browser:        @0@'''.format(webkit.found()) +'''
+  JPEG 2000:           @0@'''.format(jasper.found()) +'''
+  MNG:                 @0@'''.format(libmng.found()) +'''
+  OpenEXR:             @0@'''.format(openexr.found()) +'''
+  WebP:                @0@'''.format(webp.found()) +'''
+  PDF (export):        @0@'''.format(cairopdf.found()) +'''
+  Print:               @0@'''.format(have_print) +'''
+  Python 2:            @0@'''.format(have_python) +'''
+  Script-Fu:           @0@'''.format(have_scriptfu) +'''
+  TWAIN (Win32):       @0@'''.format(platform_win32) +'''
+  Webpage:             @0@'''.format(webkit.found()) +'''
+  WMF:                 @0@'''.format(wmf.found()) +'''
+  X11 Mouse Cursor:    @0@'''.format(xmc.found()) +'''
+  XPM:                 @0@'''.format(libxpm.found()) +'''
+  Email:               @0@'''.format(email_message) +'''
+
+Optional Modules:
+  ALSA (MIDI Input):   @0@'''.format(alsa.found()) +'''
+  Linux Input:         @0@ (GUdev support: @0@)'''
+                        .format(have_linuxinput, gudev.found()) +'''
+  DirectInput (Win32): @0@'''.format(directx.found()) +'''
+
+Tests:
+  Use xvfb-run         @0@'''.format(xvfb_run.found()) +'''
+  Test appdata         @0@'''.format(appstream_util.found()) +'''
+'''
+)
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..4b9ec84
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,34 @@
+option('ansi',              type: 'boolean', value: false,description: 'Turn on strict ansi')
+option('enable-console-bin',type: 'boolean', value: true, description: 'Build a console-only binary which 
does not link GTK+')
+option('enable-default-bin',type: 'boolean', value: true, description: 'Build default Gtk+ binary')
+option('enable-multiproc',  type: 'boolean', value: true, description: 'Support for multiple processors')
+option('gimpdir',           type: 'string',  value: '',   description: 'Change default gimpdir from 
~/.config/GIMP/2.9 to ~/.config/DIR/2.9 (if relative), or to DIR (if absolute)')
+option('profiling',         type: 'boolean', value: true, description: 'Enable profiling')
+option('windows-installer', type: 'boolean', value: false,description: 'Generate files needed for the 
Windows installer')
+option('with-aa',           type: 'boolean', value: true, description: 'AA plugin')
+option('with-alsa',         type: 'boolean', value: true, description: 'Alsa support in midi input 
controller')
+option('with-appdata-test', type: 'boolean', value: true, description: 'Validate the appdata file')
+option('with-cairo-pdf',    type: 'boolean', value: true, description: 'Cairo-pdf support')
+option('with-directx-sdk',  type: 'string',  value: '',   description: 'Prefix where the DirectX SDK is 
installed(optional)')
+option('with-ghostscript',  type: 'boolean', value: true, description: 'Ghostscript support')
+option('with-gtk-doc',      type: 'boolean', value: true, description: 'Build developer documentation for 
app')
+option('with-gudev',        type: 'boolean', value: true, description: 'Gudev support')
+option('with-jasper',       type: 'boolean', value: true, description: 'Jpeg-2000 support')
+option('with-linux-input',  type: 'boolean', value: true, description: 'Linux input event controller module')
+option('with-mng',          type: 'boolean', value: true, description: 'Mng support')
+option('with-openexr',      type: 'boolean', value: true, description: 'Openexr support')
+option('with-poppler',      type: 'boolean', value: true, description: 'Poppler support')
+option('with-print',        type: 'boolean', value: true, description: 'Print support')
+option('with-python',       type: 'boolean', value: true, description: 'Python2 support')
+option('with-screenshot',   type: 'boolean', value: true, description: 'Screensh')
+option('with-script-fu',    type: 'boolean', value: true, description: 'Script-fu extension')
+option('with-sendmail',     type: 'string',  value: '',   description: 'Use Sendmail instead of Xdg-email')
+option('with-vec-icons',    type: 'boolean', value: true, description: 'Use vector icons rather than raster 
ones')
+option('with-webkit',       type: 'boolean', value: false,description: 'Help browser and webpage plugins')
+option('with-webp',         type: 'boolean', value: true, description: 'Webp support')
+option('with-wmf',          type: 'boolean', value: true, description: 'Wmf support')
+option('with-xcursor',      type: 'boolean', value: true, description: 'Xcursor support')
+option('with-xpm',          type: 'boolean', value: true, description: 'XPM support')
+option('with-xvfb-run',     type: 'boolean', value: true, description: 'Use xvfb-run for UI-dependent 
automatic tests')
+option('shmem-type',        type: 'combo', value: 'auto', description: 'Shared memory transport type',
+        choices: [ 'none', 'sysv', 'posix', 'win32', 'auto' ])
diff --git a/modules/meson.build b/modules/meson.build
new file mode 100644
index 0000000..792c6fc
--- /dev/null
+++ b/modules/meson.build
@@ -0,0 +1,98 @@
+
+modules_deps = [
+  gtk2, babl, gegl, math,
+]
+
+color_selector_libs = [
+  libgimpcolor,
+  libgimpconfig,
+  libgimpmodule,
+  libgimpwidgets,
+]
+controller_libs = [
+  libgimpmodule,
+  libgimpwidgets,
+]
+display_filter_libs = [
+  libgimpbase,
+  libgimpcolor,
+  libgimpconfig,
+  libgimpmodule,
+  libgimpwidgets,
+]
+
+# Name, Sources, deps, link.
+modules = [
+  [ 'color-selector-cmyk',
+    [ 'color-selector-cmyk.c', ],
+    [], [ color_selector_libs, ],
+  ],
+  [ 'color-selector-water',
+    [ 'color-selector-water.c', ],
+    [ ], [ color_selector_libs, ],
+  ],
+  [ 'color-selector-wheel',
+    [ 'color-selector-wheel.c', 'gimpcolorwheel.c', ],
+    [ ], [ color_selector_libs, ],
+  ],
+  [ 'display-filter-clip-warning',
+    [ 'display-filter-clip-warning.c', ],
+    [], [ display_filter_libs, ],
+  ],
+  [ 'display-filter-color-blind',
+    [ 'display-filter-color-blind.c', ],
+    [], [ display_filter_libs, ],
+  ],
+  [ 'display-filter-gamma',
+    [ 'display-filter-gamma.c', ],
+    [ ], [ display_filter_libs, ],
+  ],
+  [ 'display-filter-high-contrast',
+    [ 'display-filter-high-contrast.c', ],
+    [ ], [ display_filter_libs, ],
+  ],
+]
+
+if have_linuxinput
+  modules += [
+    [ 'controller-linux-input',
+      [ 'controller-linux-input.c', 'gimpinputdevicestore-gudev.c', ],
+      [ gudev, ], [ controller_libs, ],
+    ],
+  ]
+endif
+
+if directx.found()
+  modules += [
+    [ 'controller-dx-input',
+      [ 'controller-dx-dinput.c', 'gimpinputdevicestore-dx.c', ],
+      [ directx,  ], [ controller_libs, '-lrpcrt4', ],
+    ],
+  ]
+endif
+
+if not platform_win32
+  modules += [
+    [ 'controller-midi',
+      [ 'controller-midi.c', ],
+      [ alsa, ], [ controller_libs, ],
+    ],
+  ]
+endif
+
+
+foreach module : modules
+  name = module[0]
+  srcs = module[1]
+  deps = module[2]
+  link = module[3]
+
+  library(name,
+    srcs,
+    include_directories: rootInclude,
+    dependencies: modules_deps + deps,
+    link_with: link,
+    install: true,
+    install_dir: join_paths(gimpplugindir, 'modules'),
+  )
+endforeach
diff --git a/pdb/meson.build b/pdb/meson.build
new file mode 100644
index 0000000..82f79b5
--- /dev/null
+++ b/pdb/meson.build
@@ -0,0 +1,151 @@
+pdbgen_backup = false
+pdbgen_groups = false
+
+pdb_names = [
+  'brush_select',
+  'brush',
+  'brushes',
+  'buffer',
+  'channel',
+  'color',
+  'context',
+  'debug',
+  'display',
+  'drawable_color',
+  'drawable_transform',
+  'drawable',
+  'dynamics',
+  'edit',
+  'fileops',
+  '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',
+  'paths',
+  'pattern_select',
+  'pattern',
+  'patterns',
+  'plug_in_compat',
+  'plug_in',
+  'procedural_db',
+  'progress',
+  'selection_tools',
+  'selection',
+  'text_layer',
+  'text_tool',
+  'transform_tools',
+  'unit',
+  'vectors',
+]
+
+pdb_sources = []
+pdb_outputs = []
+foreach name : pdb_names
+  pdb_sources += join_paths('pdb', name + '.pdb')
+  pdb_sources += join_paths('pdb', 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(),
+  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,
+)
+
+enumgen_pl = files('enumgen.pl')
+
+enums_pl = custom_target('enums.pl',
+  input : [ enumgen_pl, enum_headers, ],
+  output: [ 'enums.pl', ],
+  command: [
+    perl_env, enumgen_pl,
+    enum_headers,
+  ],
+)
+
+pdbgen_pl   = files('pdbgen.pl')
+app_pl      = files('app.pl')
+lib_pl      = files('lib.pl')
+pdb_pl      = files('pdb.pl')
+util_pl     = files('util.pl')
+stddefs_pdb = files('stddefs.pdb')
+
+pdbgen = custom_target('stamp-pdbgen',
+  input : [
+    app_pl, enums_pl, groups_pl, lib_pl, pdb_pl, pdbgen_pl, util_pl, stddefs_pdb,
+    pdb_sources,
+  ],
+  output: [ 'stamp-pdbgen', ],
+  command: [
+    perl_env, pdbgen_pl,
+    'app', 'lib',
+  ],
+)
+
+enumcode_pl = files('enumcode.pl')
+
+stamp_enumcode = custom_target('stamp-enum-code',
+  input : [ enumcode_pl, ],
+  output: [ 'stamp-enum-code', ],
+  command: [
+    perl_env, enumcode_pl,
+  ],
+)
diff --git a/plug-ins/common/meson.build b/plug-ins/common/meson.build
new file mode 100644
index 0000000..cacfc21
--- /dev/null
+++ b/plug-ins/common/meson.build
@@ -0,0 +1,525 @@
+
+common_exes_list = [
+  [
+    'align-layers',
+    [ 'align-layers.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'animation-optimize',
+    [ 'animation-optimize.c', ],
+    [ gtk2, gegl, gdk_pixbuf, cairo ],
+  ],
+  [
+    'animation-play',
+    [ 'animation-play.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'blinds',
+    [ 'blinds.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'blur',
+    [ 'blur.c', ],
+    [ gtk2, gegl, gdk_pixbuf, cairo, ],
+  ],
+  [
+    'border-average',
+    [ 'border-average.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'cartoon',
+    [ 'cartoon.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'checkerboard',
+    [ 'checkerboard.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'cml-explorer',
+    [ 'cml-explorer.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'color-cube-analyze',
+    [ 'color-cube-analyze.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'color-enhance',
+    [ 'color-enhance.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'colorify',
+    [ 'colorify.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'colormap-remap',
+    [ 'colormap-remap.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'compose',
+    [ 'compose.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'contrast-normalize',
+    [ 'contrast-normalize.c', ],
+    [ gtk2, gegl, gdk_pixbuf, cairo, ],
+  ],
+  [
+    'contrast-retinex',
+    [ 'contrast-retinex.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'crop-zealous',
+    [ 'crop-zealous.c', ],
+    [ gtk2, gegl, gdk_pixbuf, cairo, ],
+  ],
+  [
+    'curve-bend',
+    [ 'curve-bend.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'decompose',
+    [ 'decompose.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'depth-merge',
+    [ 'depth-merge.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'despeckle',
+    [ 'despeckle.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'destripe',
+    [ 'destripe.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'edge-dog',
+    [ 'edge-dog.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'edge-neon',
+    [ 'edge-neon.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'emboss',
+    [ 'emboss.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-cel',
+    [ 'file-cel.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-compressor',
+    [ 'file-compressor.c', ],
+    [ gegl, gdk_pixbuf, cairo, gio, liblzma, bz2, zlib, ],
+  ],
+  [
+    'file-csource',
+    [ 'file-csource.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-desktop-link',
+    [ 'file-desktop-link.c', ],
+    [ gtk2, gegl, gdk_pixbuf, cairo, ],
+  ],
+  [
+    'file-dicom',
+    [ 'file-dicom.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-gbr',
+    [ 'file-gbr.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-gegl',
+    [ 'file-gegl.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-gif-load',
+    [ 'file-gif-load.c', ],
+    [ gtk2, gegl, gdk_pixbuf, cairo, ],
+  ],
+  [
+    'file-gif-save',
+    [ 'file-gif-save.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-gih',
+    [ 'file-gih.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-glob',
+    [ 'file-glob.c', ],
+    [ gtk2, gegl, gdk_pixbuf, cairo,  ],
+  ],
+  [
+    'file-header',
+    [ 'file-header.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-html-table',
+    [ 'file-html-table.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-jp2-load',
+    [ 'file-jp2-load.c', ],
+    [ gtk2, gegl, gdk_pixbuf, jasper, ],
+  ],
+  [
+    'file-mng',
+    [ 'file-mng.c', ],
+    [ gtk2, gegl, libmng, libpng, ],
+  ],
+  [
+    'file-pat',
+    [ 'file-pat.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-pcx',
+    [ 'file-pcx.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-pdf-load',
+    [ 'file-pdf-load.c', ],
+    [ gtk2, gegl, gdk_pixbuf, poppler ],
+  ],
+  [
+    'file-pdf-save',
+    [ 'file-pdf-save.c', ],
+    [ gtk2, gegl, gdk_pixbuf, poppler, cairo ],
+  ],
+  [
+    'file-pix',
+    [ 'file-pix.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-png',
+    [ 'file-png.c', ],
+    [ gtk2, gegl, libpng, ],
+  ],
+  [
+    'file-pnm',
+    [ 'file-pnm.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-ps',
+    [ 'file-ps.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ghostscript, ],
+  ],
+  [
+    'file-psp',
+    [ 'file-psp.c', ],
+    [ gtk2, gegl, zlib, ],
+  ],
+  [
+    'file-raw-data',
+    [ 'file-raw-data.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-sunras',
+    [ 'file-sunras.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-svg',
+    [ 'file-svg.c', ],
+    [ gtk2, gegl, rsvg, ],
+  ],
+  [
+    'file-tga',
+    [ 'file-tga.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-xbm',
+    [ 'file-xbm.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'file-xwd',
+    [ 'file-xwd.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'film',
+    [ 'film.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'filter-pack',
+    [ 'filter-pack.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'fractal-trace',
+    [ 'fractal-trace.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'goat-exercise',
+    [ 'goat-exercise.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'gradient-map',
+    [ 'gradient-map.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'grid',
+    [ 'grid.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'guillotine',
+    [ 'guillotine.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'hot',
+    [ 'hot.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'jigsaw',
+    [ 'jigsaw.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'max-rgb',
+    [ 'max-rgb.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'newsprint',
+    [ 'newsprint.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'nl-filter',
+    [ 'nl-filter.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'oilify',
+    [ 'oilify.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'photocopy',
+    [ 'photocopy.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'plugin-browser',
+    [ 'plugin-browser.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'procedure-browser',
+    [ 'procedure-browser.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'qbist',
+    [ 'qbist.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'ripple',
+    [ 'ripple.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'sample-colorize',
+    [ 'sample-colorize.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'sharpen',
+    [ 'sharpen.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'smooth-palette',
+    [ 'smooth-palette.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'softglow',
+    [ 'softglow.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'sparkle',
+    [ 'sparkle.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'sphere-designer',
+    [ 'sphere-designer.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'tile-small',
+    [ 'tile-small.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'tile',
+    [ 'tile.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'unit-editor',
+    [ 'unit-editor.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'unsharp-mask',
+    [ 'unsharp-mask.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'van-gogh-lic',
+    [ 'van-gogh-lic.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'warp',
+    [ 'warp.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'wavelet-decompose',
+    [ 'wavelet-decompose.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+  [
+    'web-browser',
+    [ 'web-browser.c', ],
+    [ gtk2, gegl, gdk_pixbuf, ],
+  ],
+]
+
+if platform_win32
+  common_exes_list += [
+    [
+      'mail',
+      [ 'mail.c', ],
+      [ gtk2, gegl, gdk_pixbuf, ],
+    ],
+  ]
+endif
+
+if wmf.found()
+  common_exes_list += [
+    [
+      'file-wmf',
+      [ 'file-wmf.c', ],
+      [ gtk2, gegl, wmf, ],
+    ],
+  ]
+endif
+
+if xmc.found()
+  common_exes_list += [
+    [
+      'file-xmc',
+      [ 'file-xmc.c', ],
+      [ gtk2, gegl, xmc, ],
+    ],
+  ]
+endif
+
+if libxpm.found()
+  common_exes_list += [
+    [
+      'file-xpm',
+      [ 'file-xpm.c', ],
+      [ gtk2, gegl, libxpm, ],
+    ],
+  ]
+endif
+
+if webkit.found()
+  common_exes_list += [
+    [
+      'web-page',
+      [ 'web-page.c', ],
+      [ gtk2, gegl, gdk_pixbuf, webkit, ],
+    ]
+  ]
+endif
+
+foreach exe : common_exes_list
+  exe_name = exe[0]
+  exe_sources = exe[1]
+  exe_deps = exe[2]
+
+  plugin_name = 'file-exr'
+
+  rc_file = platform_win32 ? windows.compile_resources(
+    gimp_plugins_rc,
+    args: [
+      '--define', 'ORIGINALFILENAME_STR="@0@"'.format(exe_name+'.exe'),
+      '--define', 'INTERNALNAME_STR="@0@"'    .format(exe_name),
+      '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+    ],
+    include_directories: [
+      rootInclude, appInclude,
+    ],
+  ) : []
+
+  executable(exe_name,
+    [ exe_sources, rc_file ],
+    include_directories: [ rootInclude, ],
+    link_with : [
+      libgimp,
+      libgimpbase,
+      libgimpcolor,
+      libgimpconfig,
+      libgimpmath,
+      libgimpui,
+      libgimpwidgets,
+    ],
+    dependencies: [ exe_deps, math ],
+    install: true,
+    install_dir: join_paths(gimpplugindir, 'plug-ins'),
+  )
+endforeach
diff --git a/plug-ins/file-bmp/meson.build b/plug-ins/file-bmp/meson.build
new file mode 100644
index 0000000..426cd48
--- /dev/null
+++ b/plug-ins/file-bmp/meson.build
@@ -0,0 +1,37 @@
+plugin_name = 'file-bmp'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'bmp-load.c',
+    'bmp-save.c',
+    'bmp.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/file-exr/meson.build b/plug-ins/file-exr/meson.build
new file mode 100644
index 0000000..bf97848
--- /dev/null
+++ b/plug-ins/file-exr/meson.build
@@ -0,0 +1,40 @@
+if openexr.found()
+
+plugin_name = 'file-exr'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'file-exr.c',
+    'openexr-wrapper.cc',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, openexr, lcms,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
+
+endif
diff --git a/plug-ins/file-faxg3/meson.build b/plug-ins/file-faxg3/meson.build
new file mode 100644
index 0000000..97bfd01
--- /dev/null
+++ b/plug-ins/file-faxg3/meson.build
@@ -0,0 +1,36 @@
+plugin_name = 'file-faxg3'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'faxg3.c',
+    'g3.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, gdk_pixbuf, cairo,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/file-fits/meson.build b/plug-ins/file-fits/meson.build
new file mode 100644
index 0000000..c19af16
--- /dev/null
+++ b/plug-ins/file-fits/meson.build
@@ -0,0 +1,36 @@
+plugin_name = 'file-fits'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'fits-io.c',
+    'fits.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/file-fli/meson.build b/plug-ins/file-fli/meson.build
new file mode 100644
index 0000000..f8cdcec
--- /dev/null
+++ b/plug-ins/file-fli/meson.build
@@ -0,0 +1,36 @@
+plugin_name = 'file-fli'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'fli-gimp.c',
+    'fli.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/file-ico/meson.build b/plug-ins/file-ico/meson.build
new file mode 100644
index 0000000..66a4465
--- /dev/null
+++ b/plug-ins/file-ico/meson.build
@@ -0,0 +1,38 @@
+plugin_name = 'file-ico'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'ico-dialog.c',
+    'ico-load.c',
+    'ico-save.c',
+    'ico.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, libpng,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/file-jpeg/meson.build b/plug-ins/file-jpeg/meson.build
new file mode 100644
index 0000000..6db6ddd
--- /dev/null
+++ b/plug-ins/file-jpeg/meson.build
@@ -0,0 +1,40 @@
+plugin_name = 'file-jpeg'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'jpeg-icc.c',
+    'jpeg-load.c',
+    'jpeg-quality.c',
+    'jpeg-save.c',
+    'jpeg-settings.c',
+    'jpeg.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, libjpeg, lcms, gexiv2,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/file-psd/meson.build b/plug-ins/file-psd/meson.build
new file mode 100644
index 0000000..72ce422
--- /dev/null
+++ b/plug-ins/file-psd/meson.build
@@ -0,0 +1,41 @@
+plugin_name = 'file-psd'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'psd-image-res-load.c',
+    'psd-layer-res-load.c',
+    'psd-load.c',
+    'psd-save.c',
+    'psd-thumb-load.c',
+    'psd-util.c',
+    'psd.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, libjpeg, math, zlib,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/file-raw/meson.build b/plug-ins/file-raw/meson.build
new file mode 100644
index 0000000..571855f
--- /dev/null
+++ b/plug-ins/file-raw/meson.build
@@ -0,0 +1,51 @@
+
+file_raw_exes = [
+  'file-darktable',
+  'file-raw-placeholder',
+  'file-rawtherapee',
+]
+
+foreach plugin_name : file_raw_exes
+
+  rc_file = platform_win32 ? windows.compile_resources(
+    gimp_plugins_rc,
+    args: [
+      '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+      '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+      '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+    ],
+    include_directories: [
+      rootInclude, appInclude,
+    ],
+  ) : []
+
+  executable(plugin_name,
+    [
+      plugin_name +'.c',
+      'file-raw-utils.c',
+      rc_file,
+    ],
+    include_directories: [ rootInclude, ],
+    dependencies: [
+      gtk2, gegl,
+    ],
+    link_with: [
+      libgimp,
+      libgimpbase,
+      libgimpcolor,
+      libgimpconfig,
+      libgimpmath,
+      libgimpui,
+      libgimpwidgets,
+    ],
+    install: true,
+    install_dir: join_paths(gimpplugindir, 'plug-ins'),
+  )
+endforeach
+
+install_data([
+    'file-darktable-export-on-exit.lua',
+    'file-darktable-get-size.lua',
+  ],
+  install_dir: join_paths(prefix, gimpdatadir, 'file-raw'),
+)
diff --git a/plug-ins/file-sgi/meson.build b/plug-ins/file-sgi/meson.build
new file mode 100644
index 0000000..5776e37
--- /dev/null
+++ b/plug-ins/file-sgi/meson.build
@@ -0,0 +1,36 @@
+plugin_name = 'file-sgi'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'sgi-lib.c',
+    'sgi.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/file-tiff/meson.build b/plug-ins/file-tiff/meson.build
new file mode 100644
index 0000000..544a392
--- /dev/null
+++ b/plug-ins/file-tiff/meson.build
@@ -0,0 +1,38 @@
+plugin_name = 'file-tiff'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'file-tiff-io.c',
+    'file-tiff-save.c',
+    'file-tiff.c',
+    'file-tiff-load.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, gexiv2, webp, libtiff,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/file-webp/meson.build b/plug-ins/file-webp/meson.build
new file mode 100644
index 0000000..7d019cc
--- /dev/null
+++ b/plug-ins/file-webp/meson.build
@@ -0,0 +1,42 @@
+if webp.found()
+
+plugin_name = 'file-webp'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'file-webp-dialog.c',
+    'file-webp-load.c',
+    'file-webp-save.c',
+    'file-webp.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, gexiv2, webp,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
+
+endif
diff --git a/plug-ins/flame/meson.build b/plug-ins/flame/meson.build
new file mode 100644
index 0000000..b015bc5
--- /dev/null
+++ b/plug-ins/flame/meson.build
@@ -0,0 +1,38 @@
+plugin_name = 'flame'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'cmap.c',
+    'flame.c',
+    'libifs.c',
+    'rect.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, math,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/fractal-explorer/examples/meson.build b/plug-ins/fractal-explorer/examples/meson.build
new file mode 100644
index 0000000..c844b7c
--- /dev/null
+++ b/plug-ins/fractal-explorer/examples/meson.build
@@ -0,0 +1,37 @@
+install_data([
+    'Asteroid_Field',
+    'Bar_Code_Label',
+    'Beauty_of_Nature',
+    'Blue_Curtain',
+    'Car_Track',
+    'Energetic_Diamond',
+    'Explosive',
+    'Flower',
+    'Fragments',
+    'Hemp',
+    'High_Voltage',
+    'Hoops',
+    'Ice_Crystal',
+    'Leaves',
+    'Lightning',
+    'Mandelbrot',
+    'Marble',
+    'Marble2',
+    'Medusa',
+    'Nautilus',
+    'Nebula',
+    'Plant',
+    'Rose',
+    'Saturn',
+    'Snow_Crystal',
+    'Soma',
+    'Spark',
+    'Suns',
+    'Tentacles',
+    'The_Green_Place',
+    'Wave',
+    'Wood',
+    'Zooming_Circle',
+  ],
+  install_dir: join_paths(gimpdatadir, 'fractalexplorer'),
+)
diff --git a/plug-ins/fractal-explorer/meson.build b/plug-ins/fractal-explorer/meson.build
new file mode 100644
index 0000000..716e06d
--- /dev/null
+++ b/plug-ins/fractal-explorer/meson.build
@@ -0,0 +1,38 @@
+subdir('examples')
+
+plugin_name = 'fractal-explorer'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'fractal-explorer-dialogs.c',
+    'fractal-explorer.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, math,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/gfig/gfig-examples/meson.build b/plug-ins/gfig/gfig-examples/meson.build
new file mode 100644
index 0000000..c2f1af1
--- /dev/null
+++ b/plug-ins/gfig/gfig-examples/meson.build
@@ -0,0 +1,14 @@
+install_data([
+    'A_star',
+    'curves',
+    'polys',
+    'ring',
+    'ring+star',
+    'simily',
+    'spirals_and_stars',
+    'sprial',
+    'star2',
+    'stars',
+  ],
+  install_dir: join_paths(gimpdatadir, 'gfig'),
+)
diff --git a/plug-ins/gfig/images/meson.build b/plug-ins/gfig/images/meson.build
new file mode 100644
index 0000000..1a7b192
--- /dev/null
+++ b/plug-ins/gfig/images/meson.build
@@ -0,0 +1,36 @@
+stock_icons = [
+  'stock-bezier',
+  'stock-circle',
+  'stock-copy-object',
+  'stock-curve',
+  'stock-delete-object',
+  'stock-ellipse',
+  'stock-line',
+  'stock-logo',
+  'stock-move-object',
+  'stock-move-point',
+  'stock-polygon',
+  'stock-rectangle',
+  'stock-select-object',
+  'stock-show-all',
+  'stock-spiral',
+  'stock-star',
+]
+
+stock_icons_list = []
+foreach name : stock_icons
+  stock_icons_list += name.underscorify()
+  stock_icons_list += join_paths(meson.current_source_dir(), name + '.png')
+endforeach
+
+stock_pixbufs_h = custom_target('gfig-stock-pixbufs.h',
+  input : [ ],
+  output: [ 'gfig-stock-pixbufs.h', ],
+  command: [
+    gdk_pixbuf_csource,
+    '--raw',
+    '--build-list',
+    stock_icons_list,
+  ],
+  capture: true,
+)
diff --git a/plug-ins/gfig/meson.build b/plug-ins/gfig/meson.build
new file mode 100644
index 0000000..db9bb53
--- /dev/null
+++ b/plug-ins/gfig/meson.build
@@ -0,0 +1,54 @@
+subdir('gfig-examples')
+subdir('images')
+
+plugin_name = 'gfig'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'gfig-arc.c',
+    'gfig-bezier.c',
+    'gfig-circle.c',
+    'gfig-dialog.c',
+    'gfig-dobject.c',
+    'gfig-ellipse.c',
+    'gfig-grid.c',
+    'gfig-line.c',
+    'gfig-poly.c',
+    'gfig-preview.c',
+    'gfig-rectangle.c',
+    'gfig-spiral.c',
+    'gfig-star.c',
+    'gfig-stock.c',
+    'gfig-style.c',
+    'gfig.c',
+    stock_pixbufs_h,
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, math,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/gimpressionist/Brushes/meson.build b/plug-ins/gimpressionist/Brushes/meson.build
new file mode 100644
index 0000000..dfc6eee
--- /dev/null
+++ b/plug-ins/gimpressionist/Brushes/meson.build
@@ -0,0 +1,66 @@
+brushes = [
+  'arrow01.pgm',
+  'ball.ppm',
+  'blob.ppm',
+  'box.ppm',
+  'chalk01.pgm',
+  'cone.ppm',
+  'crayon01.pgm',
+  'crayon02.pgm',
+  'crayon03.pgm',
+  'crayon04.pgm',
+  'crayon05.pgm',
+  'crayon06.pgm',
+  'crayon07.pgm',
+  'crayon08.pgm',
+  'defaultbrush.pgm',
+  'dribble.pgm',
+  'fabric.pgm',
+  'fabric01.pgm',
+  'fabric02.pgm',
+  'fabric03.pgm',
+  'flower01.pgm',
+  'flower02.pgm',
+  'flower03.pgm',
+  'flower04.pgm',
+  'grad01.pgm',
+  'grad02.pgm',
+  'grad03.pgm',
+  'heart.ppm',
+  'leaf01.pgm',
+  'paintbrush01.pgm',
+  'paintbrush02.pgm',
+  'paintbrush03.pgm',
+  'paintbrush04.pgm',
+  'paper01.pgm',
+  'paper02.pgm',
+  'paper03.pgm',
+  'paper04.pgm',
+  'pentagram.pgm',
+  'scribble.pgm',
+  'shape01.pgm',
+  'shape02.pgm',
+  'shape03.pgm',
+  'shape04.pgm',
+  'snow1.pgm',
+  'sphere.ppm',
+  'splat1.pgm',
+  'splat2.pgm',
+  'splat3.pgm',
+  'spunge01.pgm',
+  'spunge02.pgm',
+  'spunge03.pgm',
+  'spunge04.pgm',
+  'spunge05.pgm',
+  'strange01.pgm',
+  'thegimp.pgm',
+  'torus.ppm',
+  'wavy.pgm',
+  'weave.pgm',
+  'worm.pgm',
+]
+
+install_data(
+  brushes,
+  install_dir: join_paths(gimpdatadir, 'gimpressionist', 'Brushes')
+)
diff --git a/plug-ins/gimpressionist/Paper/meson.build b/plug-ins/gimpressionist/Paper/meson.build
new file mode 100644
index 0000000..5fee0aa
--- /dev/null
+++ b/plug-ins/gimpressionist/Paper/meson.build
@@ -0,0 +1,16 @@
+papers = [
+  'bricks.pgm',
+  'bricks2.pgm',
+  'burlap.pgm',
+  'canvas2.pgm',
+  'defaultpaper.pgm',
+  'marble.pgm',
+  'marble2.pgm',
+  'stone.pgm',
+  'struc.pgm',
+]
+
+install_data(
+  papers,
+  install_dir: join_paths(gimpdatadir, 'gimpressionist', 'Paper')
+)
diff --git a/plug-ins/gimpressionist/Presets/meson.build b/plug-ins/gimpressionist/Presets/meson.build
new file mode 100644
index 0000000..2a70cb0
--- /dev/null
+++ b/plug-ins/gimpressionist/Presets/meson.build
@@ -0,0 +1,32 @@
+presets = [
+  'ApplyCanvas',
+  'Ballpark',
+  'Canvas',
+  'Crosshatch',
+  'Cubism',
+  'Dotify',
+  'Embroidery',
+  'Feathers',
+  'Felt-marker',
+  'Flowerbed',
+  'Furry',
+  'Line-art-2',
+  'Line-art',
+  'Maggot-invasion',
+  'MarbleMadness',
+  'Mossy',
+  'Painted_Rock',
+  'Parquette',
+  'Patchwork',
+  'Ringworks',
+  'Sample',
+  'Smash',
+  'Straws',
+  'Weave',
+  'Wormcan',
+]
+
+install_data(
+  presets,
+  install_dir: join_paths(gimpdatadir, 'gimpressionist', 'Presets')
+)
diff --git a/plug-ins/gimpressionist/meson.build b/plug-ins/gimpressionist/meson.build
new file mode 100644
index 0000000..7705a44
--- /dev/null
+++ b/plug-ins/gimpressionist/meson.build
@@ -0,0 +1,61 @@
+subdir('Brushes')
+subdir('Paper')
+subdir('Presets')
+
+plugin_name = 'gimpressionist'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'brush.c',
+    'color.c',
+    'general.c',
+    'gimp.c',
+    'gimpressionist.c',
+    'globals.c',
+    'orientation.c',
+    'orientmap.c',
+    'paper.c',
+    'placement.c',
+    'plasma.c',
+    'ppmtool.c',
+    'presets.c',
+    'preview.c',
+    'repaint.c',
+    'size.c',
+    'sizemap.c',
+    'utils.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, math,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  c_args: [
+    '-DDEFAULTPATH="' + join_paths('~/',  gimpdir,    'gimpressionist')
+                + ':' + join_paths(prefix,gimpdatadir,'gimpressionist')
+                + '"',
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/gradient-flare/flares/meson.build b/plug-ins/gradient-flare/flares/meson.build
new file mode 100644
index 0000000..a4b3db5
--- /dev/null
+++ b/plug-ins/gradient-flare/flares/meson.build
@@ -0,0 +1,11 @@
+install_data([
+    'Bright_Star',
+    'Classic',
+    'Default',
+    'Distant_Sun',
+    'GFlare_101',
+    'GFlare_102',
+    'Hidden_Planet',
+  ],
+  install_dir: join_paths(gimpdatadir, 'gflare'),
+)
diff --git a/plug-ins/gradient-flare/meson.build b/plug-ins/gradient-flare/meson.build
new file mode 100644
index 0000000..a515eca
--- /dev/null
+++ b/plug-ins/gradient-flare/meson.build
@@ -0,0 +1,37 @@
+subdir('flares')
+
+plugin_name = 'gradient-flare'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'gradient-flare.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, math,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/help-browser/meson.build b/plug-ins/help-browser/meson.build
new file mode 100644
index 0000000..19327be
--- /dev/null
+++ b/plug-ins/help-browser/meson.build
@@ -0,0 +1,43 @@
+if webkit.found()
+
+plugin_name = 'help-browser'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'dialog.c',
+    'gimpthrobber.c',
+    'gimpthrobberaction.c',
+    'help-browser.c',
+    'uri.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, gio, webkit,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
+
+endif
diff --git a/plug-ins/help/meson.build b/plug-ins/help/meson.build
new file mode 100644
index 0000000..38822b2
--- /dev/null
+++ b/plug-ins/help/meson.build
@@ -0,0 +1,40 @@
+plugin_name = 'help'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'gimp-help-lookup.c',
+    'gimphelp.c',
+    'gimphelpdomain.c',
+    'gimphelpitem.c',
+    'gimphelplocale.c',
+    'gimphelpprogress.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, cairo, gio, gdk_pixbuf,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/ifs-compose/meson.build b/plug-ins/ifs-compose/meson.build
new file mode 100644
index 0000000..ca1fb5c
--- /dev/null
+++ b/plug-ins/ifs-compose/meson.build
@@ -0,0 +1,37 @@
+plugin_name = 'ifs-compose'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'ifs-compose-storage.c',
+    'ifs-compose-utils.c',
+    'ifs-compose.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, math,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/imagemap/images/meson.build b/plug-ins/imagemap/images/meson.build
new file mode 100644
index 0000000..9200f55
--- /dev/null
+++ b/plug-ins/imagemap/images/meson.build
@@ -0,0 +1,30 @@
+stock_images = [
+  'stock-circle',
+  'stock-coord',
+  'stock-dimension',
+  'stock-java',
+  'stock-polygon',
+  'stock-rectangle',
+  'stock-to-back',
+  'stock-to-front',
+]
+
+stock_icons_list = []
+foreach image_name : stock_images
+  stock_icons_list += [
+    image_name.underscorify(),
+    join_paths(meson.current_source_dir(), image_name + '.png'),
+  ]
+endforeach
+
+imap_stock_pixbuf_h = custom_target('imap-stock-pixbufs.h',
+  input : [],
+  output: [ 'imap-stock-pixbufs.h' ],
+  command: [
+    'gdk-pixbuf-csource',
+    '--raw',
+    '--build-list',
+    stock_icons_list,
+  ],
+  capture: true,
+)
diff --git a/plug-ins/imagemap/meson.build b/plug-ins/imagemap/meson.build
new file mode 100644
index 0000000..d0e83a0
--- /dev/null
+++ b/plug-ins/imagemap/meson.build
@@ -0,0 +1,159 @@
+subdir('images')
+
+plugin_name = 'imagemap'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'imap_about.c',
+    'imap_browse.c',
+    'imap_cern_lex.c',
+    'imap_cern_parse.c',
+    'imap_circle.c',
+    'imap_cmd_clear.c',
+    'imap_cmd_copy_object.c',
+    'imap_cmd_copy.c',
+    'imap_cmd_create.c',
+    'imap_cmd_cut_object.c',
+    'imap_cmd_cut.c',
+    'imap_cmd_delete_point.c',
+    'imap_cmd_delete.c',
+    'imap_cmd_edit_object.c',
+    'imap_cmd_gimp_guides.c',
+    'imap_cmd_guides.c',
+    'imap_cmd_insert_point.c',
+    'imap_cmd_move_down.c',
+    'imap_cmd_move_sash.c',
+    'imap_cmd_move_selected.c',
+    'imap_cmd_move_to_front.c',
+    'imap_cmd_move_up.c',
+    'imap_cmd_move.c',
+    'imap_cmd_object_down.c',
+    'imap_cmd_object_move.c',
+    'imap_cmd_object_up.c',
+    'imap_cmd_paste.c',
+    'imap_cmd_select_all.c',
+    'imap_cmd_select_next.c',
+    'imap_cmd_select_prev.c',
+    'imap_cmd_select_region.c',
+    'imap_cmd_select.c',
+    'imap_cmd_send_to_back.c',
+    'imap_cmd_unselect_all.c',
+    'imap_cmd_unselect.c',
+    'imap_command.c',
+    'imap_csim_lex.c',
+    'imap_csim_parse.c',
+    'imap_default_dialog.c',
+    'imap_edit_area_info.c',
+    'imap_file.c',
+    'imap_grid.c',
+    'imap_main.c',
+    'imap_menu_funcs.c',
+    'imap_menu.c',
+    'imap_misc.c',
+    'imap_mru.c',
+    'imap_ncsa_lex.c',
+    'imap_ncsa_parse.c',
+    'imap_object_popup.c',
+    'imap_object.c',
+    'imap_polygon.c',
+    'imap_preferences.c',
+    'imap_preview.c',
+    'imap_rectangle.c',
+    'imap_selection.c',
+    'imap_settings.c',
+    'imap_source.c',
+    'imap_statusbar.c',
+    'imap_stock.c',
+    'imap_string.c',
+    'imap_table.c',
+    'imap_taglist.c',
+    imap_stock_pixbuf_h,
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, math,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
+
+
+
+flex  = find_program('flex',  required: false)
+bison = find_program('bison', required: false)
+
+if flex.found() and bison.found()
+
+  syntaxes = [
+    'cern',
+    'csim',
+    'ncsa',
+  ]
+
+  foreach syntax : syntaxes
+
+    prefix =  syntax + '_'
+    imapname = 'imap_' + syntax
+
+    custom_target(
+              imapname + '_lex.c',
+      input : imapname + '.l'    ,
+      output: imapname + '_lex.c',
+      command: [
+        flex,
+        '--case-insensitive',
+        '--prefix', prefix,
+        '--outfile', '@OUTPUT@',
+        '@INPUT@',
+      ],
+    )
+
+    custom_target(
+              imapname + '_parse.c',
+      input : imapname + '.y'      ,
+      output: imapname + '_parse.c',
+      command: [
+        bison, '--yacc',
+        '-d',
+        '--name-prefix', prefix,
+        '@INPUT@'
+      ],
+    )
+
+    custom_target(
+              imapname + '_parse.h',
+      input : imapname + '.y'      ,
+      output: imapname + '_parse.h',
+      command: [
+        bison, '--yacc',
+        '-d',
+        '--name-prefix', prefix,
+        '--output', '@OUTPUT@',
+        '@INPUT@'
+      ],
+    )
+
+  endforeach
+endif
diff --git a/plug-ins/lighting/images/meson.build b/plug-ins/lighting/images/meson.build
new file mode 100644
index 0000000..1521077
--- /dev/null
+++ b/plug-ins/lighting/images/meson.build
@@ -0,0 +1,30 @@
+stock_icons = [
+  'stock-intensity-ambient-high',
+  'stock-intensity-ambient-low',
+  'stock-intensity-diffuse-high',
+  'stock-intensity-diffuse-low',
+  'stock-reflectivity-diffuse-high',
+  'stock-reflectivity-diffuse-low',
+  'stock-reflectivity-specular-high',
+  'stock-reflectivity-specular-low',
+  'stock-reflectivity-highlight-high',
+  'stock-reflectivity-highlight-low',
+]
+
+stock_icons_list = []
+foreach name : stock_icons
+  stock_icons_list += name.underscorify()
+  stock_icons_list += join_paths(meson.current_source_dir(), name + '.png')
+endforeach
+
+stock_pixbufs_h = custom_target('stock-pixbufs.h',
+  input : [ ],
+  output: [ 'stock-pixbufs.h', ],
+  command: [
+    gdk_pixbuf_csource,
+    '--raw',
+    '--build-list',
+    stock_icons_list,
+  ],
+  capture: true,
+)
diff --git a/plug-ins/lighting/meson.build b/plug-ins/lighting/meson.build
new file mode 100644
index 0000000..f5aa2fd
--- /dev/null
+++ b/plug-ins/lighting/meson.build
@@ -0,0 +1,44 @@
+subdir('images')
+
+plugin_name = 'lighting'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'lighting-apply.c',
+    'lighting-image.c',
+    'lighting-main.c',
+    'lighting-preview.c',
+    'lighting-shade.c',
+    'lighting-stock.c',
+    'lighting-ui.c',
+    stock_pixbufs_h,
+    rc_file,
+  ],
+  include_directories: [ rootInclude, include_directories('.'), ],
+  dependencies: [
+    gtk2, gegl, math,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/map-object/meson.build b/plug-ins/map-object/meson.build
new file mode 100644
index 0000000..e3fe98f
--- /dev/null
+++ b/plug-ins/map-object/meson.build
@@ -0,0 +1,42 @@
+plugin_name = 'map-object'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'arcball.c',
+    'map-object-apply.c',
+    'map-object-image.c',
+    'map-object-main.c',
+    'map-object-preview.c',
+    'map-object-shade.c',
+    'map-object-stock.c',
+    'map-object-ui.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, math,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/meson.build b/plug-ins/meson.build
new file mode 100644
index 0000000..82896f8
--- /dev/null
+++ b/plug-ins/meson.build
@@ -0,0 +1,33 @@
+subdir('common')
+subdir('file-bmp')
+subdir('file-exr')
+subdir('file-faxg3')
+subdir('file-fits')
+subdir('file-fli')
+subdir('file-ico')
+subdir('file-jpeg')
+subdir('file-psd')
+subdir('file-raw')
+subdir('file-sgi')
+subdir('file-tiff')
+subdir('file-webp')
+subdir('flame')
+subdir('fractal-explorer')
+subdir('gfig')
+subdir('gimpressionist')
+subdir('gradient-flare')
+subdir('help-browser')
+subdir('help')
+subdir('ifs-compose')
+subdir('imagemap')
+subdir('lighting')
+subdir('map-object')
+subdir('metadata')
+subdir('pagecurl')
+subdir('print')
+subdir('pygimp')
+subdir('screenshot')
+subdir('script-fu')
+subdir('selection-to-path')
+subdir('twain')
+subdir('ui')
diff --git a/plug-ins/metadata/meson.build b/plug-ins/metadata/meson.build
new file mode 100644
index 0000000..be30743
--- /dev/null
+++ b/plug-ins/metadata/meson.build
@@ -0,0 +1,73 @@
+
+plugin_name = 'metadata-editor'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'metadata-editor.c',
+    'metadata-impexp.c',
+    'metadata-xml.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, gexiv2,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
+
+plugin_name = 'metadata-viewer'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'metadata-viewer.c',
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, gexiv2,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/pagecurl/meson.build b/plug-ins/pagecurl/meson.build
new file mode 100644
index 0000000..3b654fc
--- /dev/null
+++ b/plug-ins/pagecurl/meson.build
@@ -0,0 +1,69 @@
+plugin_name = 'pagecurl'
+
+pagecurl_icons_images = [
+  'curl0.png',
+  'curl1.png',
+  'curl2.png',
+  'curl3.png',
+  'curl4.png',
+  'curl5.png',
+  'curl6.png',
+  'curl7.png',
+]
+resourcename = 'pagecurl-icons'
+xml_content  = '<?xml version="1.0" encoding="UTF-8"?>\n'
+xml_content += '<gresources>\n'
+xml_content += '  <gresource prefix="/org/gimp/icons">\n'
+foreach file : pagecurl_icons_images
+  xml_content+='    <file preprocess="to-pixdata">'+ file +'</file>\n'
+endforeach
+xml_content += '  </gresource>\n'
+xml_content += '</gresources>\n'
+
+xml_file = configure_file(
+  output: resourcename + '.gresource.xml',
+  command: [ 'echo', xml_content ],
+  capture: true,
+)
+
+pagecurl_icons_sources = gnome.compile_resources(
+  resourcename,
+  xml_file,
+  c_name: resourcename.underscorify(),
+)
+
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'pagecurl.c',
+    pagecurl_icons_sources,
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl, math,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/print/meson.build b/plug-ins/print/meson.build
new file mode 100644
index 0000000..0993f22
--- /dev/null
+++ b/plug-ins/print/meson.build
@@ -0,0 +1,47 @@
+if have_print
+
+
+plugin_name = 'print'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+executable(plugin_name,
+  [
+    'print-draw-page.c',
+    'print-page-layout.c',
+    'print-page-setup.c',
+    'print-preview.c',
+    'print-settings.c',
+    'print-utils.c',
+    'print.c',
+    rc_file,
+  ],
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl,
+    # x11, xmu, xext, xfixes,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
+
+endif
diff --git a/plug-ins/pygimp/doc/meson.build b/plug-ins/pygimp/doc/meson.build
new file mode 100644
index 0000000..fdc4253
--- /dev/null
+++ b/plug-ins/pygimp/doc/meson.build
@@ -0,0 +1,25 @@
+
+pygimp_ps = custom_target('pygimp.ps',
+  input : [ 'pygimp.sgml' ],
+  output: [ 'pygimp.ps' ],
+  command: [
+    'db2ps',
+    '@INPUT@'
+  ],
+)
+pygimp_pdf = custom_target('pygimp.pdf',
+  input : [ 'pygimp.sgml' ],
+  output: [ 'pygimp.pdf' ],
+  command: [
+    'db2pdf',
+    '@INPUT@'
+  ],
+)
+pygimp_html = custom_target('pygimp.html',
+  input : [ 'pygimp.sgml' ],
+  output: [ 'pygimp.html' ],
+  command: [
+    'db2html', '--nochunks',
+    '@INPUT@'
+  ],
+)
diff --git a/plug-ins/pygimp/meson.build b/plug-ins/pygimp/meson.build
new file mode 100644
index 0000000..7297146
--- /dev/null
+++ b/plug-ins/pygimp/meson.build
@@ -0,0 +1,128 @@
+if have_python
+
+subdir('doc')
+subdir('plug-ins')
+
+pwd = meson.current_source_dir()
+pygtk_generator = generator(pygobjectcodegen,
+  arguments: [
+      '--override', join_paths(pwd, '@BASENAME@.override'),
+      '--register', join_paths(pygtk_defsdir, 'gdk-types.defs'),
+      '--register', join_paths(pygtk_defsdir, 'gtk-types.defs'),
+      '--register', join_paths(pwd, 'gimp-types.defs'),
+      '--register', join_paths(pwd, 'gimpcolor-types.defs'),
+      '--register', join_paths(pwd, 'gimpenums-types.defs'),
+      '--prefix', '@BASENAME@',
+      '@INPUT@',
+  ],
+  output: '@BASENAME@.c',
+  capture: true,
+)
+
+
+python_so_libs = [
+  [ 'gimp',
+    [
+      'gimpmodule.c',
+      'pygimp-display.c',
+      'pygimp-drawable.c',
+      'pygimp-image.c',
+      'pygimp-item.c',
+      'pygimp-parasite.c',
+      'pygimp-pdb.c',
+      'pygimp-tile.c',
+      'pygimp-vectors.c',
+    ],
+    [ pycairo, cairo, gtk2, ],
+    [
+      libgimp,
+      libgimpbase,
+      libgimpcolor,
+      libgimpui,
+    ],
+  ],
+  [ '_gimpenums',
+    [ 'gimpenumsmodule.c', ],
+    [ gobject, cairo, gtk2, ],
+    [
+      libgimp,libgimpbase
+    ],
+  ],
+  [ '_gimpui',
+    [ 'gimpuimodule.c',    pygtk_generator.process('gimpui.defs'), ],
+    [ pygtk2, pycairo, gtk2, ],
+    [
+      libgimp,
+      libgimpbase,
+      libgimpcolor,
+      libgimpconfig,
+      libgimpui,
+      libgimpwidgets
+    ],
+  ],
+  [ 'gimpcolor',
+    [ 'gimpcolormodule.c', 'pygimp-colors.c', ],
+    [cairo],
+    [ libgimpcolor, ],
+  ],
+  [ 'gimpthumb',
+    [ 'gimpthumbmodule.c', pygtk_generator.process('gimpthumb.defs'), ],
+    [],
+    [ libgimpthumb, ],
+  ],
+]
+
+foreach pylib : python_so_libs
+  shared_library(pylib[0],
+    pylib[1],
+    include_directories: [ rootInclude, ],
+    dependencies: pylib[2] + [
+      libpython2, pygobject,
+      gdk_pixbuf, gegl,
+    ],
+    link_with: pylib[3],
+    name_prefix: '',
+    install: true,
+    install_dir: join_paths(gimpplugindir, 'python'),
+  )
+endforeach
+
+
+
+install_data([
+    'gimpenums.py',
+    'gimpfu.py',
+    'gimpplugin.py',
+    'gimpshelf.py',
+    'gimpui.py',
+    'pygimp-logo.png',
+  ],
+  install_dir: join_paths(gimpplugindir, 'python'),
+)
+
+path_separator = platform_win32 ? ';' : ':'
+
+custom_target('pygimp.env',
+  input : [],
+  output: [ 'pygimp.env' ],
+  command: [
+    'echo', path_separator + ' PYTHONPATH=${gimp_plug_in_dir}/python'
+  ],
+  capture: true,
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'environ'),
+)
+custom_target('pygimp.interp',
+  input : [],
+  output: [ 'pygimp.interp' ],
+  command: [
+    'echo', 'python='          + python2.path()
+    + '\n'+ '/usr/bin/python=' + python2.path()
+    + '\n'+ ':Python:E::py::python:'
+  ],
+  capture: true,
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'interpreters'),
+)
+
+endif
diff --git a/plug-ins/pygimp/plug-ins/meson.build b/plug-ins/pygimp/plug-ins/meson.build
new file mode 100644
index 0000000..e3f5332
--- /dev/null
+++ b/plug-ins/pygimp/plug-ins/meson.build
@@ -0,0 +1,20 @@
+install_data([
+    'colorxhtml.py',
+    'file-openraster.py',
+    'foggify.py',
+    'gradients-save-as-css.py',
+    'histogram-export.py',
+    'palette-offset.py',
+    'palette-sort.py',
+    'palette-to-gradient.py',
+    'py-slice.py',
+    'python-eval.py',
+  ],
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
+install_data([
+    'pyconsole.py',
+    'python-console.py',
+  ],
+  install_dir: join_paths(gimpplugindir, 'plug-ins', 'python-console'),
+)
diff --git a/plug-ins/screenshot/meson.build b/plug-ins/screenshot/meson.build
new file mode 100644
index 0000000..1263615
--- /dev/null
+++ b/plug-ins/screenshot/meson.build
@@ -0,0 +1,34 @@
+if have_screenshot
+
+plugin_screenshot_sources = [
+  'screenshot-freedesktop.c',
+  'screenshot-gnome-shell.c',
+  'screenshot-kwin.c',
+  'screenshot-osx.c',
+  'screenshot-win32.c',
+  'screenshot-x11.c',
+  'screenshot.c',
+  platform_win32 ? windows.compile_resources('screenshot-win32.rc') : [],
+]
+
+screenshot = executable('screenshot',
+  plugin_screenshot_sources,
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gtk2, gegl,
+    x11, xmu, xext, xfixes,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
+
+endif
diff --git a/plug-ins/script-fu/ftx/meson.build b/plug-ins/script-fu/ftx/meson.build
new file mode 100644
index 0000000..b5117c7
--- /dev/null
+++ b/plug-ins/script-fu/ftx/meson.build
@@ -0,0 +1,12 @@
+
+scriptfu_ftx = static_library('scriptfu-ftx',
+  'ftx.c',
+  include_directories: [ rootInclude, scriptfu_incdir, ],
+  dependencies: [
+    glib,
+  ],
+  c_args: [
+    '-DUSE_INTERFACE=1',
+  ],
+  install: false,
+)
diff --git a/plug-ins/script-fu/meson.build b/plug-ins/script-fu/meson.build
new file mode 100644
index 0000000..17b537a
--- /dev/null
+++ b/plug-ins/script-fu/meson.build
@@ -0,0 +1,68 @@
+if have_scriptfu
+
+scriptfu_incdir = include_directories('.')
+
+subdir('tinyscheme')
+subdir('ftx')
+subdir('scripts')
+
+plugin_name = 'script-fu'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+plugin_scriptfu_sources = [
+  'scheme-wrapper.c',
+  'script-fu-console.c',
+  'script-fu-eval.c',
+  'script-fu-interface.c',
+  'script-fu-regex.c',
+  'script-fu-script.c',
+  'script-fu-scripts.c',
+  'script-fu-server.c',
+  'script-fu-text-console.c',
+  'script-fu-utils.c',
+  'script-fu.c',
+  rc_file,
+]
+
+winsock = platform_win32 ? cc.find_library('ws2_32') : []
+
+executable(plugin_name,
+  plugin_scriptfu_sources,
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    gegl, gtk2, math, winsock,
+  ],
+  c_args: [
+    '-DSTANDALONE=0',
+    '-DUSE_INTERFACE=1',
+    '-DUSE_STRLWR=0',
+  ],
+  link_whole: [
+    scriptfu_tinyscheme,
+    scriptfu_ftx,
+  ],
+  link_with: [
+    libgimp,
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+    libgimpui,
+    libgimpwidgets,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
+
+endif
diff --git a/plug-ins/script-fu/scripts/images/meson.build b/plug-ins/script-fu/scripts/images/meson.build
new file mode 100644
index 0000000..5735ec8
--- /dev/null
+++ b/plug-ins/script-fu/scripts/images/meson.build
@@ -0,0 +1,9 @@
+install_data([
+    'beavis.jpg',
+    'texture.jpg',
+    'texture1.jpg',
+    'texture2.jpg',
+    'texture3.jpg',
+  ],
+  install_dir: join_paths(gimpdatadir, 'scripts', 'images'),
+)
diff --git a/plug-ins/script-fu/scripts/meson.build b/plug-ins/script-fu/scripts/meson.build
new file mode 100644
index 0000000..a1a8d7c
--- /dev/null
+++ b/plug-ins/script-fu/scripts/meson.build
@@ -0,0 +1,67 @@
+subdir('images')
+
+scripts = [
+  'add-bevel.scm',
+  'addborder.scm',
+  'blend-anim.scm',
+  'burn-in-anim.scm',
+  'carve-it.scm',
+  'chrome-it.scm',
+  'circuit.scm',
+  'clothify.scm',
+  'coffee.scm',
+  'copy-visible.scm',
+  'difference-clouds.scm',
+  'distress-selection.scm',
+  'drop-shadow.scm',
+  'erase-rows.scm',
+  'font-map.scm',
+  'fuzzyborder.scm',
+  'gimp-online.scm',
+  'gradient-example.scm',
+  'grid-system.scm',
+  'guides-from-selection.scm',
+  'guides-new-percent.scm',
+  'guides-new.scm',
+  'guides-remove-all.scm',
+  'lava.scm',
+  'line-nova.scm',
+  'mkbrush.scm',
+  'old-photo.scm',
+  'palette-export.scm',
+  'paste-as-brush.scm',
+  'paste-as-pattern.scm',
+  'perspective-shadow.scm',
+  'plug-in-compat.init',
+  'predator.scm',
+  'reverse-layers.scm',
+  'ripply-anim.scm',
+  'round-corners.scm',
+  'script-fu-compat.init',
+  'script-fu-set-cmap.scm',
+  'script-fu-util.scm',
+  'script-fu.init',
+  'select-to-brush.scm',
+  'select-to-image.scm',
+  'select-to-pattern.scm',
+  'selection-round.scm',
+  'slide.scm',
+  'spinning-globe.scm',
+  'spyrogimp.scm',
+  'tileblur.scm',
+  'unsharp-mask.scm',
+  'waves-anim.scm',
+  'weave.scm',
+  'xach-effect.scm',
+]
+
+test_scripts = [
+  'contactsheet.scm',
+  'test-sphere.scm',
+  'ts-helloworld.scm',
+]
+
+install_data(
+  scripts,
+  install_dir: join_paths(gimpdatadir, 'scripts'),
+)
diff --git a/plug-ins/script-fu/tinyscheme/meson.build b/plug-ins/script-fu/tinyscheme/meson.build
new file mode 100644
index 0000000..45981df
--- /dev/null
+++ b/plug-ins/script-fu/tinyscheme/meson.build
@@ -0,0 +1,16 @@
+
+scriptfu_tinyscheme = static_library('scriptfu-tinyscheme',
+  'scheme.c',
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    glib,
+  ],
+  c_args: [
+    '-DSTANDALONE=0',
+    '-DUSE_ASCII_NAMES=0',
+    '-DUSE_INTERFACE=1',
+    '-DUSE_MATH=1',
+    '-DUSE_STRLWR=0',
+  ],
+  install: false,
+)
diff --git a/plug-ins/selection-to-path/meson.build b/plug-ins/selection-to-path/meson.build
new file mode 100644
index 0000000..c790cbc
--- /dev/null
+++ b/plug-ins/selection-to-path/meson.build
@@ -0,0 +1,47 @@
+plugin_name = 'selection-to-path'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+plugin_selection_to_path_sources = [
+  'curve.c',
+  'edge.c',
+  'fit.c',
+  'math.c',
+  'pxl-outline.c',
+  'selection-to-path-dialog.c',
+  'selection-to-path.c',
+  'spline.c',
+  'vector.c',
+  rc_file
+]
+plugin_selection_to_path_link = [
+  libgimp,
+  libgimpbase,
+  libgimpcolor,
+  libgimpconfig,
+  libgimpmath,
+  libgimpui,
+  libgimpwidgets,
+]
+plugin_selection_to_path_deps = [
+  gegl, gtk2, math,
+]
+
+selection_to_path = executable(plugin_name,
+  plugin_selection_to_path_sources,
+  include_directories: [ rootInclude, ],
+  link_with:    plugin_selection_to_path_link,
+  dependencies: plugin_selection_to_path_deps,
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
diff --git a/plug-ins/twain/meson.build b/plug-ins/twain/meson.build
new file mode 100644
index 0000000..746d2f5
--- /dev/null
+++ b/plug-ins/twain/meson.build
@@ -0,0 +1,41 @@
+if platform_win32
+
+plugin_name = 'twain'
+
+rc_file = platform_win32 ? windows.compile_resources(
+  gimp_plugins_rc,
+  args: [
+    '--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
+    '--define', 'INTERNALNAME_STR="@0@"'    .format(plugin_name),
+    '--define', 'TOP_SRCDIR="@0@"'          .format(meson.source_root()),
+  ],
+  include_directories: [
+    rootInclude, appInclude,
+  ],
+) : []
+
+# Win32 specific
+plugin_twain_sources = [
+  'tw_func.c',
+  'tw_util.c',
+  'tw_win.c',
+  'twain.c',
+  rc_file,
+]
+
+twain = executable(plugin_name,
+  plugin_twain_sources,
+  include_directories: [ rootInclude, ],
+  dependencies: [
+    glib, gtk2, gegl,
+  ],
+  link_with: [
+    libgimp,
+    libgimpcolor,
+    libgimpbase,
+  ],
+  install: true,
+  install_dir: join_paths(gimpplugindir, 'plug-ins'),
+)
+
+endif
diff --git a/plug-ins/ui/meson.build b/plug-ins/ui/meson.build
new file mode 100644
index 0000000..ad86dab
--- /dev/null
+++ b/plug-ins/ui/meson.build
@@ -0,0 +1,13 @@
+plugin_ui = [
+  'plug-in-file-gif.ui',
+  'plug-in-file-png.ui',
+  'plug-in-file-raw.ui',
+  'plug-in-file-tiff.ui',
+  'plug-in-metadata-editor-calendar.ui',
+  'plug-in-metadata-editor.ui',
+  'plug-in-metadata-viewer.ui',
+]
+
+install_data(plugin_ui,
+  install_dir: join_paths(gimpdatadir, 'ui', 'plug-ins'),
+)
diff --git a/po-libgimp/meson.build b/po-libgimp/meson.build
new file mode 100644
index 0000000..72691f7
--- /dev/null
+++ b/po-libgimp/meson.build
@@ -0,0 +1 @@
+i18n.gettext(gettext_package + '-libgimp')
diff --git a/po-plug-ins/meson.build b/po-plug-ins/meson.build
new file mode 100644
index 0000000..1ba8bed
--- /dev/null
+++ b/po-plug-ins/meson.build
@@ -0,0 +1 @@
+i18n.gettext(gettext_package + '-std-plug-ins')
diff --git a/po-python/meson.build b/po-python/meson.build
new file mode 100644
index 0000000..036e032
--- /dev/null
+++ b/po-python/meson.build
@@ -0,0 +1 @@
+i18n.gettext(gettext_package + '-python')
diff --git a/po-script-fu/meson.build b/po-script-fu/meson.build
new file mode 100644
index 0000000..2df4c88
--- /dev/null
+++ b/po-script-fu/meson.build
@@ -0,0 +1 @@
+i18n.gettext(gettext_package + '-script-fu')
diff --git a/po-tags/meson.build b/po-tags/meson.build
new file mode 100644
index 0000000..9d943cb
--- /dev/null
+++ b/po-tags/meson.build
@@ -0,0 +1 @@
+potags_dir = meson.current_source_dir()
diff --git a/po-tips/meson.build b/po-tips/meson.build
new file mode 100644
index 0000000..57e814a
--- /dev/null
+++ b/po-tips/meson.build
@@ -0,0 +1,2 @@
+potips_dir = meson.current_source_dir()
+i18n.gettext(gettext_package + '-tips')
diff --git a/po-windows-installer/meson.build b/po-windows-installer/meson.build
new file mode 100644
index 0000000..a820d9e
--- /dev/null
+++ b/po-windows-installer/meson.build
@@ -0,0 +1,2 @@
+po_windows_installer_dir = meson.current_source_dir()
+i18n.gettext(gettext_package + '-windows-installer')
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..5252486
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,2 @@
+po_dir = meson.current_source_dir()
+i18n.gettext(gettext_package)
diff --git a/themes/meson.build b/themes/meson.build
new file mode 100644
index 0000000..a161d96
--- /dev/null
+++ b/themes/meson.build
@@ -0,0 +1,25 @@
+
+theme_names = [
+  [ 'Lighter',  '00-Lighter' ],
+  [ 'Light',    '01-Light' ],
+  [ 'Gray',     '02-Gray' ],
+  [ 'Dark',     '03-Dark' ],
+  [ 'Darker',   '04-Darker' ],
+  [ 'System',   'System' ],
+]
+
+foreach theme : theme_names
+  theme_srcdir = theme[0]
+  theme_bindir = theme[1]
+  install_data(
+    join_paths(theme_srcdir, 'gtkrc'),
+    install_dir: join_paths(gimpdatadir, 'themes', theme_bindir)
+  )
+
+  if run_command('[', '-d', join_paths(theme_srcdir, 'ui'), ']').returncode() == 0
+    install_subdir(
+      join_paths(theme_srcdir, 'ui'),
+      install_dir: join_paths(gimpdatadir, 'themes', theme_bindir)
+    )
+  endif
+endforeach
diff --git a/tools/generate_changelog.sh b/tools/generate_changelog.sh
new file mode 100755
index 0000000..6311626
--- /dev/null
+++ b/tools/generate_changelog.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+srcdir="$1"
+output="$2"
+
+echo "Creating ${output} based on git log"
+
+gitdir="${srcdir}/.git"
+
+if [[ ! -d "${gitdir}" ]]; then
+    echo "A git checkout and git-log is required to write changelog in ${output}." \
+    | tee ${output} >&2
+    exit 1
+fi
+
+
+CHANGELOG_START=74424325abb54620b370f2595445b2b2a19fe5e7
+
+( \
+    git log "${CHANGELOG_START}^.." --stat "${srcdir}" | fmt --split-only \
+        > "${output}.tmp" \
+    && [ ${PIPESTATUS[0]} -eq 0 ] \
+    && mv "${output}.tmp" "${output}" -f \
+    && echo "Appending ChangeLog.pre-git" \
+    && cat "${srcdir}/ChangeLog.pre-git" >> "${output}" \
+    && exit 0
+) \
+||\
+( \
+    rm "${output}.tmp" -f \
+    && echo "Failed to generate ChangeLog, your ChangeLog may be outdated" >&2 \
+    && (test -f "${output}" \
+        || echo "git-log is required to generate this file" >> "${output}") \
+    && exit 1
+)
diff --git a/tools/meson.build b/tools/meson.build
new file mode 100644
index 0000000..6416cf7
--- /dev/null
+++ b/tools/meson.build
@@ -0,0 +1,50 @@
+
+if platform_win32
+  gimp_debug_resume = executable('gimp-debug-resume',
+    'gimp-debug-resume.c',
+  )
+endif
+
+tools_cflags = [
+  '-DGIMPDATADIR=' +'"'+ join_paths(prefix, gimpdatadir) +'"',
+]
+
+
+gimptool = executable('gimptool-' + api_version,
+  'gimptool.c',
+  include_directories: rootInclude,
+  dependencies: [
+    gtk2,
+  ],
+  link_with: [
+    libgimpbase,
+  ],
+  c_args: tools_cflags,
+  install: true,
+)
+
+executable('kernelgen',
+  'kernelgen.c',
+  include_directories: rootInclude,
+  install: false,
+)
+
+executable('test-clipboard',
+  'test-clipboard.c',
+  include_directories: rootInclude,
+  dependencies: [
+    gtk2,
+  ],
+  install: false,
+)
+
+if have_vector_icons
+  invert_svg = generator(
+    executable('invert-svg',
+      'invert-svg.c',
+      dependencies: gio,
+    ),
+    output: '@BASENAME@',
+    arguments: [ '@INPUT@', '@OUTPUT@' ],
+  )
+endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]