commit:     65deeb03c3f06717dd747889a076d14fc2356f63
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 20 13:45:28 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Jul 20 13:46:09 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65deeb03

www-client/firefox: check rust version in pkg_pretend

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 www-client/firefox/firefox-68.10.0.ebuild | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/www-client/firefox/firefox-68.10.0.ebuild 
b/www-client/firefox/firefox-68.10.0.ebuild
index 87f57c81205..9afc1bda507 100644
--- a/www-client/firefox/firefox-68.10.0.ebuild
+++ b/www-client/firefox/firefox-68.10.0.ebuild
@@ -229,6 +229,15 @@ llvm_check_deps() {
 
 pkg_pretend() {
        if [[ ${MERGE_TYPE} != binary ]] ; then
+               local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
+               rustc_version=${rustc_version[0]/rust-bin-/}
+               rustc_version=${rustc_version/rust-/}
+               [[ -z "${rustc_version}" ]] && die "Failed to determine rustc 
version!"
+
+               if ver_test "${rustc_version}" -ge "1.45.0" ; then
+                       die "Rust >=1.45.0 is not supported. Please use 
'eselect rust' to switch to <rust-1.45.0!"
+               fi
+
                if use pgo ; then
                        if ! has usersandbox $FEATURES ; then
                                die "You must enable usersandbox as X server 
can not run as root!"

Reply via email to