From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0511715800D for ; Sat, 8 Jul 2023 21:26:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4D689E081B; Sat, 8 Jul 2023 21:26:06 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3800CE081B for ; Sat, 8 Jul 2023 21:26:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7C538340DFD for ; Sat, 8 Jul 2023 21:26:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 137CDAC4 for ; Sat, 8 Jul 2023 21:26:04 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1688851182.93362d2540b24a74b9dc2e4939371a1ca4da0c03.asturm@gentoo> Subject: [gentoo-commits] proj/qt:master commit in: eclass/ X-VCS-Repository: proj/qt X-VCS-Files: eclass/qt5-build.eclass X-VCS-Directories: eclass/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 93362d2540b24a74b9dc2e4939371a1ca4da0c03 X-VCS-Branch: master Date: Sat, 8 Jul 2023 21:26:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 39bf7df8-58e5-4e40-9153-6028749e0016 X-Archives-Hash: c6bf990562ad4818db36f1101e081822 commit: 93362d2540b24a74b9dc2e4939371a1ca4da0c03 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sat Jul 8 20:58:18 2023 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat Jul 8 21:19:42 2023 +0000 URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=93362d25 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 gentoo.org> eclass/qt5-build.eclass | 61 +++++++++++++++++++------------------------------ 1 file changed, 23 insertions(+), 38 deletions(-) diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass index 847c4366..5e23d793 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: or +# @DESCRIPTION: +# Quirk for out-of-source builds. Runs qmake in root directory, copies +# generated pri from source to build dir . +# If no is given, 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: or -# @DESCRIPTION: -# Quirk for out-of-source builds. Runs qmake in root directory, copies -# generated pri from source to build dir . -# If no is given, 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