mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-11 20:30:53 +00:00
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
32 lines
1.3 KiB
Bash
32 lines
1.3 KiB
Bash
TERMUX_PKG_HOMEPAGE=https://github.com/Aloxaf/silicon
|
|
TERMUX_PKG_DESCRIPTION="Silicon is an alternative to Carbon implemented in Rust"
|
|
TERMUX_PKG_LICENSE="MIT"
|
|
TERMUX_PKG_MAINTAINER="Yaksh Bariya <thunder-coding@termux.dev>"
|
|
TERMUX_PKG_VERSION="0.5.2"
|
|
TERMUX_PKG_SRCURL=https://github.com/Aloxaf/silicon/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
|
|
TERMUX_PKG_SHA256=815d41775dd9cd399650addf8056f803f3f57e68438e8b38445ee727a56b4b2d
|
|
TERMUX_PKG_DEPENDS="fontconfig, harfbuzz"
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
TERMUX_PKG_AUTO_UPDATE=true
|
|
|
|
termux_step_pre_configure() {
|
|
termux_setup_cmake
|
|
termux_setup_rust
|
|
|
|
# Dummy CMake toolchain file to workaround build error:
|
|
# error: failed to run custom build command for `freetype-sys v0.13.1`
|
|
# ...
|
|
# CMake Error at /home/builder/.termux-build/_cache/cmake-3.27.5/share/cmake-3.27/Modules/Platform/Android-Determine.cmake:217 (message):
|
|
# Android: Neither the NDK or a standalone toolchain was found.
|
|
export TARGET_CMAKE_TOOLCHAIN_FILE="${TERMUX_PKG_BUILDDIR}/android.toolchain.cmake"
|
|
touch "${TERMUX_PKG_BUILDDIR}/android.toolchain.cmake"
|
|
}
|
|
|
|
termux_step_make() {
|
|
cargo build --jobs $TERMUX_PKG_MAKE_PROCESSES --target $CARGO_TARGET_NAME --release
|
|
}
|
|
|
|
termux_step_make_install() {
|
|
install -Dm755 -t $TERMUX_PREFIX/bin target/${CARGO_TARGET_NAME}/release/silicon
|
|
}
|