Skip to content

Commit

Permalink
enable,bump(main/deno): 2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mbekkomo committed Nov 28, 2024
1 parent 98fc467 commit a5db51d
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 106 deletions.
61 changes: 0 additions & 61 deletions disabled-packages/deno/build.sh

This file was deleted.

23 changes: 0 additions & 23 deletions disabled-packages/deno/cli-tools-upgrade.rs.patch

This file was deleted.

11 changes: 0 additions & 11 deletions disabled-packages/deno/ext-ffi-Cargo.toml.patch

This file was deleted.

11 changes: 0 additions & 11 deletions disabled-packages/deno/runtime-ops-signal.rs.patch

This file was deleted.

13 changes: 13 additions & 0 deletions packages/deno/0001-enable-libffi-system-feature.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/ext/ffi/Cargo.toml b/ext/ffi/Cargo.toml
index 2f0813a58..fda6e2469 100644
--- a/ext/ffi/Cargo.toml
+++ b/ext/ffi/Cargo.toml
@@ -18,7 +18,7 @@ deno_core.workspace = true
deno_permissions.workspace = true
dlopen2.workspace = true
dynasmrt = "1.2.3"
-libffi = "=3.2.0"
+libffi = { version = "=3.2.0", features = ["system"] }
libffi-sys = "=2.3.0"
log.workspace = true
num-bigint.workspace = true
29 changes: 29 additions & 0 deletions packages/deno/0002-disable-upgrading-via-cli.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
diff --git a/cli/tools/upgrade.rs b/cli/tools/upgrade.rs
index cb85859f7..891ebb0e2 100644
--- a/cli/tools/upgrade.rs
+++ b/cli/tools/upgrade.rs
@@ -480,6 +480,7 @@ async fn fetch_and_store_latest_version<
env.write_check_file(&version_file.serialize());
}

+#[cfg(not(target_os = "android"))]
pub async fn upgrade(
flags: Arc<Flags>,
upgrade_flags: UpgradeFlags,
@@ -612,6 +613,16 @@ pub async fn upgrade(
Ok(())
}

+#[cfg(target_os = "android")]
+pub async fn upgrade(
+ flags: Arc<Flags>,
+ upgrade_flags: UpgradeFlags,
+) -> Result<(), AnyError> {
+ log::error!("You are currently using Deno packaged by the Termux repo. Upgrading Deno via CLI will cause an issue to installed Deno. Wait for an update on Deno package in the Termux repo to upgrade.");
+ deno_runtime::exit(1);
+}
+
+
#[derive(Debug, PartialEq)]
enum RequestedVersion {
Latest(ReleaseChannel),
13 changes: 13 additions & 0 deletions packages/deno/0003-fix-tmp-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/ext/node/polyfills/os.ts b/ext/node/polyfills/os.ts
index edc89ed2c..ae24b53a1 100644
--- a/ext/node/polyfills/os.ts
+++ b/ext/node/polyfills/os.ts
@@ -287,7 +287,7 @@ export function tmpdir(): string | null {
return temp;
} else { // !isWindows
let temp = Deno.env.get("TMPDIR") || Deno.env.get("TMP") ||
- Deno.env.get("TEMP") || "/tmp";
+ Deno.env.get("TEMP") || "@TERMUX_PREFIX@/tmp";
if (temp.length > 1 && StringPrototypeEndsWith(temp, "/")) {
temp = StringPrototypeSlice(temp, 0, -1);
}
13 changes: 13 additions & 0 deletions packages/deno/0004-use-libz-sys-default-features.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Cargo.toml b/Cargo.toml
index 987c291fc..d60b7c431 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -143,7 +143,7 @@ ipnet = "2.3"
jsonc-parser = { version = "=0.26.2", features = ["serde"] }
lazy-regex = "3"
libc = "0.2.126"
-libz-sys = { version = "1.1.20", default-features = false }
+libz-sys = "1.1.20"
log = { version = "0.4.20", features = ["kv"] }
lsp-types = "=0.97.0" # used by tower-lsp and "proposed" feature is unstable in patch releases
memmem = "0.1.1"
26 changes: 26 additions & 0 deletions packages/deno/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
TERMUX_PKG_HOMEPAGE=https://deno.land/
TERMUX_PKG_DESCRIPTION="A modern runtime for JavaScript and TypeScript"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.1.1
TERMUX_PKG_SRCURL=git+https://github.com/denoland/deno
TERMUX_PKG_DEPENDS="libffi, libsqlite, glib, zlib"
TERMUX_PKG_BUILD_DEPENDS="librusty-v8"
TERMUX_PKG_BUILD_IN_SRC=true

termux_step_configure() {
termux_setup_rust
termux_setup_cmake
termux_setup_protobuf
}

termux_step_make() {
export RUSTY_V8_ARCHIVE="${TERMUX_PREFIX}/lib/librusty_v8.a"
export RUSTY_V8_SRC_BINDING_PATH="${TERMUX_PREFIX}/include/librusty_v8/src_binding.rs"

cargo build -vv --jobs "${TERMUX_PKG_MAKE_PROCESSES}" --target "${CARGO_TARGET_NAME}" --release
}

termux_step_make_install() {
install -Dm700 -t "${TERMUX_PREFIX}/bin" "target/${CARGO_TARGET_NAME}/release/deno"
}

0 comments on commit a5db51d

Please sign in to comment.