The motivation is to build the plugin process with gtk2 even when --with-gtk=3.0 has been passed to configure. The idea is the following: - libWebCore contains all the webcore files except the ones actually using gtk (there are some files in gtk dirs that don't use gtk at all) - libWebCoreGtk contains only the files using gtk - Both libs are built always using the gtk passed to the configure script - webkit1, webkit2 and webprocess link directly to both libraries - pluginprocess will link to libWebCore, and only when gtk2 has been passed to configure, it will also link to libWebCoreGtk. When building with gtk3, plugin process will use libWebCoreGtk sources as part of its sources, so that they will be built again using gtk2. This will allow us to use the flash plugin when building webkit with gtk3.
Created attachment 92930 [details] Patch
Comment on attachment 92930 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=92930&action=review This looks fine to me, but I'd like to get Xan and Kov to look at this one as well. > Source/WebCore/GNUmakefile.am:762 > +libWebCoreGtk_la_CPPFLAGS = \ > + -DBUILDING_WEBKIT \ > + $(global_cppflags) \ Would it make sense to remove GTK_CLFAGS here?
(In reply to comment #2) > (From update of attachment 92930 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=92930&action=review > > This looks fine to me, but I'd like to get Xan and Kov to look at this one as well. > > > Source/WebCore/GNUmakefile.am:762 > > +libWebCoreGtk_la_CPPFLAGS = \ > > + -DBUILDING_WEBKIT \ > > + $(global_cppflags) \ > > Would it make sense to remove GTK_CLFAGS here? global_cppflags contains some flags for GTK (deprecation guards, etc.), but I think it doesn't contain GTK_CFLAGS. Anyway, as long as it doesn't link to GTK, it's not a problem.
Created attachment 95903 [details] Updated patch Patch updated to current git master. I also moved FileChooserGtk.cpp from webcoregtk to webcore since it doesn't actually use gtk and all freetype files except FontPlatformDataFreeType.cpp which is the only one using gtk
Comment on attachment 95903 [details] Updated patch Attachment 95903 [details] did not pass gtk-ews (gtk): Output: http://queues.webkit.org/results/8763088
Comment on attachment 95903 [details] Updated patch Cannot find anything weird here. At some point it would be interesting to add a comment explaining why we have the libraries we have here, otherwise I suppose it's not easy to figure out our makefiles.
The patch works for me on a clean build, I think the bot doesn't rebuild libWebCore, it only builds libWebCoreGtk so that all symbols in libWebCoreGtk are already in libWebCore.
Created attachment 97777 [details] Patch updated to apply on current git master I've also added a comment explaining why we need this split, as suggested by Xan.
Comment on attachment 97777 [details] Patch updated to apply on current git master Looks good to me.
Committed r89251: <http://trac.webkit.org/changeset/89251>