new package: thunderbird
This commit is contained in:
parent
9053b99aca
commit
8d34cca73f
|
@ -0,0 +1,14 @@
|
|||
--- a/build/moz.configure/init.configure
|
||||
+++ b/build/moz.configure/init.configure
|
||||
@@ -499,10 +499,7 @@
|
||||
raw_os = os = os.replace("/", "_")
|
||||
abi = None
|
||||
sub_configure_alias = triplet
|
||||
- if "android" in os:
|
||||
- canonical_os = "Android"
|
||||
- canonical_kernel = "Linux"
|
||||
- elif os.startswith("linux"):
|
||||
+ if os.startswith("linux"):
|
||||
canonical_os = "GNU"
|
||||
canonical_kernel = "Linux"
|
||||
elif os.startswith("kfreebsd") and os.endswith("-gnu"):
|
|
@ -0,0 +1,11 @@
|
|||
--- a/build/moz.configure/arm.configure
|
||||
+++ b/build/moz.configure/arm.configure
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
@depends(target.os)
|
||||
def arm_option_defaults(os):
|
||||
- if os == "Android":
|
||||
+ if True:
|
||||
arch = "armv7-a"
|
||||
thumb = "yes"
|
||||
fpu = "neon"
|
|
@ -0,0 +1,44 @@
|
|||
--- a/build/moz.configure/rust.configure
|
||||
+++ b/build/moz.configure/rust.configure
|
||||
@@ -514,17 +514,27 @@
|
||||
assert_rust_compile(host, rustc_target, rustc)
|
||||
return rustc_target
|
||||
|
||||
+option("--custom-rust-target-triple", nargs=1, help="Customize Rust Target Triple")
|
||||
+
|
||||
+@depends("--custom-rust-target-triple")
|
||||
+def get_custom_rust_target_triple(custom_rust_target_triple):
|
||||
+ if custom_rust_target_triple:
|
||||
+ return custom_rust_target_triple[0]
|
||||
+ return None
|
||||
|
||||
@depends(
|
||||
- rustc, target, c_compiler, rust_supported_targets, arm_target, when=rust_compiler
|
||||
+ get_custom_rust_target_triple, rustc, target, c_compiler, rust_supported_targets, arm_target, when=rust_compiler
|
||||
)
|
||||
@checking("for rust target triplet")
|
||||
def rust_target_triple(
|
||||
- rustc, target, compiler_info, rust_supported_targets, arm_target
|
||||
+ custom_rust_target_triple, rustc, target, compiler_info, rust_supported_targets, arm_target
|
||||
):
|
||||
- rustc_target = detect_rustc_target(
|
||||
- target, compiler_info, arm_target, rust_supported_targets
|
||||
- )
|
||||
+ if custom_rust_target_triple:
|
||||
+ rustc_target = custom_rust_target_triple
|
||||
+ else:
|
||||
+ rustc_target = detect_rustc_target(
|
||||
+ target, compiler_info, arm_target, rust_supported_targets
|
||||
+ )
|
||||
assert_rust_compile(target, rustc_target, rustc)
|
||||
return rustc_target
|
||||
|
||||
@@ -599,8 +599,6 @@
|
||||
|
||||
# ==============================================================
|
||||
|
||||
-option(env="RUSTFLAGS", nargs=1, help="Rust compiler flags")
|
||||
-set_config("RUSTFLAGS", depends("RUSTFLAGS")(lambda flags: flags))
|
||||
|
||||
|
||||
# Rust compiler flags
|
|
@ -0,0 +1,21 @@
|
|||
--- a/build/moz.configure/toolchain.configure
|
||||
+++ b/build/moz.configure/toolchain.configure
|
||||
@@ -1981,17 +1981,7 @@
|
||||
|
||||
@depends(cxx_compiler, target)
|
||||
def needs_libstdcxx_newness_check(cxx_compiler, target):
|
||||
- # We only have to care about this on Linux and MinGW.
|
||||
- if cxx_compiler.type == "clang-cl":
|
||||
- return
|
||||
-
|
||||
- if target.kernel not in ("Linux", "WINNT"):
|
||||
- return
|
||||
-
|
||||
- if target.os == "Android":
|
||||
- return
|
||||
-
|
||||
- return True
|
||||
+ return
|
||||
|
||||
|
||||
def die_on_old_libstdcxx():
|
|
@ -0,0 +1,22 @@
|
|||
--- a/build/moz.configure/toolchain.configure
|
||||
+++ b/build/moz.configure/toolchain.configure
|
||||
@@ -1256,7 +1256,7 @@
|
||||
):
|
||||
wrapper = list(compiler_wrapper or ())
|
||||
flags = []
|
||||
- if sysroot.path:
|
||||
+ if False:
|
||||
if host_or_target.kernel == "Darwin":
|
||||
# While --sysroot and -isysroot are roughly equivalent, when not using
|
||||
# -isysroot on mac, clang takes the SDKROOT environment variable into
|
||||
--- a/build/moz.configure/pkg.configure
|
||||
+++ b/build/moz.configure/pkg.configure
|
||||
@@ -56,7 +56,7 @@
|
||||
@imports(_from="os", _import="environ")
|
||||
@imports(_from="os", _import="pathsep")
|
||||
def pkg_config_vars(target, sysroot_path, multiarch_dir):
|
||||
- if sysroot_path and target.kernel != "Darwin":
|
||||
+ if False:
|
||||
return namespace(
|
||||
PKG_CONFIG_PATH="",
|
||||
PKG_CONFIG_SYSROOT_DIR=sysroot_path,
|
|
@ -0,0 +1,13 @@
|
|||
--- a/toolkit/moz.configure
|
||||
+++ b/toolkit/moz.configure
|
||||
@@ -171,9 +171,7 @@
|
||||
# ==============================================================
|
||||
@depends(target)
|
||||
def midir_linux_support(target):
|
||||
- return (
|
||||
- target.kernel == "Linux" and target.os != "Android" and target.cpu != "riscv64"
|
||||
- )
|
||||
+ return
|
||||
|
||||
|
||||
@depends(target, midir_linux_support)
|
|
@ -0,0 +1,11 @@
|
|||
--- a/build/autoconf/android.m4
|
||||
+++ b/build/autoconf/android.m4
|
||||
@@ -6,7 +6,7 @@
|
||||
[
|
||||
|
||||
case "$target" in
|
||||
-*-android*|*-linuxandroid*)
|
||||
+no-android)
|
||||
dnl $extra_android_flags will be set for us by Python configure.
|
||||
dnl $_topsrcdir/build/android is a hack for versions of rustc < 1.68
|
||||
LDFLAGS="$extra_android_flags -L$_topsrcdir/build/android $LDFLAGS"
|
|
@ -0,0 +1,207 @@
|
|||
--- a/gfx/vr/external_api/moz_external_vr.h
|
||||
+++ b/gfx/vr/external_api/moz_external_vr.h
|
||||
@@ -69,7 +69,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;
|
||||
@@ -498,7 +498,7 @@
|
||||
};
|
||||
|
||||
struct VRBrowserState {
|
||||
-#if defined(__ANDROID__)
|
||||
+#if defined(__ANDROID__) && !defined(__TERMUX__)
|
||||
bool shutdown;
|
||||
#endif // defined(__ANDROID__)
|
||||
/**
|
||||
@@ -610,7 +610,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;
|
||||
@@ -621,14 +621,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 @@
|
||||
// Lock::PriorityInheritanceAvailable still must be checked as the code may
|
||||
// compile but the underlying platform still may not correctly support priority
|
||||
// inheritance locks.
|
||||
-#if defined(OS_NACL) || defined(OS_ANDROID)
|
||||
+#if defined(OS_NACL) || defined(OS_ANDROID) || defined(__TERMUX__)
|
||||
# define PRIORITY_INHERITANCE_LOCKS_POSSIBLE() 0
|
||||
#else
|
||||
# define PRIORITY_INHERITANCE_LOCKS_POSSIBLE() 1
|
||||
--- a/tools/profiler/core/platform.cpp
|
||||
+++ b/tools/profiler/core/platform.cpp
|
||||
@@ -101,7 +101,7 @@
|
||||
#include <string_view>
|
||||
#include <type_traits>
|
||||
|
||||
-#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"
|
||||
@@ -227,7 +227,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:
|
||||
@@ -334,7 +334,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)
|
||||
@@ -2928,7 +2928,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());
|
||||
@@ -2990,7 +2990,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()) {
|
||||
@@ -3223,7 +3223,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
|
||||
@@ -3361,7 +3361,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) {
|
||||
@@ -5134,7 +5134,7 @@
|
||||
// Platform-specific initialization.
|
||||
PlatformInit(lock);
|
||||
|
||||
-#if defined(GP_OS_android)
|
||||
+#if defined(GP_OS_android) && !defined(__TERMUX__)
|
||||
if (jni::IsAvailable()) {
|
||||
GeckoJavaSampler::Init();
|
||||
}
|
||||
@@ -5841,7 +5841,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
|
||||
@@ -6011,7 +6011,7 @@
|
||||
StopAudioCallbackTracing();
|
||||
}
|
||||
|
||||
-#if defined(GP_OS_android)
|
||||
+#if defined(GP_OS_android) && !defined(__TERMUX__)
|
||||
if (ActivePS::FeatureJava(aLock)) {
|
||||
java::GeckoJavaSampler::Stop();
|
||||
}
|
||||
@@ -6162,7 +6162,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.
|
||||
@@ -6198,7 +6198,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.
|
||||
@@ -6240,7 +6240,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.
|
||||
@@ -6277,7 +6277,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/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(MOZ_WIDGET_ANDROID)) || \
|
||||
+#if (defined(XP_LINUX) && !defined(__TERMUX__)) || \
|
||||
defined(XP_MACOSX) || defined(XP_WIN)
|
||||
# define MOZ_CUBEB_REMOTING
|
||||
#endif
|
||||
--- a/mozglue/misc/StackWalk.cpp
|
||||
+++ b/mozglue/misc/StackWalk.cpp
|
||||
@@ -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__)
|
||||
pthread_attr_t sattr;
|
||||
pthread_attr_init(&sattr);
|
||||
pthread_getattr_np(pthread_self(), &sattr);
|
|
@ -0,0 +1,77 @@
|
|||
--- a/ipc/chromium/src/base/shared_memory_posix.cc
|
||||
+++ b/ipc/chromium/src/base/shared_memory_posix.cc
|
||||
@@ -40,6 +40,65 @@
|
||||
#include "mozilla/UniquePtrExtensions.h"
|
||||
#include "prenv.h"
|
||||
|
||||
+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 base {
|
||||
|
||||
void SharedMemory::MappingDeleter::operator()(void* ptr) {
|
||||
@@ -153,7 +212,7 @@
|
||||
// FreeBSD in version 13.
|
||||
|
||||
# if !defined(HAVE_MEMFD_CREATE) && defined(OS_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`.
|
|
@ -0,0 +1,10 @@
|
|||
--- a/ipc/chromium/src/base/message_pump_libevent.cc
|
||||
+++ b/ipc/chromium/src/base/message_pump_libevent.cc
|
||||
@@ -41,7 +41,6 @@
|
||||
CHECK_EVENT_SIZEOF(PTHREAD_T, pthread_t);
|
||||
CHECK_EVENT_SIZEOF(SHORT, short);
|
||||
CHECK_EVENT_SIZEOF(SIZE_T, size_t);
|
||||
-CHECK_EVENT_SIZEOF(TIME_T, time_t);
|
||||
CHECK_EVENT_SIZEOF(VOID_P, void*);
|
||||
|
||||
// Lifecycle of struct event
|
|
@ -0,0 +1,23 @@
|
|||
UnderrunHandlerLinux not working due to SELinux rules
|
||||
|
||||
--- a/dom/media/UnderrunHandlerLinux.cpp
|
||||
+++ b/dom/media/UnderrunHandlerLinux.cpp
|
||||
@@ -12,6 +12,8 @@
|
||||
#include "audio_thread_priority.h"
|
||||
#include "nsDebug.h"
|
||||
|
||||
+#ifndef __TERMUX__
|
||||
+
|
||||
namespace mozilla {
|
||||
|
||||
Atomic<bool, MemoryOrdering::ReleaseAcquire> gRealtimeLimitReached;
|
||||
@@ -76,3 +78,9 @@
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
+
|
||||
+#else
|
||||
+
|
||||
+#include "UnderrunHandlerNoop.cpp"
|
||||
+
|
||||
+#endif
|
|
@ -0,0 +1,20 @@
|
|||
--- a/memory/build/Mutex.h
|
||||
+++ b/memory/build/Mutex.h
|
||||
@@ -57,7 +57,7 @@
|
||||
}
|
||||
#elif defined(XP_DARWIN)
|
||||
mMutex = OS_UNFAIR_LOCK_INIT;
|
||||
-#elif defined(XP_LINUX) && !defined(ANDROID)
|
||||
+#elif defined(XP_LINUX) && !defined(__TERMUX__)
|
||||
pthread_mutexattr_t attr;
|
||||
if (pthread_mutexattr_init(&attr) != 0) {
|
||||
return false;
|
||||
@@ -173,7 +173,7 @@
|
||||
|
||||
# if defined(XP_DARWIN)
|
||||
# define STATIC_MUTEX_INIT OS_UNFAIR_LOCK_INIT
|
||||
-# elif defined(XP_LINUX) && !defined(ANDROID)
|
||||
+# elif defined(XP_LINUX) && !defined(__TERMUX__)
|
||||
# define STATIC_MUTEX_INIT PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
|
||||
# else
|
||||
# define STATIC_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
|
|
@ -0,0 +1,49 @@
|
|||
--- a/toolkit/components/extensions/storage/moz.build
|
||||
+++ b/toolkit/components/extensions/storage/moz.build
|
||||
@@ -17,7 +17,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",
|
||||
]
|
||||
--- a/toolkit/library/rust/shared/Cargo.toml
|
||||
+++ b/toolkit/library/rust/shared/Cargo.toml
|
||||
@@ -106,11 +106,12 @@
|
||||
# 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"] }
|
||||
|
||||
-[target.'cfg(not(target_os = "android"))'.dependencies]
|
||||
viaduct = "0.1"
|
||||
-webext_storage_bridge = { path = "../../../components/extensions/storage/webext_storage_bridge" }
|
||||
tabs = { 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
|
||||
@@ -52,10 +52,8 @@
|
||||
#[cfg(not(target_os = "android"))]
|
||||
extern crate webext_storage_bridge;
|
||||
|
||||
-#[cfg(not(target_os = "android"))]
|
||||
extern crate tabs;
|
||||
|
||||
-#[cfg(not(target_os = "android"))]
|
||||
mod reexport_tabs {
|
||||
tabs::uniffi_reexport_scaffolding!();
|
||||
}
|
||||
@@ -84,7 +82,6 @@
|
||||
extern crate l10nregistry_ffi;
|
||||
extern crate localization_ffi;
|
||||
|
||||
-#[cfg(not(target_os = "android"))]
|
||||
extern crate viaduct;
|
||||
|
||||
extern crate gecko_logger;
|
|
@ -0,0 +1,15 @@
|
|||
THREAD_PRIORITY_SCHEDULING is introduced in API 28, but Termux compiles as API 24
|
||||
|
||||
--- a/nsprpub/pr/src/pthreads/ptthread.c
|
||||
+++ b/nsprpub/pr/src/pthreads/ptthread.c
|
||||
@@ -37,6 +37,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && defined(__TERMUX__) && __ANDROID_API__ < 28
|
||||
+#undef _POSIX_THREAD_PRIORITY_SCHEDULING
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Record whether or not we have the privilege to set the scheduling
|
||||
* policy and priority of threads. 0 means that privilege is available.
|
|
@ -0,0 +1,22 @@
|
|||
--- a/gfx/skia/skia/src/ports/SkDebug_stdio.cpp
|
||||
+++ b/gfx/skia/skia/src/ports/SkDebug_stdio.cpp
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "include/private/base/SkFeatures.h"
|
||||
#include "include/private/base/SkLoadUserConfig.h"
|
||||
|
||||
-#if !defined(SK_BUILD_FOR_WIN) && !defined(SK_BUILD_FOR_ANDROID)
|
||||
+#if (!defined(SK_BUILD_FOR_WIN) && !defined(SK_BUILD_FOR_ANDROID)) || defined(__TERMUX__)
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
--- a/gfx/skia/skia/src/ports/SkDebug_android.cpp
|
||||
+++ b/gfx/skia/skia/src/ports/SkDebug_android.cpp
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "include/core/SkTypes.h"
|
||||
-#if defined(SK_BUILD_FOR_ANDROID)
|
||||
+#if defined(SK_BUILD_FOR_ANDROID) && !defined(__TERMUX__)
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
--- a/toolkit/components/protobuf/src/google/protobuf/stubs/common.cc
|
||||
+++ b/toolkit/components/protobuf/src/google/protobuf/stubs/common.cc
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <windows.h>
|
||||
#define snprintf _snprintf // see comment in strutil.cc
|
||||
#endif
|
||||
-#if defined(__ANDROID__)
|
||||
+#if defined(__ANDROID__) && !defined(__TERMUX__)
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
namespace internal {
|
||||
|
||||
-#if defined(__ANDROID__)
|
||||
+#if defined(__ANDROID__) && !defined(__TERMUX__)
|
||||
inline void DefaultLogHandler(LogLevel level, const char* filename, int line,
|
||||
const std::string& message) {
|
||||
if (level < GOOGLE_PROTOBUF_MIN_LOG_LEVEL) {
|
|
@ -0,0 +1,17 @@
|
|||
--- 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");
|
|
@ -0,0 +1,33 @@
|
|||
--- a/media/libvpx/libvpx/vpx_ports/arm_cpudetect.c
|
||||
+++ b/media/libvpx/libvpx/vpx_ports/arm_cpudetect.c
|
||||
@@ -92,7 +92,7 @@
|
||||
}
|
||||
|
||||
#elif defined(__ANDROID__) /* end _MSC_VER */
|
||||
-#include <cpu-features.h>
|
||||
+#include <ndk_compat/cpu-features.h>
|
||||
|
||||
int arm_cpu_caps(void) {
|
||||
int flags;
|
||||
--- a/third_party/aom/aom_ports/arm_cpudetect.c
|
||||
+++ b/third_party/aom/aom_ports/arm_cpudetect.c
|
||||
@@ -88,7 +88,7 @@
|
||||
}
|
||||
|
||||
#elif defined(__ANDROID__) /* end _MSC_VER */
|
||||
-#include <cpu-features.h>
|
||||
+#include <ndk_compat/cpu-features.h>
|
||||
|
||||
int aom_arm_cpu_caps(void) {
|
||||
int flags;
|
||||
--- 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)
|
|
@ -0,0 +1,13 @@
|
|||
Fix SIGBUS error on Arm. Also apply to other arches just in case.
|
||||
|
||||
--- a/other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp
|
||||
+++ b/other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
-#if __sparc__
|
||||
+#if __sparc__ || __TERMUX__
|
||||
#include <string.h>
|
||||
static inline uint64 UNALIGNED_LOAD64(const char *p) {
|
||||
uint64 val;
|
|
@ -0,0 +1,21 @@
|
|||
--- a/comm/chat/modules/CLib.sys.mjs
|
||||
+++ b/comm/chat/modules/CLib.sys.mjs
|
||||
@@ -39,7 +39,7 @@
|
||||
break;
|
||||
case "linux":
|
||||
libcAbi = ctypes.default_abi;
|
||||
- libcPath = "libc.so.6";
|
||||
+ libcPath = "libc.so";
|
||||
break;
|
||||
default:
|
||||
throw new Error("Unknown OS");
|
||||
--- a/comm/mail/modules/DNS.jsm
|
||||
+++ b/comm/mail/modules/DNS.jsm
|
||||
@@ -49,6 +49,7 @@
|
||||
{ name: "resolv.9", suffix: "" },
|
||||
{ name: "resolv", suffix: ".2" },
|
||||
{ name: "resolv", suffix: "" },
|
||||
+ { name: "c", suffix: "" },
|
||||
];
|
||||
}
|
||||
let tried = [];
|
|
@ -0,0 +1,61 @@
|
|||
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=115.6.1
|
||||
TERMUX_PKG_SRCURL=https://ftp.mozilla.org/pub/thunderbird/releases/${TERMUX_PKG_VERSION}/source/thunderbird-${TERMUX_PKG_VERSION}.source.tar.xz
|
||||
TERMUX_PKG_SHA256=638beb0d2907c6adbe441b7cd371f205728ac65489c04cb29bb40e71ea2846e3
|
||||
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_IN_SRC=true
|
||||
|
||||
termux_step_post_get_source() {
|
||||
local f="media/ffvpx/config_unix_aarch64.h"
|
||||
echo "Applying sed substitution to ${f}"
|
||||
sed -i -E '/^#define (CONFIG_LINUX_PERF|HAVE_SYSCTL) /s/1$/0/' ${f}
|
||||
}
|
||||
|
||||
termux_step_pre_configure() {
|
||||
termux_setup_nodejs
|
||||
termux_setup_rust
|
||||
|
||||
cargo install cbindgen
|
||||
|
||||
sed \
|
||||
-e "s|@CARGO_TARGET_NAME@|${CARGO_TARGET_NAME}|" \
|
||||
-i "${TERMUX_PKG_SRCDIR}"/build/moz.configure/rust.configure
|
||||
|
||||
export HOST_CC=$(command -v clang)
|
||||
export HOST_CXX=$(command -v clang++)
|
||||
|
||||
# https://reviews.llvm.org/D141184
|
||||
CXXFLAGS+=" -U__ANDROID__ -D_LIBCPP_HAS_NO_C11_ALIGNED_ALLOC"
|
||||
LDFLAGS+=" -landroid-shmem -landroid-spawn -llog"
|
||||
|
||||
if [ "$TERMUX_ARCH" = "arm" ]; then
|
||||
termux_setup_no_integrated_as
|
||||
# For symbol android_getCpuFeatures
|
||||
LDFLAGS+=" -l:libndk_compat.a"
|
||||
fi
|
||||
}
|
||||
|
||||
termux_step_configure() {
|
||||
sed \
|
||||
-e "s|@TERMUX_HOST_PLATFORM@|${TERMUX_HOST_PLATFORM}|" \
|
||||
-e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|" \
|
||||
-e "s|@CARGO_TARGET_NAME@|${CARGO_TARGET_NAME}|" \
|
||||
$TERMUX_PKG_BUILDER_DIR/mozconfig.cfg > .mozconfig
|
||||
|
||||
./mach configure
|
||||
}
|
||||
|
||||
termux_step_make() {
|
||||
./mach build
|
||||
./mach buildsymbols
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
./mach install
|
||||
|
||||
install -Dm644 -t "${TERMUX_PREFIX}/share/applications" "${TERMUX_PKG_BUILDER_DIR}/thunderbird.desktop"
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
ac_add_options --enable-application=comm/mail
|
||||
|
||||
# Cross compile options
|
||||
ac_add_options --target=@TERMUX_HOST_PLATFORM@
|
||||
ac_add_options --prefix=@TERMUX_PREFIX@
|
||||
ac_add_options --with-sysroot=@TERMUX_PREFIX@
|
||||
ac_add_options --custom-rust-target-triple=@CARGO_TARGET_NAME@
|
||||
|
||||
# Branding
|
||||
ac_add_options --disable-official-branding
|
||||
|
||||
# System libraries
|
||||
ac_add_options --enable-system-ffi
|
||||
ac_add_options --enable-system-pixman
|
||||
ac_add_options --with-system-icu
|
||||
ac_add_options --with-system-jpeg=@TERMUX_PREFIX@
|
||||
ac_add_options --with-system-libevent
|
||||
ac_add_options --with-system-libvpx
|
||||
ac_add_options --with-system-nspr
|
||||
ac_add_options --with-system-nss
|
||||
ac_add_options --with-system-webp
|
||||
ac_add_options --with-system-zlib
|
||||
|
||||
# Features
|
||||
ac_add_options --enable-audio-backends=pulseaudio
|
||||
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
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --disable-accessibility
|
||||
ac_add_options --disable-crashreporter
|
||||
ac_add_options --disable-dbus
|
||||
ac_add_options --disable-necko-wifi
|
||||
ac_add_options --disable-updater
|
||||
ac_add_options --disable-hardening
|
||||
ac_add_options --disable-parental-controls
|
||||
ac_add_options --disable-webspeech
|
||||
ac_add_options --disable-synth-speechd
|
||||
ac_add_options --disable-elf-hack
|
||||
ac_add_options --disable-address-sanitizer-reporter
|
||||
|
||||
# System addons
|
||||
ac_add_options --allow-addon-sideload
|
|
@ -0,0 +1,21 @@
|
|||
[Desktop Entry]
|
||||
Name=Thunderbird
|
||||
Comment=Send and receive mail with Thunderbird
|
||||
GenericName=Mail Client
|
||||
Exec=thunderbird %u
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=thunderbird
|
||||
Categories=Network;Email;
|
||||
MimeType=message/rfc822;x-scheme-handler/mailto;text/calendar;text/vcard;text/x-vcard;x-scheme-handler/webcal;x-scheme-handler/webcals;x-scheme-handler/mid;
|
||||
StartupNotify=true
|
||||
StartupWMClass=thunderbird
|
||||
Actions=ComposeMessage;OpenAddressBook;
|
||||
|
||||
[Desktop Action ComposeMessage]
|
||||
Name=Write new message
|
||||
Exec=thunderbird -compose
|
||||
|
||||
[Desktop Action OpenAddressBook]
|
||||
Name=Open address book
|
||||
Exec=thunderbird -addressbook
|
Loading…
Reference in New Issue