wpewebkit/webkitgtk: Add a packageconfig option to control the pdfjs feature.
This feature adds around of 3MB to the binary size of libwebkit.so and is enabled by default on the upstream CMake configuration.
So disable it here by default meanwhile allowing users to optionally enable it with a PACKAGECONFIG entry.
Actually, wait a moment: we want PDF.js support enabled for the GTK port by default, and disabled for WPE...
Why do we want that enabled by default on a Yocto build? A Yocto build is most of the times used on embedded devices, is not a desktop distro.
I find hard to justify that (by default) we increment on 3MB the binary size of the library just for rendering PDFs on the browser.
I was actually going to submit a PR to oe-core (poky) to disable it there by default for the webkitgtk recipe that is shipped there.
Actually, wait a moment: we want PDF.js support enabled for the GTK port by default, and disabled for WPE...
Why do we want that enabled by default on a Yocto build? A Yocto build is most of the times used on embedded devices, is not a desktop distro.
I find hard to justify that (by default) we increment on 3MB the binary size of the library just for rendering PDFs on the browser.
I was actually going to submit a PR to oe-core (poky) to disable it there by default for the webkitgtk recipe that is shipped there.
We don't have a specific policy on how to set default values for PACKAGECONFIG flags. Personally, I tend to align these flags with CMake defaults, as it simplifies recipe maintenance. However, there are exceptions - such as the doc flag - that do not follow this pattern, so this is not a strict rule. In this particular case, I'd agree with @clopez's point of view.
I still lean towards keeping the existing default, but given both @clopez and @psaavedra think it's better to disable PDF.js support in WPE by default (because embedded) let's do that and have the option enabled by default for webkitgtk and disabled for the wpewebkit package. Does that sound fine for everybody involved?
P.S. This needs rebasing before it can land.
Ok.
I would have preferred to disable this also by default for webkitgtk here, because the purpose of doing a yocto build is usually for an embedded device but I will accept the compromise.
I will rebase the patch so it get's disabled by default only for wpewebkit
thanks!