bump(x11/thunderbird): 137.0.1

- Fixes #24070

- makes the `mozconfig.cfg`, `build.sh` and patches of `thunderbird` very similar to `firefox`, except for places where `thunderbird` is different

- `disable-systray-x86_64.patch`: fixes the build of `thunderbird` 136.0.1 for x86_64 Termux specifically. has been tested at runtime on a bare metal 64-bit Android-x86 device, and behaves as expected (uniform behavior with other architectures of Termux `thunderbird` 136.0.1)

- `toolbar-based-custom-compose-window-width-for-ralfwerner.patch`: hardcoded custom dimensions of the edit window formatting toolbar to provide a workaround for edit window minimum text wrapping width high-dpi-scaling low-resolution situations in HTML mode while preserving the formatting toolbar functionality

- `icu-22132.patch`: fixes a bug in `libicu` that has been happening for a long time, which causes these features of `thunderbird` to begin functioning:
  - Search Bar
  - Address Book
  - Customize Toolbars
  - Calendar
  - Tasks
  - Chat
  - Settings Button
  - Hamburger Button
This commit is contained in:
termux-pacman-bot
2025-04-05 16:38:45 +00:00
parent 4d9cc4754d
commit c07038da2a
30 changed files with 876 additions and 344 deletions

View File

@@ -8,6 +8,7 @@ TERMUX_PKG_MAINTAINER="@termux"
# Never forget to always bump revision of reverse dependencies and rebuild them
# when bumping "major" version.
TERMUX_PKG_VERSION="77.1"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/unicode-org/icu/releases/download/release-${TERMUX_PKG_VERSION//./-}/icu4c-${TERMUX_PKG_VERSION//./_}-src.tgz
TERMUX_PKG_SHA256=588e431f77327c39031ffbb8843c0e3bc122c211374485fa87dc5f3faff24061
TERMUX_PKG_AUTO_UPDATE=true

View File

@@ -0,0 +1,41 @@
Fixes the VTIMEZONE generator of libicu producing an invalid VTIMEZONE,
which if unpatched, would cause the error
JavaScript error: resource:///modules/calendar/Ical.sys.mjs, line 1942: ParserError: invalid line (no token ";" or ":") "America/Chicago[2025a]"
in Thunderbird 115 and newer, which would cause multiple UI elements to be missing or broken.
More information:
https://unicode-org.atlassian.net/browse/ICU-22132
https://bugzilla.mozilla.org/show_bug.cgi?id=1843007
Following the example of Arch Linux:
https://gitlab.archlinux.org/archlinux/packaging/packages/icu/-/blob/cf70a1eb2d513d0286fb975fb06abb20442a4358/ICU-22132.patch
Before:
icutzprop: "America/Chicago[2025a]"
After:
icutzprop: "X-TZINFO:America/Chicago[2025a]"
--- a/i18n/vtzone.cpp 2023-07-14 09:05:38.000000000 +0100
+++ b/i18n/vtzone.cpp 2023-07-14 09:05:38.000000000 +0100
@@ -1735,14 +1735,14 @@
}
}
} else {
- UnicodeString icutzprop;
- UVector customProps(nullptr, uhash_compareUnicodeString, status);
+ UVector customProps(uprv_deleteUObject, uhash_compareUnicodeString, status);
if (olsonzid.length() > 0 && icutzver.length() > 0) {
- icutzprop.append(olsonzid);
- icutzprop.append(u'[');
- icutzprop.append(icutzver);
- icutzprop.append(u']');
- customProps.addElement(&icutzprop, status);
+ LocalPointer<UnicodeString> icutzprop(new UnicodeString(ICU_TZINFO_PROP), status);
+ icutzprop->append(olsonzid);
+ icutzprop->append(u'[');
+ icutzprop->append(icutzver);
+ icutzprop->append(u']');
+ customProps.adoptElement(icutzprop.orphan(), status);
}
writeZone(writer, *tz, &customProps, status);
}

View File

@@ -1,14 +1,11 @@
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -499,10 +499,7 @@
raw_os = os = os.replace("/", "_")
@@ -500,7 +500,7 @@
abi = None
sub_configure_alias = triplet
- if "android" in os:
if "android" in os:
- canonical_os = "Android"
- canonical_kernel = "Linux"
- elif os.startswith("linux"):
+ if os.startswith("linux"):
canonical_os = "GNU"
+ canonical_os = "GNU"
canonical_kernel = "Linux"
elif os.startswith("kfreebsd") and os.endswith("-gnu"):
elif os.startswith("linux"):
canonical_os = "GNU"

View File

@@ -33,7 +33,7 @@
assert_rust_compile(target, rustc_target, rustc)
return rustc_target
@@ -599,8 +599,6 @@
@@ -599,8 +609,6 @@
# ==============================================================

View File

@@ -11,7 +11,7 @@
# -isysroot on mac, clang takes the SDKROOT environment variable into
--- a/build/moz.configure/pkg.configure
+++ b/build/moz.configure/pkg.configure
@@ -60,7 +60,7 @@
@@ -56,7 +56,7 @@
@imports(_from="os", _import="environ")
@imports(_from="os", _import="pathsep")
def pkg_config_vars(target, sysroot_path, multiarch_dir):

View File

@@ -1,13 +1,11 @@
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -171,9 +171,7 @@
# ==============================================================
@@ -174,7 +174,7 @@
@depends(target)
def midir_linux_support(target):
- return (
return (
- target.kernel == "Linux" and target.os != "Android" and target.cpu != "riscv64"
- )
+ return
+ False
)
@depends(target, midir_linux_support)

View File

@@ -1,60 +1,14 @@
--- a/dom/media/CubebUtils.cpp
+++ b/dom/media/CubebUtils.cpp
@@ -59,7 +59,7 @@
#define PREF_AUDIOIPC_STACK_SIZE "media.audioipc.stack_size"
#define PREF_AUDIOIPC_SHM_AREA_SIZE "media.audioipc.shm_area_size"
--- a/dom/media/systemservices/VideoEngine.cpp
+++ b/dom/media/systemservices/VideoEngine.cpp
@@ -30,7 +30,7 @@
#define LOG(args) MOZ_LOG(gVideoEngineLog, mozilla::LogLevel::Debug, args)
#define LOG_ENABLED() MOZ_LOG_TEST(gVideoEngineLog, mozilla::LogLevel::Debug)
-#if defined(XP_LINUX) || defined(XP_MACOSX) || defined(XP_WIN)
+#if defined(XP_LINUX) && !defined(__TERMUX__) || defined(XP_MACOSX) || defined(XP_WIN)
# define MOZ_CUBEB_REMOTING
#endif
-#if defined(ANDROID)
+#if defined(ANDROID) && !defined(__TERMUX__)
int VideoEngine::SetAndroidObjects() {
LOG(("%s", __PRETTY_FUNCTION__));
--- a/gfx/vr/external_api/moz_external_vr.h
+++ b/gfx/vr/external_api/moz_external_vr.h
@@ -70,7 +70,7 @@
static const int kVRLayerMaxCount = 8;
static const int kVRHapticsMaxCount = 32;
-#if defined(__ANDROID__)
+#if defined(__ANDROID__) && !defined(__TERMUX__)
typedef uint64_t VRLayerTextureHandle;
#elif defined(XP_MACOSX)
typedef uint32_t VRLayerTextureHandle;
@@ -666,7 +666,7 @@
};
struct VRBrowserState {
-#if defined(__ANDROID__)
+#if defined(__ANDROID__) && !defined(__TERMUX__)
bool shutdown;
#endif // defined(__ANDROID__)
/**
@@ -783,7 +783,7 @@
struct VRExternalShmem {
int32_t version;
int32_t size;
-#if defined(__ANDROID__)
+#if defined(__ANDROID__) && !defined(__TERMUX__)
pthread_mutex_t systemMutex;
pthread_mutex_t geckoMutex;
pthread_mutex_t servoMutex;
@@ -794,14 +794,14 @@
int64_t generationA;
#endif // defined(__ANDROID__)
VRSystemState state;
-#if !defined(__ANDROID__)
+#if !(defined(__ANDROID__) && !defined(__TERMUX__))
int64_t generationB;
int64_t geckoGenerationA;
int64_t servoGenerationA;
#endif // !defined(__ANDROID__)
VRBrowserState geckoState;
VRBrowserState servoState;
-#if !defined(__ANDROID__)
+#if !(defined(__ANDROID__) && !defined(__TERMUX__))
int64_t geckoGenerationB;
int64_t servoGenerationB;
#endif // !defined(__ANDROID__)
--- a/ipc/chromium/src/base/lock_impl_posix.cc
+++ b/ipc/chromium/src/base/lock_impl_posix.cc
@@ -22,7 +22,7 @@
@@ -66,142 +20,69 @@
# define PRIORITY_INHERITANCE_LOCKS_POSSIBLE() 0
#else
# define PRIORITY_INHERITANCE_LOCKS_POSSIBLE() 1
--- a/js/src/ctypes/libffi/src/closures.c
+++ b/js/src/ctypes/libffi/src/closures.c
@@ -112,7 +112,7 @@
#else /* !NetBSD with PROT_MPROTECT */
#if !FFI_MMAP_EXEC_WRIT && !FFI_EXEC_TRAMPOLINE_TABLE
-# if __linux__ && !defined(__ANDROID__)
+# if __linux__ && !defined(__TERMUX__)
/* This macro indicates it may be forbidden to map anonymous memory
with both write and execute permission. Code compiled when this
option is defined will attempt to map such pages once, but if it
--- a/memory/build/malloc_decls.h
+++ b/memory/build/malloc_decls.h
@@ -39,7 +39,7 @@
// consistent declare certain functions as `throw()`, though.
// Bionic and OS X don't seem to care about `throw()`ness.
-# if defined(ANDROID) || defined(XP_DARWIN)
+# if defined(__TERMUX__) || defined(XP_DARWIN)
# undef NOTHROW_MALLOC_DECL
# define NOTHROW_MALLOC_DECL MALLOC_DECL
// Some places don't care about the distinction.
--- a/dom/media/CubebUtils.cpp
+++ b/dom/media/CubebUtils.cpp
@@ -57,7 +57,7 @@
#define PREF_AUDIOIPC_STACK_SIZE "media.audioipc.stack_size"
#define PREF_AUDIOIPC_SHM_AREA_SIZE "media.audioipc.shm_area_size"
-#if defined(XP_LINUX) || defined(XP_MACOSX) || defined(XP_WIN)
+#if (defined(XP_LINUX) && !defined(__TERMUX__)) || defined(XP_MACOSX) || defined(XP_WIN)
# define MOZ_CUBEB_REMOTING
#endif
--- a/mozglue/misc/ConditionVariable_posix.cpp
+++ b/mozglue/misc/ConditionVariable_posix.cpp
@@ -23,7 +23,7 @@
// Android 4.4 or earlier & macOS 10.12 has the clock functions, but not
// pthread_condattr_setclock.
#if defined(HAVE_CLOCK_MONOTONIC) && \
- !(defined(__ANDROID__) && __ANDROID_API__ < 21) && !defined(__APPLE__)
+ defined(__TERMUX__)
# define CV_USE_CLOCK_API
#endif
--- a/mozglue/misc/StackWalk.cpp
+++ b/mozglue/misc/StackWalk.cpp
@@ -759,7 +759,7 @@
@@ -692,7 +692,7 @@
stackEnd = __libc_stack_end;
# elif defined(XP_DARWIN)
stackEnd = pthread_get_stackaddr_np(pthread_self());
-# elif defined(ANDROID)
+# elif defined(ANDROID) || defined(__TERMUX__)
+# elif defined(__TERMUX__)
pthread_attr_t sattr;
pthread_attr_init(&sattr);
pthread_getattr_np(pthread_self(), &sattr);
--- a/tools/profiler/core/platform.cpp
+++ b/tools/profiler/core/platform.cpp
@@ -140,7 +140,7 @@
# include <errno.h>
#endif
-#if defined(GP_OS_android)
+#if defined(GP_OS_android) && !defined(__TERMUX__)
# include "JavaExceptions.h"
# include "mozilla/java/GeckoJavaSamplerNatives.h"
# include "mozilla/jni/Refs.h"
@@ -289,7 +289,7 @@
mozilla::Atomic<int, mozilla::MemoryOrdering::Relaxed> gSkipSampling;
-#if defined(GP_OS_android)
+#if defined(GP_OS_android) && !defined(__TERMUX__)
class GeckoJavaSampler
: public java::GeckoJavaSampler::Natives<GeckoJavaSampler> {
private:
@@ -396,7 +396,7 @@
#undef ADD_FEATURE
// Now remove features not supported on this platform/configuration.
-#if !defined(GP_OS_android)
+#if !(defined(GP_OS_android) && !defined(__TERMUX__))
ProfilerFeature::ClearJava(features);
#endif
#if !defined(HAVE_NATIVE_UNWIND)
@@ -3216,7 +3216,7 @@
aPreRecordedMetaInformation.mProcessInfoCpuCount);
}
-#if defined(GP_OS_android)
+#if defined(GP_OS_android) && !defined(__TERMUX__)
jni::String::LocalRef deviceInformation =
java::GeckoJavaSampler::GetDeviceInformation();
aWriter.StringProperty("device", deviceInformation->ToCString());
@@ -3288,7 +3288,7 @@
}
}
-#if defined(GP_OS_android)
+#if defined(GP_OS_android) && !defined(__TERMUX__)
template <int N>
static bool StartsWith(const nsACString& string, const char (&prefix)[N]) {
if (N - 1 > string.Length()) {
@@ -3521,7 +3521,7 @@
}
SLOW_DOWN_FOR_TESTING();
-#if defined(GP_OS_android)
+#if defined(GP_OS_android) && !defined(__TERMUX__)
// Java thread profile data should be collected before serializing the meta
// object. This is because Java thread adds some markers with marker schema
// objects. And these objects should be added before the serialization of the
@@ -3659,7 +3659,7 @@
}
aProgressLogger.SetLocalProgress(92_pc, "Wrote samples and markers");
-#if defined(GP_OS_android)
+#if defined(GP_OS_android) && !defined(__TERMUX__)
if (ActivePS::FeatureJava(aLock)) {
for (java::GeckoJavaSampler::ThreadInfo::LocalRef& threadInfo :
javaThreads) {
@@ -5682,7 +5682,7 @@
profiler_init_signal_handlers();
#endif
-#if defined(GP_OS_android)
+#if defined(GP_OS_android) && !defined(__TERMUX__)
if (jni::IsAvailable()) {
GeckoJavaSampler::Init();
}
@@ -6386,7 +6386,7 @@
// Setup support for pushing/popping labels in mozglue.
RegisterProfilerLabelEnterExit(MozGlueLabelEnter, MozGlueLabelExit);
-#if defined(GP_OS_android)
+#if defined(GP_OS_android) && !defined(__TERMUX__)
if (ActivePS::FeatureJava(aLock)) {
int javaInterval = interval;
// Java sampling doesn't accurately keep up with the sampling rate that is
@@ -6567,7 +6567,7 @@
StopAudioCallbackTracing();
}
-#if defined(GP_OS_android)
+#if defined(GP_OS_android) && !defined(__TERMUX__)
if (ActivePS::FeatureJava(aLock)) {
java::GeckoJavaSampler::Stop();
}
@@ -6747,7 +6747,7 @@
return GenericPromise::CreateAndResolve(/* unused */ true, __func__);
}
-#if defined(GP_OS_android)
+#if defined(GP_OS_android) && !defined(__TERMUX__)
if (ActivePS::FeatureJava(lock) && !ActivePS::IsSamplingPaused(lock)) {
// Not paused yet, so this is the first pause, let Java know.
// TODO: Distinguish Pause and PauseSampling in Java.
@@ -6783,7 +6783,7 @@
ActivePS::SetIsPaused(lock, false);
RacyFeatures::SetUnpaused();
-#if defined(GP_OS_android)
+#if defined(GP_OS_android) && !defined(__TERMUX__)
if (ActivePS::FeatureJava(lock) && !ActivePS::IsSamplingPaused(lock)) {
// Not paused anymore, so this is the last unpause, let Java know.
// TODO: Distinguish Unpause and UnpauseSampling in Java.
@@ -6825,7 +6825,7 @@
return GenericPromise::CreateAndResolve(/* unused */ true, __func__);
}
-#if defined(GP_OS_android)
+#if defined(GP_OS_android) && !defined(__TERMUX__)
if (ActivePS::FeatureJava(lock) && !ActivePS::IsSamplingPaused(lock)) {
// Not paused yet, so this is the first pause, let Java know.
// TODO: Distinguish Pause and PauseSampling in Java.
@@ -6862,7 +6862,7 @@
ActivePS::SetIsSamplingPaused(lock, false);
RacyFeatures::SetSamplingUnpaused();
-#if defined(GP_OS_android)
+#if defined(GP_OS_android) && !defined(__TERMUX__)
if (ActivePS::FeatureJava(lock) && !ActivePS::IsSamplingPaused(lock)) {
// Not paused anymore, so this is the last unpause, let Java know.
// TODO: Distinguish Unpause and UnpauseSampling in Java.
--- a/nsprpub/pr/src/pthreads/ptsynch.c
+++ b/nsprpub/pr/src/pthreads/ptsynch.c
@@ -864,7 +864,7 @@
*/
# if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) || \
(defined(FREEBSD) && __FreeBSD_version < 1200059) || \
- defined(OPENBSD) || defined(DARWIN)
+ defined(OPENBSD) || defined(DARWIN) || defined(__TERMUX__)
/* union semun is defined by including <sys/sem.h> */
# else
/* according to X/OPEN we have to define it ourselves */

View File

@@ -1,8 +1,12 @@
--- a/ipc/chromium/src/base/shared_memory_posix.cc
+++ b/ipc/chromium/src/base/shared_memory_posix.cc
SharedMemory_posix.cpp is being transitioned away from, and will be deleted in a
future firefox version after this commit
https://github.com/mozilla/gecko-dev/commit/8cbcede05e9563dae119db2105668dfa134c6691
--- a/ipc/glue/SharedMemory_posix.cpp
+++ b/ipc/glue/SharedMemory_posix.cpp
@@ -40,6 +40,65 @@
#include "mozilla/UniquePtrExtensions.h"
#include "prenv.h"
#include "nsXULAppAPI.h" // for XRE_IsParentProcess
+static int shm_unlink(const char *name) {
+ size_t namelen;
@@ -63,15 +67,92 @@
+ return fd;
+}
+
namespace base {
namespace mozilla::ipc {
void SharedMemory::MappingDeleter::operator()(void* ptr) {
@@ -153,7 +212,7 @@
void SharedMemory::ResetImpl() {
@@ -101,7 +160,7 @@
// FreeBSD in version 13.
# if !defined(HAVE_MEMFD_CREATE) && defined(XP_LINUX) && \
- defined(SYS_memfd_create)
+ defined(SYS_memfd_create) && !defined(__TERMUX__)
#if !defined(HAVE_MEMFD_CREATE) && defined(XP_LINUX) && \
- defined(SYS_memfd_create)
+ defined(SYS_memfd_create) && !defined(__TERMUX__)
// Older libc versions (e.g., glibc before 2.27) don't have the
// wrapper, but we can supply our own; see `linux_memfd_defs.h`.
--- a/ipc/glue/SharedMemoryPlatform_posix.cpp
+++ b/ipc/glue/SharedMemoryPlatform_posix.cpp
@@ -39,6 +39,65 @@
#include "prenv.h"
#include "nsXULAppAPI.h" // for XRE_IsParentProcess
+static int shm_unlink(const char *name) {
+ size_t namelen;
+ char *fname;
+
+ /* Construct the filename. */
+ while (name[0] == '/') ++name;
+
+ if (name[0] == '\0') {
+ /* The name "/" is not supported. */
+ errno = EINVAL;
+ return -1;
+ }
+
+ namelen = strlen(name);
+ fname = (char *) alloca(sizeof("@TERMUX_PREFIX@/tmp/") - 1 + namelen + 1);
+ memcpy(fname, "@TERMUX_PREFIX@/tmp/", sizeof("@TERMUX_PREFIX@/tmp/") - 1);
+ memcpy(fname + sizeof("@TERMUX_PREFIX@/tmp/") - 1, name, namelen + 1);
+
+ return unlink(fname);
+}
+
+static int shm_open(const char *name, int oflag, mode_t mode) {
+ size_t namelen;
+ char *fname;
+ int fd;
+
+ /* Construct the filename. */
+ while (name[0] == '/') ++name;
+
+ if (name[0] == '\0') {
+ /* The name "/" is not supported. */
+ errno = EINVAL;
+ return -1;
+ }
+
+ namelen = strlen(name);
+ fname = (char *) alloca(sizeof("@TERMUX_PREFIX@/tmp/") - 1 + namelen + 1);
+ memcpy(fname, "@TERMUX_PREFIX@/tmp/", sizeof("@TERMUX_PREFIX@/tmp/") - 1);
+ memcpy(fname + sizeof("@TERMUX_PREFIX@/tmp/") - 1, name, namelen + 1);
+
+ fd = open(fname, oflag, mode);
+ if (fd != -1) {
+ /* We got a descriptor. Now set the FD_CLOEXEC bit. */
+ int flags = fcntl(fd, F_GETFD, 0);
+ flags |= FD_CLOEXEC;
+ flags = fcntl(fd, F_SETFD, flags);
+
+ if (flags == -1) {
+ /* Something went wrong. We cannot return the descriptor. */
+ int save_errno = errno;
+ close(fd);
+ fd = -1;
+ errno = save_errno;
+ }
+ }
+
+ return fd;
+}
+
namespace mozilla::ipc::shared_memory {
// memfd_create is a nonstandard interface for creating anonymous
@@ -101,7 +160,7 @@
// FreeBSD in version 13.
#if !defined(HAVE_MEMFD_CREATE) && defined(XP_LINUX) && \
- defined(SYS_memfd_create)
+ defined(SYS_memfd_create) && !defined(__TERMUX__)
// Older libc versions (e.g., glibc before 2.27) don't have the
// wrapper, but we can supply our own; see `linux_memfd_defs.h`.

View File

@@ -1,56 +1,44 @@
--- a/toolkit/components/extensions/storage/moz.build
+++ b/toolkit/components/extensions/storage/moz.build
@@ -17,7 +17,7 @@
@@ -11,7 +11,7 @@
# a delegate for consumers to use instead. Android Components can then provide
# an implementation of the delegate that's backed by the Rust component. For
# details, please see bug 1626506, comment 4.
-if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
+if False:
EXPORTS.mozilla.extensions.storage += [
"ExtensionStorageComponents.h",
EXTRA_JS_MODULES += [
"ExtensionStorageComponents.sys.mjs",
]
--- a/toolkit/library/rust/shared/Cargo.toml
+++ b/toolkit/library/rust/shared/Cargo.toml
@@ -111,13 +111,14 @@
# Since we're building with at least rustc 1.63, enable rust 1.57 features (use of try_reserve methods).
fallible_collections = { version = "0.4", features = ["rust_1_57"] }
@@ -112,7 +112,7 @@
[target.'cfg(any(target_os = "macos",target_os = "ios", all(target_os = "windows", not(target_arch = "aarch64"))))'.dependencies]
osclientcerts = { path = "../../../../security/manager/ssl/osclientcerts" }
-[target.'cfg(not(target_os = "android"))'.dependencies]
+[target.'cfg(target_os = "android")'.dependencies]
gkrust-uniffi-components = { path = "../../../components/uniffi-bindgen-gecko-js/components/", features = ["xpcom"] }
gkrust-uniffi-fixtures = { path = "../../../components/uniffi-bindgen-gecko-js/fixtures/", features = ["xpcom"], optional = true }
viaduct = "0.1"
-webext_storage_bridge = { path = "../../../components/extensions/storage/webext_storage_bridge" }
tabs = { version = "0.1" }
suggest = { version = "0.1" }
relevancy = { version = "0.1" }
+[target.'cfg(not(target_os = "android"))'.dependencies]
+webext_storage_bridge = { path = "../../../components/extensions/storage/webext_storage_bridge" }
+
[target.'cfg(target_os = "windows")'.dependencies]
detect_win32k_conflicts = { path = "../../../xre/detect_win32k_conflicts" }
--- a/toolkit/library/rust/shared/lib.rs
+++ b/toolkit/library/rust/shared/lib.rs
@@ -55,17 +55,14 @@
#[cfg(not(target_os = "android"))]
extern crate webext_storage_bridge;
@@ -55,7 +55,6 @@
extern crate audio_thread_priority;
-#[cfg(not(target_os = "android"))]
extern crate tabs;
-#[cfg(not(target_os = "android"))]
mod reexport_appservices_uniffi_scaffolding {
tabs::uniffi_reexport_scaffolding!();
relevancy::uniffi_reexport_scaffolding!();
suggest::uniffi_reexport_scaffolding!();
}
-#[cfg(not(target_os = "android"))]
extern crate suggest;
extern crate webext_storage;
#[cfg(feature = "webrtc")]
@@ -95,7 +92,6 @@
extern crate l10nregistry_ffi;
extern crate localization_ffi;
@@ -91,13 +90,11 @@
all(target_os = "windows", not(target_arch = "aarch64"))))]
extern crate osclientcerts;
-#[cfg(not(target_os = "android"))]
extern crate gkrust_uniffi_components;
#[cfg(feature = "uniffi_fixtures")]
extern crate gkrust_uniffi_fixtures;
-#[cfg(not(target_os = "android"))]
extern crate viaduct;

View File

@@ -0,0 +1,11 @@
--- a/gfx/cairo/libpixman/src/pixman-arm.c
+++ b/gfx/cairo/libpixman/src/pixman-arm.c
@@ -96,7 +96,7 @@
#elif defined(__ANDROID__) || defined(ANDROID) /* Android */
-#include <cpu-features.h>
+#include <ndk_compat/cpu-features.h>
static arm_cpu_features_t
detect_cpu_features (void)

View File

@@ -1,17 +0,0 @@
--- a/intl/lwbrk/LineBreaker.cpp
+++ b/intl/lwbrk/LineBreaker.cpp
@@ -434,7 +434,13 @@
/* REGIONAL_INDICATOR = 39, [RI] */ CLASS_CHARACTER,
/* E_BASE = 40, [EB] */ CLASS_BREAKABLE,
/* E_MODIFIER = 41, [EM] */ CLASS_CHARACTER,
- /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER};
+ /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER,
+ /* AKSARA = 43, [AK] */ CLASS_CHARACTER,
+ /* AKSARA_PREBASE = 44, [AP] */ CLASS_CHARACTER,
+ /* AKSARA_START = 45, [AS] */ CLASS_CHARACTER,
+ /* VIRAMA_FINAL = 46, [VF] */ CLASS_CHARACTER,
+ /* VIRAMA = 47, [VI] */ CLASS_CHARACTER,
+ };
static_assert(U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass),
"Gecko vs ICU LineBreak class mismatch");

View File

@@ -1,33 +0,0 @@
--- a/gfx/cairo/libpixman/src/pixman-arm.c
+++ b/gfx/cairo/libpixman/src/pixman-arm.c
@@ -96,7 +96,7 @@
#elif defined(__ANDROID__) || defined(ANDROID) /* Android */
-#include <cpu-features.h>
+#include <ndk_compat/cpu-features.h>
static arm_cpu_features_t
detect_cpu_features (void)
--- a/media/libvpx/libvpx/vpx_ports/arm_cpudetect.h
+++ b/media/libvpx/libvpx/vpx_ports/arm_cpudetect.h
@@ -34,7 +34,7 @@
// Use getauxval() when targeting (64-bit) Android with API level >= 18.
// getauxval() is supported since Android API level 18 (Android 4.3.)
// First Android version with 64-bit support was Android 5.x (API level 21).
-#include <cpu-features.h>
+#include <ndk_compat/cpu-features.h>
#endif
static INLINE int arm_cpu_env_flags(int *flags) {
--- a/third_party/aom/aom_ports/arm_cpudetect.h
+++ b/third_party/aom/aom_ports/arm_cpudetect.h
@@ -36,7 +36,7 @@
// Use getauxval() when targeting (64-bit) Android with API level >= 18.
// getauxval() is supported since Android API level 18 (Android 4.3.)
// First Android version with 64-bit support was Android 5.x (API level 21).
-#include <cpu-features.h>
+#include <ndk_compat/cpu-features.h>
#endif
static bool arm_cpu_env_flags(int *flags) {

View File

@@ -1,4 +1,8 @@
Fix SIGBUS error on Arm. Also apply to other arches just in case.
Fix SIGBUS Firefox error on Arm. Also apply to other arches just in case.
https://github.com/termux/termux-packages/issues/15901
https://github.com/mozilla/gecko-dev/commit/d7ba2cef0e9b74addedda4bc7f57daf10599a5dc
https://github.com/google/cityhash/blob/master/src/city.cc
--- a/other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp
+++ b/other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp

View File

@@ -0,0 +1,12 @@
--- a/toolkit/xre/glxtest/glxtest.cpp
+++ b/toolkit/xre/glxtest/glxtest.cpp
@@ -946,7 +946,9 @@
log("GLX_TEST: childgltest start\n");
// Get a list of all GPUs from the PCI bus.
+#if !defined(__TERMUX__)
get_pci_status();
+#endif
#ifdef MOZ_WAYLAND
if (aWayland) {

View File

@@ -0,0 +1,11 @@
--- a/modules/zlib/src/gzguts.h
+++ b/modules/zlib/src/gzguts.h
@@ -3,6 +3,8 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
+#include <unistd.h>
+
#ifdef _LARGEFILE64_SOURCE
# ifndef _LARGEFILE_SOURCE
# define _LARGEFILE_SOURCE 1

View File

@@ -1,11 +0,0 @@
--- a/gfx/graphite2/src/MozGrMalloc.h
+++ b/gfx/graphite2/src/MozGrMalloc.h
@@ -12,7 +12,7 @@
#include "mozilla/mozalloc.h"
-#if defined(XP_LINUX)
+#if defined(XP_LINUX) && !defined(__TERMUX__)
#define malloc moz_xmalloc
#define calloc moz_xcalloc

View File

@@ -1,3 +1,5 @@
https://github.com/termux/termux-packages/issues/19050
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -2619,6 +2619,8 @@

View File

@@ -0,0 +1,10 @@
--- a/intl/components/src/TimeZone.cpp
+++ b/intl/components/src/TimeZone.cpp
@@ -4,6 +4,7 @@
#include "mozilla/intl/TimeZone.h"
+#include "mozilla/Try.h"
#include "mozilla/Vector.h"
#include <algorithm>

View File

@@ -2,7 +2,7 @@ It uses `android_res_nquery`, but this function only got added in API level 29
--- a/netwerk/dns/nsHostResolver.cpp
+++ b/netwerk/dns/nsHostResolver.cpp
@@ -237,6 +237,8 @@
@@ -210,6 +210,8 @@
// native HTTPS records on Win 11 for now.
sNativeHTTPSSupported = StaticPrefs::network_dns_native_https_query_win10() ||
mozilla::IsWin11OrLater();
@@ -13,15 +13,17 @@ It uses `android_res_nquery`, but this function only got added in API level 29
sNativeHTTPSSupported = jni::GetAPIVersion() >= 29;
--- a/netwerk/dns/moz.build
+++ b/netwerk/dns/moz.build
@@ -59,15 +59,7 @@
@@ -53,17 +53,7 @@
"nsEffectiveTLDService.cpp", # Excluded from UNIFIED_SOURCES due to special build flags.
]
-if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
- SOURCES += ["PlatformDNSWin.cpp"]
-elif CONFIG["OS_TARGET"] == "Linux" or CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
-elif CONFIG["OS_TARGET"] == "Linux":
- SOURCES += ["PlatformDNSUnix.cpp"]
- OS_LIBS += ["resolv"]
-elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
- SOURCES += ["PlatformDNSMac.cpp"]
-elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
- SOURCES += ["PlatformDNSAndroid.cpp"]
-else:

View File

@@ -0,0 +1,17 @@
https://github.com/termux/termux-packages/issues/18792
https://bugzilla.mozilla.org/show_bug.cgi?id=1637465
This should be a temporary measure. Look into enable building the same
feature set as desktop.
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -3711,7 +3711,7 @@
pref("webextensions.storage.sync.enabled", true);
// Should we use the old kinto-based implementation of storage.sync? To be removed in bug 1637465.
-pref("webextensions.storage.sync.kinto", false);
+pref("webextensions.storage.sync.kinto", true);
// Server used by the old kinto-based implementation of storage.sync.
pref("webextensions.storage.sync.serverURL", "https://webextensions.settings.services.mozilla.com/v1");

View File

@@ -0,0 +1,16 @@
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -1689,12 +1689,7 @@
let cached_programs = program_cache.map(|program_cache| Rc::clone(&program_cache.rc_get()));
- let color = if cfg!(target_os = "android") {
- // The color is for avoiding black flash before receiving display list.
- ColorF::new(1.0, 1.0, 1.0, 1.0)
- } else {
- ColorF::new(0.0, 0.0, 0.0, 0.0)
- };
+ let color = ColorF::new(0.0, 0.0, 0.0, 0.0);
let compositor_config = if software {
CompositorConfig::Native {

View File

@@ -0,0 +1,65 @@
https://github.com/termux/termux-packages/issues/22907
--- a/layout/generic/IntrinsicISizesCache.h
+++ b/layout/generic/IntrinsicISizesCache.h
@@ -131,25 +131,14 @@
};
// If the high bit of mOutOfLine is 1, then it points to an OutOfLineCache.
+ bool mIsOutOfLine = false;
union {
InlineCache mInline;
- struct {
-#ifndef HAVE_64BIT_BUILD
- uintptr_t mPadding = 0;
-#endif
- uintptr_t mOutOfLine = 0;
- };
+ uintptr_t mOutOfLine = 0;
};
- static constexpr uintptr_t kHighBit = uintptr_t(1)
- << (sizeof(void*) * CHAR_BIT - 1);
-
bool IsOutOfLine() const {
-#ifdef HAVE_64BIT_BUILD
- return mOutOfLine & kHighBit;
-#else
- return mPadding & kHighBit;
-#endif
+ return mIsOutOfLine;
}
bool IsInline() const { return !IsOutOfLine(); }
OutOfLineCache* EnsureOutOfLine() {
@@ -159,13 +148,8 @@
auto inlineCache = mInline;
auto* ool = new OutOfLineCache();
ool->mCacheWithoutPercentageBasis = inlineCache;
-#ifdef HAVE_64BIT_BUILD
- MOZ_ASSERT((reinterpret_cast<uintptr_t>(ool) & kHighBit) == 0);
- mOutOfLine = reinterpret_cast<uintptr_t>(ool) | kHighBit;
-#else
mOutOfLine = reinterpret_cast<uintptr_t>(ool);
- mPadding = kHighBit;
-#endif
+ mIsOutOfLine = true;
MOZ_ASSERT(IsOutOfLine());
return ool;
}
@@ -174,16 +158,10 @@
if (!IsOutOfLine()) {
return nullptr;
}
-#ifdef HAVE_64BIT_BUILD
- return reinterpret_cast<OutOfLineCache*>(mOutOfLine & ~kHighBit);
-#else
return reinterpret_cast<OutOfLineCache*>(mOutOfLine);
-#endif
}
};
-static_assert(sizeof(IntrinsicISizesCache) == 8, "Unexpected cache size");
-
} // namespace mozilla
#endif

View File

@@ -0,0 +1,31 @@
Fixes a crash in the command "firefox -headless" when run with no X11 server present
in all distros when firefox was built with the edge case intersection of:
with MOZ_HAS_REMOTE, with MOZ_X11, without MOZ_ENABLE_DBUS and without MOZ_WAYLAND
as described here https://github.com/termux/termux-packages/issues/22286
and here https://bugzilla.mozilla.org/show_bug.cgi?id=1946405
--- a/toolkit/components/remote/nsGTKRemoteServer.cpp
+++ b/toolkit/components/remote/nsGTKRemoteServer.cpp
@@ -18,9 +18,7 @@
#include "nsGTKToolkit.h"
-#ifdef MOZ_WAYLAND
-# include "mozilla/WidgetUtilsGtk.h"
-#endif
+#include "mozilla/WidgetUtilsGtk.h"
nsresult nsGTKRemoteServer::Startup(const char* aAppName,
const char* aProfileName) {
@@ -36,6 +34,10 @@ nsresult nsGTKRemoteServer::Startup(const char* aAppName,
}
#endif
+ if (!mozilla::widget::GdkIsX11Display()) {
+ return NS_ERROR_FAILURE;
+ }
+
XRemoteBaseStartup(aAppName, aProfileName);
mServerWindow = gtk_invisible_new();

View File

@@ -1,3 +1,5 @@
Thunderbird-only patch
--- a/comm/chat/modules/CLib.sys.mjs
+++ b/comm/chat/modules/CLib.sys.mjs
@@ -39,7 +39,7 @@

View File

@@ -1,3 +1,7 @@
firefox does not need this yet because Wayland is disabled in firefox
because of an issue that does not seem reproducible in Thunderbird
https://github.com/termux/termux-packages/pull/19441#issuecomment-2000151761
--- a/third_party/wayland-proxy/wayland-proxy.cpp
+++ b/third_party/wayland-proxy/wayland-proxy.cpp
@@ -739,7 +739,9 @@

View File

@@ -0,0 +1,23 @@
For some reason, thunderbird currently has a system tray icon that upstream only
appears to have enabled on x86_64 GNU/Linux X11
(not ARM GNU/Linux X11 or 32-bit x86 GNU/Linux X11).
since the system tray code appears to have a dependency on dbus, but this thunderbird
is built with --disable-dbus, this disables the system tray code
(otherwise this other error would happen)
error: could not find system library 'dbus-1' required by the 'libdbus-sys' crate
This fixes this build error when targeting x86_64:
ld.lld: error: undefined symbol: nsLinuxSysTrayHandlerConstructor
--- a/comm/mailnews/base/src/components.conf
+++ b/comm/mailnews/base/src/components.conf
@@ -338,7 +338,7 @@ elif buildconfig.substs["OS_ARCH"] == "WINNT":
"headers": ["/comm/mailnews/base/src/nsMessengerWinIntegration.h"],
},
]
-elif buildconfig.substs["OS_ARCH"] == "Linux" and buildconfig.substs["TARGET_CPU"] == "x86_64":
+elif buildconfig.substs["OS_ARCH"] == "Linux" and buildconfig.substs["TARGET_CPU"] == "Disabling this":
Classes += [
{
"cid": "{d9e45fee-1dd1-11b2-938c-9147855ed837}",

View File

@@ -0,0 +1,396 @@
Hardcodes a second formatting toolbar in the HTML mode of the message composer
and moves some buttons into it in order to provide a workaround for
minimum text wrapping window width on high-DPI low-resolution devices
This effectively hardcodes the formatting toolbar into a different shape
that sacrifices some minimum vertical screen space to gain some minimum
horizontal screen space
Requested by Ralf Werner
Discussion: https://github.com/termux/termux-packages/pull/23911
--- a/comm/mail/components/compose/content/MsgComposeCommands.js
+++ b/comm/mail/components/compose/content/MsgComposeCommands.js
@@ -1157,7 +1157,8 @@ var defaultController = {
return gMsgCompose && gMsgCompose.composeHTML;
},
doCommand() {
- goToggleToolbar("FormatToolbar", "menu_showFormatToolbar");
+ goToggleToolbar("FormatToolbarOne", "menu_showFormatToolbar");
+ goToggleToolbar("FormatToolbarTwo", "menu_showFormatToolbar");
},
},
--- /dev/null
+++ b/comm/mail/components/compose/content/editFormatButtonsOne.inc.xhtml
@@ -0,0 +1,71 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+ <!-- Formatting toolbar items. "value" are HTML tagnames, don't translate -->
+ <menulist id="ParagraphSelect"
+ class="toolbar-focustarget"
+ oncommand="setParagraphState(event);"
+ crop="end"
+ tooltiptext="&ParagraphSelect.tooltip;"
+ observes="cmd_renderedHTMLEnabler">
+ <menupopup id="ParagraphPopup">
+ <menuitem id="toolbarmenu_bodyText" label="&bodyTextCmd.label;" value=""/>
+ <menuitem id="toolbarmenu_paragraph" label="&paragraphParagraphCmd.label;" value="p"/>
+ <menuitem id="toolbarmenu_h1" label="&heading1Cmd.label;" value="h1"/>
+ <menuitem id="toolbarmenu_h2" label="&heading2Cmd.label;" value="h2"/>
+ <menuitem id="toolbarmenu_h3" label="&heading3Cmd.label;" value="h3"/>
+ <menuitem id="toolbarmenu_h4" label="&heading4Cmd.label;" value="h4"/>
+ <menuitem id="toolbarmenu_h5" label="&heading5Cmd.label;" value="h5"/>
+ <menuitem id="toolbarmenu_h6" label="&heading6Cmd.label;" value="h6"/>
+ <menuitem id="toolbarmenu_address" label="&paragraphAddressCmd.label;" value="address"/>
+ <menuitem id="toolbarmenu_pre" label="&paragraphPreformatCmd.label;" value="pre"/>
+ </menupopup>
+ </menulist>
+
+ <!-- "value" are HTML tagnames, don't translate -->
+ <menulist id="FontFaceSelect"
+ class="toolbar-focustarget"
+ oncommand="doStatefulCommand('cmd_fontFace', event.target.value)"
+ crop="center"
+ sizetopopup="pref"
+ tooltiptext="&FontFaceSelect.tooltip;"
+ observes="cmd_renderedHTMLEnabler">
+ <menupopup id="FontFacePopup">
+ <menuitem id="toolbarmenu_fontVarWidth" label="&fontVarWidth.label;" value=""/>
+ <menuitem id="toolbarmenu_fontFixedWidth" label="&fontFixedWidth.label;" value="monospace"/>
+ <menuseparator id="toolbarmenuAfterGenericFontsSeparator"/>
+ <menuitem id="toolbarmenu_fontHelvetica" label="&fontHelvetica.label;"
+ value="Helvetica, Arial, sans-serif"
+ value_parsed="helvetica,arial,sans-serif"/>
+ <menuitem id="toolbarmenu_fontTimes" label="&fontTimes.label;"
+ value="Times New Roman, Times, serif"
+ value_parsed="times new roman,times,serif"/>
+ <menuitem id="toolbarmenu_fontCourier" label="&fontCourier.label;"
+ value="Courier New, Courier, monospace"
+ value_parsed="courier new,courier,monospace"/>
+ <menuseparator id="toolbarmenuAfterDefaultFontsSeparator"
+ class="fontFaceMenuAfterDefaultFonts"/>
+ <menuseparator id="toolbarmenuAfterUsedFontsSeparator"
+ class="fontFaceMenuAfterUsedFonts"
+ hidden="true"/>
+ <!-- Local font face items added here by initLocalFontFaceMenu() -->
+ </menupopup>
+ </menulist>
+
+ <toolbaritem id="color-buttons-container"
+ class="formatting-button"
+ align="center">
+ <stack id="ColorButtons">
+ <box class="color-button" id="BackgroundColorButton"
+ onclick="if (!this.hasAttribute('disabled') || this.getAttribute('disabled') != 'true') { EditorSelectColor('', event); }"
+ tooltiptext="&BackgroundColorButton.tooltip;"
+ observes="cmd_backgroundColor"
+ oncommand="/* See MsgComposeCommands.js::updateAllItems for why this attribute is needed here. */"/>
+ <box class="color-button" id="TextColorButton"
+ onclick="if (!this.hasAttribute('disabled') || this.getAttribute('disabled') != 'true') { EditorSelectColor('Text', event); }"
+ tooltiptext="&TextColorButton.tooltip;"
+ observes="cmd_fontColor"
+ oncommand="/* See MsgComposeCommands.js::updateAllItems for why this attribute is needed here. */"/>
+ </stack>
+ </toolbaritem>
diff --git a/comm/mail/components/compose/content/editFormatButtons.inc.xhtml b/comm/mail/components/compose/content/editFormatButtonsTwo.inc.xhtml
similarity index 73%
rename from comm/mail/components/compose/content/editFormatButtons.inc.xhtml
rename to comm/mail/components/compose/content/editFormatButtonsTwo.inc.xhtml
index f84b2610..22451b50 100644
--- a/comm/mail/components/compose/content/editFormatButtons.inc.xhtml
+++ b/comm/mail/components/compose/content/editFormatButtonsTwo.inc.xhtml
@@ -3,73 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!-- Formatting toolbar items. "value" are HTML tagnames, don't translate -->
- <menulist id="ParagraphSelect"
- class="toolbar-focustarget"
- oncommand="setParagraphState(event);"
- crop="end"
- tooltiptext="&ParagraphSelect.tooltip;"
- observes="cmd_renderedHTMLEnabler">
- <menupopup id="ParagraphPopup">
- <menuitem id="toolbarmenu_bodyText" label="&bodyTextCmd.label;" value=""/>
- <menuitem id="toolbarmenu_paragraph" label="&paragraphParagraphCmd.label;" value="p"/>
- <menuitem id="toolbarmenu_h1" label="&heading1Cmd.label;" value="h1"/>
- <menuitem id="toolbarmenu_h2" label="&heading2Cmd.label;" value="h2"/>
- <menuitem id="toolbarmenu_h3" label="&heading3Cmd.label;" value="h3"/>
- <menuitem id="toolbarmenu_h4" label="&heading4Cmd.label;" value="h4"/>
- <menuitem id="toolbarmenu_h5" label="&heading5Cmd.label;" value="h5"/>
- <menuitem id="toolbarmenu_h6" label="&heading6Cmd.label;" value="h6"/>
- <menuitem id="toolbarmenu_address" label="&paragraphAddressCmd.label;" value="address"/>
- <menuitem id="toolbarmenu_pre" label="&paragraphPreformatCmd.label;" value="pre"/>
- </menupopup>
- </menulist>
-
- <!-- "value" are HTML tagnames, don't translate -->
- <menulist id="FontFaceSelect"
- class="toolbar-focustarget"
- oncommand="doStatefulCommand('cmd_fontFace', event.target.value)"
- crop="center"
- sizetopopup="pref"
- tooltiptext="&FontFaceSelect.tooltip;"
- observes="cmd_renderedHTMLEnabler">
- <menupopup id="FontFacePopup">
- <menuitem id="toolbarmenu_fontVarWidth" label="&fontVarWidth.label;" value=""/>
- <menuitem id="toolbarmenu_fontFixedWidth" label="&fontFixedWidth.label;" value="monospace"/>
- <menuseparator id="toolbarmenuAfterGenericFontsSeparator"/>
- <menuitem id="toolbarmenu_fontHelvetica" label="&fontHelvetica.label;"
- value="Helvetica, Arial, sans-serif"
- value_parsed="helvetica,arial,sans-serif"/>
- <menuitem id="toolbarmenu_fontTimes" label="&fontTimes.label;"
- value="Times New Roman, Times, serif"
- value_parsed="times new roman,times,serif"/>
- <menuitem id="toolbarmenu_fontCourier" label="&fontCourier.label;"
- value="Courier New, Courier, monospace"
- value_parsed="courier new,courier,monospace"/>
- <menuseparator id="toolbarmenuAfterDefaultFontsSeparator"
- class="fontFaceMenuAfterDefaultFonts"/>
- <menuseparator id="toolbarmenuAfterUsedFontsSeparator"
- class="fontFaceMenuAfterUsedFonts"
- hidden="true"/>
- <!-- Local font face items added here by initLocalFontFaceMenu() -->
- </menupopup>
- </menulist>
-
- <toolbaritem id="color-buttons-container"
- class="formatting-button"
- align="center">
- <stack id="ColorButtons">
- <box class="color-button" id="BackgroundColorButton"
- onclick="if (!this.hasAttribute('disabled') || this.getAttribute('disabled') != 'true') { EditorSelectColor('', event); }"
- tooltiptext="&BackgroundColorButton.tooltip;"
- observes="cmd_backgroundColor"
- oncommand="/* See MsgComposeCommands.js::updateAllItems for why this attribute is needed here. */"/>
- <box class="color-button" id="TextColorButton"
- onclick="if (!this.hasAttribute('disabled') || this.getAttribute('disabled') != 'true') { EditorSelectColor('Text', event); }"
- tooltiptext="&TextColorButton.tooltip;"
- observes="cmd_fontColor"
- oncommand="/* See MsgComposeCommands.js::updateAllItems for why this attribute is needed here. */"/>
- </stack>
- </toolbaritem>
-
<toolbarbutton id="AbsoluteFontSizeButton"
class="formatting-button"
tooltiptext="&absoluteFontSizeToolbarCmd.tooltip;"
--- a/comm/mail/components/compose/content/messengercompose.xhtml
+++ b/comm/mail/components/compose/content/messengercompose.xhtml
@@ -2416,12 +2416,22 @@
</hbox>
</toolbar>
- <toolbox id="FormatToolbox" mode="icons">
- <toolbar id="FormatToolbar"
+ <toolbox id="FormatToolboxOne" mode="icons">
+ <toolbar id="FormatToolbarOne"
class="chromeclass-toolbar themeable-brighttext"
persist="collapsed"
nowindowdrag="true">
-#include editFormatButtons.inc.xhtml
+#include editFormatButtonsOne.inc.xhtml
+ <spacer flex="1"/>
+ </toolbar>
+ </toolbox>
+
+ <toolbox id="FormatToolboxTwo" mode="icons">
+ <toolbar id="FormatToolbarTwo"
+ class="chromeclass-toolbar themeable-brighttext"
+ persist="collapsed"
+ nowindowdrag="true">
+#include editFormatButtonsTwo.inc.xhtml
<spacer flex="1"/>
</toolbar>
</toolbox>
--- a/comm/mail/components/extensions/parent/ext-composeAction.js
+++ b/comm/mail/components/extensions/parent/ext-composeAction.js
@@ -41,8 +41,8 @@ this.composeAction = class extends ToolbarButtonAPI {
];
const isFormatToolbar =
extension.manifest.compose_action.default_area == "formattoolbar";
- this.toolboxId = isFormatToolbar ? "FormatToolbox" : "compose-toolbox";
- this.toolbarId = isFormatToolbar ? "FormatToolbar" : "composeToolbar2";
+ this.toolboxId = isFormatToolbar ? "FormatToolboxOne" : "compose-toolbox";
+ this.toolbarId = isFormatToolbar ? "FormatToolbarOne" : "composeToolbar2";
}
static onUninstall(extensionId) {
@@ -54,7 +54,7 @@ this.composeAction = class extends ToolbarButtonAPI {
// Check all possible toolbars and remove the toolbarbutton if found.
// Sadly we have to hardcode these values here, as the add-on is already
// shutdown when onUninstall is called.
- const toolbars = ["composeToolbar2", "FormatToolbar"];
+ const toolbars = ["composeToolbar2", "FormatToolbarOne"];
for (const toolbar of toolbars) {
for (const setName of ["currentset", "extensionset"]) {
const set = Services.xulStore
@@ -121,7 +121,7 @@ this.composeAction = class extends ToolbarButtonAPI {
makeButton(window) {
const button = super.makeButton(window);
- if (this.toolbarId == "FormatToolbar") {
+ if (this.toolbarId == "FormatToolbarOne") {
button.classList.add("formatting-button");
// The format toolbar has no associated context menu. Add one directly to
// this button.
--- a/comm/mail/themes/linux/mail/compose/messengercompose.css
+++ b/comm/mail/themes/linux/mail/compose/messengercompose.css
@@ -119,7 +119,14 @@
/* ::::: format toolbar ::::: */
-#FormatToolbar {
+#FormatToolbarOne {
+ background-color: inherit;
+ color: inherit;
+ margin-inline: 3px;
+ padding-block: 4px;
+}
+
+#FormatToolbarTwo {
background-color: inherit;
color: inherit;
margin-inline: 3px;
@@ -155,7 +162,12 @@ menu[command="cmd_convertCloud"] .menu-iconic-left {
background-image: none;
}
- & #FormatToolbar {
+ & #FormatToolbarOne {
+ color: inherit;
+ background-image: none;
+ }
+
+ & #FormatToolbarTwo {
color: inherit;
background-image: none;
}
--- a/comm/mail/themes/osx/mail/compose/messengercompose.css
+++ b/comm/mail/themes/osx/mail/compose/messengercompose.css
@@ -171,7 +171,22 @@ toolbar[nowindowdrag="true"] {
/* ::::: format toolbar ::::: */
-#FormatToolbar {
+#FormatToolbarOne {
+ padding-block: 4px;
+ margin-inline: 3px;
+ margin-block-end: 3px;
+
+ :root[lwt-tree] & {
+ background-image: none;
+ background-color: transparent !important;
+ }
+
+ & toolbarseparator {
+ background-image: none;
+ }
+}
+
+#FormatToolbarTwo {
padding-block: 4px;
margin-inline: 3px;
margin-block-end: 3px;
--- a/comm/mail/themes/shared/mail/messengercompose.css
+++ b/comm/mail/themes/shared/mail/messengercompose.css
@@ -26,7 +26,7 @@
/* Styles for the default system dark theme */
:root[lwt-tree] {
- & :is(#MsgHeadersToolbar, #FormatToolbox) {
+ & :is(#MsgHeadersToolbar, #FormatToolboxOne, #FormatToolboxTwo) {
background-color: var(--toolbar-bgcolor) !important;
color: var(--lwt-text-color);
}
@@ -368,7 +368,8 @@
padding-inline: 3px;
display: grid;
grid-template: "contacts contacts-splitter headers" minmax(auto, var(--headersSplitter-height))
- "contacts contacts-splitter format-toolbar" min-content
+ "contacts contacts-splitter format-toolbar-one" min-content
+ "contacts contacts-splitter format-toolbar-two" min-content
"contacts contacts-splitter headers-splitter" min-content
"contacts contacts-splitter message" minmax(33%, 1fr)
"contacts contacts-splitter attachment-splitter" min-content
@@ -479,7 +480,7 @@
}
}
-:is(#MsgHeadersToolbar, #FormatToolbox) {
+:is(#MsgHeadersToolbar, #FormatToolboxOne, #FormatToolboxTwo) {
background-color: var(--layout-background-2);
color: var(--layout-color-1);
color-scheme: light-dark;
@@ -492,8 +493,12 @@
grid-template-columns: auto;
}
-#FormatToolbox {
- grid-area: format-toolbar;
+#FormatToolboxOne {
+ grid-area: format-toolbar-one;
+}
+
+#FormatToolboxTwo {
+ grid-area: format-toolbar-two;
}
#headersSplitter {
@@ -604,7 +609,38 @@
/* :::: Format toolbar :::: */
-#FormatToolbar {
+#FormatToolbarOne {
+ &:not([hidden="true"]) {
+ display: flex;
+ }
+
+ & > menulist {
+ margin-block: 1px;
+
+ &:not(:hover) {
+ background: transparent;
+ }
+
+ &::part(label-box) {
+ text-shadow: none;
+ }
+
+ &:not([disabled="true"],[open="true"]):hover {
+ background: var(--toolbarbutton-hover-background);
+ }
+
+ &[open="true"] {
+ background: var(--toolbarbutton-active-background);
+ border-color: var(--toolbarbutton-active-bordercolor);
+ }
+ }
+
+ & > toolbarbutton > .toolbarbutton-text {
+ display: none;
+ }
+}
+
+#FormatToolbarTwo {
&:not([hidden="true"]) {
display: flex;
}
--- a/comm/mail/themes/windows/mail/compose/messengercompose.css
+++ b/comm/mail/themes/windows/mail/compose/messengercompose.css
@@ -124,7 +124,11 @@
/* ::::: format toolbar ::::: */
-#FormatToolbar {
+#FormatToolbarOne {
+ margin-block-end: 2px;
+}
+
+#FormatToolbarTwo {
margin-block-end: 2px;
}

View File

@@ -2,41 +2,46 @@ TERMUX_PKG_HOMEPAGE=https://www.thunderbird.net
TERMUX_PKG_DESCRIPTION="Unofficial Thunderbird email client"
TERMUX_PKG_LICENSE="MPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="128.8.1"
TERMUX_PKG_SRCURL="https://archive.mozilla.org/pub/thunderbird/releases/${TERMUX_PKG_VERSION}esr/source/thunderbird-${TERMUX_PKG_VERSION}esr.source.tar.xz"
TERMUX_PKG_SHA256=bfef101c0fb720e67b5fe0ec9cf8232145e782c1d253395728d47e2bc68d0c13
TERMUX_PKG_VERSION="137.0.1"
TERMUX_PKG_SRCURL="https://archive.mozilla.org/pub/thunderbird/releases/${TERMUX_PKG_VERSION}/source/thunderbird-${TERMUX_PKG_VERSION}.source.tar.xz"
TERMUX_PKG_SHA256=8e59b4fce8d3d74e4599f56ae94d8edf001eaf221e8288d9dafd9d8d0836f7d1
TERMUX_PKG_DEPENDS="ffmpeg, fontconfig, freetype, gdk-pixbuf, glib, gtk3, libandroid-shmem, libandroid-spawn, libc++, libcairo, libevent, libffi, libice, libicu, libjpeg-turbo, libnspr, libnss, libotr, libpixman, libsm, libvpx, libwebp, libx11, libxcb, libxcomposite, libxdamage, libxext, libxfixes, libxrandr, libxtst, pango, pulseaudio, zlib"
TERMUX_PKG_BUILD_DEPENDS="binutils-cross, libcpufeatures, libice, libsm"
TERMUX_PKG_BUILD_DEPENDS="libcpufeatures, libice, libsm"
TERMUX_PKG_BUILD_IN_SRC=true
# Mozilla does not provide a simple way to find the latest ESR release
TERMUX_PKG_UPDATE_VERSION_REGEXP='\d+\.\d+\.\d+(?=esr/)'
TERMUX_PKG_AUTO_UPDATE=true
termux_pkg_auto_update() {
# Adapted from the auto_update function in x11/firefox and packages/ncdu.
# Unfortunately there is no 'latest-esr/' directory for Thunderbird.
# https://archive.mozilla.org/pub/thunderbird/releases/latest/README.txt
local api_url latest_esr
api_url="https://archive.mozilla.org/pub/thunderbird/releases/"
latest_esr="$(curl -s "$api_url" \
| grep -oP "$TERMUX_PKG_UPDATE_VERSION_REGEXP" \
| sort -V \
| tail -n1)"
local e=0
local api_url="https://download.mozilla.org/?product=thunderbird-latest&os=linux64&lang=en-US"
local api_url_r=$(curl -s "${api_url}")
local latest_version=$(echo "${api_url_r}" | sed -nE "s/.*thunderbird-(.*).tar.xz.*/\1/p")
[[ -z "${api_url_r}" ]] && e=1
[[ -z "${latest_version}" ]] && e=1
if [[ "${latest_esr}" == "${TERMUX_PKG_VERSION}" ]]; then
echo "INFO: No update needed. Already at version '${latest_esr}'."
local uptime_now=$(cat /proc/uptime)
local uptime_s="${uptime_now//.*}"
local uptime_h_limit=2
local uptime_s_limit=$((uptime_h_limit*60*60))
[[ -z "${uptime_s}" ]] && [[ "$(uname -o)" != "Android" ]] && e=1
[[ "${uptime_s}" == 0 ]] && [[ "$(uname -o)" != "Android" ]] && e=1
[[ "${uptime_s}" -gt "${uptime_s_limit}" ]] && e=1
if [[ "${e}" != 0 ]]; then
cat <<- EOL >&2
WARN: Auto update failure!
api_url_r=${api_url_r}
latest_version=${latest_version}
uptime_now=${uptime_now}
uptime_s=${uptime_s}
uptime_s_limit=${uptime_s_limit}
EOL
return
fi
# We want to avoid re-filtering the version.
# It's already cleaned up, so unset the regexp.
# See: https://github.com/termux/termux-packages/issues/20836
# See also: packages/taplo/build.sh
unset TERMUX_PKG_UPDATE_VERSION_REGEXP
termux_pkg_upgrade_version "${latest_esr}"
termux_pkg_upgrade_version "${latest_version}"
}
termux_step_post_get_source() {
local f="media/ffvpx/config_unix_aarch64.h"
echo "Applying sed substitution to ${f}"
@@ -92,6 +97,11 @@ termux_step_pre_configure() {
}
termux_step_configure() {
if [ "$TERMUX_CONTINUE_BUILD" == "true" ]; then
termux_step_pre_configure
cd $TERMUX_PKG_SRCDIR
fi
sed \
-e "s|@TERMUX_HOST_PLATFORM@|${TERMUX_HOST_PLATFORM}|" \
-e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|" \
@@ -110,17 +120,7 @@ END
}
termux_step_make() {
# XXX: Try max 10 times
for t in $(seq 1 10); do
if ./mach build --keep-going -j "$TERMUX_PKG_MAKE_PROCESSES"; then
break
else
if [ "$t" = "10" ]; then
termux_error_exit "Giving up after 10 attempts"
fi
fi
done
./mach build -j "$TERMUX_PKG_MAKE_PROCESSES"
./mach buildsymbols
}

View File

@@ -27,7 +27,6 @@ ac_add_options --enable-minify=properties
ac_add_options --enable-mobile-optimize
ac_add_options --enable-printing
ac_add_options --disable-jemalloc
ac_add_options --without-wasm-sandboxed-libraries
ac_add_options --disable-crashreporter
ac_add_options --disable-updater
ac_add_options --disable-sandbox
@@ -43,6 +42,7 @@ ac_add_options --disable-webspeech
ac_add_options --disable-synth-speechd
ac_add_options --disable-elf-hack
ac_add_options --disable-address-sanitizer-reporter
ac_add_options --without-wasm-sandboxed-libraries
# System addons
ac_add_options --allow-addon-sideload