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 9BAF9158086 for ; Thu, 6 Jan 2022 19:57:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D9CEDE0788; Thu, 6 Jan 2022 19:57:57 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 B0A18E0788 for ; Thu, 6 Jan 2022 19:57:57 +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 96E64342E3A for ; Thu, 6 Jan 2022 19:57:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 33C4B246 for ; Thu, 6 Jan 2022 19:57:55 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1641499034.c2e5a02f2ecd0af162b6598e718058a2420c9a05.sam@gentoo> Subject: [gentoo-commits] proj/qt:master commit in: dev-qt/qtwebengine/ X-VCS-Repository: proj/qt X-VCS-Files: dev-qt/qtwebengine/qtwebengine-5.15.2.9999.ebuild X-VCS-Directories: dev-qt/qtwebengine/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: c2e5a02f2ecd0af162b6598e718058a2420c9a05 X-VCS-Branch: master Date: Thu, 6 Jan 2022 19:57:55 +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: 7f195ca1-159b-46da-a86d-857b76f2b900 X-Archives-Hash: ced25866127e432bf7b5fafa5a377d3b commit: c2e5a02f2ecd0af162b6598e718058a2420c9a05 Author: Sam James gentoo org> AuthorDate: Tue Jan 4 21:07:49 2022 +0000 Commit: Sam James gentoo org> CommitDate: Thu Jan 6 19:57:14 2022 +0000 URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=c2e5a02f 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 gentoo.org> Signed-off-by: Sam James gentoo.org> dev-qt/qtwebengine/qtwebengine-5.15.2.9999.ebuild | 61 +++++++++++++++++------ 1 file changed, 45 insertions(+), 16 deletions(-) diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.2.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.2.9999.ebuild index 381ae491..2c200df5 100644 --- a/dev-qt/qtwebengine/qtwebengine-5.15.2.9999.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-5.15.2.9999.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." +}