diff options
Diffstat (limited to 'dev-qt/qtcore')
-rw-r--r-- | dev-qt/qtcore/Manifest | 5 | ||||
-rw-r--r-- | dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch | 50 | ||||
-rw-r--r-- | dev-qt/qtcore/files/qtcore-5.14.2-QLibrary-deadlock.patch | 106 | ||||
-rw-r--r-- | dev-qt/qtcore/metadata.xml | 6 | ||||
-rw-r--r-- | dev-qt/qtcore/qtcore-5.14.2.ebuild | 103 | ||||
-rw-r--r-- | dev-qt/qtcore/qtcore-5.15.1.ebuild | 100 | ||||
-rw-r--r-- | dev-qt/qtcore/qtcore-5.15.13.ebuild | 162 |
7 files changed, 167 insertions, 365 deletions
diff --git a/dev-qt/qtcore/Manifest b/dev-qt/qtcore/Manifest index d72f3b48819d..945cf510181a 100644 --- a/dev-qt/qtcore/Manifest +++ b/dev-qt/qtcore/Manifest @@ -1,2 +1,3 @@ -DIST qtbase-everywhere-src-5.14.2.tar.xz 49865752 BLAKE2B ed8eb18dfc79e9983248655eb62e8305ef8b79f96c7880c88533250fef8f0d187cf576082d41df08314711b4c007b94686486abd77bf9bc201336caa02ced300 SHA512 8c83e06d58b56e9f288e83d6c3dd4ad6cc9f1eb1a32c7b44fb912fda34ed7255766fd9fa60cd740ee001df7d6172f25df05f1f95e986c3e793fbcd9bf4f18de9 -DIST qtbase-everywhere-src-5.15.1.tar.xz 50153132 BLAKE2B 5a8cbbf8d44c7affc8ee43db04bd024bb529e0707b1feee2c7ae439cdf1331b1cf3e89b84c6a6f5bab3ec34025fbd634a8f4d259bd64ece172f288500e5b59e6 SHA512 40b687c046b25a6717834ffe2616ee4f373d75214ec1c7e3a26502cd0cde9f0a872eaee99f06c54c7a3625ae85df5cdd3a3b54a160e8e37c7cfeb5800d026fe4 +DIST qtbase-5.15-gentoo-patchset-5.tar.xz 9116 BLAKE2B b6318fc7c3ccdbfe85d56797ffaa3b275ce3f324731caca5efb497494837ca00c020494e9f811c0d5e9a460a4d70f16291c637409e7ad72325a36bc55e113c8c SHA512 f0343bf475a86f3f73b98b166ee48b1c5c9200aac9212ad977befe05679d0c351167618b16ae958e6403f33eecdc465b26a0df5d0b83d5d57a8c85ddb8a41c9b +DIST qtbase-5.15.13-gentoo-kde-1.tar.xz 331952 BLAKE2B 6fb7314f03e99d8d2f5e8486ea805164f7e42a14c29a46519bae200364ad3798d26fd09bbd9381030b816f0a68c45d98581a76b80ca3fff8ae4c0121c77fc6ae SHA512 2c049f451eaa4a5087bb39283a66e7bbef89b9e3235ae930c48a405aeaaa999e863857c5074de6ad282708c756b8acab40fbb68f2a4a8b45ef7ade72b12bb98d +DIST qtbase-everywhere-opensource-src-5.15.13.tar.xz 50862768 BLAKE2B d96d4d6b11aae3c471d5f24ed1030004394dfb89d399d5cddc868f39d0a4851a75ed0d59fdc79ef354c21a354eae0f23df1cfb8c30290d5c080b5fad507ce29a SHA512 565632646b04eed525530a50f1228dd1aa3b8f1318485fa7cf6ad96eabdc2208ed1522b3fc174bd4797b7d51edff18ea1f91a82dd701379407b880f1dd0d16ef diff --git a/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch b/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch deleted file mode 100644 index 30b5abc39759..000000000000 --- a/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch +++ /dev/null @@ -1,50 +0,0 @@ -From: Andreas Sturmlechner <asturm@gentoo.org> -Date: Sun, 9 Feb 2020 11:45:00 +0100 -Subject: [PATCH] qtcore: Fix cmake macro compat. for upgrade from <Qt-5.14 - -In upstream commit: - -https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.14&id=63d9cd17 - -_populate_$${CMAKE_MODULE_NAME}_plugin_properties in 5.14.0 gained an additional argument -IsDebugAndRelease without providing backward compatibility. This macro is used (at least) for -QtGui and QtDesigner plugins added by qtimageformats, qtsvg, qtvirtualkeyboard and qtwayland. -During upgrade from <Qt-5.14 to >=Qt-5.14, as a consequence of slot upgrade rebuilds, some -reverse dependencies are slated for rebuild before these Qt consumers have been rebuilt and their -cmake files regenerated, leading to cmake errors like: - -https://bugs.gentoo.org/703306 -https://bugs.gentoo.org/705198 - -From mkspecs/features/create_cmake.prf: - -# CMAKE_DEBUG_AND_RELEASE is used to tell the _populate_$${CMAKE_MODULE_NAME}_target_properties -# functions whether a Configuration specific generator expression needs to be added to the values -# of INTERFACE_LINK_LIBRARIES and INTERFACE_LINK_OPTIONS. For debug_and_release builds, we do need -# configuration specific values. For singular builds (only release or only debug), we want the -# values to be applied regardless of the configuration. -# This would allow on Linux and macOS (and with a recent enough version of CMake on Windows) to -# build a Debug configuration of an application, even if Qt was built in a Release configuration. - -qt5-build.eclass is configuring either as 'release' or as 'debug', so we make IsDebugAndRelease -optional and default to FALSE. - ---- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2020-01-23 13:37:32.000000000 +0100 -+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2020-02-09 15:15:21.156219814 +0100 -@@ -538,8 +538,14 @@ - - file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\") - -- macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION -- IsDebugAndRelease) -+ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION) -+ set(IsDebugAndRelease FALSE) -+ set (list_var ${ARGN}) -+ list(LENGTH list_var num_extra_arg) -+ if (${num_extra_arg} GREATER 0) -+ list(GET list_var 0 IsDebugAndRelease) -+ endif() -+ - set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) - - !!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) diff --git a/dev-qt/qtcore/files/qtcore-5.14.2-QLibrary-deadlock.patch b/dev-qt/qtcore/files/qtcore-5.14.2-QLibrary-deadlock.patch deleted file mode 100644 index 6a9c9921b7d0..000000000000 --- a/dev-qt/qtcore/files/qtcore-5.14.2-QLibrary-deadlock.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 276fa8383a7535765be7182883ef4aade17ce013 Mon Sep 17 00:00:00 2001 -From: Thiago Macieira <thiago.macieira@intel.com> -Date: Thu, 2 Apr 2020 12:08:41 -0300 -Subject: [PATCH] QLibrary: fix deadlock caused by fix to QTBUG-39642 - -Commit ae6f73e8566fa76470937aca737141183929a5ec inserted a mutex around -the entire load_sys(). We had reasoed that deadlocks would only occur if -the object creation in instance() recursed into its own instance(), -which was already a bug. But we had forgotten that dlopen()/ -LoadLibrary() executes initialization code from the module being loaded, -which could cause a recursion back into the same QPluginLoader or -QLibrary object. This recursion is benign because the module *is* loaded -and dlopen()/LoadLibrary() returns the same handle. - -[ChangeLog][QtCore][QLibrary and QPluginLoader] Fixed a deadlock that -would happen if the plugin or library being loaded has load-time -initialization code (C++ global variables) that recursed back into the -same QLibrary or QPluginLoader object. - -PS: QLibraryPrivate::loadPlugin() updates pluginState outside a mutex -lock, so pluginState should be made an atomic variable. Once that is -done, we'll only need locking the mutex to update errorString (no -locking before loading). - -Fixes: QTBUG-83207 -Task-number: QTBUG-39642 -Change-Id: Ibdc95e9af7bd456a94ecfffd160209304e5ab2eb -Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> -Reviewed-by: David Faure <david.faure@kdab.com> ---- - src/corelib/plugin/qlibrary.cpp | 2 -- - src/corelib/plugin/qlibrary_unix.cpp | 4 ++++ - src/corelib/plugin/qlibrary_win.cpp | 3 +++ - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp -index ddb053c26fa..be9d92b2048 100644 ---- a/src/corelib/plugin/qlibrary.cpp -+++ b/src/corelib/plugin/qlibrary.cpp -@@ -576,9 +576,7 @@ bool QLibraryPrivate::load() - - Q_TRACE(QLibraryPrivate_load_entry, fileName); - -- mutex.lock(); - bool ret = load_sys(); -- mutex.unlock(); - if (qt_debug_component()) { - if (ret) { - qDebug() << "loaded library" << fileName; -diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp -index 017aa97b66a..a5c72f81d96 100644 ---- a/src/corelib/plugin/qlibrary_unix.cpp -+++ b/src/corelib/plugin/qlibrary_unix.cpp -@@ -123,6 +123,7 @@ QStringList QLibraryPrivate::prefixes_sys() - - bool QLibraryPrivate::load_sys() - { -+ QMutexLocker locker(&mutex); - QString attempt; - QFileSystemEntry fsEntry(fileName); - -@@ -213,6 +214,7 @@ bool QLibraryPrivate::load_sys() - } - #endif - -+ locker.unlock(); - bool retry = true; - Handle hnd = nullptr; - for (int prefix = 0; retry && !hnd && prefix < prefixes.size(); prefix++) { -@@ -273,6 +275,8 @@ bool QLibraryPrivate::load_sys() - } - } - #endif -+ -+ locker.relock(); - if (!hnd) { - errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName, qdlerror()); - } -diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp -index 000bf762763..ef58724be8e 100644 ---- a/src/corelib/plugin/qlibrary_win.cpp -+++ b/src/corelib/plugin/qlibrary_win.cpp -@@ -78,6 +78,7 @@ bool QLibraryPrivate::load_sys() - // fileName - // - // NB If it's a plugin we do not ever try the ".dll" extension -+ QMutexLocker locker(&mutex); - QStringList attempts; - - if (pluginState != IsAPlugin) -@@ -95,6 +96,7 @@ bool QLibraryPrivate::load_sys() - attempts.prepend(QDir::rootPath() + fileName); - #endif - -+ locker.unlock(); - Handle hnd = nullptr; - for (const QString &attempt : qAsConst(attempts)) { - #ifndef Q_OS_WINRT -@@ -115,6 +117,7 @@ bool QLibraryPrivate::load_sys() - #ifndef Q_OS_WINRT - SetErrorMode(oldmode); - #endif -+ locker.relock(); - if (!hnd) { - errorString = QLibrary::tr("Cannot load library %1: %2").arg( - QDir::toNativeSeparators(fileName), qt_error_string()); diff --git a/dev-qt/qtcore/metadata.xml b/dev-qt/qtcore/metadata.xml index 9354e57ac71b..2bc45aff3552 100644 --- a/dev-qt/qtcore/metadata.xml +++ b/dev-qt/qtcore/metadata.xml @@ -1,14 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>qt@gentoo.org</email> <name>Gentoo Qt Project</name> </maintainer> <use> - <flag name="old-kernel" restrict="<dev-qt/qtcore-5.15.0">Disable syscalls not available on Linux kernels older than 3.17</flag> - <flag name="old-kernel" restrict=">=dev-qt/qtcore-5.15.0">Disable syscalls not available on Linux kernels older than 4.11</flag> - <flag name="systemd">Enable native journald logging support</flag> + <flag name="old-kernel">Disable syscalls not available on Linux kernels older than 4.11</flag> </use> <upstream> <bugs-to>https://bugreports.qt.io/</bugs-to> diff --git a/dev-qt/qtcore/qtcore-5.14.2.ebuild b/dev-qt/qtcore/qtcore-5.14.2.ebuild deleted file mode 100644 index 48df292f53b7..000000000000 --- a/dev-qt/qtcore/qtcore-5.14.2.ebuild +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -QT5_MODULE="qtbase" -inherit linux-info qt5-build - -DESCRIPTION="Cross-platform application development framework" -SLOT=5/$(ver_cut 1-3) - -if [[ ${QT5_BUILD_TYPE} == release ]]; then - KEYWORDS="amd64 arm arm64 ~hppa ppc ppc64 ~sparc x86" -fi - -IUSE="icu old-kernel systemd" - -DEPEND=" - dev-libs/double-conversion:= - dev-libs/glib:2 - dev-libs/libpcre2[pcre16,unicode] - sys-libs/zlib:= - icu? ( dev-libs/icu:= ) - !icu? ( virtual/libiconv ) - systemd? ( sys-apps/systemd:= ) -" -RDEPEND="${DEPEND} - !<dev-qt/qtcore-4.8.7-r4:4 -" - -QT5_TARGET_SUBDIRS=( - src/tools/bootstrap - src/tools/moc - src/tools/rcc - src/corelib - src/tools/qlalr - doc -) - -QT5_GENTOO_PRIVATE_CONFIG=( - !:network - !:sql - !:testlib - !:xml -) - -PATCHES=( - "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" # bug 703306 - "${FILESDIR}/${P}-QLibrary-deadlock.patch" # QTBUG-83207 -) - -pkg_pretend() { - use kernel_linux || return - get_running_version - if kernel_is -lt 3 17 && ! use old-kernel; then - ewarn "The running kernel is older than 3.17. USE=old-kernel is needed for" - ewarn "dev-qt/qtcore to function on this kernel properly. See Bug #669994." - fi -} - -src_prepare() { - # don't add -O3 to CXXFLAGS, bug 549140 - sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || die - - # fix missing qt_version_tag symbol w/ LTO, bug 674382 - sed -i -e 's/^gcc:ltcg/gcc/' src/corelib/global/global.pri || die - - qt5-build_src_prepare -} - -src_configure() { - local myconf=( - -no-feature-statx # bug 672856 - $(qt_use icu) - $(qt_use !icu iconv) - $(qt_use systemd journald) - ) - use old-kernel && myconf+=( - -no-feature-renameat2 # needs Linux 3.16, bug 669994 - -no-feature-getentropy # needs Linux 3.17, bug 669994 - ) - qt5-build_src_configure -} - -src_install() { - qt5-build_src_install - - local flags=( - DBUS FREETYPE IMAGEFORMAT_JPEG IMAGEFORMAT_PNG - OPENGL OPENSSL SSL WIDGETS - ) - - for flag in ${flags[@]}; do - cat >> "${D}"/${QT5_HEADERDIR}/QtCore/qconfig.h <<- _EOF_ || die - - #if defined(QT_NO_${flag}) && defined(QT_${flag}) - # undef QT_NO_${flag} - #elif !defined(QT_NO_${flag}) && !defined(QT_${flag}) - # define QT_NO_${flag} - #endif - _EOF_ - done -} diff --git a/dev-qt/qtcore/qtcore-5.15.1.ebuild b/dev-qt/qtcore/qtcore-5.15.1.ebuild deleted file mode 100644 index 449fddfc065d..000000000000 --- a/dev-qt/qtcore/qtcore-5.15.1.ebuild +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -QT5_MODULE="qtbase" -inherit linux-info qt5-build - -DESCRIPTION="Cross-platform application development framework" -SLOT=5/$(ver_cut 1-3) - -if [[ ${QT5_BUILD_TYPE} == release ]]; then - KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" -fi - -IUSE="icu old-kernel systemd" - -DEPEND=" - dev-libs/double-conversion:= - dev-libs/glib:2 - dev-libs/libpcre2[pcre16,unicode] - sys-libs/zlib:= - icu? ( dev-libs/icu:= ) - !icu? ( virtual/libiconv ) - systemd? ( sys-apps/systemd:= ) -" -RDEPEND="${DEPEND} - !<dev-qt/qtcore-4.8.7-r4:4 -" - -QT5_TARGET_SUBDIRS=( - src/tools/bootstrap - src/tools/moc - src/tools/rcc - src/corelib - src/tools/qlalr - doc -) - -QT5_GENTOO_PRIVATE_CONFIG=( - !:network - !:sql - !:testlib - !:xml -) - -PATCHES=( "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" ) # bug 703306 - -pkg_pretend() { - use kernel_linux || return - get_running_version - if kernel_is -lt 4 11 && ! use old-kernel; then - ewarn "The running kernel is older than 4.11. USE=old-kernel is needed for" - ewarn "dev-qt/qtcore to function on this kernel properly. Bugs #669994, #672856" - fi -} - -src_prepare() { - # don't add -O3 to CXXFLAGS, bug 549140 - sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || die - - # fix missing qt_version_tag symbol w/ LTO, bug 674382 - sed -i -e 's/^gcc:ltcg/gcc/' src/corelib/global/global.pri || die - - qt5-build_src_prepare -} - -src_configure() { - local myconf=( - $(qt_use icu) - $(qt_use !icu iconv) - $(qt_use systemd journald) - ) - use old-kernel && myconf+=( - -no-feature-renameat2 # needs Linux 3.16, bug 669994 - -no-feature-getentropy # needs Linux 3.17, bug 669994 - -no-feature-statx # needs Linux 4.11, bug 672856 - ) - qt5-build_src_configure -} - -src_install() { - qt5-build_src_install - - local flags=( - DBUS FREETYPE IMAGEFORMAT_JPEG IMAGEFORMAT_PNG - OPENGL OPENSSL SSL WIDGETS - ) - - for flag in ${flags[@]}; do - cat >> "${D}"/${QT5_HEADERDIR}/QtCore/qconfig.h <<- _EOF_ || die - - #if defined(QT_NO_${flag}) && defined(QT_${flag}) - # undef QT_NO_${flag} - #elif !defined(QT_NO_${flag}) && !defined(QT_${flag}) - # define QT_NO_${flag} - #endif - _EOF_ - done -} diff --git a/dev-qt/qtcore/qtcore-5.15.13.ebuild b/dev-qt/qtcore/qtcore-5.15.13.ebuild new file mode 100644 index 000000000000..8a419f7c95fb --- /dev/null +++ b/dev-qt/qtcore/qtcore-5.15.13.ebuild @@ -0,0 +1,162 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +if [[ ${PV} != *9999* ]]; then + QT5_KDEPATCHSET_REV=1 + KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv ~sparc x86" +fi + +QT5_MODULE="qtbase" +inherit linux-info flag-o-matic toolchain-funcs qt5-build + +DESCRIPTION="Cross-platform application development framework" +SLOT=5/${QT5_PV} + +IUSE="icu old-kernel" + +DEPEND=" + dev-libs/double-conversion:= + dev-libs/glib:2 + dev-libs/libpcre2[pcre16,unicode] + sys-libs/zlib:= + icu? ( dev-libs/icu:= ) + !icu? ( virtual/libiconv ) +" +RDEPEND="${DEPEND} + !<dev-qt/designer-${QT5_PV}:5 + !<dev-qt/qt3d-${QT5_PV}:5 + !<dev-qt/qtbluetooth-${QT5_PV}:5 + !<dev-qt/qtcharts-${QT5_PV}:5 + !<dev-qt/qtconcurrent-${QT5_PV}:5 + !<dev-qt/qtdatavis3d-${QT5_PV}:5 + !<dev-qt/qtdbus-${QT5_PV}:5 + !<dev-qt/qtdeclarative-${QT5_PV}:5 + !<dev-qt/qtgamepad-${QT5_PV}:5 + !<dev-qt/qtgraphicaleffects-${QT5_PV}:5 + !<dev-qt/qtgui-${QT5_PV}:5 + !<dev-qt/qthelp-${QT5_PV}:5 + !<dev-qt/qtimageformats-${QT5_PV}:5 + !<dev-qt/qtlocation-${QT5_PV}:5 + !<dev-qt/qtmultimedia-${QT5_PV}:5 + !<dev-qt/qtnetwork-${QT5_PV}:5 + !<dev-qt/qtnetworkauth-${QT5_PV}:5 + !<dev-qt/qtopengl-${QT5_PV}:5 + !<dev-qt/qtpositioning-${QT5_PV}:5 + !<dev-qt/qtprintsupport-${QT5_PV}:5 + !<dev-qt/qtquickcontrols-${QT5_PV}:5 + !<dev-qt/qtquickcontrols2-${QT5_PV}:5 + !<dev-qt/qtquicktimeline-${QT5_PV}:5 + !<dev-qt/qtscript-${QT5_PV}:5 + !<dev-qt/qtscxml-${QT5_PV}:5 + !<dev-qt/qtsensors-${QT5_PV}:5 + !<dev-qt/qtserialbus-${QT5_PV}:5 + !<dev-qt/qtserialport-${QT5_PV}:5 + !<dev-qt/qtspeech-${QT5_PV}:5 + !<dev-qt/qtsql-${QT5_PV}:5 + !<dev-qt/qtsvg-${QT5_PV}:5 + !<dev-qt/qttest-${QT5_PV}:5 + !<dev-qt/qtvirtualkeyboard-${QT5_PV}:5 + !<dev-qt/qtwayland-${QT5_PV}:5 + !<dev-qt/qtwebchannel-${QT5_PV}:5 + !<dev-qt/qtwebengine-${QT5_PV}:5 + !<dev-qt/qtwebsockets-${QT5_PV}:5 + !<dev-qt/qtwebview-${QT5_PV}:5 + !<dev-qt/qtwidgets-${QT5_PV}:5 + !<dev-qt/qtx11extras-${QT5_PV}:5 + !<dev-qt/qtxml-${QT5_PV}:5 + !<dev-qt/qtxmlpatterns-${QT5_PV}:5 +" + +QT5_TARGET_SUBDIRS=( + src/tools/bootstrap + src/tools/moc + src/tools/rcc + src/corelib + src/tools/qlalr + doc +) + +QT5_GENTOO_PRIVATE_CONFIG=( + !:network + !:sql + !:testlib + !:xml +) + +pkg_pretend() { + use kernel_linux || return + get_running_version + if kernel_is -lt 4 11 && ! use old-kernel; then + ewarn "The running kernel is older than 4.11. USE=old-kernel is needed for" + ewarn "dev-qt/qtcore to function on this kernel properly. Bugs #669994, #672856" + fi +} + +src_prepare() { + # don't add -O3 to CXXFLAGS, bug 549140 + sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || die + + # fix missing qt_version_tag symbol w/ LTO, bug 674382 + sed -i -e 's/^gcc:ltcg/gcc/' src/corelib/global/global.pri || die + + # Broken with FORTIFY_SOURCE=3 + # + # Our toolchain sets F_S=2 by default w/ >= -O2, so we need + # to unset F_S first, then explicitly set 2, to negate any default + # and anything set by the user if they're choosing 3 (or if they've + # modified GCC to set 3). + # + # Refs: + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105078 + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105709 + # https://bugreports.qt.io/browse/QTBUG-103782 + # bug #847145 + if tc-enables-fortify-source ; then + # We can't unconditionally do this b/c we fortify needs + # some level of optimisation. + filter-flags -D_FORTIFY_SOURCE=3 + # (Qt doesn't seem to respect CPPFLAGS?) + append-flags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 + fi + + qt5-build_src_prepare + + # workaround for a79a370c (...Annotate-QMutex-...patch) adding a header + qt5_syncqt_version +} + +src_configure() { + local myconf=( + $(qt_use icu) + $(qt_use !icu iconv) + ) + use old-kernel && myconf+=( + -no-feature-renameat2 # needs Linux 3.16, bug 669994 + -no-feature-getentropy # needs Linux 3.17, bug 669994 + -no-feature-statx # needs Linux 4.11, bug 672856 + ) + qt5-build_src_configure +} + +src_install() { + qt5-build_src_install + qt5_symlink_binary_to_path qmake 5 + + local flags=( + DBUS FREETYPE IMAGEFORMAT_JPEG IMAGEFORMAT_PNG + OPENGL OPENSSL SSL WIDGETS + ) + + for flag in ${flags[@]}; do + cat >> "${D}"/${QT5_HEADERDIR}/QtCore/qconfig.h <<- _EOF_ || die + + #if defined(QT_NO_${flag}) && defined(QT_${flag}) + # undef QT_NO_${flag} + #elif !defined(QT_NO_${flag}) && !defined(QT_${flag}) + # define QT_NO_${flag} + #endif + _EOF_ + done +} |