| 1 | TERMUX_PKG_HOMEPAGE=https://www.erlang.org/ |
| 2 | TERMUX_PKG_DESCRIPTION="General-purpose concurrent functional programming language developed by Ericsson" |
| 3 | TERMUX_PKG_VERSION=20.1.6 |
| 4 | TERMUX_PKG_SHA256=21358072bc7052639b0af33d726e5d38cd4d2bb92581ceb227a347282482476a |
| 5 | TERMUX_PKG_SRCURL=https://github.com/erlang/otp/archive/OTP-$TERMUX_PKG_VERSION.tar.gz |
| 6 | TERMUX_PKG_DEPENDS="openssl, ncurses, libutil" |
| 7 | TERMUX_PKG_HOSTBUILD="yes" |
| 8 | TERMUX_PKG_BUILD_IN_SRC="yes" |
| 9 | TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--without-javac --with-ssl=${TERMUX_PREFIX} --with-termcap" |
| 10 | TERMUX_PKG_EXTRA_MAKE_ARGS="noboot" |
| 11 | |
| 12 | termux_step_post_extract_package() { |
| 13 | # We need a host build every time: |
| 14 | rm -Rf "$TERMUX_PKG_HOSTBUILD_DIR" |
| 15 | ./otp_build autoconf |
| 16 | } |
| 17 | |
| 18 | termux_step_host_build () { |
| 19 | cd $TERMUX_PKG_SRCDIR |
| 20 | ./configure --enable-bootstrap-only |
| 21 | make -j "$TERMUX_MAKE_PROCESSES" |
| 22 | } |
| 23 | |
| 24 | termux_step_pre_configure () { |
| 25 | # liblog is needed for syslog usage: |
| 26 | LDFLAGS+=" -llog" |
| 27 | # Put binaries built in termux_step_host_build at start of PATH: |
| 28 | cp bin/*/* $TERMUX_PKG_SRCDIR/bootstrap/bin |
| 29 | export PATH="$TERMUX_PKG_SRCDIR/bootstrap/bin:$PATH" |
| 30 | } |