1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 inherit linux-info qt5-build
9 DESCRIPTION="Cross-platform application development framework"
12 if [[ ${QT5_BUILD_TYPE} == release ]]; then
13 KEYWORDS="amd64 arm arm64 ~hppa ~ppc ppc64 ~sparc x86"
16 IUSE="icu old-kernel systemd"
19 dev-libs/double-conversion:=
21 dev-libs/libpcre2[pcre16,unicode]
23 icu? ( dev-libs/icu:= )
24 !icu? ( virtual/libiconv )
25 systemd? ( sys-apps/systemd:= )
28 !<dev-qt/qtcore-4.8.7-r4:4
40 QT5_GENTOO_PRIVATE_CONFIG=(
48 "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" # bug 703306
49 "${FILESDIR}/${P}-QLibrary-deadlock.patch" # QTBUG-83207
53 use kernel_linux || return
55 if kernel_is -lt 3 17 && ! use old-kernel; then
56 ewarn "The running kernel is older than 3.17. USE=old-kernel is needed for"
57 ewarn "dev-qt/qtcore to function on this kernel properly. See Bug #669994."
62 # don't add -O3 to CXXFLAGS, bug 549140
63 sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || die
65 # fix missing qt_version_tag symbol w/ LTO, bug 674382
66 sed -i -e 's/^gcc:ltcg/gcc/' src/corelib/global/global.pri || die
73 -no-feature-statx # bug 672856
76 $(qt_use systemd journald)
78 use old-kernel && myconf+=(
79 -no-feature-renameat2 # needs Linux 3.16, bug 669994
80 -no-feature-getentropy # needs Linux 3.17, bug 669994
82 qt5-build_src_configure
89 DBUS FREETYPE IMAGEFORMAT_JPEG IMAGEFORMAT_PNG
90 OPENGL OPENSSL SSL WIDGETS
93 for flag in ${flags[@]}; do
94 cat >> "${D}"/${QT5_HEADERDIR}/QtCore/qconfig.h <<- _EOF_ || die
96 #if defined(QT_NO_${flag}) && defined(QT_${flag})
98 #elif !defined(QT_NO_${flag}) && !defined(QT_${flag})
99 # define QT_NO_${flag}