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
30 changes: 27 additions & 3 deletions packages/libical/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,38 @@ 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="3.0.20"
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://github.com/libical/libical/releases/download/v$TERMUX_PKG_VERSION/libical-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=e73de92f5a6ce84c1b00306446b290a2b08cdf0a80988eca0a2c9d5c3510b4c2
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="libc++, libicu"
TERMUX_PKG_DEPENDS="glib, libc++, libicu, libxml2"
TERMUX_PKG_BREAKS="libical-dev"
TERMUX_PKG_REPLACES="libical-dev"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" -DSHARED_ONLY=true -DICAL_GLIB=false -DUSE_BUILTIN_TZDATA=true -DPERL_EXECUTABLE=/usr/bin/perl"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DSHARED_ONLY=true
-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_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 \
-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
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",

8 changes: 3 additions & 5 deletions packages/spidermonkey/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ 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_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

Expand Down
1 change: 1 addition & 0 deletions scripts/setup-termux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ PYTHON_PACKAGES+=" pygments" # necessary to build mesa (dependency of mako t
PYTHON_PACKAGES+=" mako" # necessary to build mesa
PYTHON_PACKAGES+=" pyyaml" # necessary to build mesa
PYTHON_PACKAGES+=" setuptools" # necessary to build mesa (explicitly 'system'-wide unlike the setuptools in termux_setup_python_pip)
PYTHON_PACKAGES+=" docutils" # necesary to build gnome-shell
# More 'system-wide' python packages should be added here if working towards the goal
# of setup-termux.sh for on-device building having closer behavior
# to setup-ubuntu.sh for cross-compilation. If adding packages here, please add a comment
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -569,12 +569,17 @@
message(FATAL_ERROR "You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv")
endif(NOT HAVE_ICONV)

+if(CMAKE_CROSSCOMPILING)
+ file(COPY "$ENV{ICONV_DETECT_H}" DESTINATION "${CMAKE_BINARY_DIR}/")
+ set(_correct_iconv 1)
+else()
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBS})
file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/" _binary_dir_with_separator)
CHECK_C_SOURCE_RUNS("#define ICONV_DETECT_BUILD_DIR \"${_binary_dir_with_separator}\"
#include \"${CMAKE_SOURCE_DIR}/iconv-detect.c\"" _correct_iconv)
unset(_binary_dir_with_separator)
unset(CMAKE_REQUIRED_LIBRARIES)
+endif()

if(NOT _correct_iconv)
message(FATAL_ERROR "You need to install a working iconv implementation, such as ftp://ftp.gnu.org/pub/gnu/libiconv")
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -639,6 +639,10 @@
# Check to see if strftime supports the use of %l and %k
# *******************************************************

+if(CMAKE_CROSSCOMPILING)
+ message(INFO "Cross compiling, assume HAVE_LKSTRFTIME is 0")
+ set(HAVE_LKSTRFTIME 0)
+else()
CHECK_C_SOURCE_RUNS("
#include <stdlib.h>
#include <string.h>
@@ -657,6 +661,7 @@
return 1;
return 0;
}" HAVE_LKSTRFTIME)
+endif()

# ******************************
# system mail stuff
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -35,10 +35,17 @@
set(CMAKE_REQUIRED_LIBRARIES ${DATA_SERVER_LDFLAGS})
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DG_LOG_DOMAIN=\"oauth2-value-helper\" -DBUILDING_VALUE_HELPER=1)
file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/oauth2-google-client-id" _binary_dir_to_file)
+if(CMAKE_CROSSCOMPILING)
+ execute_process(
+ COMMAND "$ENV{GOOGLE_OAUTH2_SCHEME_SCRIPT}" "${WITH_GOOGLE_CLIENT_ID}" "${_binary_dir_to_file}"
+ )
+ set(_decoded 1)
+else()
CHECK_C_SOURCE_RUNS("#define DECODE_KEY \"${WITH_GOOGLE_CLIENT_ID}\"
#define DECODE_TO_FILE \"${_binary_dir_to_file}\"
#define DECODE_REVERSED 1
#include \"${CMAKE_SOURCE_DIR}/src/libedataserver/e-oauth2-service.c\"" _decoded)
+endif()
file(READ ${_binary_dir_to_file} _google_oauth2_scheme)
unset(_binary_dir_to_file)
unset(_decoded)
22 changes: 22 additions & 0 deletions x11-packages/evolution-data-server/0004-use-host-tools.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- a/src/camel/CMakeLists.txt
+++ b/src/camel/CMakeLists.txt
@@ -20,7 +20,7 @@

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/camel-mime-tables.c
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/camel-gen-tables >${CMAKE_CURRENT_BINARY_DIR}/camel-mime-tables.c
+ COMMAND camel-gen-tables >${CMAKE_CURRENT_BINARY_DIR}/camel-mime-tables.c
DEPENDS camel-gen-tables
)

--- a/src/addressbook/libebook-contacts/CMakeLists.txt
+++ b/src/addressbook/libebook-contacts/CMakeLists.txt
@@ -25,7 +25,7 @@

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/e-name-western-tables.h
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gen-western-table "${CMAKE_CURRENT_SOURCE_DIR}/e-name-western-tables.h.in" >${CMAKE_CURRENT_BINARY_DIR}/e-name-western-tables.h
+ COMMAND gen-western-table "${CMAKE_CURRENT_SOURCE_DIR}/e-name-western-tables.h.in" >${CMAKE_CURRENT_BINARY_DIR}/e-name-western-tables.h
DEPENDS gen-western-table e-name-western-tables.h.in
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -335,7 +335,11 @@
# db_load checking, it's optional
# ******************************

+if(ENABLE_TESTS)
find_program(DB_LOAD NAMES db_load db4_load db_load-4 db5_load db_load-5)
+else()
+set(DB_LOAD 0)
+endif()
if(DB_LOAD)
set(HAVE_DB_LOAD ON)
else(DB_LOAD)
Loading
Loading