* [Buildroot] [PATCH] package/qt5/qt5webkit: fix QMake-generated artifacts location and content
@ 2026-06-05 11:12 Paul Louvel via buildroot
2026-11-06 14:34 ` [Buildroot] [PATCH v2 1/2] package/qt5/qt5base: export the OpenGL and EGL library dirs to CMake Angelo Compagnucci
0 siblings, 1 reply; 3+ messages in thread
From: Paul Louvel via buildroot @ 2026-06-05 11:12 UTC (permalink / raw)
To: buildroot; +Cc: Nico Orlando, Roberto Zelbi, Paul Louvel
Building qt-webkit-kiosk fails because of several issues in the
configuration and installation process of the qt5webkit package.
A previous patch from Thomas Ballasi attempted to fix the issue [1].
Packages depending on QtWebKit and using QMake as their build system
initially fail with the following error (qt-webkit-kiosk):
Project MESSAGE: Settings:
Project MESSAGE: - QT : core gui network webkit widgets webkitwidgets printsupport multimedia testlib
Project MESSAGE: - PREFIX : /usr
Project MESSAGE: - TARGET : qt-webkit-kiosk
Project MESSAGE: - VERSION: 1.99.6
Project ERROR: Unknown module(s) in QT: webkit webkitwidgets
When resolving dependencies, the host qmake searches for module pri
files in:
$(HOST_DIR)/mkspecs/modules
However, the qt5webkit package incorrectly installs its pri files into:
$(STAGING_DIR)/usr/mkspecs/modules
As a result, qmake cannot locate the required module definitions.
Additionally, the generated pri files contain hardcoded include and
library paths instead of using the appropriate qmake variables:
$$QT_MODULE_LIB_BASE for library paths
$$QT_MODULE_INCLUDE_BASE for include paths
Using hardcoded paths leads to a build failure even if the module
definitions are correctly located:
cpu-vendor-os-g++: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
The header files are also installed in
$(STAGING_DIR)/usr/include instead of
$(STAGING_DIR)/usr/include/qt5, which is the expected location for Qt
headers.
These problems can be fixed by using QMake system paths retrieved by CMake at
configure time with the qmake -query command. qt5webkit provides a
KDE_INSTALL_USE_QT_SYS_PATHS option that must be set to ON for the build system
to correctly use QMake configuration properties and install headers and module
definitions in the proper locations.
The patch from Thomas Ballasi used the
CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT configuration option to set
CMAKE_INSTALL_PREFIX to the correct Qt installation prefix.
Projects may check this variable to set CMAKE_INSTALL_PREFIX to a value other than
the default "/usr/local" on UNIX platforms.
However, CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT is not intended to be set
by users. It is implicitly set to ON when CMAKE_INSTALL_PREFIX is unset, and to
OFF otherwise, regardless of whether it was explicitly set by the user. In
Buildroot, CMAKE_INSTALL_PREFIX is set to "/usr" by the default CMake
configuration command, rendering this fix ineffective because as a result,
CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT is set to OFF.
Adding -DKDE_INSTALL_USE_QT_SYS_PATHS=ON fixes the header installation location,
but the pri files are still installed in the wrong location. This is caused by
the conditional in OptionsQt.cmake that sets KDE_INSTALL_USE_QT_SYS_PATHS to OFF
when CMAKE_INSTALL_PREFIX differs from the Qt installation prefix directory,
which is the case because Buildroot sets it to "/usr" by default.
Removing this check fixes the pri file content issue, but the build then fails
with another error:
qt5webkit: installs files in $(STAGING_DIR)/$(HOST_DIR)
Because the DESTDIR parameter used by the default CMake _INSTALL_STAGING_CMDS is
set to $(STAGING_DIR), it gets prepended to the absolute installation path of
the module definitions:
$(HOST_DIR)/mkspecs/modules
The resulting installation path is wrong:
$(STAGING_DIR)/$(HOST_DIR)/mkspecs/modules
Defining custom QT5WEBKIT_INSTALL_{STAGING,TARGET}_CMDS commands that do not use
the DESTDIR variable fixes this issue. Instead, an alternative installation
prefix is specified with:
--prefix=$(STAGING_DIR)/usr for staging --prefix=$(TARGET_DIR)/usr for target
Tested with a QEMU x86_64 target. qt-webkit-kiosk builds and runs successfully.
Please take into account that Qt WebKit is an old, deprecated project intended
to be replaced by Qt WebEngine [2] [3].
In addition, there has been no release since March 10, 2020, apart from
security-fix releases [4].
[1] https://patchwork.ozlabs.org/project/buildroot/patch/20220929181350.1026033-1-thomas.ballasi@savoirfairelinux.com/
Note: Thomas refers to 'DATADIR' in his patch, but I believe he means
'DESTDIR' instead.
[2] https://forum.qt.io/topic/65982/now-that-qwebkit-has-been-deprecated-what-can-i-do
[3] https://lists.buildroot.org/pipermail/buildroot/2015-July/496272.html
[4] https://github.com/qtwebkit/qtwebkit/releases/tag/qtwebkit-5.212.0-alpha4
Fixes: https://lists.buildroot.org/pipermail/buildroot/2022-February/323066.html
Signed-off-by: Paul Louvel (DAVE.eu) <paul.louvel@bootlin.com>
---
...-conditional-on-CMAKE_INSTALL_PREFIX.patch | 32 +++++++++++++++++++
package/qt5/qt5webkit/qt5webkit.mk | 19 +++++++++++
2 files changed, 51 insertions(+)
create mode 100644 package/qt5/qt5webkit/0014-remove-conditional-on-CMAKE_INSTALL_PREFIX.patch
diff --git a/package/qt5/qt5webkit/0014-remove-conditional-on-CMAKE_INSTALL_PREFIX.patch b/package/qt5/qt5webkit/0014-remove-conditional-on-CMAKE_INSTALL_PREFIX.patch
new file mode 100644
index 0000000000..ccfbaa5b10
--- /dev/null
+++ b/package/qt5/qt5webkit/0014-remove-conditional-on-CMAKE_INSTALL_PREFIX.patch
@@ -0,0 +1,32 @@
+From 38e96676cda9e555b4c55102a57e29c2073c30c2 Mon Sep 17 00:00:00 2001
+From: Paul Louvel <paul.louvel@bootlin.com>
+Date: Fri, 22 May 2026 15:47:43 +0200
+Subject: [PATCH] remove conditional on CMAKE_INSTALL_PREFIX.
+
+Remove a conditional on CMAKE_INSTALL_PREFIX, since Buildroot sets it to "/usr"
+by default. Prevent setting KDE_INSTALL_USE_QT_SYS_PATHS to OFF, which would
+cause the project to ignore QMake installation properties and install the module
+mkspecs in the wrong location with wrong values.
+
+Upstream: N/A QtWebkit is not maintained anymore, and this patch is only
+relevant for Buildroot.
+Signed-off-by: Paul Louvel <paul.louvel@bootlin.com>
+---
+ Source/cmake/OptionsQt.cmake | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake
+index 71f9afa01..fd52e8eab 100644
+--- a/Source/cmake/OptionsQt.cmake
++++ b/Source/cmake/OptionsQt.cmake
+@@ -1008,10 +1008,6 @@ endif ()
+
+ include(KDEInstallDirs)
+
+-if (NOT qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}")
+- set(KDE_INSTALL_USE_QT_SYS_PATHS OFF)
+-endif ()
+-
+ # We split all installed files into 2 components: Code and Data. This is different from
+ # traditional approach with Runtime and Devel, but we need it to fix concurrent installation of
+ # debug and release builds in qmake-based build
diff --git a/package/qt5/qt5webkit/qt5webkit.mk b/package/qt5/qt5webkit/qt5webkit.mk
index 6912359674..a5f44b2260 100644
--- a/package/qt5/qt5webkit/qt5webkit.mk
+++ b/package/qt5/qt5webkit/qt5webkit.mk
@@ -51,10 +51,29 @@ QT5WEBKIT_CONF_OPTS += -DENABLE_SAMPLING_PROFILER=OFF
endif
QT5WEBKIT_CONF_OPTS += \
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DENABLE_TOOLS=OFF \
-DPORT=Qt \
-DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python3 \
-DSHARED_CORE=ON \
-DUSE_LIBHYPHEN=OFF
+# Remove the DESTDIR from the install command install so that the .pri files in
+# the correct location: $(HOST_DIR)/mkspecs/modules instead of
+# $(STAGING_DIR)$(HOST_DIR)/usr/mkspecs/modules.
+define QT5WEBKIT_INSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(QT5WEBKIT_BUILD_ENV) \
+ $(BR2_CMAKE) --install $(QT5WEBKIT_BUILDDIR) \
+ --prefix $(STAGING_DIR)/usr
+endef
+
+# Remove the DESTDIR from the install command install so that the .pri files in
+# the correct location: $(HOST_DIR)/mkspecs/modules instead of
+# $(TARGET_DIR)$(HOST_DIR)/usr/mkspecs/modules.
+define QT5WEBKIT_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(QT5WEBKIT_BUILD_ENV) \
+ $(BR2_CMAKE) --install $(QT5WEBKIT_BUILDDIR) \
+ --prefix $(TARGET_DIR)/usr
+endef
+
$(eval $(cmake-package))
--
Paul Louvel, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread* [Buildroot] [PATCH v2 1/2] package/qt5/qt5base: export the OpenGL and EGL library dirs to CMake 2026-06-05 11:12 [Buildroot] [PATCH] package/qt5/qt5webkit: fix QMake-generated artifacts location and content Paul Louvel via buildroot @ 2026-11-06 14:34 ` Angelo Compagnucci 2026-11-06 14:34 ` [Buildroot] [PATCH v2 2/2] package/qt5/qt5webkit: fix QMake-generated artifacts location and content Angelo Compagnucci 0 siblings, 1 reply; 3+ messages in thread From: Angelo Compagnucci @ 2026-11-06 14:34 UTC (permalink / raw) To: buildroot Cc: Paul Louvel, Giulio Benetti, Thomas Petazzoni, Yann E . MORIN, Thomas Ballasi, Nico Orlando, Roberto Zelbi, Angelo Compagnucci When the OpenGL ES2, OpenGL or EGL libraries are found with pkg-config, as in Buildroot, their directory only ends up as a -L flag in QMAKE_LIBS_OPENGL_ES2, QMAKE_LIBS_OPENGL or QMAKE_LIBS_EGL. qtbase drops it when generating Qt5GuiConfigExtras.cmake, whose find_library(... NO_DEFAULT_PATH) then never finds the libraries: -- Qt OpenGL implementation: GLESv2 -- Qt OpenGL libraries: -- Qt EGL libraries: So Qt5Gui_OPENGL_LIBRARIES and Qt5Gui_EGL_LIBRARIES are empty for every CMake project using them, and qt5webkit with OpenGL ES2 (qt5base OpenGL support, which enables its WebKit2/QML API) fails to link libWebCore: GraphicsContext3DOpenGLES.cpp: undefined reference to `glBindRenderbuffer' ...: undefined reference to `eglGetProcAddress' Add a patch exporting the directories given with -L when QMAKE_LIBDIR_* are not set. Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com> --- Changes v1 -> v2: - new patch: with the OpenGL support of qt5base, which enables the WebKit2 QML API of qt5webkit, libWebCore fails to link because Qt5Gui_OPENGL_LIBRARIES and Qt5Gui_EGL_LIBRARIES are empty. Tested: Bootlin x86_64 glibc stable toolchain, qt5base with OpenGL ES2 (mesa3d softpipe, EGL) and eglfs, qt5declarative, qt5webkit (WebKit2 ON) and qt-webkit-kiosk: everything builds, Qt reports "Qt OpenGL libraries: Qt5::Gui_GLESv2" and "Qt EGL libraries: Qt5::Gui_EGL", libWebCore links libGLESv2/libEGL, the qt_lib_webkit*.pri files are in $(HOST_DIR)/mkspecs/modules, the headers in $(STAGING_DIR)/usr/include/qt5, and the QtWebKit QML module in both $(STAGING_DIR)/usr/qml and $(TARGET_DIR)/usr/qml. Not run-time tested. ...penGL-and-EGL-library-dirs-found-wit.patch | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 package/qt5/qt5base/0012-gui-export-the-OpenGL-and-EGL-library-dirs-found-wit.patch diff --git a/package/qt5/qt5base/0012-gui-export-the-OpenGL-and-EGL-library-dirs-found-wit.patch b/package/qt5/qt5base/0012-gui-export-the-OpenGL-and-EGL-library-dirs-found-wit.patch new file mode 100644 index 0000000000..6ab60937de --- /dev/null +++ b/package/qt5/qt5base/0012-gui-export-the-OpenGL-and-EGL-library-dirs-found-wit.patch @@ -0,0 +1,82 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Angelo Compagnucci <angelo.compagnucci@gmail.com> +Date: Fri, 6 Nov 2026 14:27:11 +0100 +Subject: [PATCH] gui: export the OpenGL and EGL library dirs found with -L to + CMake + +When the OpenGL ES2, OpenGL or EGL libraries are detected with +pkg-config, their library directory ends up as a -L flag in +QMAKE_LIBS_OPENGL_ES2, QMAKE_LIBS_OPENGL or QMAKE_LIBS_EGL, while +QMAKE_LIBDIR_* stay empty. + +cmakeProcessLibs() drops the -L flags, so the generated +Qt5GuiConfigExtras.cmake calls _qt5gui_find_extra_libs() with an empty +library directory, and its find_library(... NO_DEFAULT_PATH) never finds +the libraries: Qt5Gui_OPENGL_LIBRARIES and Qt5Gui_EGL_LIBRARIES are +empty, and CMake projects using them (e.g. QtWebKit with OpenGL ES2) +fail to link with undefined references to the gl* and egl* functions. + +Use the directories given with -L when QMAKE_LIBDIR_* are not set. + +Upstream: N/A, Qt 5 is end of life and Qt 6 builds with CMake +Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com> +--- + mkspecs/features/cmake_functions.prf | 12 ++++++++++++ + src/gui/gui.pro | 4 ++++ + 2 files changed, 16 insertions(+) + +diff --git a/mkspecs/features/cmake_functions.prf b/mkspecs/features/cmake_functions.prf +index 0c62b46..1b217ef 100644 +--- a/mkspecs/features/cmake_functions.prf ++++ b/mkspecs/features/cmake_functions.prf +@@ -71,6 +71,18 @@ defineReplace(cmakeProcessLibs) { + return ($$join(out, ";")) + } + ++defineReplace(cmakeProcessLibDirs) { ++ variable = $$1 ++ out = ++ for(v, variable) { ++ contains(v, -L.*) { ++ v ~= s,^-L,, ++ out += $$v ++ } ++ } ++ return ($$out) ++} ++ + defineReplace(cmakeRelativePath) { + path = $$relative_path($$1, $$2) + return($$replace(path, ([^/])$, \\1/)) +diff --git a/src/gui/gui.pro b/src/gui/gui.pro +index 20372d9..21b5d55 100644 +--- a/src/gui/gui.pro ++++ b/src/gui/gui.pro +@@ -76,6 +76,8 @@ qtConfig(angle) { + qtConfig(egl) { + CMAKE_EGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_EGL) + !isEmpty(QMAKE_LIBDIR_EGL): CMAKE_EGL_LIBDIR += $$cmakeTargetPath($$QMAKE_LIBDIR_EGL) ++ else: for(dir, $$list($$cmakeProcessLibDirs($$QMAKE_LIBS_EGL))): \ ++ CMAKE_EGL_LIBDIR += $$cmakeTargetPath($$dir) + } + + qtConfig(opengles2) { +@@ -83,6 +85,7 @@ qtConfig(angle) { + CMAKE_OPENGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_OPENGL_ES2) + CMAKE_OPENGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_OPENGL_ES2) + !isEmpty(QMAKE_LIBDIR_OPENGL_ES2): CMAKE_OPENGL_LIBDIR = $$cmakePortablePaths($$QMAKE_LIBDIR_OPENGL_ES2) ++ else: CMAKE_OPENGL_LIBDIR = $$cmakePortablePaths($$cmakeProcessLibDirs($$QMAKE_LIBS_OPENGL_ES2)) + CMAKE_GL_HEADER_NAME = GLES2/gl2.h + CMAKE_QT_OPENGL_IMPLEMENTATION = GLESv2 + } else: qtConfig(opengl) { +@@ -90,6 +93,7 @@ qtConfig(angle) { + CMAKE_OPENGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_OPENGL) + !qtConfig(dynamicgl): CMAKE_OPENGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_OPENGL) + !isEmpty(QMAKE_LIBDIR_OPENGL): CMAKE_OPENGL_LIBDIR = $$cmakePortablePaths($$QMAKE_LIBDIR_OPENGL) ++ else: CMAKE_OPENGL_LIBDIR = $$cmakePortablePaths($$cmakeProcessLibDirs($$QMAKE_LIBS_OPENGL)) + CMAKE_GL_HEADER_NAME = GL/gl.h + mac: CMAKE_GL_HEADER_NAME = gl.h + CMAKE_QT_OPENGL_IMPLEMENTATION = GL +-- +2.34.1 + -- 2.34.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2 2/2] package/qt5/qt5webkit: fix QMake-generated artifacts location and content 2026-11-06 14:34 ` [Buildroot] [PATCH v2 1/2] package/qt5/qt5base: export the OpenGL and EGL library dirs to CMake Angelo Compagnucci @ 2026-11-06 14:34 ` Angelo Compagnucci 0 siblings, 0 replies; 3+ messages in thread From: Angelo Compagnucci @ 2026-11-06 14:34 UTC (permalink / raw) To: buildroot Cc: Paul Louvel, Giulio Benetti, Thomas Petazzoni, Yann E . MORIN, Thomas Ballasi, Nico Orlando, Roberto Zelbi, Angelo Compagnucci From: Paul Louvel <paul.louvel@bootlin.com> Building qt-webkit-kiosk fails because of several issues in the configuration and installation process of the qt5webkit package. A previous patch from Thomas Ballasi attempted to fix the issue [1]. Packages depending on QtWebKit and using QMake as their build system initially fail with the following error (qt-webkit-kiosk): Project MESSAGE: Settings: Project MESSAGE: - QT : core gui network webkit widgets webkitwidgets printsupport multimedia testlib Project MESSAGE: - PREFIX : /usr Project MESSAGE: - TARGET : qt-webkit-kiosk Project MESSAGE: - VERSION: 1.99.6 Project ERROR: Unknown module(s) in QT: webkit webkitwidgets When resolving dependencies, the host qmake searches for module pri files in: $(HOST_DIR)/mkspecs/modules However, the qt5webkit package incorrectly installs its pri files into: $(STAGING_DIR)/usr/mkspecs/modules As a result, qmake cannot locate the required module definitions. Additionally, the generated pri files contain hardcoded include and library paths instead of using the appropriate qmake variables: $$QT_MODULE_LIB_BASE for library paths $$QT_MODULE_INCLUDE_BASE for include paths Using hardcoded paths leads to a build failure even if the module definitions are correctly located: cpu-vendor-os-g++: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include' The header files are also installed in $(STAGING_DIR)/usr/include instead of $(STAGING_DIR)/usr/include/qt5, which is the expected location for Qt headers. These problems can be fixed by using QMake system paths retrieved by CMake at configure time with the qmake -query command. qt5webkit provides a KDE_INSTALL_USE_QT_SYS_PATHS option that must be set to ON for the build system to correctly use QMake configuration properties and install headers and module definitions in the proper locations. The patch from Thomas Ballasi used the CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT configuration option to set CMAKE_INSTALL_PREFIX to the correct Qt installation prefix. Projects may check this variable to set CMAKE_INSTALL_PREFIX to a value other than the default "/usr/local" on UNIX platforms. However, CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT is not intended to be set by users. It is implicitly set to ON when CMAKE_INSTALL_PREFIX is unset, and to OFF otherwise, regardless of whether it was explicitly set by the user. In Buildroot, CMAKE_INSTALL_PREFIX is set to "/usr" by the default CMake configuration command, rendering this fix ineffective because as a result, CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT is set to OFF. Adding -DKDE_INSTALL_USE_QT_SYS_PATHS=ON fixes the header installation location, but the pri files are still installed in the wrong location. This is caused by the conditional in OptionsQt.cmake that sets KDE_INSTALL_USE_QT_SYS_PATHS to OFF when CMAKE_INSTALL_PREFIX differs from the Qt installation prefix directory, which is the case because Buildroot sets it to "/usr" by default. Removing this check fixes the pri file content issue, but the build then fails with another error: qt5webkit: installs files in $(STAGING_DIR)/$(HOST_DIR) Because the DESTDIR parameter used by the default CMake _INSTALL_STAGING_CMDS is set to $(STAGING_DIR), it gets prepended to the absolute installation path of the module definitions: $(HOST_DIR)/mkspecs/modules The resulting installation path is wrong: $(STAGING_DIR)/$(HOST_DIR)/mkspecs/modules Defining custom QT5WEBKIT_INSTALL_{STAGING,TARGET}_CMDS commands that do not use the DESTDIR variable fixes this issue. Instead, an alternative installation prefix is specified with: --prefix=$(STAGING_DIR)/usr for staging --prefix=$(TARGET_DIR)/usr for target With KDE_INSTALL_USE_QT_SYS_PATHS=ON, the QML directory is also taken from qmake, as an absolute path in the staging directory: with the OpenGL support of qt5base, which enables the WebKit2 QML API, the QtWebKit QML module would be installed in $(STAGING_DIR)/usr/qml also by the target installation, and never in $(TARGET_DIR). Set KDE_INSTALL_QMLDIR to "qml", relative to the installation prefix, so that it follows --prefix. Tested with a QEMU x86_64 target. qt-webkit-kiosk builds and runs successfully. Please take into account that Qt WebKit is an old, deprecated project intended to be replaced by Qt WebEngine [2] [3]. In addition, there has been no release since March 10, 2020, apart from security-fix releases [4]. [1] https://patchwork.ozlabs.org/project/buildroot/patch/20220929181350.1026033-1-thomas.ballasi@savoirfairelinux.com/ Note: Thomas refers to 'DATADIR' in his patch, but I believe he means 'DESTDIR' instead. [2] https://forum.qt.io/topic/65982/now-that-qwebkit-has-been-deprecated-what-can-i-do [3] https://lists.buildroot.org/pipermail/buildroot/2015-July/496272.html [4] https://github.com/qtwebkit/qtwebkit/releases/tag/qtwebkit-5.212.0-alpha4 Fixes: https://lists.buildroot.org/pipermail/buildroot/2022-February/323066.html Signed-off-by: Paul Louvel (DAVE.eu) <paul.louvel@bootlin.com> Co-authored-by: Angelo Compagnucci <angelo.compagnucci@gmail.com> Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com> --- Changes v1 -> v2: - rename the qtwebkit patch to 0015, 0014 is now taken by 0014-gcc16.patch; - set KDE_INSTALL_QMLDIR to "qml": with KDE_INSTALL_USE_QT_SYS_PATHS=ON the QML directory is the absolute staging path from qmake, so the QtWebKit QML module was only installed in staging, never in the target. Tested: Bootlin x86_64 glibc stable toolchain, qt5base with OpenGL ES2 (mesa3d softpipe, EGL) and eglfs, qt5declarative, qt5webkit (WebKit2 ON) and qt-webkit-kiosk: everything builds, Qt reports "Qt OpenGL libraries: Qt5::Gui_GLESv2" and "Qt EGL libraries: Qt5::Gui_EGL", libWebCore links libGLESv2/libEGL, the qt_lib_webkit*.pri files are in $(HOST_DIR)/mkspecs/modules, the headers in $(STAGING_DIR)/usr/include/qt5, and the QtWebKit QML module in both $(STAGING_DIR)/usr/qml and $(TARGET_DIR)/usr/qml. Not run-time tested. ...-conditional-on-CMAKE_INSTALL_PREFIX.patch | 32 +++++++++++++++++++ package/qt5/qt5webkit/qt5webkit.mk | 20 ++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 package/qt5/qt5webkit/0015-remove-conditional-on-CMAKE_INSTALL_PREFIX.patch diff --git a/package/qt5/qt5webkit/0015-remove-conditional-on-CMAKE_INSTALL_PREFIX.patch b/package/qt5/qt5webkit/0015-remove-conditional-on-CMAKE_INSTALL_PREFIX.patch new file mode 100644 index 0000000000..ccfbaa5b10 --- /dev/null +++ b/package/qt5/qt5webkit/0015-remove-conditional-on-CMAKE_INSTALL_PREFIX.patch @@ -0,0 +1,32 @@ +From 38e96676cda9e555b4c55102a57e29c2073c30c2 Mon Sep 17 00:00:00 2001 +From: Paul Louvel <paul.louvel@bootlin.com> +Date: Fri, 22 May 2026 15:47:43 +0200 +Subject: [PATCH] remove conditional on CMAKE_INSTALL_PREFIX. + +Remove a conditional on CMAKE_INSTALL_PREFIX, since Buildroot sets it to "/usr" +by default. Prevent setting KDE_INSTALL_USE_QT_SYS_PATHS to OFF, which would +cause the project to ignore QMake installation properties and install the module +mkspecs in the wrong location with wrong values. + +Upstream: N/A QtWebkit is not maintained anymore, and this patch is only +relevant for Buildroot. +Signed-off-by: Paul Louvel <paul.louvel@bootlin.com> +--- + Source/cmake/OptionsQt.cmake | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake +index 71f9afa01..fd52e8eab 100644 +--- a/Source/cmake/OptionsQt.cmake ++++ b/Source/cmake/OptionsQt.cmake +@@ -1008,10 +1008,6 @@ endif () + + include(KDEInstallDirs) + +-if (NOT qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}") +- set(KDE_INSTALL_USE_QT_SYS_PATHS OFF) +-endif () +- + # We split all installed files into 2 components: Code and Data. This is different from + # traditional approach with Runtime and Devel, but we need it to fix concurrent installation of + # debug and release builds in qmake-based build diff --git a/package/qt5/qt5webkit/qt5webkit.mk b/package/qt5/qt5webkit/qt5webkit.mk index 6912359674..961dbd8daf 100644 --- a/package/qt5/qt5webkit/qt5webkit.mk +++ b/package/qt5/qt5webkit/qt5webkit.mk @@ -51,10 +51,30 @@ QT5WEBKIT_CONF_OPTS += -DENABLE_SAMPLING_PROFILER=OFF endif QT5WEBKIT_CONF_OPTS += \ + -DKDE_INSTALL_QMLDIR=qml \ + -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \ -DENABLE_TOOLS=OFF \ -DPORT=Qt \ -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python3 \ -DSHARED_CORE=ON \ -DUSE_LIBHYPHEN=OFF +# Remove the DESTDIR from the install command install so that the .pri files in +# the correct location: $(HOST_DIR)/mkspecs/modules instead of +# $(STAGING_DIR)$(HOST_DIR)/usr/mkspecs/modules. +define QT5WEBKIT_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(QT5WEBKIT_BUILD_ENV) \ + $(BR2_CMAKE) --install $(QT5WEBKIT_BUILDDIR) \ + --prefix $(STAGING_DIR)/usr +endef + +# Remove the DESTDIR from the install command install so that the .pri files in +# the correct location: $(HOST_DIR)/mkspecs/modules instead of +# $(TARGET_DIR)$(HOST_DIR)/usr/mkspecs/modules. +define QT5WEBKIT_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(QT5WEBKIT_BUILD_ENV) \ + $(BR2_CMAKE) --install $(QT5WEBKIT_BUILDDIR) \ + --prefix $(TARGET_DIR)/usr +endef + $(eval $(cmake-package)) -- 2.34.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-06 14:34 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-06-05 11:12 [Buildroot] [PATCH] package/qt5/qt5webkit: fix QMake-generated artifacts location and content Paul Louvel via buildroot 2026-11-06 14:34 ` [Buildroot] [PATCH v2 1/2] package/qt5/qt5base: export the OpenGL and EGL library dirs to CMake Angelo Compagnucci 2026-11-06 14:34 ` [Buildroot] [PATCH v2 2/2] package/qt5/qt5webkit: fix QMake-generated artifacts location and content Angelo Compagnucci
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox