2019-04-29 13:39:49 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://www.duktape.org/
|
2019-06-17 22:06:14 +02:00
|
|
|
TERMUX_PKG_DESCRIPTION="An embeddable Javascript engine with a focus on portability and compact footprint"
|
2019-04-29 13:39:49 +02:00
|
|
|
TERMUX_PKG_LICENSE="MIT"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2020-07-17 14:19:51 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/svaarala/duktape.git
|
2020-10-17 19:04:54 +02:00
|
|
|
TERMUX_PKG_VERSION=2.6.0
|
2019-07-20 10:42:33 +02:00
|
|
|
TERMUX_PKG_REPLACES="duktape (<< 2.3.0-1), libduktape-dev"
|
|
|
|
TERMUX_PKG_BREAKS="duktape (<< 2.3.0-1), libduktape-dev"
|
2019-08-12 17:28:41 +02:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
2019-04-29 13:39:49 +02:00
|
|
|
|
2019-08-16 13:31:46 +02:00
|
|
|
termux_step_pre_configure() {
|
|
|
|
if $TERMUX_ON_DEVICE_BUILD; then
|
|
|
|
# configure.py requires 'yaml' python2 module.
|
|
|
|
if ! pip2 show pyyaml > /dev/null 2>&1; then
|
|
|
|
pip2 install pyyaml
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2019-04-29 13:39:49 +02:00
|
|
|
termux_step_make() {
|
|
|
|
make libduktape.so.1.0.0 duk CC=${CC} GXX=${CXX}
|
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_make_install() {
|
2019-06-18 19:11:53 +02:00
|
|
|
install libduktape.so.1.0.0 ${TERMUX_PREFIX}/lib/libduktape.so
|
|
|
|
install duk ${TERMUX_PREFIX}/bin
|
|
|
|
install prep/nondebug/*.h ${TERMUX_PREFIX}/include
|
2019-04-29 13:39:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_post_make_install() {
|
2019-04-29 13:44:39 +02:00
|
|
|
# Add a pkg-config file for the duktape lib
|
2019-04-29 13:39:49 +02:00
|
|
|
cat > "$PKG_CONFIG_LIBDIR/duktape.pc" <<-HERE
|
|
|
|
Name: Duktape
|
|
|
|
Description: Shared library for the Duktape interpreter
|
|
|
|
Version: $TERMUX_PKG_VERSION
|
|
|
|
Requires:
|
|
|
|
Libs: -lduktape -lm
|
|
|
|
HERE
|
|
|
|
}
|