new package: deno
This commit is contained in:
parent
4a27a66da9
commit
059617db3b
31
packages/deno/build.sh
Normal file
31
packages/deno/build.sh
Normal file
@ -0,0 +1,31 @@
|
||||
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=1.17.3
|
||||
TERMUX_PKG_SRCURL=https://github.com/denoland/deno.git
|
||||
TERMUX_PKG_DEPENDS="libffi"
|
||||
TERMUX_PKG_BUILD_DEPENDS="librusty-v8"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
# Due to dependency on librusty-v8.
|
||||
TERMUX_PKG_BLACKLISTED_ARCHES="arm, i686, x86_64"
|
||||
|
||||
termux_step_make() {
|
||||
termux_setup_rust
|
||||
local libdir=target/$CARGO_TARGET_NAME/release/deps
|
||||
mkdir -p $libdir
|
||||
ln -sf $TERMUX_PREFIX/lib/libffi.so $libdir/
|
||||
local libgcc="$($CC -print-libgcc-file-name)"
|
||||
echo "INPUT($libgcc -l:libunwind.a)" > $libdir/libgcc.so
|
||||
local cmd="cargo build --jobs $TERMUX_MAKE_PROCESSES \
|
||||
--target $CARGO_TARGET_NAME --release"
|
||||
$cmd || :
|
||||
ln -sf $TERMUX_PREFIX/lib/librusty_v8.a \
|
||||
target/$CARGO_TARGET_NAME/release/gn_out/obj/librusty_v8.a
|
||||
$cmd
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
install -Dm700 -t $TERMUX_PREFIX/bin target/${CARGO_TARGET_NAME}/release/deno
|
||||
}
|
11
packages/deno/ext-ffi-Cargo.toml.patch
Normal file
11
packages/deno/ext-ffi-Cargo.toml.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/ext/ffi/Cargo.toml
|
||||
+++ b/ext/ffi/Cargo.toml
|
||||
@@ -16,7 +16,7 @@
|
||||
[dependencies]
|
||||
deno_core = { version = "0.114.0", path = "../../core" }
|
||||
dlopen = "0.1.8"
|
||||
-libffi = "2.0.0"
|
||||
+libffi = { version = "2.0.0", features = ["system"] }
|
||||
serde = { version = "1.0.129", features = ["derive"] }
|
||||
tokio = { version = "1.10.1", features = ["full"] }
|
||||
|
11
packages/deno/runtime-ops-signal.rs.patch
Normal file
11
packages/deno/runtime-ops-signal.rs.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/runtime/ops/signal.rs
|
||||
+++ b/runtime/ops/signal.rs
|
||||
@@ -97,7 +97,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
-#[cfg(target_os = "linux")]
|
||||
+#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
pub fn signal_str_to_int(s: &str) -> Result<libc::c_int, AnyError> {
|
||||
match s {
|
||||
"SIGHUP" => Ok(1),
|
Loading…
Reference in New Issue
Block a user