erlang: Update from 20.3.2 to 20.3.4
[termux-packages] / packages / erlang / build.sh
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.3.4
4 TERMUX_PKG_SHA256=6a3b8d42b49dde708ab6faea4bf56b12466d0435e95314f42cedc0471ffcf7ae
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 }