commit: 913a1a9332f138872b8399a3d7fe1258b33f3d1a Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> AuthorDate: Fri Feb 5 18:32:14 2021 +0000 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> CommitDate: Fri Feb 5 18:32:14 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=913a1a93
mail-client/thunderbird: add rust-1.49 llvm version workaround Bug: https://bugs.gentoo.org/768543 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> mail-client/thunderbird/thunderbird-78.7.0.ebuild | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/mail-client/thunderbird/thunderbird-78.7.0.ebuild b/mail-client/thunderbird/thunderbird-78.7.0.ebuild index 5e08a396984..1b6d9fe8f96 100644 --- a/mail-client/thunderbird/thunderbird-78.7.0.ebuild +++ b/mail-client/thunderbird/thunderbird-78.7.0.ebuild @@ -398,9 +398,19 @@ pkg_setup() { [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}") [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!" - local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }') - [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}") - [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!" + # temp fix for https://bugs.gentoo.org/768543 + # we can assume that rust 1.49.0 always uses llvm 11 + local version_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'release:' | awk '{ print $2 }') + [[ -n ${version_rust} ]] && version_rust=$(ver_cut 1-2 "${version_rust}") + [[ -z ${version_rust} ]] && die "Failed to read version from rustc!" + + if ver_test "${version_rust}" -eq "1.49" ; then + local version_llvm_rust="11" + else + local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }') + [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}") + [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!" + fi if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}."