termux-packages/packages/ninja/build.sh

30 lines
770 B
Bash
Raw Normal View History

2017-09-15 18:41:26 +02:00
TERMUX_PKG_HOMEPAGE=https://ninja-build.org
TERMUX_PKG_DESCRIPTION="A small build system with a focus on speed"
2019-01-21 13:53:58 +01:00
TERMUX_PKG_LICENSE="Apache-2.0"
2020-01-30 21:03:41 +01:00
TERMUX_PKG_VERSION=1.10.0
2017-09-15 18:41:26 +02:00
TERMUX_PKG_SRCURL=https://github.com/ninja-build/ninja/archive/v${TERMUX_PKG_VERSION}.tar.gz
2020-01-30 21:03:41 +01:00
TERMUX_PKG_SHA256=3810318b08489435f8efc19c05525e80a993af5a55baa0dfeae0465a9d45f99f
TERMUX_PKG_DEPENDS="libc++, libandroid-spawn"
termux_step_pre_configure() {
CXXFLAGS+=" $CPPFLAGS"
LDFLAGS+=" -landroid-spawn"
}
2017-09-15 18:41:26 +02:00
termux_step_configure() {
2017-09-15 18:41:26 +02:00
$TERMUX_PKG_SRCDIR/configure.py
}
termux_step_make() {
if $TERMUX_ON_DEVICE_BUILD; then
$TERMUX_PKG_SRCDIR/configure.py --bootstrap
else
termux_setup_ninja
ninja -j $TERMUX_MAKE_PROCESSES
fi
2017-09-15 18:41:26 +02:00
}
termux_step_make_install() {
2017-09-15 18:41:26 +02:00
cp ninja $TERMUX_PREFIX/bin
}