diff options
-rwxr-xr-x | kerl | 21 |
1 files changed, 18 insertions, 3 deletions
@@ -391,7 +391,8 @@ get_otp_version() get_perl_version() { if assert_perl; then - perl -v | grep version | sed $SED_OPT -e 's/.*v5\.([0-9]+)\.[0-9].*/\1/' + # This is really evil but it's portable and it works. Don't @ me bro + perl -e 'print int(($] - 5)*1000)' else echo "FATAL: I couldn't find perl which is required to compile Erlang." exit 1 @@ -542,6 +543,15 @@ _do_build() Darwin) OSVERSION=`uname -r` RELVERSION=`get_otp_version "$1"` + + # Ensure that the --enable-darwin-64bit flag is set on all macOS + # That way even on older Erlangs we get 64 bit Erlang builds + # macOS has been mandatory 64 bit for a while + echo -n $KERL_CONFIGURE_OPTIONS | grep "darwin-64bit" 1>/dev/null 2>&1 + if [ $? -ne 0 ]; then + KERL_CONFIGURE_OPTIONS = "$KERL_CONFIGURE_OPTIONS --enable-darwin-64bit" + fi + case "$OSVERSION" in 16*|15*) echo -n $KERL_CONFIGURE_OPTIONS | grep "ssl" 1>/dev/null 2>&1 @@ -889,8 +899,13 @@ ACTIVATE_CSH if [ -d "$DOC_DIR" ]; then echo "Installing docs..." cp $CP_OPT "$DOC_DIR/" "$absdir/lib" - ln -s "$absdir/lib/erlang/man" "$absdir/man" - ln -s "$absdir/lib/erlang/doc" "$absdir/html" + if [ -d "$absdir/lib/erlang/man" ]; then + ln -s "$absdir/lib/erlang/man" "$absdir/man" + ln -s "$absdir/lib/erlang/doc" "$absdir/html" + elif [ -d "$absdir/lib/man" ]; then + ln -s "$absdir/lib/man" "$absdir/man" + ln -s "$absdir/lib/doc" "$absdir/html" + fi fi else if [ "$KERL_BUILD_BACKEND" = "tarball" ]; then |