Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions packages/libical/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,45 @@ TERMUX_PKG_DESCRIPTION="Libical is an Open Source implementation of the iCalenda
TERMUX_PKG_LICENSE="LGPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="4.0.4"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/libical/libical/releases/download/v$TERMUX_PKG_VERSION/libical-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=c851cdb46da5e6397881dafaa592c5516fb49da05dd1bb095f711a6d20eac422
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="libc++, libicu"
TERMUX_PKG_DEPENDS="glib, gobject-introspection, libc++, libicu, libxml2"
TERMUX_PKG_BUILD_DEPENDS="g-ir-scanner"
TERMUX_PKG_BREAKS="libical-dev"
TERMUX_PKG_REPLACES="libical-dev"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DLIBICAL_BUILD_DOCS=false
-DLIBICAL_GLIB=false
-DLIBICAL_GOBJECT_INTROSPECTION=false
-DLIBICAL_GLIB_BUILD_DOCS=false
-DUSE_BUILTIN_TZDATA=true
-DPERL_EXECUTABLE=/usr/bin/perl
-DICAL_GLIB=true
-DIMPORT_ICAL_GLIB_SRC_GENERATOR=$TERMUX_PKG_HOSTBUILD_DIR/host-prefix/lib/cmake/LibIcal/IcalGlibSrcGenerator.cmake
-DENABLE_GTK_DOC=false
"
TERMUX_PKG_HOSTBUILD=true

termux_step_pre_configure() {
termux_setup_gir
}

termux_step_host_build() {
termux_setup_cmake
termux_setup_ninja

mkdir -p "$TERMUX_PKG_HOSTBUILD_DIR"/host-prefix

cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$TERMUX_PKG_HOSTBUILD_DIR"/host-prefix \
-DENABLE_GTK_DOC=OFF \
-DLIBICAL_GLIB_BUILD_DOCS=OFF \
-G Ninja \
"$TERMUX_PKG_SRCDIR"
cmake --build .
cmake --install . --prefix "$TERMUX_PKG_HOSTBUILD_DIR"/host-prefix
}

termux_step_post_get_source() {
# Do not forget to bump revision of reverse dependencies and rebuild them
Expand Down
3 changes: 3 additions & 0 deletions packages/libical/gir/4.0.4/ICal-4.0.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0"?>
<dump>
</dump>
76 changes: 76 additions & 0 deletions packages/libical/gir/4.0.4/ICalGLib-4.0.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0"?>
<dump>
<class name="ICalObject" get-type="i_cal_object_get_type" parents="GObject" abstract="1">
<property name="native" type="gpointer" flags="235"/>
<property name="native-destroy-func" type="gpointer" flags="227"/>
<property name="is-global-memory" type="gboolean" flags="235" default-value="FALSE"/>
<property name="always-destroy" type="gboolean" flags="227" default-value="FALSE"/>
<property name="owner" type="GObject" flags="227"/>
</class>
<class name="ICalArray" get-type="i_cal_array_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalAttach" get-type="i_cal_attach_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalCompIter" get-type="i_cal_comp_iter_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalParameter" get-type="i_cal_parameter_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalComponent" get-type="i_cal_component_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalTime" get-type="i_cal_time_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalPeriod" get-type="i_cal_period_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalDatetimeperiod" get-type="i_cal_datetimeperiod_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalDuration" get-type="i_cal_duration_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalEnumArray" get-type="i_cal_enum_array_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalGeo" get-type="i_cal_geo_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalParamIter" get-type="i_cal_param_iter_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalParser" get-type="i_cal_parser_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalProperty" get-type="i_cal_property_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalPropIter" get-type="i_cal_prop_iter_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalRecurIterator" get-type="i_cal_recur_iterator_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalRecurrence" get-type="i_cal_recurrence_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalReqstat" get-type="i_cal_reqstat_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalStrArray" get-type="i_cal_str_array_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalTimeSpan" get-type="i_cal_time_span_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalTimezone" get-type="i_cal_timezone_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalTrigger" get-type="i_cal_trigger_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalValue" get-type="i_cal_value_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalVcardParameter" get-type="i_cal_vcard_parameter_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalVcardComponent" get-type="i_cal_vcard_component_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalVcardEnumArray" get-type="i_cal_vcard_enum_array_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalVcardGeo" get-type="i_cal_vcard_geo_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalVcardProperty" get-type="i_cal_vcard_property_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalVcardStrArray" get-type="i_cal_vcard_str_array_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalVcardStructured" get-type="i_cal_vcard_structured_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalVcardTime" get-type="i_cal_vcard_time_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalVcardTz" get-type="i_cal_vcard_tz_get_type" parents="ICalObject,GObject">
</class>
<class name="ICalVcardValue" get-type="i_cal_vcard_value_get_type" parents="ICalObject,GObject">
</class>
</dump>
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,6 @@
# 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
@@ -692,7 +692,7 @@
Expand All @@ -77,12 +66,13 @@
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__)
@@ -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
# else
/* according to X/OPEN we have to define it ourselves */

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
--- 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"
--- 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;
Expand Down Expand Up @@ -63,15 +63,16 @@
+ return fd;
+}
+
namespace base {
namespace mozilla::ipc::shared_memory {

void SharedMemory::MappingDeleter::operator()(void* ptr) {
@@ -153,7 +212,7 @@
// 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__)
#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`.

47 changes: 47 additions & 0 deletions packages/spidermonkey/0012-fix-rust-compile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
--- a/toolkit/components/extensions/storage/moz.build
+++ b/toolkit/components/extensions/storage/moz.build
@@ -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:
EXTRA_JS_MODULES += [
"ExtensionStorageComponents.sys.mjs",
]
--- a/toolkit/library/rust/shared/Cargo.toml
+++ b/toolkit/library/rust/shared/Cargo.toml
@@ -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"
--- a/toolkit/library/rust/shared/lib.rs
+++ b/toolkit/library/rust/shared/lib.rs
@@ -55,7 +55,6 @@

extern crate audio_thread_priority;

-#[cfg(not(target_os = "android"))]
extern crate webext_storage;

#[cfg(feature = "webrtc")]
@@ -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;

extern crate gecko_logger;

52 changes: 0 additions & 52 deletions packages/spidermonkey/0013-fix-rust-compile.patch

This file was deleted.

17 changes: 0 additions & 17 deletions packages/spidermonkey/0017-icu-74.patch

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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:
Expand All @@ -30,3 +32,4 @@ It uses `android_res_nquery`, but this function only got added in API level 29

UNIFIED_SOURCES += [
"ChildDNSService.cpp",

18 changes: 13 additions & 5 deletions packages/spidermonkey/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,29 @@ TERMUX_PKG_HOMEPAGE=https://spidermonkey.dev
TERMUX_PKG_DESCRIPTION="Mozilla's JavaScript engine"
TERMUX_PKG_LICENSE="MPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="128.10.0"
TERMUX_PKG_REVISION=2
_REAL_VERSION=${TERMUX_PKG_VERSION}esr
TERMUX_PKG_SRCURL=https://archive.mozilla.org/pub/firefox/releases/$_REAL_VERSION/source/firefox-$_REAL_VERSION.source.tar.xz
TERMUX_PKG_SHA256=2ed83e26e41a8b3e2c7c0d13448a84dbb9b7ed65ed46bc162d629b0c6b071caf
TERMUX_PKG_VERSION="140.7.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL="https://archive.mozilla.org/pub/firefox/releases/${TERMUX_PKG_VERSION}esr/source/firefox-${TERMUX_PKG_VERSION}esr.source.tar.xz"
TERMUX_PKG_SHA256=608a739071726f30236f7100ec5e30e1b8ec342d4e91e715948c287909cb1529
TERMUX_PKG_DEPENDS="libicu, libnspr, libnss, zlib"
TERMUX_PKG_BUILD_IN_SRC=true

# Firefox 140's mach only supports Python 3.12 or lower.
_MOZILLA_PYTHON_VERSION=3.12.12
_MOZILLA_PYTHON_SRCURL=https://www.python.org/ftp/python/${_MOZILLA_PYTHON_VERSION}/Python-${_MOZILLA_PYTHON_VERSION}.tar.xz
_MOZILLA_PYTHON_SHA256=fb85a13414b028c49ba18bbd523c2d055a30b56b18b92ce454ea2c51edc656c4

termux_step_post_get_source() {
local f="media/ffvpx/config_unix_aarch64.h"
echo "Applying sed substitution to ${f}"
sed -E '/^#define (CONFIG_LINUX_PERF|HAVE_SYSCTL) /s/1$/0/' -i ${f}
}

termux_step_pre_configure() {
termux_setup_build_python \
"$_MOZILLA_PYTHON_VERSION" \
"$_MOZILLA_PYTHON_SRCURL" \
"$_MOZILLA_PYTHON_SHA256"
termux_setup_nodejs
termux_setup_rust

Expand Down
Loading