0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-01-31 20:12:26 +00:00
Termux Github Actions 8b57f6b458 bump(main/ruff): 0.9.2
This commit has been automatically submitted by Github Actions.
2025-01-16 18:27:41 +00:00

41 lines
1.3 KiB
Bash

TERMUX_PKG_HOMEPAGE="https://github.com/charliermarsh/ruff"
TERMUX_PKG_DESCRIPTION="An extremely fast Python linter, written in Rust"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_LICENSE_FILE="../../LICENSE"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.9.2"
TERMUX_PKG_SRCURL="https://github.com/charliermarsh/ruff/archive/refs/tags/$TERMUX_PKG_VERSION.tar.gz"
TERMUX_PKG_SHA256=d47a61bbbfceda23ddd29dd0c3cb3bb55f240e80a7aa0ba944e7f9f3f6ed886f
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure() {
TERMUX_PKG_SRCDIR+="/crates/ruff"
TERMUX_PKG_BUILDDIR="${TERMUX_PKG_SRCDIR}"
cd $TERMUX_PKG_BUILDDIR
rm -rf _lib
mkdir -p _lib
cd _lib
$CC $CPPFLAGS $CFLAGS -fvisibility=hidden \
-c $TERMUX_PKG_BUILDER_DIR/ctermid.c
$AR cru libctermid.a ctermid.o
local env_host=$(printf $CARGO_TARGET_NAME | tr a-z A-Z | sed s/-/_/g)
export CARGO_TARGET_${env_host}_RUSTFLAGS+=" -C link-arg=$TERMUX_PKG_BUILDDIR/_lib/libctermid.a"
termux_setup_rust
: "${CARGO_HOME:=$HOME/.cargo}"
export CARGO_HOME
cd $TERMUX_PKG_SRCDIR
cargo fetch --target "${CARGO_TARGET_NAME}"
local _patch=$TERMUX_PKG_BUILDER_DIR/tikv-jemalloc-sys-0.5.3+5.3.0-patched-src-lib.rs.diff
local d
for d in $CARGO_HOME/registry/src/*/tikv-jemalloc-sys-*; do
patch --silent -p1 -d ${d} < ${_patch} || :
done
}