commit:     ef16882b0231f3b6944c38a42b85da4324689ea3
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 18 17:26:41 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Jun 22 15:53:37 2023 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=ef16882b

qt5-build.eclass: Add qt5_syncqt_version()

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

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

diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index 31e3be2e..847c4366 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -326,6 +326,25 @@ qt5-build_pkg_postrm() {
 
 ######  Public helpers  ######
 
+# @FUNCTION: qt5_syncqt_version
+# @DESCRIPTION:
+# Wrapper for Qt5 syncqt.pl to sync header files for ${PV} (required to run if
+# headers are added/removed by patching)
+qt5_syncqt_version() {
+       if [[ ${PV} == *9999* ]]; then
+               return
+       fi
+
+       local syncqt
+       if [[ ${PN} == qtcore ]]; then
+               syncqt=bin/syncqt.pl
+       else
+               syncqt=${QT5_BINDIR}/syncqt.pl
+       fi
+
+       perl ${syncqt} -version ${PV} || die
+}
+
 # @FUNCTION: qt5_symlink_binary_to_path
 # @USAGE: <target binary name> [suffix]
 # @DESCRIPTION:

Reply via email to