Modified: trunk/Tools/Scripts/update-webkit-libs-jhbuild (223535 => 223536)
--- trunk/Tools/Scripts/update-webkit-libs-jhbuild 2017-10-17 13:14:09 UTC (rev 223535)
+++ trunk/Tools/Scripts/update-webkit-libs-jhbuild 2017-10-17 13:54:55 UTC (rev 223536)
@@ -2,6 +2,7 @@
# Copyright (C) 2011 Igalia S.L.
# Copyright (C) 2012 Intel Corporation
# Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (C) 2016 Canon Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -21,6 +22,7 @@
use lib $FindBin::Bin;
use webkitdirs;
use Getopt::Long qw(:config pass_through);
+use XML::LibXML;
my $platform = "";
$platform = "gtk" if isGtk();
@@ -38,6 +40,18 @@
'force' => \$force
);
+sub getJhbuildIncludedFilePaths
+{
+ my $jhbuildFile = shift;
+ my $dom = XML::LibXML->load_xml(location => $jhbuildFile);
+ my @includes;
+
+ foreach my $includeFile ($dom->findnodes('/moduleset/include/@href')) {
+ push(@includes, $includeFile->to_literal());
+ }
+ return @includes;
+}
+
sub getMD5HashForFile($)
{
my $file = shift;
@@ -54,39 +68,65 @@
return md5_hex($contents);
}
-sub jhbuildConfigurationChanged()
+sub jhbuildConfigurationCheckFile
{
- foreach my $file (qw(jhbuildrc jhbuild.modules)) {
- my $path = join('/', getJhbuildPath(), $file . '.md5sum');
- if (! -e $path) {
- return 1;
- }
+ my $file = shift;
+ my $path = join('/', getJhbuildPath(), $platform, $file . '.md5sum');
+ if (! -e $path) {
+ return 1;
+ }
- # Get the md5 sum of the file we're testing, look in the right platform directory.
- my $actualFile = join('/', sourceDir(), 'Tools', $platform, $file);
- my $currentSum = getMD5HashForFile($actualFile);
+ # Get the md5 sum of the file we're testing, look in the right platform directory.
+ my $actualFile = join('/', sourceDir(), 'Tools', $platform, $file);
+ my $currentSum = getMD5HashForFile($actualFile);
- # Get our previous record.
- open(PREVIOUS_MD5, $path);
- chomp(my $previousSum = <PREVIOUS_MD5>);
- close(PREVIOUS_MD5);
+ # Get our previous record.
+ open(PREVIOUS_MD5, $path);
+ chomp(my $previousSum = <PREVIOUS_MD5>);
+ close(PREVIOUS_MD5);
- if ($previousSum ne $currentSum) {
+ if ($previousSum ne $currentSum) {
+ return 1;
+ }
+}
+
+sub jhbuildConfigurationChanged()
+{
+ my $jhbuildMain = join('/', sourceDir(), 'Tools', $platform, 'jhbuild.modules');
+ my @jhbuildFiles = qw(jhbuildrc jhbuild.modules);
+ push(@jhbuildFiles, getJhbuildIncludedFilePaths($jhbuildMain));
+
+ foreach my $file (@jhbuildFiles) {
+ if (jhbuildConfigurationCheckFile($file)) {
return 1;
}
}
}
+sub saveMd5File
+{
+ my $file = shift;
+ my $path = realpath(dirname(join('/', getJhbuildPath(), $platform, $file)));
+ (-d $path) || mkpath $path;
+
+ $path = join('/', getJhbuildPath(), $platform);
+ my $source = join('/', sourceDir(), "Tools", $platform, $file);
+ my $destination = join('/', $path, $file);
+ open(SUM, ">$destination" . ".md5sum");
+ print SUM getMD5HashForFile($source);
+ close(SUM);
+}
+
sub saveJhbuildMd5() {
# Save md5sum for jhbuild-related files.saveJhbuildMd5();
my $jhbuildPath = getJhbuildPath();
+ my $jhbuildMain = join('/', sourceDir(), 'Tools', $platform, 'jhbuild.modules');
+ my @jhbuildFiles = qw(jhbuildrc jhbuild.modules);
+ push(@jhbuildFiles, getJhbuildIncludedFilePaths($jhbuildMain));
+
(-d $jhbuildPath) || mkpath $jhbuildPath;
- foreach my $file (qw(jhbuildrc jhbuild.modules)) {
- my $source = join('/', sourceDir(), "Tools", $platform, $file);
- my $destination = join('/', $jhbuildPath, $file);
- open(SUM, ">$destination" . ".md5sum");
- print SUM getMD5HashForFile($source);
- close(SUM);
+ foreach my $file (@jhbuildFiles) {
+ saveMd5File($file);
}
}
@@ -95,8 +135,13 @@
if (!-d $jhbuildPath) {
return;
}
- foreach my $file (qw(jhbuildrc jhbuild.modules)) {
- my $md5File = join('/', $jhbuildPath, $file) . ".md5sum";
+
+ my $jhbuildMain = join('/', sourceDir(), 'Tools', $platform, 'jhbuild.modules');
+ my @jhbuildFiles = qw(jhbuildrc jhbuild.modules);
+ push(@jhbuildFiles, getJhbuildIncludedFilePaths($jhbuildMain));
+
+ foreach my $file (@jhbuildFiles) {
+ my $md5File = join('/', $jhbuildPath, $platform, $file) . ".md5sum";
unlink($md5File) if -e $md5File;
}
}
Modified: trunk/Tools/gtk/install-dependencies (223535 => 223536)
--- trunk/Tools/gtk/install-dependencies 2017-10-17 13:14:09 UTC (rev 223535)
+++ trunk/Tools/gtk/install-dependencies 2017-10-17 13:54:55 UTC (rev 223536)
@@ -203,6 +203,7 @@
libxkbcommon-x11-dev \
libtool-bin \
libudev-dev \
+ libxml-libxml-perl \
python-dev \
ragel \
x11proto-bigreqs-dev \
@@ -351,6 +352,7 @@
libxkbcommon-x11 \
mtdev \
orc \
+ perl-xml-libxml\
python2 \
python2-lxml \
ragel \
@@ -494,6 +496,7 @@
mesa-libEGL-devel \
mtdev-devel \
orc-devel \
+ perl-libxml-perl \
ragel \
systemd-devel \
xorg-x11-font-utils \
Modified: trunk/Tools/wpe/install-dependencies (223535 => 223536)
--- trunk/Tools/wpe/install-dependencies 2017-10-17 13:14:09 UTC (rev 223535)
+++ trunk/Tools/wpe/install-dependencies 2017-10-17 13:54:55 UTC (rev 223536)
@@ -120,6 +120,7 @@
libvorbis-dev \
libvpx-dev \
libxcb-xkb-dev \
+ libxml-libxml-perl \
luajit"
# These are dependencies necessary for using webkit-patch
@@ -207,6 +208,7 @@
mesa-libgl \
opus \
orc \
+ perl-xml-libxml\
v4l-utils"
# These are dependencies necessary for using webkit-patch
@@ -284,6 +286,7 @@
mesa-libGLES-devel \
opus-devel \
orc-devel \
+ perl-libxml-perl \
pulseaudio-libs-devel"
# These are dependencies necessary for using webkit-patch