Diff
Modified: trunk/ChangeLog (280381 => 280382)
--- trunk/ChangeLog 2021-07-28 14:01:53 UTC (rev 280381)
+++ trunk/ChangeLog 2021-07-28 15:01:50 UTC (rev 280382)
@@ -1,3 +1,17 @@
+2021-07-28 Philippe Normand <[email protected]>
+
+ [WPE][GTK] SVN_REVISION drifting away if bots don't re-run cmake
+ https://bugs.webkit.org/show_bug.cgi?id=228290
+
+ Reviewed by Michael Catanzaro.
+
+ The CMake configure_file() is now used only tarball builds for files requiring information
+ about the build revision. For developer builds a custom target now takes care of keeping
+ those files up-to-date.
+
+ * Source/cmake/OptionsGTK.cmake:
+ * Source/cmake/OptionsWPE.cmake:
+
2021-07-27 Zan Dobersek <[email protected]>
[CMake] Add WTF_CPU_RISCV64
Modified: trunk/Source/_javascript_Core/ChangeLog (280381 => 280382)
--- trunk/Source/_javascript_Core/ChangeLog 2021-07-28 14:01:53 UTC (rev 280381)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-07-28 15:01:50 UTC (rev 280382)
@@ -1,3 +1,15 @@
+2021-07-28 Philippe Normand <[email protected]>
+
+ [WPE][GTK] SVN_REVISION drifting away if bots don't re-run cmake
+ https://bugs.webkit.org/show_bug.cgi?id=228290
+
+ Reviewed by Michael Catanzaro.
+
+ * PlatformGTK.cmake: Expand ${BUILD_REVISION} with apply-build-revision-to-files.py for
+ non-tarball builds, or let CMake do it for tarball builds.
+ * _javascript_coregtk.pc.in: Switch revision var to ${} format, so that we can choose to
+ either let CMake expand it or do it ourselves.
+
2021-07-27 Patrick Angle <[email protected]>
Web Inspector: [Cocoa] "RemoteInspector XPC connection to relay failed." messages are confusing in StdErr
Modified: trunk/Source/_javascript_Core/PlatformGTK.cmake (280381 => 280382)
--- trunk/Source/_javascript_Core/PlatformGTK.cmake 2021-07-28 14:01:53 UTC (rev 280381)
+++ trunk/Source/_javascript_Core/PlatformGTK.cmake 2021-07-28 15:01:50 UTC (rev 280382)
@@ -3,7 +3,18 @@
set(_javascript_Core_OUTPUT_NAME _javascript_coregtk-${WEBKITGTK_API_VERSION})
-configure_file(_javascript_coregtk.pc.in ${_javascript_Core_PKGCONFIG_FILE} @ONLY)
+if (EXISTS "${TOOLS_DIR}/glib/apply-build-revision-to-files.py")
+ configure_file(_javascript_coregtk.pc.in ${_javascript_Core_PKGCONFIG_FILE} @ONLY)
+ add_custom_target(_javascript_Core-build-revision
+ python3 "${TOOLS_DIR}/glib/apply-build-revision-to-files.py" ${_javascript_Core_PKGCONFIG_FILE}
+ DEPENDS ${_javascript_Core_PKGCONFIG_FILE}
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} VERBATIM)
+ list(APPEND _javascript_Core_DEPENDENCIES
+ _javascript_Core-build-revision
+ )
+else ()
+ configure_file(_javascript_coregtk.pc.in ${_javascript_Core_PKGCONFIG_FILE})
+endif ()
install(FILES "${CMAKE_BINARY_DIR}/Source/_javascript_Core/_javascript_coregtk-${WEBKITGTK_API_VERSION}.pc"
DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
Modified: trunk/Source/_javascript_Core/_javascript_coregtk.pc.in (280381 => 280382)
--- trunk/Source/_javascript_Core/_javascript_coregtk.pc.in 2021-07-28 14:01:53 UTC (rev 280381)
+++ trunk/Source/_javascript_Core/_javascript_coregtk.pc.in 2021-07-28 15:01:50 UTC (rev 280382)
@@ -2,7 +2,7 @@
exec_prefix=${prefix}
libdir=@LIB_INSTALL_DIR@
includedir=${prefix}/include
-revision=@SVN_REVISION@
+revision=${BUILD_REVISION}
Name: _javascript_CoreGTK+
Description: GTK+ version of the _javascript_Core engine
Modified: trunk/Source/WebKit/ChangeLog (280381 => 280382)
--- trunk/Source/WebKit/ChangeLog 2021-07-28 14:01:53 UTC (rev 280381)
+++ trunk/Source/WebKit/ChangeLog 2021-07-28 15:01:50 UTC (rev 280382)
@@ -1,3 +1,19 @@
+2021-07-28 Philippe Normand <[email protected]>
+
+ [WPE][GTK] SVN_REVISION drifting away if bots don't re-run cmake
+ https://bugs.webkit.org/show_bug.cgi?id=228290
+
+ Reviewed by Michael Catanzaro.
+
+ * PlatformGTK.cmake: Expand ${BUILD_REVISION} with apply-build-revision-to-files.py for
+ non-tarball builds, or let CMake do it for tarball builds.
+ * PlatformWPE.cmake: Ditto.
+ * UIProcess/API/glib/WebKitProtocolHandler.cpp:
+ (WebKit::WebKitProtocolHandler::handleGPU): Use generated BuildRevision.h header
+ * gtk/webkit2gtk-web-extension.pc.in: Switch revision var to ${} format, so that we can choose to
+ either let CMake expand it or do it ourselves.
+ * gtk/webkit2gtk.pc.in: Ditto.
+
2021-07-27 Devin Rousso <[email protected]>
[Modern Media Controls] [macOS] Overflow button still shows as `on` even after contextmenu is dismissed
Modified: trunk/Source/WebKit/PlatformGTK.cmake (280381 => 280382)
--- trunk/Source/WebKit/PlatformGTK.cmake 2021-07-28 14:01:53 UTC (rev 280381)
+++ trunk/Source/WebKit/PlatformGTK.cmake 2021-07-28 15:01:50 UTC (rev 280382)
@@ -11,9 +11,24 @@
file(MAKE_DIRECTORY ${WebKit2Gtk_FRAMEWORK_HEADERS_DIR}/webkit2gtk-webextension)
configure_file(UIProcess/API/gtk/WebKitVersion.h.in ${WebKit2Gtk_DERIVED_SOURCES_DIR}/webkit2/WebKitVersion.h)
-configure_file(gtk/webkit2gtk.pc.in ${WebKit2_PKGCONFIG_FILE} @ONLY)
-configure_file(gtk/webkit2gtk-web-extension.pc.in ${WebKit2WebExtension_PKGCONFIG_FILE} @ONLY)
+if (EXISTS "${TOOLS_DIR}/glib/apply-build-revision-to-files.py")
+ configure_file(gtk/webkit2gtk.pc.in ${WebKit2_PKGCONFIG_FILE} @ONLY)
+ configure_file(gtk/webkit2gtk-web-extension.pc.in ${WebKit2WebExtension_PKGCONFIG_FILE} @ONLY)
+ configure_file(Shared/glib/BuildRevision.h.in ${WebKit2Gtk_FRAMEWORK_HEADERS_DIR}/BuildRevision.h @ONLY)
+ add_custom_target(WebKit-build-revision
+ python3 "${TOOLS_DIR}/glib/apply-build-revision-to-files.py" ${WebKit2Gtk_FRAMEWORK_HEADERS_DIR}/BuildRevision.h ${WebKit2_PKGCONFIG_FILE} ${WebKit2WebExtension_PKGCONFIG_FILE}
+ DEPENDS ${WebKit2Gtk_FRAMEWORK_HEADERS_DIR}/BuildRevision.h ${WebKit2_PKGCONFIG_FILE} ${WebKit2WebExtension_PKGCONFIG_FILE}
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} VERBATIM)
+ list(APPEND WebKit_DEPENDENCIES
+ WebKit-build-revision
+ )
+else ()
+ configure_file(gtk/webkit2gtk.pc.in ${WebKit2_PKGCONFIG_FILE})
+ configure_file(gtk/webkit2gtk-web-extension.pc.in ${WebKit2WebExtension_PKGCONFIG_FILE})
+ configure_file(Shared/glib/BuildRevision.h.in ${WebKit2Gtk_FRAMEWORK_HEADERS_DIR}/BuildRevision.h)
+endif ()
+
add_definitions(-DBUILDING_WEBKIT)
add_definitions(-DWEBKIT2_COMPILATION)
add_definitions(-DWEBKIT_DOM_USE_UNSTABLE_API)
Modified: trunk/Source/WebKit/PlatformWPE.cmake (280381 => 280382)
--- trunk/Source/WebKit/PlatformWPE.cmake 2021-07-28 14:01:53 UTC (rev 280381)
+++ trunk/Source/WebKit/PlatformWPE.cmake 2021-07-28 15:01:50 UTC (rev 280382)
@@ -18,6 +18,19 @@
configure_file(wpe/wpe-webkit-uninstalled.pc.in ${CMAKE_BINARY_DIR}/wpe-webkit-${WPE_API_VERSION}-uninstalled.pc @ONLY)
configure_file(wpe/wpe-web-extension-uninstalled.pc.in ${CMAKE_BINARY_DIR}/wpe-web-extension-${WPE_API_VERSION}-uninstalled.pc @ONLY)
+if (EXISTS "${TOOLS_DIR}/glib/apply-build-revision-to-files.py")
+ configure_file(Shared/glib/BuildRevision.h.in ${FORWARDING_HEADERS_WPE_DIR}/BuildRevision.h @ONLY)
+ add_custom_target(WebKit-build-revision
+ python3 "${TOOLS_DIR}/glib/apply-build-revision-to-files.py" ${FORWARDING_HEADERS_WPE_DIR}/BuildRevision.h
+ DEPENDS ${FORWARDING_HEADERS_WPE_DIR}/BuildRevision.h
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} VERBATIM)
+ list(APPEND WebKit_DEPENDENCIES
+ WebKit-build-revision
+ )
+else ()
+ configure_file(Shared/glib/BuildRevision.h.in ${FORWARDING_HEADERS_WPE_DIR}/BuildRevision.h)
+endif ()
+
add_definitions(-DWEBKIT2_COMPILATION)
add_definitions(-DLIBDIR="${LIB_INSTALL_DIR}")
Added: trunk/Source/WebKit/Shared/glib/BuildRevision.h.in (0 => 280382)
--- trunk/Source/WebKit/Shared/glib/BuildRevision.h.in (rev 0)
+++ trunk/Source/WebKit/Shared/glib/BuildRevision.h.in 2021-07-28 15:01:50 UTC (rev 280382)
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2021 Igalia S.L.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
+ */
+
+#pragma once
+
+#define BUILD_REVISION "${BUILD_REVISION}"
Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp (280381 => 280382)
--- trunk/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp 2021-07-28 14:01:53 UTC (rev 280381)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp 2021-07-28 15:01:50 UTC (rev 280382)
@@ -20,6 +20,7 @@
#include "config.h"
#include "WebKitProtocolHandler.h"
+#include "BuildRevision.h"
#include "WebKitError.h"
#include "WebKitVersion.h"
#include "WebKitWebView.h"
@@ -202,7 +203,7 @@
" <td><div class=\"titlename\">WebKit version</div></td>"
" <td>%s %d.%d.%d (%s)</td>"
" </tbody></tr>",
- webkitPortName(), WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION, WEBKIT_MICRO_VERSION, SVN_REVISION);
+ webkitPortName(), WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION, WEBKIT_MICRO_VERSION, BUILD_REVISION);
#if OS(UNIX)
struct utsname osName;
Modified: trunk/Source/WebKit/gtk/webkit2gtk-web-extension.pc.in (280381 => 280382)
--- trunk/Source/WebKit/gtk/webkit2gtk-web-extension.pc.in 2021-07-28 14:01:53 UTC (rev 280381)
+++ trunk/Source/WebKit/gtk/webkit2gtk-web-extension.pc.in 2021-07-28 15:01:50 UTC (rev 280382)
@@ -2,7 +2,7 @@
exec_prefix=${prefix}
libdir=@LIB_INSTALL_DIR@
includedir=${prefix}/include
-revision=@SVN_REVISION@
+revision=${BUILD_REVISION}
Name: WebKitGTK web process extensions
Description: Web content engine for GTK - web process extensions
Modified: trunk/Source/WebKit/gtk/webkit2gtk.pc.in (280381 => 280382)
--- trunk/Source/WebKit/gtk/webkit2gtk.pc.in 2021-07-28 14:01:53 UTC (rev 280381)
+++ trunk/Source/WebKit/gtk/webkit2gtk.pc.in 2021-07-28 15:01:50 UTC (rev 280382)
@@ -2,7 +2,7 @@
exec_prefix=${prefix}
libdir=@LIB_INSTALL_DIR@
includedir=${prefix}/include
-revision=@SVN_REVISION@
+revision=${BUILD_REVISION}
Name: WebKitGTK
Description: Web content engine for GTK
Modified: trunk/Source/cmake/OptionsGTK.cmake (280381 => 280382)
--- trunk/Source/cmake/OptionsGTK.cmake 2021-07-28 14:01:53 UTC (rev 280381)
+++ trunk/Source/cmake/OptionsGTK.cmake 2021-07-28 15:01:50 UTC (rev 280382)
@@ -265,12 +265,9 @@
add_definitions(-DUSER_AGENT_BRANDING="${USER_AGENT_BRANDING}")
endif ()
-if (EXISTS "${TOOLS_DIR}/glib/svn-revision")
- execute_process(COMMAND ${TOOLS_DIR}/glib/svn-revision ERROR_QUIET OUTPUT_VARIABLE SVN_REVISION OUTPUT_STRIP_TRAILING_WHITESPACE)
-else ()
- set(SVN_REVISION "tarball")
+if (NOT EXISTS "${TOOLS_DIR}/glib/apply-build-revision-to-files.py")
+ set(BUILD_REVISION "tarball")
endif ()
-add_definitions(-DSVN_REVISION="${SVN_REVISION}")
SET_AND_EXPOSE_TO_BUILD(HAVE_GTK_UNIX_PRINTING ${GTK_UNIX_PRINT_FOUND})
SET_AND_EXPOSE_TO_BUILD(HAVE_OS_DARK_MODE_SUPPORT 1)
Modified: trunk/Source/cmake/OptionsWPE.cmake (280381 => 280382)
--- trunk/Source/cmake/OptionsWPE.cmake 2021-07-28 14:01:53 UTC (rev 280381)
+++ trunk/Source/cmake/OptionsWPE.cmake 2021-07-28 15:01:50 UTC (rev 280382)
@@ -257,12 +257,9 @@
add_definitions(-DUSER_AGENT_BRANDING=${USER_AGENT_BRANDING})
endif ()
-if (EXISTS "${TOOLS_DIR}/glib/svn-revision")
- execute_process(COMMAND ${TOOLS_DIR}/glib/svn-revision ERROR_QUIET OUTPUT_VARIABLE SVN_REVISION OUTPUT_STRIP_TRAILING_WHITESPACE)
-else ()
- set(SVN_REVISION "tarball")
+if (NOT EXISTS "${TOOLS_DIR}/glib/apply-build-revision-to-files.py")
+ set(BUILD_REVISION "tarball")
endif ()
-add_definitions(-DSVN_REVISION="${SVN_REVISION}")
SET_AND_EXPOSE_TO_BUILD(HAVE_ACCESSIBILITY ${ENABLE_ACCESSIBILITY})
SET_AND_EXPOSE_TO_BUILD(USE_ATK ${ENABLE_ACCESSIBILITY})
Modified: trunk/Tools/ChangeLog (280381 => 280382)
--- trunk/Tools/ChangeLog 2021-07-28 14:01:53 UTC (rev 280381)
+++ trunk/Tools/ChangeLog 2021-07-28 15:01:50 UTC (rev 280382)
@@ -1,3 +1,15 @@
+2021-07-28 Philippe Normand <[email protected]>
+
+ [WPE][GTK] SVN_REVISION drifting away if bots don't re-run cmake
+ https://bugs.webkit.org/show_bug.cgi?id=228290
+
+ Reviewed by Michael Catanzaro.
+
+ * MiniBrowser/gtk/main.c:
+ (main): Use generated BuildRevision.h header.
+ * glib/apply-build-revision-to-files.py: Added.
+ (main):
+
2021-07-28 Diego Pino Garcia <[email protected]>
[WPE] Add missing required dependencies to build WPE
Modified: trunk/Tools/MiniBrowser/gtk/main.c (280381 => 280382)
--- trunk/Tools/MiniBrowser/gtk/main.c 2021-07-28 14:01:53 UTC (rev 280381)
+++ trunk/Tools/MiniBrowser/gtk/main.c 2021-07-28 15:01:50 UTC (rev 280382)
@@ -28,6 +28,7 @@
#include "cmakeconfig.h"
#include "BrowserWindow.h"
+#include "BuildRevision.h"
#include <errno.h>
#include <gtk/gtk.h>
#include <string.h>
@@ -824,8 +825,8 @@
webkit_get_major_version(),
webkit_get_minor_version(),
webkit_get_micro_version());
- if (g_strcmp0(SVN_REVISION, "tarball"))
- g_print(" (%s)", SVN_REVISION);
+ if (g_strcmp0(BUILD_REVISION, "tarball"))
+ g_print(" (%s)", BUILD_REVISION);
g_print("\n");
g_clear_object(&webkitSettings);
Modified: trunk/Tools/MiniBrowser/wpe/main.cpp (280381 => 280382)
--- trunk/Tools/MiniBrowser/wpe/main.cpp 2021-07-28 14:01:53 UTC (rev 280381)
+++ trunk/Tools/MiniBrowser/wpe/main.cpp 2021-07-28 15:01:50 UTC (rev 280382)
@@ -25,6 +25,7 @@
#include "cmakeconfig.h"
+#include "BuildRevision.h"
#include "HeadlessViewBackend.h"
#include "WindowViewBackend.h"
#include <memory>
@@ -200,8 +201,8 @@
webkit_get_major_version(),
webkit_get_minor_version(),
webkit_get_micro_version());
- if (g_strcmp0(SVN_REVISION, "tarball"))
- g_print(" (%s)", SVN_REVISION);
+ if (g_strcmp0(BUILD_REVISION, "tarball"))
+ g_print(" (%s)", BUILD_REVISION);
g_print("\n");
return 0;
}
Added: trunk/Tools/glib/apply-build-revision-to-files.py (0 => 280382)
--- trunk/Tools/glib/apply-build-revision-to-files.py (rev 0)
+++ trunk/Tools/glib/apply-build-revision-to-files.py 2021-07-28 15:01:50 UTC (rev 280382)
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2021 Igalia S.L.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import os
+import sys
+
+top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
+sys.path.insert(0, os.path.join(top_level_directory, "Tools", "Scripts"))
+
+from webkitpy.common.checkout.scm.detection import SCMDetector # nopep8
+from webkitpy.common.system.executive import Executive # nopep8
+from webkitpy.common.system.filesystem import FileSystem # nopep8
+
+
+def main(args):
+ scm = SCMDetector(FileSystem(), Executive()).default_scm()
+ svn_revision = scm.head_svn_revision()
+ build_revision = f"r{svn_revision}"
+
+ for in_file in args:
+ with open(in_file) as fd:
+ data = "" build_revision)
+ with open(in_file, 'w') as fd:
+ fd.write(data)
+
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv[1:]))