Skip to content

Commit

Permalink
bump,enable(main/librusty-v8): 130.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mbekkomo committed Nov 25, 2024
1 parent db65008 commit 159cd28
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 151 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.

45 changes: 0 additions & 45 deletions disabled-packages/librusty-v8/build.sh

This file was deleted.

19 changes: 19 additions & 0 deletions packages/librusty-v8/BUILD.gn.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/BUILD.gn b/BUILD.gn
index 3de64b8..b3a0dd3 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -47,4 +47,14 @@ config("rusty_v8_config") {
"-fansi-escape-codes",
]
}
+
+ cflags_c = []
+ foreach(flag, string_split(getenv("CFLAGS"))) {
+ cflags_c += [ flag ]
+ }
+
+ cflags_cc = []
+ foreach(flag, string_split(getenv("CXXFLAGS"))) {
+ cflags_cc += [ flag ]
+ }
}
51 changes: 51 additions & 0 deletions packages/librusty-v8/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
TERMUX_PKG_HOMEPAGE=https://github.com/denoland/rusty_v8
TERMUX_PKG_DESCRIPTION="High quality Rust bindings to V8's C++ API"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=130.0.1
TERMUX_PKG_SRCURL=git+https://github.com/denoland/rusty_v8
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_NO_STATICSPLIT=true

# to reduce compilation time
_SCCACHE_VERSION=0.8.2
_SCACCHE_SHA256=ecda4ddc89a49f1ec6f35bdce5ecbf6f205b399a680d11119d4ce9f6d962104e

termux_step_configure() {
termux_setup_rust
termux_setup_ninja
termux_setup_gn

GN="$(command -v gn)"
export GN

mkdir -p "${TERMUX_PKG_CACHEDIR}/sccache"
termux_download \
"https://github.com/mozilla/sccache/releases/download/v${_SCCACHE_VERSION}/sccache-v${_SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" \
"${TERMUX_PKG_CACHEDIR}/sccache.tar.gz" \
"${_SCACCHE_SHA256}"
tar -zxf "${TERMUX_PKG_CACHEDIR}/sccache.tar.gz" --strip-components=1 -C "${TERMUX_PKG_CACHEDIR}/sccache"
export SCCACHE="${TERMUX_PKG_CACHEDIR}/sccache/sccache"
}

termux_step_make() {
export CLANG_BASE_PATH="${TERMUX_STANDALONE_TOOLCHAIN}/sysroot/usr"
# workaround for cargo to detect and use CI's clang/clang++
ln -s "${TERMUX_STANDALONE_TOOLCHAIN}/bin" "${CLANG_BASE_PATH}/bin"

export CARGO_CFG_TARGET_OS=android
case ${TERMUX_ARCH} in
i686) CARGO_CFG_TARGET_ARCH=x86 ;;
*) CARGO_CFG_TARGET_ARCH=${TERMUX_ARCH} ;;
esac
export CARGO_CFG_TARGET_ARCH

export TARGET="${TERMUX_HOST_PLATFORM}"

export V8_FROM_SOURCE=1
cargo build -vv --jobs "${TERMUX_PKG_MAKE_PROCESSES}" --target "${CARGO_TARGET_NAME}" --release
}

termux_step_make_install() {
install -Dm600 -t "${TERMUX_PREFIX}/lib" "target/${CARGO_TARGET_NAME}/release/gn_out/obj/librusty_v8.a"
}

0 comments on commit 159cd28

Please sign in to comment.