0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-21 22:06:17 +00:00
termux-packages/disabled-packages/librusty-v8/build.sh
Henrik Grimler 9e90d1b31a
tree-wide: rename TERMUX_MAKE_PROCESSES to TERMUX_PKG_MAKE_PROCESSES
Some packages have issues with parallel builds and need to set
TERMUX_MAKE_PROCESSES=1. All other build variables that package
recipes set are prefixed with TERMUX_PKG, use that for MAKE_PROCESSES
as well for consistency.

%ci:no-build
2024-06-16 11:16:22 +02:00

46 lines
1.3 KiB
Bash

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"
_COMMIT=8b90dfd2f4fcbbaefd2c4d2be220d94a00a3ebba
TERMUX_PKG_VERSION=2022.02.02
TERMUX_PKG_SRCURL=git+https://github.com/denoland/rusty_v8
TERMUX_PKG_GIT_BRANCH=main
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_NO_STATICSPLIT=true
TERMUX_PKG_BLACKLISTED_ARCHES="arm, i686, x86_64"
termux_step_post_get_source() {
git fetch --unshallow || true
git checkout $_COMMIT
local version="$(git log -1 --format=%cs | sed 's/-/./g')"
if [ "$version" != "$TERMUX_PKG_VERSION" ]; then
echo -n "ERROR: The specified version \"$TERMUX_PKG_VERSION\""
echo " is different from what is expected to be: \"$version\""
return 1
fi
git submodule update --init --recursive
}
termux_step_pre_configure() {
export V8_FROM_SOURCE=1
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
}
termux_step_make() {
termux_setup_rust
cargo build --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
}
termux_step_post_make_install() {
unset V8_FROM_SOURCE
unset PKG_CONFIG_PATH
}