commit:     dfaa1f6e860d5bcf3ab1d9a930baedae1bdb6d73
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 14 11:39:45 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jun 14 18:20:52 2022 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=dfaa1f6e

qt5-build.eclass: Add _QT5_GENTOOPATCHSET_REV qtbase patchset logic

Usage may be extended to other QT5_MODULEs in the future.

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 eclass/qt5-build.eclass | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index 2272e2e2..39a72e57 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -63,6 +63,13 @@ readonly QT5_PV
 # The upstream package name of the module this package belongs to.
 # Used for SRC_URI and S.
 
+# @ECLASS_VARIABLE: _QT5_GENTOOPATCHSET_REV
+# @DEFAULT_UNSET
+# @INTERNAL
+# @DESCRIPTION:
+# Gentoo downstream patchset version applied over qtbase. Used for SRC_URI and
+# applied in src_prepare.
+
 # @ECLASS_VARIABLE: QT5_TARGET_SUBDIRS
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -115,6 +122,11 @@ if [[ ${PN} != qtwebengine ]]; then
        esac
 fi
 
+if [[ ${QT5_MODULE} == qtbase ]] && [[ ${PV} == 5.15.[4-9]* ]]; then
+       _QT5_GENTOOPATCHSET_REV=1
+       SRC_URI+=" 
https://dev.gentoo.org/~asturm/distfiles/qtbase-5.15-gentoo-patchset-${_QT5_GENTOOPATCHSET_REV}.tar.xz";
+fi
+
 # @ECLASS_VARIABLE: QT5_BUILD_DIR
 # @OUTPUT_VARIABLE
 # @DESCRIPTION:
@@ -189,6 +201,8 @@ qt5-build_src_prepare() {
 
                # Respect build variables in configure tests (bug #639494)
                sed -i -e "s|\"\$outpath/bin/qmake\" \"\$relpathMangled\" -- 
\"\$@\"|& $(qt5_qmake_args) |" configure || die
+
+               [[ -n ${_QT5_GENTOOPATCHSET_REV} ]] && eapply 
"${WORKDIR}/qtbase-5.15-gentoo-patchset-${_QT5_GENTOOPATCHSET_REV}"
        fi
 
        [[ -n ${QT5_KDEPATCHSET_REV} ]] && eapply 
"${WORKDIR}/${QT5_MODULE}-${PV}-gentoo-kde-${QT5_KDEPATCHSET_REV}"

Reply via email to