Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/seamonkey/files/, www-client/seamonkey/
Date: Fri, 14 May 2021 10:17:48
Message-Id: 1620987456.648a93817f39a990a40b9b9ab16863d89e784468.polynomial-c@gentoo
1 commit: 648a93817f39a990a40b9b9ab16863d89e784468
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 14 10:17:00 2021 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri May 14 10:17:36 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=648a9381
7
8 www-client/seamonkey: Fixed build with =dev-lang/rust-1.52*
9
10 Closes: https://bugs.gentoo.org/789981
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 .../files/seamonkey-2.53.7.1-rust-1.52.patch | 52 ++++++++++++++++++++++
14 www-client/seamonkey/seamonkey-2.53.7.1-r1.ebuild | 2 +
15 2 files changed, 54 insertions(+)
16
17 diff --git a/www-client/seamonkey/files/seamonkey-2.53.7.1-rust-1.52.patch b/www-client/seamonkey/files/seamonkey-2.53.7.1-rust-1.52.patch
18 new file mode 100644
19 index 00000000000..47c3995e41c
20 --- /dev/null
21 +++ b/www-client/seamonkey/files/seamonkey-2.53.7.1-rust-1.52.patch
22 @@ -0,0 +1,52 @@
23 +http://www.wg9s.com/comm-253/patches/seamonkey-253-patches/mozilla-release/patches/1670538-87a1.patch
24 +https://bugs.gentoo.org/789981
25 +
26 +--- seamonkey-2.53.7.1/config/rules.mk
27 ++++ seamonkey-2.53.7.1/config/rules.mk
28 +@@ -861,16 +861,27 @@
29 + # Versions of rust >= 1.45 need -Cembed-bitcode=yes for all crates when
30 + # using -Clto.
31 + ifeq (,$(filter 1.37.% 1.38.% 1.39.% 1.40.% 1.41.% 1.42.% 1.43.% 1.44.%,$(RUSTC_VERSION)))
32 + RUSTFLAGS += -Cembed-bitcode=yes
33 + endif
34 + endif
35 + endif
36 +
37 ++ifndef RUSTC_BOOTSTRAP
38 ++ifeq (,$(filter 1.47.% 1.48.% 1.49.%,$(RUSTC_VERSION)))
39 ++# RUSTC_BOOTSTRAP := gkrust_shared,qcms for later
40 ++RUSTC_BOOTSTRAP := gkrust_shared
41 ++ifdef MOZ_RUST_SIMD
42 ++RUSTC_BOOTSTRAP := $(RUSTC_BOOTSTRAP),encoding_rs,packed_simd
43 ++endif
44 ++export RUSTC_BOOTSTRAP
45 ++endif
46 ++endif
47 ++
48 + rustflags_override = RUSTFLAGS='$(MOZ_RUST_DEFAULT_FLAGS) $(RUSTFLAGS)'
49 +
50 + ifdef MOZ_MSVCBITS
51 + # If we are building a MozillaBuild shell, we want to clear out the
52 + # vcvars.bat environment variables for cargo builds. This is because
53 + # a 32-bit MozillaBuild shell on a 64-bit machine will try to use
54 + # the 32-bit compiler/linker for everything, while cargo/rustc wants
55 + # to use the 64-bit linker for build.rs scripts. This conflict results
56 +--- seamonkey-2.53.7.1/toolkit/library/rust/shared/build.rs.1670538.later
57 ++++ seamonkey-2.53.7.1/toolkit/library/rust/shared/build.rs.1670538.later
58 +@@ -0,0 +1,16 @@
59 ++--- build.rs
60 +++++ build.rs
61 ++@@ -17,12 +17,12 @@ fn main() {
62 ++ } else if std::env::var("MOZ_AUTOMATION").is_ok() {
63 ++ panic!("Builds on automation must use a version of rust for which we know how to hook OOM: want < {}, have {}",
64 ++ max_oom_hook_version, ver);
65 ++ }
66 ++
67 ++ // This is a rather awful thing to do, but we're only doing it on
68 ++ // versions of rustc that are not going to change the unstable APIs
69 ++ // we use from under us, all being already released or beta.
70 ++- if bootstrap {
71 +++ if bootstrap && ver < Version::parse("1.50.0").unwrap() {
72 ++ println!("cargo:rustc-env=RUSTC_BOOTSTRAP=1");
73 ++ }
74 ++ }
75
76 diff --git a/www-client/seamonkey/seamonkey-2.53.7.1-r1.ebuild b/www-client/seamonkey/seamonkey-2.53.7.1-r1.ebuild
77 index b2745d4b7e6..7ff2f9c71b4 100644
78 --- a/www-client/seamonkey/seamonkey-2.53.7.1-r1.ebuild
79 +++ b/www-client/seamonkey/seamonkey-2.53.7.1-r1.ebuild
80 @@ -195,6 +195,8 @@ src_prepare() {
81 # https://github.com/JustOff/github-wc-polyfill/issues/10
82 eapply "${FILESDIR}/${PN}-2.53.7.1-cpu_hog_fix.patch"
83
84 + eapply "${FILESDIR}/${PN}-2.53.7.1-rust-1.52.patch" #789981
85 +
86 # Shell scripts sometimes contain DOS line endings; bug 391889
87 grep -rlZ --include="*.sh" $'\r$' . |
88 while read -r -d $'\0' file ; do