mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-21 22:47:14 -08:00
qt5-build.eclass: Import out-of-source quirks from qdoc/qtlocation
We probably won't get this fixed in Qt5 cycle anymore. Standardises the quirk via new internal helper function qt5_tools_oos_quirk() to avoid qt5_qmake usage in ebuilds. Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
+37
-2
@@ -720,9 +720,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
|
||||
|
||||
Reference in New Issue
Block a user