summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2016-11-07 09:36:50 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-02-02 12:31:10 +0000
commit5ae3854f795ac5c1a0f104bd8b66ed6f988181cd (patch)
tree197aac0ea37c400dfa582379b2bac84029e794a0 /Tools
parent747609969d3a8bd95ed2293bb5d943660188ede4 (diff)
Imported WebKit commit 490f716dd2dd07fb0d6652795c62586e2e28ae27
Change-Id: I9f66467721cf923468af87915c260c1bb44e013e Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Tools')
-rw-r--r--Tools/PlatformQt.cmake6
-rwxr-xr-xTools/qt/convert-prl-libs-to-cmake.pl96
-rw-r--r--Tools/qt/manifest.txt6
3 files changed, 108 insertions, 0 deletions
diff --git a/Tools/PlatformQt.cmake b/Tools/PlatformQt.cmake
new file mode 100644
index 000000000..4894e4b69
--- /dev/null
+++ b/Tools/PlatformQt.cmake
@@ -0,0 +1,6 @@
+add_subdirectory(DumpRenderTree)
+add_subdirectory(ImageDiff)
+if (ENABLE_TEST_SUPPORT)
+ add_subdirectory(TestWebKitAPI)
+ add_subdirectory(QtTestBrowser)
+endif ()
diff --git a/Tools/qt/convert-prl-libs-to-cmake.pl b/Tools/qt/convert-prl-libs-to-cmake.pl
new file mode 100755
index 000000000..b5b5289f8
--- /dev/null
+++ b/Tools/qt/convert-prl-libs-to-cmake.pl
@@ -0,0 +1,96 @@
+#!/usr/bin/env perl
+# Copyright (C) 2016 Konstantin Tokarev <annulen@yandex.ru>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of Apple Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+use File::Basename;
+use File::Spec;
+use strict;
+use warnings;
+
+my ($qt_lib, $component_name, $out_name) = @ARGV;
+
+my ($qt_lib_base, $qt_lib_dir) = fileparse($qt_lib, qr{\..*});
+my $prl_name = File::Spec->join($qt_lib_dir, "$qt_lib_base.prl");
+
+my $qmake_prl_libs;
+
+open(my $prl, '<', $prl_name) or die "Cannot open $prl_name: $!";
+while(<$prl>) {
+ next unless /^QMAKE_PRL_LIBS/;
+ chomp;
+ if (/^QMAKE_PRL_LIBS\s+=\s+(.*)$/) {
+ $qmake_prl_libs = $1;
+ last;
+ }
+}
+close $prl;
+
+unless($qmake_prl_libs) {
+ print "QMAKE_PRL_LIBS variable is undefined or empty\n";
+ exit;
+}
+
+my $prl_libs = squash_prl_libs (split /\s+/, $qmake_prl_libs);
+
+my $template = <<'END_CMAKE';
+get_target_property(_link_libs Qt5::${_component} INTERFACE_LINK_LIBRARIES)
+if (_link_libs)
+ set(_list_sep ";")
+else ()
+ set(_list_sep "")
+endif ()
+set_target_properties(Qt5::${_component} PROPERTIES
+ "INTERFACE_LINK_LIBRARIES" "${_link_libs}${_list_sep}${_libs}")
+set(Qt5${_component}_STATIC_LIB_DEPENDENCIES "${_libs}")
+list(APPEND STATIC_LIB_DEPENDENCIES
+ ${Qt5${_component}_STATIC_LIB_DEPENDENCIES}
+)
+unset(_component)
+unset(_libs)
+unset(_list_sep)
+
+END_CMAKE
+
+open(my $out, '>>', $out_name) or die "Cannot open $out_name for writing: $!";
+print $out qq/set(_component "$component_name")\n/;
+print $out qq/set(_libs "$prl_libs")\n/;
+print $out $template;
+close $out;
+
+sub squash_prl_libs {
+ my @libs = @_;
+ my @result;
+ for (my $i = 0; $i < $#libs; ++$i) {
+ my $lib = $libs[$i];
+ if ($lib eq '-framework') {
+ $lib = "$libs[$i] $libs[$i + 1]";
+ ++$i;
+ }
+ $lib =~ s"\$\$\[QT_INSTALL_LIBS\]"$qt_lib_dir"g;
+ push @result, $lib;
+ }
+ return join ';', @result;
+}
diff --git a/Tools/qt/manifest.txt b/Tools/qt/manifest.txt
index bc4765030..5e7b65b76 100644
--- a/Tools/qt/manifest.txt
+++ b/Tools/qt/manifest.txt
@@ -62,6 +62,8 @@ exclude Source/cmake/eflsymbols.filter$
exclude Source/WebInspectorUI/Tools
exclude Source/WebInspectorUI/UserInterface/Images
+exclude Source/WebKit/qt/LICENSE.LGPLv21
+
exclude Source/WebKit2/Resources
file Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js
@@ -83,6 +85,9 @@ file Source/WebKit/win/Plugins
# Version
file Source/WebKit/mac/Configurations/Version.xcconfig
+# Move LICENSE.LGPLv21 to the root
+file Source/WebKit/qt/LICENSE.LGPLv21 LICENSE.LGPLv21
+
directory Source/WebInspectorUI/UserInterface/Images
exclude Source/WebInspectorUI/UserInterface/Images/.*
file Source/WebInspectorUI/UserInterface/Images/gtk
@@ -120,6 +125,7 @@ exclude Tools/WebKitTestRunner/fonts/
file CMakeLists.txt
file Tools/CMakeLists.txt
+file Tools/PlatformQt.cmake
file Tools/Scripts/VCSUtils.pm
file Tools/Scripts/build-webkit
file Tools/Scripts/run-gtk-tests