0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-12 13:03:31 +00:00
Fredrik Fornwall 98a53c9f18 chore(main/libduktape): Build without using host python2
Use the dist tarball (which other Linux distributions are doing) it's possible
to build duktape without a host python2 - a step towards removing it (#21376).

A small side benefit is that it simplifies the build somewhat and
we do not need to create the pkg-config file ourselves.
2024-09-09 11:03:33 +02:00

23 lines
955 B
Bash

TERMUX_PKG_HOMEPAGE=https://www.duktape.org/
TERMUX_PKG_DESCRIPTION="An embeddable Javascript engine with a focus on portability and compact footprint"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.7.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/svaarala/duktape/releases/download/v$TERMUX_PKG_VERSION/duktape-$TERMUX_PKG_VERSION.tar.xz
TERMUX_PKG_SHA256=90f8d2fa8b5567c6899830ddef2c03f3c27960b11aca222fa17aa7ac613c2890
TERMUX_PKG_REPLACES="duktape (<< 2.3.0-1), libduktape-dev"
TERMUX_PKG_BREAKS="duktape (<< 2.3.0-1), libduktape-dev"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_make_install() {
# Add missing NEEDED on libm.so
sed -i 's/duktape\.c/& -lm/' Makefile.sharedlibrary
make -f Makefile.sharedlibrary CC="${CC}" GXX="${CXX}" INSTALL_PREFIX="${TERMUX_PREFIX}" install
make -f Makefile.cmdline CC="${CC}" GXX="${CXX}" INSTALL_PREFIX="${TERMUX_PREFIX}" duk
install duk "${TERMUX_PREFIX}"/bin
}