mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-01-01 00:20:30 +00:00
348 lines
11 KiB
Diff
348 lines
11 KiB
Diff
--- 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"
|
|
--- a/build/moz.configure/init.configure
|
|
+++ b/build/moz.configure/init.configure
|
|
@@ -500,7 +500,7 @@
|
|
abi = None
|
|
sub_configure_alias = triplet
|
|
if "android" in os:
|
|
- canonical_os = "Android"
|
|
+ canonical_os = "GNU"
|
|
canonical_kernel = "Linux"
|
|
elif os.startswith("linux"):
|
|
canonical_os = "GNU"
|
|
--- 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:
|
|
pkgconfig_dirs = [
|
|
"usr/lib/pkgconfig",
|
|
"usr/lib/{}/pkgconfig".format(multiarch_dir),
|
|
--- 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
|
|
@@ -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():
|
|
--- 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/dom/media/moz.build
|
|
+++ b/dom/media/moz.build
|
|
@@ -321,7 +321,7 @@
|
|
"XiphExtradata.cpp",
|
|
]
|
|
|
|
-if CONFIG["OS_TARGET"] == "Linux":
|
|
+if False:
|
|
UNIFIED_SOURCES += ["UnderrunHandlerLinux.cpp"]
|
|
else:
|
|
UNIFIED_SOURCES += ["UnderrunHandlerNoop.cpp"]
|
|
--- 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(ANDROID)
|
|
+#if defined(ANDROID) && !defined(__TERMUX__)
|
|
int VideoEngine::SetAndroidObjects() {
|
|
LOG(("%s", __PRETTY_FUNCTION__));
|
|
|
|
--- 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(ANDROID)
|
|
+#if defined(ANDROID) || defined(__TERMUX__)
|
|
# 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/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;
|
|
@@ -142,7 +142,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
|
|
--- 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/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
|
|
--- 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
|
|
@@ -692,7 +692,7 @@
|
|
stackEnd = __libc_stack_end;
|
|
# elif defined(XP_DARWIN)
|
|
stackEnd = pthread_get_stackaddr_np(pthread_self());
|
|
-# elif defined(ANDROID)
|
|
+# elif defined(__TERMUX__)
|
|
pthread_attr_t sattr;
|
|
pthread_attr_init(&sattr);
|
|
pthread_getattr_np(pthread_self(), &sattr);
|
|
--- a/nsprpub/pr/src/pthreads/ptsynch.c
|
|
+++ b/nsprpub/pr/src/pthreads/ptsynch.c
|
|
@@ -953,7 +953,7 @@
|
|
#if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) \
|
|
|| (defined(FREEBSD) && __FreeBSD_version < 1200059) \
|
|
|| defined(OPENBSD) || defined(BSDI) \
|
|
- || defined(DARWIN)
|
|
+ || defined(DARWIN) || defined(__TERMUX__)
|
|
/* union semun is defined by including <sys/sem.h> */
|
|
#else
|
|
/* according to X/OPEN we have to define it ourselves */
|
|
--- 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__)
|
|
+#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.
|
|
--- a/old-configure.in
|
|
+++ b/old-configure.in
|
|
@@ -197,9 +197,6 @@
|
|
AC_MSG_CHECKING([for --noexecstack option to as])
|
|
_SAVE_CFLAGS=$CFLAGS
|
|
CFLAGS="$CFLAGS -Wa,--noexecstack"
|
|
- AC_TRY_COMPILE(,,AC_MSG_RESULT([yes])
|
|
- [ASFLAGS="$ASFLAGS -Wa,--noexecstack"],
|
|
- AC_MSG_RESULT([no]))
|
|
CFLAGS=$_SAVE_CFLAGS
|
|
AC_MSG_CHECKING([for -z noexecstack option to ld])
|
|
_SAVE_LDFLAGS=$LDFLAGS
|
|
--- 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
|
|
@@ -104,7 +104,6 @@
|
|
# 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" }
|
|
--- a/toolkit/library/rust/shared/lib.rs
|
|
+++ b/toolkit/library/rust/shared/lib.rs
|
|
@@ -50,21 +50,16 @@
|
|
|
|
extern crate audio_thread_priority;
|
|
|
|
-#[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!();
|
|
}
|
|
|
|
-#[cfg(not(target_os = "android"))]
|
|
extern crate suggest;
|
|
|
|
-#[cfg(not(target_os = "android"))]
|
|
mod reexport_suggest {
|
|
suggest::uniffi_reexport_scaffolding!();
|
|
}
|
|
@@ -93,7 +88,6 @@
|
|
extern crate l10nregistry_ffi;
|
|
extern crate localization_ffi;
|
|
|
|
-#[cfg(not(target_os = "android"))]
|
|
extern crate viaduct;
|
|
|
|
extern crate gecko_logger;
|
|
--- a/toolkit/moz.configure
|
|
+++ b/toolkit/moz.configure
|
|
@@ -174,7 +174,7 @@
|
|
@depends(target)
|
|
def midir_linux_support(target):
|
|
return (
|
|
- target.kernel == "Linux" and target.os != "Android" and target.cpu != "riscv64"
|
|
+ False
|
|
)
|
|
|
|
|
|
@@ -234,7 +234,7 @@
|
|
|
|
@depends("--enable-audio-backends", target)
|
|
def imply_aaudio(values, target):
|
|
- if any("aaudio" in value for value in values) and target.os != "Android":
|
|
+ if any("aaudio" in value for value in values) and False:
|
|
die("Cannot enable AAudio on %s", target.os)
|
|
return any("aaudio" in value for value in values) or None
|
|
|
|
@@ -268,7 +268,7 @@
|
|
|
|
@depends("--enable-audio-backends", target)
|
|
def imply_opensl(values, target):
|
|
- if any("opensl" in value for value in values) and target.os != "Android":
|
|
+ if any("opensl" in value for value in values) and False:
|
|
die("Cannot enable OpenSL on %s", target.os)
|
|
return any("opensl" in value for value in values) or None
|
|
|
|
@@ -1523,6 +1523,7 @@
|
|
# packed relative relocations rather than elfhack.
|
|
if android_version:
|
|
return android_version >= 30
|
|
+ return False
|
|
return have_arc4random
|
|
|
|
@depends(
|
|
@@ -2250,6 +2251,8 @@
|
|
set_config("MOZ_JPEG_CFLAGS", jpeg_flags.cflags)
|
|
set_config("MOZ_JPEG_LIBS", jpeg_flags.ldflags)
|
|
|
|
+ set_config("MOZ_SYSTEM_JPEG", True)
|
|
+
|
|
@depends("--with-system-jpeg", target, neon_flags)
|
|
def in_tree_jpeg_arm(system_jpeg, target, neon_flags):
|
|
if system_jpeg:
|
|
@@ -3418,7 +3421,7 @@
|
|
option(
|
|
env="MOZ_LINKER",
|
|
default=depends(target.os, when="--enable-jemalloc")(
|
|
- lambda os: os == "Android"
|
|
+ lambda os: True
|
|
),
|
|
help="{Enable|Disable} custom dynamic linker",
|
|
)
|
|
@@ -3450,7 +3453,7 @@
|
|
"Can't find header linux/joystick.h, needed for gamepad support."
|
|
" Please install Linux kernel headers."
|
|
),
|
|
- when=target_has_linux_kernel & compile_environment,
|
|
+ when=False,
|
|
)
|
|
|
|
|
|
--- 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) {
|