summaryrefslogtreecommitdiff
path: root/eclass/qt5-build.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
commit623ee73d661e5ed8475cb264511f683407d87365 (patch)
tree993eb27c93ec7a2d2d19550300d888fc1fed9e69 /eclass/qt5-build.eclass
parentceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff)
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'eclass/qt5-build.eclass')
-rw-r--r--eclass/qt5-build.eclass55
1 files changed, 31 insertions, 24 deletions
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index e1b32e71ab4f..9a757ccedf2f 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: qt5-build.eclass
@@ -6,18 +6,17 @@
# qt@gentoo.org
# @AUTHOR:
# Davide Pesavento <pesa@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7
+# @SUPPORTED_EAPIS: 7
# @BLURB: Eclass for Qt5 split ebuilds.
# @DESCRIPTION:
# This eclass contains various functions that are used when building Qt5.
-# Requires EAPI 6.
+# Requires EAPI 7.
if [[ ${CATEGORY} != dev-qt ]]; then
die "qt5-build.eclass is only to be used for building Qt 5"
fi
case ${EAPI} in
- 6) inherit eapi7-ver ;;
7) : ;;
*) die "qt5-build.eclass: unsupported EAPI=${EAPI:-0}" ;;
esac
@@ -105,10 +104,11 @@ EGIT_REPO_URI=(
# @OUTPUT_VARIABLE
# @DESCRIPTION:
# Build directory for out-of-source builds.
-case ${QT5_BUILD_TYPE} in
- live) : ${QT5_BUILD_DIR:=${S}_build} ;;
- release) : ${QT5_BUILD_DIR:=${S}} ;; # workaround for bug 497312
-esac
+if ver_test ${PV} -lt 5.14.2; then
+ : ${QT5_BUILD_DIR:=${S}} # workaround for bug 497312
+else
+ : ${QT5_BUILD_DIR:=${S}_build}
+fi
IUSE="debug test"
@@ -118,9 +118,6 @@ BDEPEND="
dev-lang/perl
virtual/pkgconfig
"
-case ${EAPI} in
- 6) DEPEND+=" ${BDEPEND}" ;;
-esac
if [[ ${PN} != qttest ]]; then
DEPEND+=" test? ( ~dev-qt/qttest-${PV} )"
fi
@@ -288,7 +285,7 @@ qt5-build_src_install() {
qt5_install_module_config
# prune libtool files
- find "${D}" -name '*.la' -delete || die
+ find "${D}" -name '*.la' -type f -delete || die
}
# @FUNCTION: qt5-build_pkg_postinst
@@ -568,8 +565,13 @@ qt5_base_configure() {
-no-libpng -no-libjpeg
-no-freetype -no-harfbuzz
-no-openssl -no-libproxy
+ $([[ ${QT5_MINOR_VERSION} -ge 14 ]] && echo -no-feature-gssapi)
-no-xcb-xlib
- -no-xcb-xinput -no-xkbcommon # bug 672340
+
+ # bug 672340
+ -no-xkbcommon
+ $([[ ${QT5_MINOR_VERSION} -lt 15 ]] && echo -no-xcb-xinput)
+ $([[ ${QT5_MINOR_VERSION} -ge 15 ]] && echo -no-bundled-xcb-xinput)
# cannot use -no-gif because there is no way to override it later
#-no-gif
@@ -617,7 +619,7 @@ qt5_base_configure() {
# disable undocumented X11-related flags, override in qtgui
# (not shown in ./configure -help output)
- -no-xkb
+ $([[ ${QT5_MINOR_VERSION} -lt 15 ]] && echo -no-xkb)
# always enable session management support: it doesn't need extra deps
# at configure time and turning it off is dangerous, see bug 518262
@@ -644,7 +646,7 @@ qt5_base_configure() {
-no-gui -no-widgets
# QTBUG-76521, default will change to zstd in Qt6
- $([[ ${QT5_MINOR_VERSION} -ge 13 ]] && echo -no-zstd)
+ -no-zstd
# module-specific options
"${myconf[@]}"
@@ -657,7 +659,12 @@ qt5_base_configure() {
# a forwarding header is no longer created since 5.8, causing the system
# config to always be used. bug 599636
- cp src/corelib/global/qconfig.h include/QtCore/ || die
+ # ${S}/include does not exist in live sources
+ local basedir="${S}/"
+ if ver_test ${PV} -lt 5.14.2 || [[ ${QT5_BUILD_TYPE} == live ]]; then
+ basedir=""
+ fi
+ cp src/corelib/global/qconfig.h "${basedir}"include/QtCore/ || die
popd >/dev/null || die
@@ -814,18 +821,18 @@ qt5_install_module_config() {
qt5_regenerate_global_configs() {
einfo "Regenerating gentoo-qconfig.h"
- find "${ROOT%/}${QT5_HEADERDIR}"/Gentoo \
+ find "${ROOT}${QT5_HEADERDIR}"/Gentoo \
-name '*-qconfig.h' -a \! -name 'gentoo-qconfig.h' -type f \
-execdir cat '{}' + | sort -u > "${T}"/gentoo-qconfig.h
[[ -s ${T}/gentoo-qconfig.h ]] || ewarn "Generated gentoo-qconfig.h is empty"
- cp "${T}"/gentoo-qconfig.h "${ROOT%/}${QT5_HEADERDIR}"/Gentoo/gentoo-qconfig.h \
+ cp "${T}"/gentoo-qconfig.h "${ROOT}${QT5_HEADERDIR}"/Gentoo/gentoo-qconfig.h \
|| eerror "Failed to install new gentoo-qconfig.h"
einfo "Updating QT_CONFIG in qconfig.pri"
- local qconfig_pri=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/qconfig.pri
- local qconfig_pri_orig=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/gentoo/qconfig-qtcore.pri
+ local qconfig_pri=${ROOT}${QT5_ARCHDATADIR}/mkspecs/qconfig.pri
+ local qconfig_pri_orig=${ROOT}${QT5_ARCHDATADIR}/mkspecs/gentoo/qconfig-qtcore.pri
if [[ -f ${qconfig_pri} ]]; then
local x qconfig_add= qconfig_remove=
local qt_config new_qt_config=
@@ -838,7 +845,7 @@ qt5_regenerate_global_configs() {
# generate list of QT_CONFIG entries from the existing list,
# appending QCONFIG_ADD and excluding QCONFIG_REMOVE
eshopts_push -s nullglob
- for x in "${ROOT%/}${QT5_ARCHDATADIR}"/mkspecs/gentoo/*-qconfig.pri; do
+ for x in "${ROOT}${QT5_ARCHDATADIR}"/mkspecs/gentoo/*-qconfig.pri; do
qconfig_add+=" $(sed -n 's/^QCONFIG_ADD=\s*//p' "${x}")"
qconfig_remove+=" $(sed -n 's/^QCONFIG_REMOVE=\s*//p' "${x}")"
done
@@ -858,8 +865,8 @@ qt5_regenerate_global_configs() {
einfo "Updating QT.global_private in qmodule.pri"
- local qmodule_pri=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/qmodule.pri
- local qmodule_pri_orig=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/gentoo/qmodule-qtcore.pri
+ local qmodule_pri=${ROOT}${QT5_ARCHDATADIR}/mkspecs/qmodule.pri
+ local qmodule_pri_orig=${ROOT}${QT5_ARCHDATADIR}/mkspecs/gentoo/qmodule-qtcore.pri
if [[ -f ${qmodule_pri} && -f ${qmodule_pri_orig} ]]; then
local x
local qprivateconfig_enabled= qprivateconfig_disabled=
@@ -870,7 +877,7 @@ qt5_regenerate_global_configs() {
qprivateconfig_orig_enabled="$(sed -n 's/^QT.global_private.enabled_features\s=\s*//p' "${qmodule_pri_orig}")"
qprivateconfig_orig_disabled="$(sed -n 's/^QT.global_private.disabled_features\s=\s*//p' "${qmodule_pri_orig}")"
eshopts_push -s nullglob
- for x in "${ROOT%/}${QT5_ARCHDATADIR}"/mkspecs/gentoo/*-qmodule.pri; do
+ for x in "${ROOT}${QT5_ARCHDATADIR}"/mkspecs/gentoo/*-qmodule.pri; do
qprivateconfig_enabled+=" $(sed -n 's/^QT.global_private.enabled_features\s=\s*//p' "${x}")"
qprivateconfig_disabled+=" $(sed -n 's/^QT.global_private.disabled_features\s=\s*//p' "${x}")"
done