diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2023-07-08 22:58:18 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2023-07-08 23:18:22 +0200 |
commit | 3020832ba81b8ac64676bcde632315fa3e2c6a92 (patch) | |
tree | 4466193a236abcd77f479336baf43eb26663d5e2 /eclass/qt5-build.eclass | |
parent | dev-ml/reason: add dune-build-info dep (diff) | |
download | gentoo-3020832ba81b8ac64676bcde632315fa3e2c6a92.tar.gz gentoo-3020832ba81b8ac64676bcde632315fa3e2c6a92.tar.bz2 gentoo-3020832ba81b8ac64676bcde632315fa3e2c6a92.zip |
qt5-build.eclass: Rename qt5_tools_oos_quirk -> qt5_configure_oos_quirk
...and turn it into a public helper, as it serves more than just qttools.
The initial review missed the fact that qtlocation is not part of qttools, so
push the quirks back into the ebuilds, calling the newly publicised function.
Bug: https://bugs.gentoo.org/910066
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass/qt5-build.eclass')
-rw-r--r-- | eclass/qt5-build.eclass | 61 |
1 files changed, 23 insertions, 38 deletions
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass index 847c436651af..5e23d793915a 100644 --- a/eclass/qt5-build.eclass +++ b/eclass/qt5-build.eclass @@ -326,6 +326,28 @@ qt5-build_pkg_postrm() { ###### Public helpers ###### +# @FUNCTION: qt5_configure_oos_quirk +# @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_configure_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 "${source}" "${dest}" || die +} + # @FUNCTION: qt5_syncqt_version # @DESCRIPTION: # Wrapper for Qt5 syncqt.pl to sync header files for ${PV} (required to run if @@ -739,44 +761,7 @@ qt5_tools_configure() { # allow the ebuild to override what we set here myqmakeargs=( "${qmakeargs[@]}" "${myqmakeargs[@]}" ) - # 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 "${source}" "${dest}" || die + qt5_configure_oos_quirk qttools-config.pri } # @FUNCTION: qt5_qmake_args |