summaryrefslogtreecommitdiff
path: root/dev-qt
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-01-04 21:07:49 +0000
committerSam James <sam@gentoo.org>2022-01-04 21:07:58 +0000
commit2b134e09a3ab94f3c33419cf0b8114d004cec477 (patch)
treeec3a7c83169943a296f43d365c84876db4decb24 /dev-qt
parentqt5-build.eclass: remove kernel_FreeBSD (diff)
downloadgentoo-2b134e09a3ab94f3c33419cf0b8114d004cec477.tar.gz
gentoo-2b134e09a3ab94f3c33419cf0b8114d004cec477.tar.bz2
gentoo-2b134e09a3ab94f3c33419cf0b8114d004cec477.zip
dev-qt/qtwebengine: add check-reqs for disk space and memory usage
For now, assumes: - RAM/memory: 2GB per job for GCC, 1.5GB per job for Clang - Disk (build): 7GB - Disk (installed): 150MB (Also moves pkg_preinst to the end of the ebuild to reflect phase execution order, as per devmanual.) Closes: https://bugs.gentoo.org/570534 Thanks-to: Ionen Wolkens <ionen@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-qt')
-rw-r--r--dev-qt/qtwebengine/qtwebengine-5.15.2_p20211216.ebuild61
1 files changed, 45 insertions, 16 deletions
diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.2_p20211216.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.2_p20211216.ebuild
index 7923a290ab0e..3baacbff39c9 100644
--- a/dev-qt/qtwebengine/qtwebengine-5.15.2_p20211216.ebuild
+++ b/dev-qt/qtwebengine/qtwebengine-5.15.2_p20211216.ebuild
@@ -5,7 +5,7 @@ EAPI=8
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="xml(+)"
-inherit estack flag-o-matic multiprocessing python-any-r1 qt5-build
+inherit check-reqs estack flag-o-matic multiprocessing python-any-r1 qt5-build toolchain-funcs
DESCRIPTION="Library for rendering dynamic web content in Qt5 C++ and QML applications"
HOMEPAGE="https://www.qt.io/"
@@ -110,29 +110,47 @@ PATCHES=(
"${WORKDIR}/${PN}-5.15.2_p20211019-jumbo-build.patch" # bug 813957
)
-pkg_preinst() {
- elog "This version of Qt WebEngine is based on Chromium version 87.0.4280, with"
- elog "additional security fixes from newer versions. Extensive as it is, the"
- elog "list of backports is impossible to evaluate, but always bound to be behind"
- elog "Chromium's release schedule."
- elog "In addition, various online services may deny service based on an outdated"
- elog "user agent version (and/or other checks). Google is already known to do so."
- elog
- elog "tldr: Your web browsing experience will be compromised."
-}
-
-src_unpack() {
- # bug 307861
+qtwebengine_check-reqs() {
+ # bug #307861
eshopts_push -s extglob
if is-flagq '-g?(gdb)?([1-9])'; then
- ewarn
ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)."
ewarn "You may experience really long compilation times and/or increased memory usage."
ewarn "If compilation fails, please try removing -g/-ggdb before reporting a bug."
- ewarn
fi
eshopts_pop
+ [[ ${MERGE_TYPE} == binary ]] && return
+
+ # (check-reqs added for bug #570534)
+ #
+ # Estimate the amount of RAM required
+ # Multiplier is *10 because Bash doesn't do floating point maths.
+ # Let's crudely assume ~2GB per compiler job for GCC.
+ local multiplier=20
+
+ # And call it ~1.5GB for Clang.
+ if tc-is-clang ; then
+ multiplier=15
+ fi
+
+ local CHECKREQS_DISK_BUILD="7G"
+ local CHECKREQS_DISK_USR="150M"
+ local CHECKREQS_MEMORY=$(($(makeopts_jobs)*multiplier/10))G
+
+ check-reqs_${EBUILD_PHASE_FUNC}
+}
+
+pkg_pretend() {
+ qtwebengine_check-reqs
+}
+
+pkg_setup() {
+ qtwebengine_check-reqs
+ python-any-r1_pkg_setup
+}
+
+src_unpack() {
case ${QT5_BUILD_TYPE} in
live) git-r3_src_unpack ;&
release) default ;;
@@ -231,3 +249,14 @@ src_install() {
die "${CATEGORY}/${PF} failed to build anything. Please report to https://bugs.gentoo.org/"
fi
}
+
+pkg_preinst() {
+ elog "This version of Qt WebEngine is based on Chromium version 87.0.4280, with"
+ elog "additional security fixes from newer versions. Extensive as it is, the"
+ elog "list of backports is impossible to evaluate, but always bound to be behind"
+ elog "Chromium's release schedule."
+ elog "In addition, various online services may deny service based on an outdated"
+ elog "user agent version (and/or other checks). Google is already known to do so."
+ elog
+ elog "tldr: Your web browsing experience will be compromised."
+}