mirror of
https://github.com/termux/termux-packages.git
synced 2025-03-04 04:48:55 +00:00
- New variables have been implemented: - TERMUX_PKG_BUILD32 - enables or disables cross-compilation of the package - TERMUX_PKG_BUILD32DIR - path to compiled cross-package components - TERMUX_LIB64_PATH - 64-bit library path - TERMUX_LIB32_PATH - 32-bit library path - TERMUX_LIB_PATH - path to the library which changes depending on the compilation type (non-cross - TERMUX_LIB64_PATH, cross - TERMUX_LIB32_PATH) - Implemented cross functions (termux_step_configure32, termux_step_make32 and termux_step_make_install32). - The application environment setup scheme has been updated to ensure that cgct works properly. It now sets up temporary glibc, glibc32 packages, and libgcc symbolic links from cgct when needed. The updated scheme also allows forks to easily build glibc packages for their applications. - The glibc package naming standard has been updated, now glibc packages can be named with the "glibc32" prefix.
41 lines
1.5 KiB
Bash
41 lines
1.5 KiB
Bash
# shellcheck disable=SC2086
|
|
termux_step_make_install() {
|
|
[ "$TERMUX_PKG_METAPACKAGE" = "true" ] && return
|
|
|
|
if test -f build.ninja; then
|
|
ninja -j $TERMUX_PKG_MAKE_PROCESSES install
|
|
elif test -f setup.py || test -f pyproject.toml || test -f setup.cfg; then
|
|
pip install --no-deps . --prefix $TERMUX_PREFIX
|
|
elif ls ./*.cabal &>/dev/null; then
|
|
# Workaround until `cabal install` is fixed.
|
|
while read -r bin; do
|
|
[[ -f "$bin" ]] || termux_error_exit "'$bin', no such file. Has build completed?"
|
|
echo "INFO: Installing '$bin' component..."
|
|
cp "$bin" "$TERMUX_PREFIX/bin"
|
|
done< <(cat ./dist-newstyle/cache/plan.json | jq -r '."install-plan"[]|select(."component-name"? and (."component-name"|test("exe:.*")) and (.style == "local") )|."bin-file"')
|
|
elif ls ./*akefile &>/dev/null || [ -n "$TERMUX_PKG_EXTRA_MAKE_ARGS" ]; then
|
|
: "${TERMUX_PKG_MAKE_INSTALL_TARGET:="install"}"
|
|
# Some packages have problem with parallell install, and it does not buy much, so use -j 1.
|
|
if [ -z "$TERMUX_PKG_EXTRA_MAKE_ARGS" ]; then
|
|
make -j 1 ${TERMUX_PKG_MAKE_INSTALL_TARGET}
|
|
else
|
|
make -j 1 ${TERMUX_PKG_EXTRA_MAKE_ARGS} ${TERMUX_PKG_MAKE_INSTALL_TARGET}
|
|
fi
|
|
elif test -f Cargo.toml; then
|
|
termux_setup_rust
|
|
cargo install \
|
|
--jobs $TERMUX_PKG_MAKE_PROCESSES \
|
|
--path . \
|
|
--force \
|
|
--locked \
|
|
--no-track \
|
|
--target $CARGO_TARGET_NAME \
|
|
--root $TERMUX_PREFIX \
|
|
$TERMUX_PKG_EXTRA_CONFIGURE_ARGS
|
|
fi
|
|
}
|
|
|
|
termux_step_make_install32() {
|
|
termux_step_make_install
|
|
}
|