commit:     6e2db7c249ef58650278f19e806327359109677b
Author:     WANG Xuerui <xen0n <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  8 10:01:30 2025 +0000
Commit:     WANG Xuerui <xen0n <AT> gentoo <DOT> org>
CommitDate: Sat Mar  8 16:25:00 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e2db7c2

mail-client/thunderbird: add loong support to 136

Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org>

 mail-client/thunderbird/Manifest                 |  1 +
 mail-client/thunderbird/thunderbird-136.0.ebuild | 19 ++++++++++++++-----
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
index 30c2a892e499..9e96c8c814f8 100644
--- a/mail-client/thunderbird/Manifest
+++ b/mail-client/thunderbird/Manifest
@@ -1,5 +1,6 @@
 DIST firefox-128esr-patches-08.tar.xz 17564 BLAKE2B 
d904b74fdae2e76866ded11de5377a7b6883d35996b358ae3419ffb7da53b04b2c7d4bb10d48998a8318a84e8221de39955289cb33a8f278c131b4af2006be62
 SHA512 
344a2d04dec679cd8ed714dcecc9dd5b56696803cee9267e7c0c45c439d78728e7eae674bb5f0a64f2e5802dc59c1ec25f1703885024d88bda8a02e2b3e0d69e
 DIST firefox-128esr-patches-09.tar.xz 17976 BLAKE2B 
78f64f5086951f7bf2b304c1148154647aef5c4e699257cba5e94a83d8d8c159a591d0b2a7a5f8bc0f8ec28d5eae66a0783b45f94b4ef713282a6f88e46c75be
 SHA512 
159d8c94af0f90c10baf7446e573a37397b3be7103e7001fb6b38845a28a41793c21ad24c23e0b3cfc4daa2c3a6040ef701f612693c9f4dfff8534f82e7b18a1
+DIST firefox-136-loong-patches-01.tar.xz 38508 BLAKE2B 
2508fdb9de68bb90edfb3f4a15f79579cd8865cb87ef0a9073c3b740152d857b791cb53c4520a2bdc466f083e7aa6e028a90d44b61b3eea46395f62115b7272a
 SHA512 
e4f83d6a98eb25335de80bf396bfb2d0a362e7509efa898291f524d6fbf20754a278a930d61b3b9727e6b08d8e4959b001c75c2e3f648ce70444b39950307157
 DIST firefox-136-patches-01.tar.xz 12568 BLAKE2B 
9056b1c750eeb7c226bd4ff5ebdb03d491177d93bbee95552f7176903ec8796131a491c39304030370ed55281f92585422e28926b5f7491081d33912360d999f
 SHA512 
48548637f6152fd3a72e283e3d16708a563fe84cd22d84129d5bd58f6b6baf7a6e50d521cb371ef21e7b9f95c13cc72531a3e1ab735abb70c51e5c02424fb2ca
 DIST thunderbird-128.7.0esr-af.xpi 530351 BLAKE2B 
665e3c36027491ec674b4d11f668de264b9e7fdb476930dd151a7df7449759be5768986ac83ad348f6a9e1495ce34faea05a3647e31503a0a531c5ed35dbf516
 SHA512 
18dd42b98b74e951d624a868c89ae9713d5e5b1e991170506a880d2ab8ddb22e834b11a42bf9ab01c2664742eb503afcfbae93dc6baf3c0c2b5ce1322e545632
 DIST thunderbird-128.7.0esr-ar.xpi 686986 BLAKE2B 
4b219c2ddb940ea9363f86167d1d94acb68ebb280a17c761d8a54b09dab85939f4fe861b82c6ffc90b79be061b85167b35e9e96abde1ebb5732d82f59f9e426a
 SHA512 
f9e314831d230b1488b64056caf22a410f4e883c50e697746965949775333f785ed0316d0baac1df460c33f7724eb93a8e0784d7ee99d5fc9513245552f7749e

diff --git a/mail-client/thunderbird/thunderbird-136.0.ebuild 
b/mail-client/thunderbird/thunderbird-136.0.ebuild
index c33f2a728200..9932fc886a7a 100644
--- a/mail-client/thunderbird/thunderbird-136.0.ebuild
+++ b/mail-client/thunderbird/thunderbird-136.0.ebuild
@@ -4,6 +4,7 @@
 EAPI=8
 
 FIREFOX_PATCHSET="firefox-136-patches-01.tar.xz"
+FIREFOX_LOONG_PATCHSET="firefox-136-loong-patches-01.tar.xz"
 
 LLVM_COMPAT=( 17 18 19 )
 
@@ -58,7 +59,10 @@ PATCH_URIS=(
 )
 
 SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> 
${MOZ_P_DISTFILES}.source.tar.xz
-       ${PATCH_URIS[@]}"
+       ${PATCH_URIS[@]}
+       loong? (
+               
https://dev.gentoo.org/~xen0n/distfiles/www-client/${MOZ_PN}/${FIREFOX_LOONG_PATCHSET}
+       )"
 S="${WORKDIR}/${PN}-${PV%_*}"
 
 LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
@@ -517,6 +521,7 @@ src_prepare() {
        fi
 
        eapply "${WORKDIR}/firefox-patches"
+       use loong && eapply "${WORKDIR}/firefox-loong-patches"
 
        # Allow user to apply any additional patches without modifing ebuild
        eapply_user
@@ -532,6 +537,10 @@ src_prepare() {
                        export RUST_TARGET="i686-unknown-linux-musl"
                elif use arm64 ; then
                        export RUST_TARGET="aarch64-unknown-linux-musl"
+               elif use loong; then
+                       # Only the LP64D ABI of LoongArch64 is actively 
supported among
+                       # the wider Linux ecosystem, so the assumption is safe.
+                       export RUST_TARGET="loongarch64-unknown-linux-musl"
                elif use ppc64 ; then
                        export RUST_TARGET="powerpc64le-unknown-linux-musl"
                elif use riscv ; then
@@ -703,7 +712,7 @@ src_configure() {
        mozconfig_add_options_ac '' --enable-update-channel=${update_channel}
 
        # Whitelist to allow unkeyworded arches to build with 
"--disable-rust-simd" by default.
-       if use amd64 || use arm64 ; then
+       if use amd64 || use arm64 || use loong ; then
                mozconfig_add_options_ac '' --enable-rust-simd
        fi
 
@@ -711,7 +720,7 @@ src_configure() {
        # amd64, arm, arm64 & x86.
        # Might want to flip the logic around if Firefox is to support more 
arches.
        # bug 833001, bug 903411#c8
-       if use ppc64 || use riscv; then
+       if use loong || use ppc64 || use riscv; then
                mozconfig_add_options_ac '' --disable-sandbox
        else
                mozconfig_add_options_ac '' --enable-sandbox
@@ -909,8 +918,8 @@ src_configure() {
                else
                        mozconfig_add_options_ac 'relr elf-hack' 
--enable-elf-hack=relr
                fi
-       elif use ppc64 || use riscv ; then
-               # '--disable-elf-hack' is not recognized on ppc64/riscv,
+       elif use loong || use ppc64 || use riscv ; then
+               # '--disable-elf-hack' is not recognized on loong/ppc64/riscv,
                # see bgo #917049, #930046
                :;
        else

Reply via email to