-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes related to QT5_GENTOO_CONFIG, QT_FEATURE_* macros, qconfig_p.h header #261
base: master
Are you sure you want to change the base?
Conversation
…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
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}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break existing 5.15.5 ebuilds, right?
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 |
Fixes related to
QT5_GENTOO_CONFIG
,QT_FEATURE_*
macros,qconfig_p.h
header.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/gui
andsrc/platformsupport
are inQT5_TARGET_SUBDIRS
indev-qt/qtgui
ebuilds.Previously some D-Bus-dependent code was disabled even for
dev-qt/qtgui[dbus]
.src/platformsupport/services/genericunix/qgenericunixservices.cpp
: