Fixes related to QT5_GENTOO_CONFIG, QT_FEATURE_* macros, qconfig_p.h header#261
Open
Arfrever wants to merge 12 commits intogentoo:masterfrom
Open
Fixes related to QT5_GENTOO_CONFIG, QT_FEATURE_* macros, qconfig_p.h header#261Arfrever wants to merge 12 commits intogentoo:masterfrom
Arfrever wants to merge 12 commits intogentoo:masterfrom
Conversation
added 12 commits
September 16, 2022 00:00
…NFIG. Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
…FIG. Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
…ENTOO_CONFIG. Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
…QT5_GENTOO_CONFIG. Undocumented automatic uppercasing will be removed. Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
This is consistent with dev-qt/qtdbus, dev-qt/qtgui, dev-qt/qtnetwork. Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
…elements of QT5_GENTOO_CONFIG. This will allow to support macros with lowercase letters such as QT_FEATURE_dbus. Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
…RIVATE_CONFIG. Remove automatic derivation of feature, macro components of elements of QT5_GENTOO_CONFIG. Remove automatic derivation of feature component of elements of QT5_GENTOO_PRIVATE_CONFIG. Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
QT_FEATURE_* macros should have values -1 or 1, and are used by QT_CONFIG and QT_REQUIRE_CONFIG macros: (https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/qglobal.h?h=5.15) [[[ /* The QT_CONFIG macro implements a safe compile time check for features of Qt. Features can be in three states: 0 or undefined: This will lead to a compile error when testing for it -1: The feature is not available 1: The feature is available */ #define QT_CONFIG(feature) (1/QT_FEATURE_##feature == 1) #define QT_REQUIRE_CONFIG(feature) Q_STATIC_ASSERT_X(QT_FEATURE_##feature == 1, "Required feature " #feature " for file " __FILE__ " not available.") ]]] Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
This does not affect build of qtbase packages themselves, but will allow to fix value returned by QT_CONFIG(dbus) and QT_CONFIG(dbus_linked) after installation. Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
This does not affect build of qtbase packages themselves, but will allow to fix value returned by QT_CONFIG(gui) after installation. Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
This does not affect build of qtbase packages themselves, but will allow to fix value returned by QT_CONFIG(widgets) after installation. Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
… 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 <QtCore/private/qconfig_p.h>' 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 <Arfrever@Apache.Org>
eb759b4 to
6a90fd7
Compare
a17r
reviewed
Sep 17, 2022
Comment on lines
-801
to
+805
| local flag=${x%%:*} | ||
| x=${x#${flag}:} | ||
| local feature=${x%%:*} | ||
| x=${x#${feature}:} | ||
| local macro=${x} | ||
| macro=$(tr 'a-z-' 'A-Z_' <<< "${macro}") | ||
| IFS=: read -r flag feature macro <<<"${x}" |
Member
There was a problem hiding this comment.
This will break existing 5.15.5 ebuilds, right?
Member
|
fwiw, rebasing 5.15.6 bump on top of this built fine, but I haven't tried 5.15.5. Correction: Subsequently, dev-qt/qtdeclarative failed ot build, and revdeps too. https://gist.githubusercontent.com/a17r/0b15913b0823f9c7c0b6cc1d402c6d62/raw/3c840963ad062ce1b2582f5b1ed543b1487e04d0/dev-qt:qtdeclarative-5.15.6:20220917-151454.log |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes related to
QT5_GENTOO_CONFIG,QT_FEATURE_*macros,qconfig_p.hheader.Problem was accidentally found during work on Qt 5.15.6 version bump (#260), but older versions are also affected.
In Qt 5.15.5:
Both
src/guiandsrc/platformsupportare inQT5_TARGET_SUBDIRSindev-qt/qtguiebuilds.Previously some D-Bus-dependent code was disabled even for
dev-qt/qtgui[dbus].src/platformsupport/services/genericunix/qgenericunixservices.cpp: