| Differences between
and this patch
- a/WebKitTools/Scripts/build-webkit -12 / +41 lines
Lines 39-44 use POSIX; a/WebKitTools/Scripts/build-webkit_sec1
39
39
40
my $originalWorkingDirectory = getcwd();
40
my $originalWorkingDirectory = getcwd();
41
41
42
my $databaseSupport = 1;
43
my $icondatabaseSupport = 1;
42
my $svgSupport = 1;
44
my $svgSupport = 1;
43
my $svgExperimentalSupport = 0;
45
my $svgExperimentalSupport = 0;
44
my $svgAnimationSupport = $svgExperimentalSupport;
46
my $svgAnimationSupport = $svgExperimentalSupport;
Lines 58-63 my $programName = basename($0); a/WebKitTools/Scripts/build-webkit_sec2
58
my $usage = <<EOF;
60
my $usage = <<EOF;
59
Usage: $programName [options] [options to pass to build system]
61
Usage: $programName [options] [options to pass to build system]
60
  --help                        Show this help message
62
  --help                        Show this help message
63
  --[no-]database               Toggle Database Support (default: $databaseSupport)
64
  --[no-]icondatabase           Toggle Icon database support (default: $icondatabaseSupport)
61
  --[no-]svg                    Toggle SVG support (default: $svgSupport)
65
  --[no-]svg                    Toggle SVG support (default: $svgSupport)
62
  --[no-]svg-experimental       Toggle SVG experimental features support (default: $svgExperimentalSupport, 
66
  --[no-]svg-experimental       Toggle SVG experimental features support (default: $svgExperimentalSupport, 
63
                                implies SVG Support)
67
                                implies SVG Support)
Lines 73-79 Usage: $programName [options] [options to pass to build system] a/WebKitTools/Scripts/build-webkit_sec3
73
  --[no-]coverage               Toggle code coverage support (default: $coverageSupport)
77
  --[no-]coverage               Toggle code coverage support (default: $coverageSupport)
74
EOF
78
EOF
75
79
76
GetOptions('svg!' => \$svgSupport,
80
GetOptions('database!' => \$databaseSupport,
81
           'icondatabase!' => \$icondatabaseSupport,
82
           'svg!' => \$svgSupport,
77
           'svg-experimental!' => \$svgExperimentalSupport,
83
           'svg-experimental!' => \$svgExperimentalSupport,
78
           'svg-animation!' => \$svgAnimationSupport,
84
           'svg-animation!' => \$svgAnimationSupport,
79
           'svg-filters!' => \$svgFiltersSupport,
85
           'svg-filters!' => \$svgFiltersSupport,
Lines 132-147 if (isWx()) { a/WebKitTools/Scripts/build-webkit_sec4
132
138
133
139
134
my $productDir = productDir();
140
my $productDir = productDir();
135
my @options = XcodeOptions();
136
my @overrideFeatureDefinesOption = ();
141
my @overrideFeatureDefinesOption = ();
137
142
138
if ($clean) {
143
push @overrideFeatureDefinesOption, "ENABLE_DATABASE" if $databaseSupport;
139
    push(@options, "-alltargets");
144
push @overrideFeatureDefinesOption, "ENABLE_ICONDATABASE" if $icondatabaseSupport;
140
    push(@options, "clean");
141
}
142
143
push @overrideFeatureDefinesOption, "ENABLE_DATABASE";
144
push @overrideFeatureDefinesOption, "ENABLE_ICONDATABASE";
145
push @overrideFeatureDefinesOption, "ENABLE_SVG" if $svgSupport;
145
push @overrideFeatureDefinesOption, "ENABLE_SVG" if $svgSupport;
146
push @overrideFeatureDefinesOption, "ENABLE_SVG_ANIMATION" if $svgAnimationSupport;
146
push @overrideFeatureDefinesOption, "ENABLE_SVG_ANIMATION" if $svgAnimationSupport;
147
push @overrideFeatureDefinesOption, "ENABLE_SVG_FILTERS" if $svgFiltersSupport;
147
push @overrideFeatureDefinesOption, "ENABLE_SVG_FILTERS" if $svgFiltersSupport;
Lines 172-178 for my $dir (@projects, @otherDirs) { a/WebKitTools/Scripts/build-webkit_sec5
172
    }
172
    }
173
}
173
}
174
174
175
my @options = ();
176
177
if ($clean && isOSX()) {
178
    push(@options, "-alltargets");
179
    push(@options, "clean");
180
}
181
182
# enable autotool options accordingly
183
if ($ENV{WEBKITAUTOTOOLS}) {
184
    push @options, $databaseSupport         ? "--enable-database"           : "--disable-database";
185
    push @options, $icondatabaseSupport     ? "--enable-icondatabase"       : "--disable-icondatabase";
186
    push @options, $svgSupport              ? "--enable-svg"                : "--disable-svg";
187
    push @options, $svgAnimationSupport     ? "--enable-svg-animation"      : "--disable-svg-animation";
188
    push @options, $svgFiltersSupport       ? "--enable-svg-filters"        : "--disable-svg-filters";
189
    push @options, $svgForeignObjectSupport ? "--enable-svg-foreign-object" : "--disable-svg-foreign-object";
190
    push @options, $svgFontsSupport         ? "--enable-svg-fonts"          : "--disable-svg-fonts";
191
    push @options, $svgAsImageSupport       ? "--enable-svg-as-image"       : "--disable-svg-as-image";
192
    push @options, $svgUseSupport           ? "--enable-svg-use-element"    : "--disable-svg-use-element";
193
    push @options, $xpathSupport            ? "--enable-xpath"              : "--disable-xpath";
194
    push @options, $xsltSupport             ? "--enable-xslt"               : "--disable-xslt";
195
    push @options, $videoSupport            ? "--enable-video"              : "--disable-video";
196
    push @options, $coverageSupport         ? "--enable-coverage"           : "--disable-coverage";
197
198
}
199
175
if (isOSX()) {
200
if (isOSX()) {
201
202
    push(@options, XcodeOptions());
203
176
    # Copy library and header from WebKitLibraries to a findable place in the product directory.
204
    # Copy library and header from WebKitLibraries to a findable place in the product directory.
177
    my $srcLib = "WebKitLibraries/libWebKitSystemInterfaceTiger.a";
205
    my $srcLib = "WebKitLibraries/libWebKitSystemInterfaceTiger.a";
178
    my $lib = "$productDir/libWebKitSystemInterfaceTiger.a";
206
    my $lib = "$productDir/libWebKitSystemInterfaceTiger.a";
Lines 199-205 if (isOSX()) { a/WebKitTools/Scripts/build-webkit_sec6
199
    }
227
    }
200
}
228
}
201
229
202
if (isGtk() && isDarwin() && !$ENV{QMAKESPEC}) {
230
if (isGtk() && isDarwin() && !$ENV{WEBKITAUTOTOOLS} && !$ENV{QMAKESPEC}) {
203
    # The qmake from Trolltech's binary "QT for Mac" distribution tries to
231
    # The qmake from Trolltech's binary "QT for Mac" distribution tries to
204
    # create xcode projects, not Makefiles
232
    # create xcode projects, not Makefiles
205
    $ENV{QMAKESPEC} = "macx-g++";
233
    $ENV{QMAKESPEC} = "macx-g++";
Lines 218-230 removeLibraryDependingOnSVG("WebCore", $svgSupport); a/WebKitTools/Scripts/build-webkit_sec7
218
for my $dir (@projects) {
246
for my $dir (@projects) {
219
    chdir $dir or die;
247
    chdir $dir or die;
220
    my $result = 0;
248
    my $result = 0;
249
221
    if (isGtk()) {
250
    if (isGtk()) {
222
        if ($dir ne "WebKit") {
251
        if ($dir ne "WebKit") {
223
            chdir ".." or die;
252
            chdir ".." or die;
224
            next;
253
            next;
225
        }
254
        }
226
255
        
227
        $result = buildQMakeGtkProject($dir, $clean);
256
        $result = buildGtkProject($dir, $clean,  @options);
228
    } elsif (isQt()) {
257
    } elsif (isQt()) {
229
        if ($dir ne "WebKit") {
258
        if ($dir ne "WebKit") {
230
            chdir ".." or die;
259
            chdir ".." or die;
- a/WebKitTools/Scripts/run-launcher -13 / +23 lines
Lines 38-65 use webkitdirs; a/WebKitTools/Scripts/run-launcher_sec1
38
38
39
setConfiguration();
39
setConfiguration();
40
my $productDir = productDir();
40
my $productDir = productDir();
41
my $libDir = catdir(productDir(), 'lib');
42
my $launcherPath = productDir();
41
my $launcherPath = productDir();
43
my @args = @ARGV;
42
my @args = @ARGV;
44
43
45
# Check to see that all the frameworks are built.
44
# Check to see that all the frameworks are built.
46
checkFrameworks();
45
checkFrameworks();
47
46
48
if (isGtk()) {
47
# Set paths according to the build system used
49
  $launcherPath = catdir($launcherPath, "WebKitTools", "GtkLauncher", "GtkLauncher");
48
if (!$ENV{WEBKITAUTOTOOLS}) {
50
  # Strip --gtk from the arg-list, since otherwise GtkLauncher will try to
49
    my $libDir = catdir(productDir(), 'lib');
51
  # interpret it as a URL.
50
52
  @args = grep(!/^(--gtk)$/, @args);
51
    if (isGtk()) {
53
} elsif (isQt()) {
52
        $launcherPath = catdir($launcherPath, "WebKitTools", "GtkLauncher", "GtkLauncher");
54
  $launcherPath = catdir($launcherPath, "bin", "QtLauncher");
53
        # Strip --gtk from the arg-list, since otherwise GtkLauncher will try to
54
        # interpret it as a URL.
55
        @args = grep(!/^(--gtk)$/, @args);
56
    } elsif (isQt()) {
57
        $launcherPath = catdir($launcherPath, "bin", "QtLauncher");
58
    }
59
60
    # Set up LD_LIBRARY_PATH to point to the product directory.
61
    print "Starting webkit launcher with LD_LIBRARY_PATH set to point to built WebKit in $libDir.\n";
62
    
63
    $ENV{LD_LIBRARY_PATH} = $ENV{LD_LIBRARY_PATH} ? "$libDir:$ENV{LD_LIBRARY_PATH}" : $libDir;
55
} else {
64
} else {
56
  die;
57
}
58
65
59
# Set up LD_LIBRARY_PATH to point to the product directory.
66
    if (isGtk()) {
60
print "Starting webkit launcher with LD_LIBRARY_PATH set to point to built WebKit in $libDir.\n";
67
        $launcherPath = catdir($launcherPath, "Programs", "GtkLauncher");
68
        @args = grep(!/^(--gtk)$/, @args);
69
    }
61
70
62
$ENV{LD_LIBRARY_PATH} = $ENV{LD_LIBRARY_PATH} ? "$libDir:$ENV{LD_LIBRARY_PATH}" : $libDir;
71
    print "Starting webkit launcher.\n";
72
}
63
73
64
exec $launcherPath, @args or die;
74
exec $launcherPath, @args or die;
65
75
- a/WebKitTools/Scripts/run-webkit-tests -1 / +8 lines
Lines 258-264 $testMedia = 0 if $shouldCheckLeaks && isTiger(); a/WebKitTools/Scripts/run-webkit-tests_sec1
258
setConfigurationProductDir(Cwd::abs_path($root)) if (defined($root));
258
setConfigurationProductDir(Cwd::abs_path($root)) if (defined($root));
259
my $productDir = productDir();
259
my $productDir = productDir();
260
$productDir .= "/bin" if (isQt());
260
$productDir .= "/bin" if (isQt());
261
$productDir .= "/WebKitTools/DumpRenderTree/gtk" if isGtk();
261
262
if (isGtk()) {
263
    if ($ENV{WEBKITAUTOTOOLS}) {
264
        $productDir .= "/Programs";
265
    } else {
266
        $productDir .= "/WebKitTools/DumpRenderTree/gtk";
267
    }
268
}
262
269
263
chdirWebKit();
270
chdirWebKit();
264
271
- a/WebKitTools/Scripts/webkitdirs.pm -7 / +59 lines
Lines 394-400 sub hasSVGSupport a/WebKitTools/Scripts/webkitdirs.pm_sec1
394
    }
394
    }
395
395
396
    if (isGtk() and $path =~ /WebCore/) {
396
    if (isGtk() and $path =~ /WebCore/) {
397
        $path .= "/../lib/libWebKitGtk.so";
397
        $path .= "/../lib/libWebKitGtk.so" if !$ENV{WEBKITAUTOTOOLS};
398
        $path .= "/../.libs/libWebKitGtk.so" if $ENV{WEBKITAUTOTOOLS};
398
    }
399
    }
399
400
400
    open NM, "-|", "nm", $path or die;
401
    open NM, "-|", "nm", $path or die;
Lines 716-721 sub qtMakeCommand($) a/WebKitTools/Scripts/webkitdirs.pm_sec2
716
    return "make";
717
    return "make";
717
}
718
}
718
719
720
sub buildAutotoolsProject($@)
721
{
722
    my ($clean, @buildArgs) = @_;
723
724
    my $make = 'make';
725
    my $dir = productDir();
726
    my $config = passedConfiguration() || configuration();
727
    my $prefix = $ENV{"WebKitInstallationPrefix"};
728
729
    # check if configuration is Debug
730
    if ($config =~ m/debug/i) {
731
        push @buildArgs, "--enable-debug";
732
    } else {
733
        push @buildArgs, "--disable-debug";
734
    }
735
736
    if (! -d $dir) {
737
        system "mkdir", "-p", "$dir";
738
        if (! -d $dir) {
739
            die "Failed to create build directory " . $dir;
740
        }
741
    }
742
743
    chdir $dir or die "Failed to cd into " . $dir . "\n";
744
745
    my $result;
746
    if ($clean) {
747
        $result = system "$make distclean";
748
        return $result;
749
    }
750
751
    print "Calling configure in " . $dir . "\n\n";
752
    print "Installation directory: $prefix\n" if(defined($prefix));
753
     
754
    $result = system "$sourceDir/autogen.sh", @buildArgs;
755
    if ($result ne 0) {
756
        die "Failed to setup build environment using 'autotools'!\n";
757
    }
758
759
    $result = system $make;
760
    if ($result ne 0) {
761
        die "\nFailed to build WebKit using '$make'!\n";
762
    }
763
764
    chdir ".." or die;
765
    return $result;
766
}
767
719
sub buildQMakeProject($@)
768
sub buildQMakeProject($@)
720
{
769
{
721
    my ($clean, @buildArgs) = @_;
770
    my ($clean, @buildArgs) = @_;
Lines 789-806 sub buildQMakeQtProject($$) a/WebKitTools/Scripts/webkitdirs.pm_sec3
789
    return buildQMakeProject($clean, @buildArgs);
838
    return buildQMakeProject($clean, @buildArgs);
790
}
839
}
791
840
792
sub buildQMakeGtkProject($$)
841
sub buildGtkProject($$@)
793
{
842
{
794
    my ($project, $clean) = @_;
843
    my ($project, $clean, @buildArgs) = @_;
795
844
796
    if ($project ne "WebKit") {
845
    if ($project ne "WebKit") {
797
        die "The Gtk portbuilds JavaScriptCore/WebCore/WebKitQt in one shot! Only call it for 'WebKit'.\n";
846
        die "The Gtk portbuilds JavaScriptCore/WebCore/WebKitQt in one shot! Only call it for 'WebKit'.\n";
798
    }
847
    }
799
848
800
    my @buildArgs = ("CONFIG+=gtk-port");
849
    if ($ENV{WEBKITAUTOTOOLS}) {
801
    push @buildArgs, "CONFIG-=qt";
850
        return buildAutotoolsProject($clean, @buildArgs);
802
851
    } else {
803
    return buildQMakeProject($clean, @buildArgs);
852
        my @buildArgs = {"CONFIG+=gtk-port"};
853
        push @buildArgs, "CONFIG-=qt";
854
        return buildQMakeProject($clean, @buildArgs);
855
    }
804
}
856
}
805
857
806
sub setPathForRunningWebKitApp
858
sub setPathForRunningWebKitApp
- a/configure.ac -7 / +7 lines
Lines 214-224 AC_MSG_RESULT([$enable_database]) a/configure.ac_sec1
214
214
215
# check whether to build with icon database support
215
# check whether to build with icon database support
216
AC_MSG_CHECKING([whether to enable icon database support])
216
AC_MSG_CHECKING([whether to enable icon database support])
217
AC_ARG_ENABLE(icon_database,
217
AC_ARG_ENABLE(icondatabase,
218
              AC_HELP_STRING([--enable-icon-database],
218
              AC_HELP_STRING([--enable-icondatabase],
219
                             [enable icon database [default=no]]),
219
                             [enable icon database [default=no]]),
220
              [],[enable_icon_database="no"])
220
              [],[enable_icondatabase="no"])
221
AC_MSG_RESULT([$enable_icon_database])
221
AC_MSG_RESULT([$enable_icondatabase])
222
222
223
# check whether to enable HTML5 audio/video support
223
# check whether to enable HTML5 audio/video support
224
AC_MSG_CHECKING([whether to enable HTML5 video support])
224
AC_MSG_CHECKING([whether to enable HTML5 video support])
Lines 350-356 if test "$http_backend" = "curl"; then a/configure.ac_sec2
350
fi
350
fi
351
351
352
# check if sqlite 3 is available
352
# check if sqlite 3 is available
353
if test "$enable_icon_database" = "yes" || test "$enable_database" = "yes"; then
353
if test "$enable_icondatabase" = "yes" || test "$enable_database" = "yes"; then
354
   PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= $SQLITE_REQUIRED_VERSION])
354
   PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= $SQLITE_REQUIRED_VERSION])
355
   AC_SUBST([SQLITE3_CFLAGS])
355
   AC_SUBST([SQLITE3_CFLAGS])
356
   AC_SUBST([SQLITE3_LIBS])
356
   AC_SUBST([SQLITE3_LIBS])
Lines 414-420 AM_CONDITIONAL([USE_CURL], [test "$http_backend" = "curl"]) a/configure.ac_sec3
414
# WebKit feature conditionals
414
# WebKit feature conditionals
415
AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug" = "yes"])
415
AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug" = "yes"])
416
AM_CONDITIONAL([ENABLE_DATABASE],[test "$enable_database" = "yes"])
416
AM_CONDITIONAL([ENABLE_DATABASE],[test "$enable_database" = "yes"])
417
AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icon_database" = "yes"])
417
AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icondatabase" = "yes"])
418
AM_CONDITIONAL([ENABLE_XPATH],[test "$enable_xpath" = "yes"])
418
AM_CONDITIONAL([ENABLE_XPATH],[test "$enable_xpath" = "yes"])
419
AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"])
419
AM_CONDITIONAL([ENABLE_XSLT],[test "$enable_xslt" = "yes"])
420
AM_CONDITIONAL([ENABLE_VIDEO],[test "$enable_video" = "yes"])
420
AM_CONDITIONAL([ENABLE_VIDEO],[test "$enable_video" = "yes"])
Lines 447-453 WebKit was configured with the following options: a/configure.ac_sec4
447
 Optimized memory allocator        : $enable_fast_malloc
447
 Optimized memory allocator        : $enable_fast_malloc
448
 HTML5 client-side storage support : $enable_database
448
 HTML5 client-side storage support : $enable_database
449
 HTML5 video element support       : $enable_video
449
 HTML5 video element support       : $enable_video
450
 Icon database support             : $enable_icon_database
450
 Icon database support             : $enable_icondatabase
451
 SVG support                       : $enable_svg
451
 SVG support                       : $enable_svg
452
 SVG animation support             : $enable_svg_animation
452
 SVG animation support             : $enable_svg_animation
453
 SVG filters support               : $enable_svg_filters
453
 SVG filters support               : $enable_svg_filters

Return to Bug 16618