[webkit-dev] Simplifying conditions in webkitdirs.pm

Konstantin Tokarev annulen at yandex.ru
Sun Jan 10 10:44:26 PST 2016

Hello WebKittens,

There are a lot of strange conditions in webkitdirs.pm which work only because of several coincidences happening in current trunk. As a result, addition of new ports (both in trunk or outside of trunk) require more line changes than it could be.

To be more concrete, I'm have these ports in mind:
1. Nix JSC port proposed by Yusuke Suzuki recently
2. Qt port which I'm restoring now (don't worry, I have no plans to upstream it in foreseeable future)

I've submitted a couple of patches in order to improve situation:


Other examples of such conditions:


sub isAppleMacWebKit()
    return isDarwin() && !isGtk(); 

If EFL is built on Darwin at some point it becomes AppleMac


sub isAppleWinWebKit()
    return (isCygwin() || isWindows()) && !isWinCairo() && !isGtk();


sub checkRequiredSystemConfig
    } elsif (isGtk() or isEfl() or isWindows() or isCygwin()) {
        my @cmds = qw(bison gperf flex);
    # following code check if these tools are present

Looks like that building any possible port requires these tools


sub isCMakeBuild()
    if (isEfl() || isGtk() || isAnyWindows()) {
        return 1;
    # ...

Do I understand correctly that CMake is a highly preferred (or even required) build system for any new port? If so that should be written as

  return 1 unless isAppleMacWebKit();


More information about the webkit-dev mailing list