All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/qt5/qt5webkit: fix generated artifacts
@ 2022-09-22 21:45 Thomas Ballasi
  2022-09-29 10:43 ` Giulio Benetti
  2022-09-29 18:13 ` [Buildroot] [PATCH v2] " Thomas Ballasi
  0 siblings, 2 replies; 8+ messages in thread
From: Thomas Ballasi @ 2022-09-22 21:45 UTC (permalink / raw)
  To: buildroot; +Cc: Peter Seiderer, Thomas Ballasi, Julien Corjon

Generated artifacts of the installation process were wrongly located,
causing packages using qt5webkit (qt-webkit-kiosk and python-pyqt5) to
fail at build time. The changes aims at fixing this issue.

There were three main issues occuring during the build:

1. *.pri files were wrongly located in the host's and target's sysroot
   directores while buildroot implements its own mkspecs directory.
   By setting KDE_INSTALL_USE_QT_SYS_PATHS on, mkspecs modules are now
   being installed in host's data dir (ECM_MKSPECS_INSTALL_DIR is set
   accordingly @ line 102 in Source/cmake/ECMGeneratePriFile.cmake).
   This also required to prevent using the CMake package's default
   DATADIR variable as it enforces to install under the sysroot
   directory.

2. *.pri files' content had hardcoded include and library paths which
   has been corrected by setting on KDE_INSTALL_USE_QT_SYS_PATHS as
   their content is written according to this value (see line 514 and
   739 in file Source/WebKit/PlatformQt.cmake).

3. *.h files were located a directory below where supposed (inside qt5/
   directory). This was caused by using DATADIR which assumed include
   files were to be located in sysroot/usr/include/.
   Disabling this variable by removing it from build options leads to a
   correct behavior.

Regression happened when qt5webkit started using cmake-package at commit
df0b0fe6919c0d0f3750f439a3cfa765232bd569.

More info @ https://bugs.buildroot.org/show_bug.cgi?id=14606

Signed-off-by: Thomas Ballasi <thomas.ballasi@savoirfairelinux.com>
---
 ...-set-KDE_INSTALL_USE_QT_SYS_PATHS-on.patch | 42 +++++++++++++++++++
 package/qt5/qt5webkit/qt5webkit.mk            |  7 ++++
 2 files changed, 49 insertions(+)
 create mode 100644 package/qt5/qt5webkit/0007-cmake-set-KDE_INSTALL_USE_QT_SYS_PATHS-on.patch

diff --git a/package/qt5/qt5webkit/0007-cmake-set-KDE_INSTALL_USE_QT_SYS_PATHS-on.patch b/package/qt5/qt5webkit/0007-cmake-set-KDE_INSTALL_USE_QT_SYS_PATHS-on.patch
new file mode 100644
index 0000000000..b65eb305b4
--- /dev/null
+++ b/package/qt5/qt5webkit/0007-cmake-set-KDE_INSTALL_USE_QT_SYS_PATHS-on.patch
@@ -0,0 +1,42 @@
+From f4950219005b487c18d41ce4e6bc11c4b0e3a20d Mon Sep 17 00:00:00 2001
+From: Thomas Ballasi <thomas.ballasi@savoirfairelinux.com>
+Date: Wed, 21 Sep 2022 14:46:40 -0400
+Subject: [PATCH] cmake: set KDE_INSTALL_USE_QT_SYS_PATHS on
+
+This variable is used to save .pri files to directories relative to the
+host (output/host/mkspecs/modules/) rather than relative to the target
+itself, which is unwanted behavior.
+
+The changes also enables .pri files not to hardcode include and library
+paths and to use $$QT_MODULE_INCLUDE_BASE and $$QT_MODULE_LIB_BASE.
+
+Signed-off-by: Thomas Ballasi <thomas.ballasi@savoirfairelinux.com>
+---
+ Source/cmake/OptionsQt.cmake | 8 +-------
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake
+index 1ee60b777106..607c69bd38fe 100644
+--- a/Source/cmake/OptionsQt.cmake
++++ b/Source/cmake/OptionsQt.cmake
+@@ -998,16 +998,10 @@ feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
+ include(ECMQueryQmake)
+ 
+ query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX)
+-if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+-    set(CMAKE_INSTALL_PREFIX "${qt_install_prefix_dir}" CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
+-endif ()
++set(CMAKE_INSTALL_PREFIX "${qt_install_prefix_dir}")
+ 
+ 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
+-- 
+2.25.1
+
diff --git a/package/qt5/qt5webkit/qt5webkit.mk b/package/qt5/qt5webkit/qt5webkit.mk
index 6912359674..607c022568 100644
--- a/package/qt5/qt5webkit/qt5webkit.mk
+++ b/package/qt5/qt5webkit/qt5webkit.mk
@@ -57,4 +57,11 @@ QT5WEBKIT_CONF_OPTS += \
 	-DSHARED_CORE=ON \
 	-DUSE_LIBHYPHEN=OFF
 
+QT5WEBKIT_INSTALL_STAGING_OPTS = install/fast
+
+define QT5WEBKIT_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(BR2_CMAKE) --install $(QT5WEBKIT_BUILDDIR) \
+		--prefix $(TARGET_DIR)/usr
+endef
+
 $(eval $(cmake-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-12-28 19:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-22 21:45 [Buildroot] [PATCH] package/qt5/qt5webkit: fix generated artifacts Thomas Ballasi
2022-09-29 10:43 ` Giulio Benetti
2022-09-29 18:04   ` Thomas Ballasi
2022-09-29 18:13 ` [Buildroot] [PATCH v2] " Thomas Ballasi
2022-09-29 22:02   ` Giulio Benetti
2023-08-11  7:23   ` Thomas Petazzoni via buildroot
2023-10-02 20:01   ` Yann E. MORIN
2025-12-28 19:52   ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.