summaryrefslogtreecommitdiff
path: root/eclass/qt5-build.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-08 22:23:22 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-08 22:23:22 +0100
commit99b2c44c1425c7b2925846d4c44b2bf2f78dc786 (patch)
tree9bf7a2d385aace0ea5f3f8d3e3657168b758fdaa /eclass/qt5-build.eclass
parent39bccce90513402ec93bb0fde30678f16b07a9cc (diff)
gentoo auto-resync : 08:07:2023 - 22:23:22
Diffstat (limited to 'eclass/qt5-build.eclass')
-rw-r--r--eclass/qt5-build.eclass58
1 files changed, 56 insertions, 2 deletions
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index 8779d5e93bc4..847c436651af 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:
@@ -720,9 +739,44 @@ qt5_tools_configure() {
# allow the ebuild to override what we set here
myqmakeargs=( "${qmakeargs[@]}" "${myqmakeargs[@]}" )
- mkdir -p "${QT5_BUILD_DIR}" || die
+ # out-of-source build quirks
+ case ${PN} in
+ qdoc)
+ # bug 676948
+ qt5_tools_oos_quirk qtqdoc-config.pri src/qdoc
+ ;;
+ qtlocation)
+ # src/plugins/geoservices requires files that are only generated
+ # when qmake is run in the root directory. bug 633776
+ qt5_tools_oos_quirk qtlocation-config.pri src/location
+ ;;
+ *) ;;
+ esac
+
+ qt5_tools_oos_quirk qttools-config.pri
+}
+
+# @FUNCTION: qt5_tools_oos_quirk
+# @INTERNAL
+# @USAGE: <file> or <file> <path>
+# @DESCRIPTION:
+# Quirk for out-of-source builds. Runs qmake in root directory, copies
+# generated pri <file> from source <path> to build dir <path>.
+# If no <path> is given, <file> is copied to ${QT5_BUILD_DIR}.
+qt5_tools_oos_quirk() {
+ if [[ "$#" == 2 ]]; then
+ local source="${2}/${1}"
+ local dest="${QT5_BUILD_DIR}/${2}"
+ elif [[ "$#" == 1 ]]; then
+ local source="${1}"
+ local dest="${QT5_BUILD_DIR}"
+ else
+ die "${FUNCNAME[0]} must be passed either one or two arguments"
+ fi
+
+ mkdir -p "${dest}" || die
qt5_qmake "${QT5_BUILD_DIR}"
- cp qttools-config.pri "${QT5_BUILD_DIR}" || die
+ cp "${source}" "${dest}" || die
}
# @FUNCTION: qt5_qmake_args