From eb759b4fe4d0921ec6e24ad63134c59dadad51fc Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Fri, 16 Sep 2022 00:00:00 +0000 Subject: [PATCH] qt5-build.eclass: qt5_base_configure(): Copy generated qconfig_p.h to appropriate directory. configure (in all qtbase packages) generates: ${QT5_BUILD_DIR}/src/corelib/global/qconfig.h ${QT5_BUILD_DIR}/src/corelib/global/qconfig_p.h ${QT5_BUILD_DIR}/src/corelib/global/qconfig.cpp qt5_qmake in src/corelib directory (run only in dev-qt/qtcore) generates: ${QT5_BUILD_DIR}/include/QtCore/qconfig.h with content: #include "../../src/corelib/global/qconfig.h" ${QT5_BUILD_DIR}/include/QtCore/${Qt_Version}/QtCore/private/qconfig_p.h with content: #include "../../../../../src/corelib/global/qconfig_p.h" qconfig.h and qconfig_p.h define various macros with values possibly dependent on flags passed to configure. Many of these macros are QT_FEATURE_*, which are usually used through QT_CONFIG macro. /usr/include/qt5/QtCore/${Qt_Version}/QtCore/private/qconfig_p.h installed by dev-qt/qtcore contains e.g.: #define QT_FEATURE_dbus -1 #define QT_FEATURE_dbus_linked -1 #define QT_FEATURE_gui -1 #define QT_FEATURE_widgets -1 ${QT5_BUILD_DIR}/src/corelib/global/qconfig_p.h generated by configure for dev-qt/qtgui[dbus] contains desired values such as: #define QT_FEATURE_dbus 1 #define QT_FEATURE_dbus_linked 1 #define QT_FEATURE_gui 1 #define QT_FEATURE_widgets -1 However this header is not used and '#include ' could not include it from this location. Previously qtbase packages other than dev-qt/qtcore were using /usr/include/qt5/QtCore/${Qt_Version}/QtCore/private/qconfig_p.h installed by dev-qt/qtcore. qt5_base_configure() already copies ${QT5_BUILD_DIR}/src/corelib/global/qconfig.h to include/QtCore directory to prevent using of /usr/include/qt5/QtCore/qconfig.h at build time. qt5_base_configure() is hereby fixed to also copy ${QT5_BUILD_DIR}/src/corelib/global/qconfig_p.h to include/QtCore/private directory to prevent using of /usr/include/qt5/QtCore/${Qt_Version}/QtCore/private/qconfig_p.h at build time. Signed-off-by: Arfrever Frehtes Taifersar Arahesis --- eclass/qt5-build.eclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass index 8967dd5dc..cbb4fbd46 100644 --- a/eclass/qt5-build.eclass +++ b/eclass/qt5-build.eclass @@ -672,6 +672,10 @@ qt5_base_configure() { basedir="" fi cp src/corelib/global/qconfig.h "${basedir}"include/QtCore/ || die + if [[ ${PN} != qtcore ]]; then + mkdir "${basedir}"include/QtCore/private || die + cp src/corelib/global/qconfig_p.h "${basedir}"include/QtCore/private/ || die + fi popd >/dev/null || die