2017-07-17 20:24:18 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://www.erlang.org/
|
2018-08-26 02:48:28 +02:00
|
|
|
TERMUX_PKG_DESCRIPTION="General-purpose concurrent functional programming language"
|
2019-01-20 22:39:59 +01:00
|
|
|
TERMUX_PKG_LICENSE="Apache-2.0"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2022-04-01 14:22:03 +02:00
|
|
|
TERMUX_PKG_VERSION="24.3.3"
|
2017-11-22 16:43:28 +01:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/erlang/otp/archive/OTP-$TERMUX_PKG_VERSION.tar.gz
|
2022-04-01 14:22:03 +02:00
|
|
|
TERMUX_PKG_SHA256=a5f4d83426fd3dc2f08c0c823ae29bcf72b69008a2baee66d27ad614ec7ab607
|
2021-10-04 12:43:31 +02:00
|
|
|
TERMUX_PKG_AUTO_UPDATE=true
|
2022-04-01 09:41:46 +02:00
|
|
|
TERMUX_PKG_UPDATE_VERSION_REGEXP="\d+(\.\d+)+"
|
2019-04-14 14:51:46 +02:00
|
|
|
TERMUX_PKG_DEPENDS="openssl, ncurses, zlib"
|
2019-08-12 17:28:41 +02:00
|
|
|
TERMUX_PKG_NO_STATICSPLIT=true
|
|
|
|
TERMUX_PKG_HOSTBUILD=true
|
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
2021-12-06 05:33:25 +01:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
|
|
|
--without-javac
|
|
|
|
--with-ssl=${TERMUX_PREFIX}
|
|
|
|
--with-termcap
|
2021-12-06 05:40:25 +01:00
|
|
|
erl_xcomp_sysroot=${TERMUX_PREFIX}
|
2021-12-06 05:33:25 +01:00
|
|
|
"
|
2016-12-23 22:12:42 +01:00
|
|
|
|
2020-07-16 23:58:48 +02:00
|
|
|
termux_step_post_get_source() {
|
2021-10-27 04:11:46 +02:00
|
|
|
# We need a host build every time, because we dont know the full output of host build and have no idea to cache it.
|
2017-01-10 12:34:38 +01:00
|
|
|
rm -Rf "$TERMUX_PKG_HOSTBUILD_DIR"
|
|
|
|
}
|
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_host_build() {
|
2021-10-27 04:11:46 +02:00
|
|
|
cd $TERMUX_PKG_BUILDDIR
|
|
|
|
# Erlang cross compile reference: https://github.com/erlang/otp/blob/master/HOWTO/INSTALL-CROSS.md#building-a-bootstrap-system
|
|
|
|
# Build erlang bootstrap system.
|
|
|
|
./configure --enable-bootstrap-only --without-javac --without-ssl --without-termcap
|
|
|
|
make -j $TERMUX_MAKE_PROCESSES
|
2016-12-23 22:12:42 +01:00
|
|
|
}
|
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_pre_configure() {
|
2021-10-27 04:11:46 +02:00
|
|
|
# Add --build flag for erlang cross build
|
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --build=$(./erts/autoconf/config.guess)"
|
2022-02-22 14:21:31 +01:00
|
|
|
}
|