2017-11-01 21:27:13 +08:00
|
|
|
|
|
|
|
common_plugins_list = [
|
|
|
|
{ 'name': 'align-layers', },
|
|
|
|
{ 'name': 'animation-optimize', },
|
|
|
|
{ 'name': 'animation-play', },
|
|
|
|
{ 'name': 'blinds', },
|
|
|
|
{ 'name': 'border-average', },
|
|
|
|
{ 'name': 'busy-dialog', },
|
|
|
|
{ 'name': 'checkerboard', },
|
|
|
|
{ 'name': 'cml-explorer', },
|
|
|
|
{ 'name': 'colormap-remap', },
|
|
|
|
{ 'name': 'compose', },
|
|
|
|
{ 'name': 'contrast-retinex', },
|
|
|
|
{ 'name': 'crop-zealous',
|
|
|
|
'deps': [ gtk3, gegl, gdk_pixbuf, cairo, ],
|
|
|
|
},
|
|
|
|
{ 'name': 'curve-bend', },
|
|
|
|
{ 'name': 'decompose', },
|
|
|
|
{ 'name': 'depth-merge', },
|
|
|
|
{ 'name': 'despeckle', },
|
|
|
|
{ 'name': 'destripe', },
|
|
|
|
{ 'name': 'file-cel', },
|
|
|
|
{ 'name': 'file-compressor',
|
|
|
|
'deps': [ gegl, gdk_pixbuf, cairo, gio, liblzma, bz2, zlib, ],
|
|
|
|
},
|
|
|
|
{ 'name': 'file-csource', },
|
|
|
|
{ 'name': 'file-desktop-link',
|
|
|
|
'deps': [ gtk3, gegl, gdk_pixbuf, cairo, ],
|
|
|
|
},
|
|
|
|
{ 'name': 'file-dicom', },
|
|
|
|
{ 'name': 'file-gbr', },
|
|
|
|
{ 'name': 'file-gegl', },
|
|
|
|
{ 'name': 'file-gif-load',
|
|
|
|
'deps': [ gtk3, gegl, gdk_pixbuf, cairo, ],
|
|
|
|
},
|
|
|
|
{ 'name': 'file-gif-save', },
|
|
|
|
{ 'name': 'file-gih', },
|
|
|
|
{ 'name': 'file-glob',
|
|
|
|
'deps': [ gtk3, gegl, gdk_pixbuf, cairo, ],
|
|
|
|
},
|
|
|
|
{ 'name': 'file-header', },
|
|
|
|
{ 'name': 'file-html-table', },
|
|
|
|
{ 'name': 'file-pat', },
|
|
|
|
{ 'name': 'file-pcx', },
|
|
|
|
{ 'name': 'file-pdf-load',
|
|
|
|
'deps': [ gtk3, gegl, gdk_pixbuf, poppler ],
|
|
|
|
},
|
|
|
|
{ 'name': 'file-pix', },
|
|
|
|
{ 'name': 'file-png',
|
2021-01-17 22:28:08 +08:00
|
|
|
'deps': [ gtk3, gegl, libpng, lcms ],
|
2017-11-01 21:27:13 +08:00
|
|
|
},
|
|
|
|
{ 'name': 'file-pnm', },
|
|
|
|
{ 'name': 'file-psp',
|
|
|
|
'deps': [ gtk3, gegl, zlib, ],
|
|
|
|
},
|
|
|
|
{ 'name': 'file-raw-data', },
|
|
|
|
{ 'name': 'file-sunras', },
|
|
|
|
{ 'name': 'file-svg',
|
|
|
|
'deps': [ gtk3, gegl, rsvg, ],
|
|
|
|
},
|
|
|
|
{ 'name': 'file-tga', },
|
2022-07-08 03:23:35 +08:00
|
|
|
{ 'name': 'file-wbmp', },
|
2017-11-01 21:27:13 +08:00
|
|
|
{ 'name': 'file-xbm', },
|
|
|
|
{ 'name': 'file-xwd', },
|
|
|
|
{ 'name': 'film', },
|
|
|
|
{ 'name': 'gradient-map', },
|
|
|
|
{ 'name': 'grid', },
|
|
|
|
{ 'name': 'guillotine', },
|
|
|
|
{ 'name': 'hot', },
|
|
|
|
{ 'name': 'jigsaw', },
|
|
|
|
{ 'name': 'nl-filter', },
|
|
|
|
{ 'name': 'plugin-browser', },
|
|
|
|
{ 'name': 'procedure-browser', },
|
|
|
|
{ 'name': 'qbist', },
|
|
|
|
{ 'name': 'sample-colorize', },
|
|
|
|
{ 'name': 'smooth-palette', },
|
|
|
|
{ 'name': 'sparkle', },
|
|
|
|
{ 'name': 'sphere-designer', },
|
|
|
|
{ 'name': 'tile-small', },
|
|
|
|
{ 'name': 'tile', },
|
|
|
|
{ 'name': 'unit-editor', },
|
|
|
|
{ 'name': 'van-gogh-lic', },
|
|
|
|
{ 'name': 'warp', },
|
|
|
|
{ 'name': 'wavelet-decompose', },
|
|
|
|
{ 'name': 'web-browser', },
|
|
|
|
]
|
|
|
|
|
2019-09-12 18:04:16 +08:00
|
|
|
if libaa.found()
|
|
|
|
common_plugins_list += {
|
|
|
|
'name': 'file-aa',
|
|
|
|
'deps': [ gtk3, gegl, gdk_pixbuf, libaa, ],
|
|
|
|
}
|
|
|
|
endif
|
|
|
|
|
2020-10-20 00:52:18 +08:00
|
|
|
if have_heif
|
2019-09-12 18:04:16 +08:00
|
|
|
common_plugins_list += { 'name': 'file-heif',
|
2020-08-19 22:36:18 +08:00
|
|
|
'deps': [ gtk3, gegl, libheif, gexiv2, lcms, ],
|
2019-09-12 18:04:16 +08:00
|
|
|
}
|
|
|
|
endif
|
|
|
|
|
|
|
|
if openjpeg.found()
|
|
|
|
common_plugins_list += { 'name': 'file-jp2-load',
|
|
|
|
'deps': [ gtk3, gegl, gdk_pixbuf, openjpeg, ],
|
|
|
|
}
|
|
|
|
endif
|
|
|
|
|
2021-08-26 20:24:21 +08:00
|
|
|
if libjxl.found() and libjxl_threads.found()
|
|
|
|
common_plugins_list += {
|
|
|
|
'name': 'file-jpegxl',
|
2022-10-04 23:02:08 +08:00
|
|
|
'deps': [ gtk3, gegl, gexiv2, libjxl, libjxl_threads, ],
|
2021-08-26 20:24:21 +08:00
|
|
|
}
|
|
|
|
endif
|
|
|
|
|
2019-09-12 18:04:16 +08:00
|
|
|
if libmng.found()
|
2022-04-01 00:27:23 +08:00
|
|
|
mng_cflags = []
|
|
|
|
if platform_windows
|
|
|
|
mng_cflags = [ '-DMNG_USE_DLL' ]
|
|
|
|
endif
|
2019-09-12 18:04:16 +08:00
|
|
|
common_plugins_list += { 'name': 'file-mng',
|
2022-04-01 00:27:23 +08:00
|
|
|
'deps': [ gtk3, gegl, libmng, libpng, ],
|
|
|
|
'cflags': mng_cflags,
|
2019-09-12 18:04:16 +08:00
|
|
|
}
|
|
|
|
endif
|
|
|
|
|
|
|
|
if cairopdf.found()
|
|
|
|
common_plugins_list += { 'name': 'file-pdf-save',
|
|
|
|
'deps': [ gtk3, gegl, gdk_pixbuf, poppler, cairo, cairopdf ],
|
|
|
|
}
|
|
|
|
endif
|
|
|
|
|
|
|
|
if ghostscript.found()
|
|
|
|
common_plugins_list += { 'name': 'file-ps',
|
|
|
|
'deps': [ gtk3, gegl, gdk_pixbuf, ghostscript, ],
|
|
|
|
}
|
2017-11-01 21:27:13 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
if wmf.found()
|
|
|
|
common_plugins_list += { 'name': 'file-wmf',
|
|
|
|
'deps': [ gtk3, gegl, wmf, ],
|
|
|
|
}
|
|
|
|
endif
|
|
|
|
|
|
|
|
if xmc.found()
|
|
|
|
common_plugins_list += { 'name': 'file-xmc',
|
|
|
|
'deps': [ gtk3, gegl, xmc, ],
|
|
|
|
}
|
|
|
|
endif
|
|
|
|
|
|
|
|
if libxpm.found()
|
|
|
|
common_plugins_list += { 'name': 'file-xpm',
|
|
|
|
'deps': [ gtk3, gegl, libxpm, ],
|
|
|
|
}
|
|
|
|
endif
|
|
|
|
|
2019-09-12 18:04:16 +08:00
|
|
|
if not platform_windows
|
|
|
|
common_plugins_list += { 'name': 'mail', }
|
|
|
|
endif
|
|
|
|
|
configure, meson, plug-ins: unmaintain WebkitGTK-depending plug-ins.
This is an official way to declare these plug-ins as now
unmaintained/deprecated.
Relevant plug-ins are:
1) help-browser (Displaying the docs): nowadays every desktop machine
has a browser. Let's just use whatever is the person's default
browser.
2) web-page (Web screenshot): it looks to me like every browser has this
feature by default now (I use it all the time in Firefox to get a
full-page screenshot, never in GIMP), even on mobile, I am told. It's
nice to have it in GIMP too, but not like absolutely necessary.
On the other hand:
1. It's a hell to build, with a lot of issues. We have regular issues on
our Flatpak-s. We don't manage to build it on our CI (only locally
apparently). Also it takes a crazy amount of time (like 90% of CI
build-time would be webkit).
2. From what I gather, new versions don't work on Windows anymore. Even
MSYS2 seems to have dropped the ball and don't try anymore.
Basically we would have a feature disparity from GIMP 3.0 (most
platform but Windows). We don't know when it will be resolved (if
ever) as it's been like this for years.
Now why we are keeping the code around instead of just removing
everything is that the topic tree in the help browser is useful and
comfortable to use. Ideally we should get some equivalent to help
browsing the help efficiently in the web docs as well (so basically
menus, web search and alike?). So I am told to keep the code around at
least for now to see if we can figure something out or improve the
situation.
Except for this point, we can consider the WebkitGTK plug-ins as
deprecated from GIMP 3.0 on.
2021-12-23 01:47:30 +08:00
|
|
|
if get_option('webkit-unmaintained')
|
2017-11-01 21:27:13 +08:00
|
|
|
common_plugins_list += { 'name': 'web-page',
|
|
|
|
'deps': [ gtk3, gegl, gdk_pixbuf, webkit, ],
|
|
|
|
}
|
|
|
|
endif
|
|
|
|
|
|
|
|
foreach plugin : common_plugins_list
|
|
|
|
plugin_name = plugin.get('name')
|
|
|
|
plugin_sources = [ plugin.get('sources', plugin_name + '.c') ]
|
|
|
|
plugin_deps = plugin.get('deps', [ gtk3, gegl, gdk_pixbuf, ])
|
|
|
|
plugin_cflags = plugin.get('cflags', [])
|
|
|
|
|
|
|
|
if platform_windows
|
|
|
|
plugin_rc = configure_file(
|
Issue #7327: Cannot build GIMP3 on MSYS2 using Meson.
This is untested on my side, because the bug only happens on native
builds with meson (our CI has cross-builds with meson and native builds
with autotools and I only do cross-builds locally) but I think/hope it
will work.
Basically we were using .full_path() because these rc files were also
used as input of some configure_file() calls which doesn't like custom
target objects as input (it wants strings or file objects). Yet a bug
in meson didn't like the colon used in native Windows full paths ('C:'
and such) when used in windows.compile_resources(). This has been fixed
by Luca Bacci in: https://github.com/mesonbuild/meson/pull/9368
Yet we just cannot depend on very early meson (or worse dev meson code).
On the other hand, if the input is a custom_tgt object, it uses the
object ID which we give as first parameter of custom_target() so we know
it's appropriately named without colons (such as 'gimp_plugins_rc').
Thus we should not bump into this issue again.
For the few usage in configure_file(), I just add a .full_path() only
when needed at call time.
Last but not least, I replace the bogus `meson --version` call by a
`python3 -c 'exit()'` as advised by Eli Schwartz:
https://gitlab.gnome.org/GNOME/gimp/-/commit/2afa019c708869ef84a2d24c96552b380a504d4d#note_1284951
The reason is that it is apparently possible (or will be when some
reimplementation of meson will be done) that the `meson` executable
itself does not exist. On the other hand, `python3` should always be
there, as a mandatory dependency of the build tool.
In order to use an appropriate `python3`, I made the
pythonmod.find_installation() check required in our build (which should
not be a problem since it's a meson requirement as well), even when the
-Dpython option is false (this one depends on other requirements too
anyway, such as version and pygobject). This way I can call this meson
variable of discovered python in my bogus call, instead of calling a
(potentially different) python from PATH environment.
2021-10-12 22:00:33 +08:00
|
|
|
input : gimp_plugins_rc.full_path(),
|
2017-11-01 21:27:13 +08:00
|
|
|
output: plugin_name + '.rc',
|
|
|
|
copy: true,
|
|
|
|
)
|
|
|
|
|
2022-08-31 05:58:24 +08:00
|
|
|
# See https://gitlab.gnome.org/GNOME/gimp/-/issues/8537
|
|
|
|
if generate_version_h
|
|
|
|
compile_resources_depfiles = []
|
|
|
|
compile_resources_depends = [ gitversion_h ]
|
|
|
|
else
|
|
|
|
compile_resources_depfiles = [ gitversion_h ]
|
|
|
|
compile_resources_depends = []
|
|
|
|
endif
|
|
|
|
|
2017-11-01 21:27:13 +08:00
|
|
|
plugin_sources += windows.compile_resources(
|
|
|
|
plugin_rc,
|
|
|
|
args: [
|
|
|
|
'--define', 'ORIGINALFILENAME_STR="@0@"'.format(plugin_name+'.exe'),
|
|
|
|
'--define', 'INTERNALNAME_STR="@0@"' .format(plugin_name),
|
2022-08-31 07:07:27 +08:00
|
|
|
'--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()),
|
2017-11-01 21:27:13 +08:00
|
|
|
],
|
|
|
|
include_directories: [
|
|
|
|
rootInclude, appInclude,
|
|
|
|
],
|
2022-08-31 05:58:24 +08:00
|
|
|
depend_files: compile_resources_depfiles,
|
|
|
|
depends: compile_resources_depends
|
2017-11-01 21:27:13 +08:00
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
|
|
|
executable(plugin_name,
|
|
|
|
plugin_sources,
|
|
|
|
include_directories: [ rootInclude, ],
|
|
|
|
link_with : [
|
|
|
|
libgimp,
|
|
|
|
libgimpbase,
|
|
|
|
libgimpcolor,
|
|
|
|
libgimpconfig,
|
|
|
|
libgimpmath,
|
|
|
|
libgimpui,
|
|
|
|
libgimpwidgets,
|
|
|
|
],
|
|
|
|
dependencies: [ plugin_deps, math ],
|
|
|
|
c_args: plugin_cflags,
|
|
|
|
install: true,
|
|
|
|
install_dir: gimpplugindir / 'plug-ins' / plugin_name,
|
|
|
|
)
|
|
|
|
endforeach
|