From 9b1e4871563b9a5c0248b67f1b873d058dd93be2 Mon Sep 17 00:00:00 2001 From: Dan Vargas Date: Sat, 13 Mar 2021 20:57:52 -0600 Subject: [PATCH] pkg(erlang-23.0.0): Added erlang (escript) 23.0.0 --- packages/erlang/23.0.0/build.sh | 21 +++++++++++++++++++++ packages/erlang/23.0.0/environment | 4 ++++ packages/erlang/23.0.0/metadata.json | 6 ++++++ packages/erlang/23.0.0/run | 4 ++++ packages/erlang/23.0.0/test.erl | 3 +++ 5 files changed, 38 insertions(+) create mode 100755 packages/erlang/23.0.0/build.sh create mode 100644 packages/erlang/23.0.0/environment create mode 100644 packages/erlang/23.0.0/metadata.json create mode 100644 packages/erlang/23.0.0/run create mode 100644 packages/erlang/23.0.0/test.erl diff --git a/packages/erlang/23.0.0/build.sh b/packages/erlang/23.0.0/build.sh new file mode 100755 index 0000000..f282bc2 --- /dev/null +++ b/packages/erlang/23.0.0/build.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +PREFIX=$(realpath $(dirname $0)) + +mkdir -p build + +cd build + +curl "http://erlang.org/download/otp_src_23.0.tar.gz" -o erlang.tar.gz +tar xzf erlang.tar.gz --strip-components=1 +rm erlang.tar.gz + +export ERL_TOP=$(pwd) +./configure --prefix "$PREFIX" +make -j$(nproc) +make install -j$(nproc) + +cd .. + +rm -rf build + diff --git a/packages/erlang/23.0.0/environment b/packages/erlang/23.0.0/environment new file mode 100644 index 0000000..780b668 --- /dev/null +++ b/packages/erlang/23.0.0/environment @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +# Put 'export' statements here for environment variables +export PATH=$PWD/bin:$PATH diff --git a/packages/erlang/23.0.0/metadata.json b/packages/erlang/23.0.0/metadata.json new file mode 100644 index 0000000..d035d40 --- /dev/null +++ b/packages/erlang/23.0.0/metadata.json @@ -0,0 +1,6 @@ +{ + "language": "erlang", + "version": "23.0.0", + "author": "Dan Vargas ", + "aliases": ["erlang", "erl", "escript"] +} \ No newline at end of file diff --git a/packages/erlang/23.0.0/run b/packages/erlang/23.0.0/run new file mode 100644 index 0000000..135d9f4 --- /dev/null +++ b/packages/erlang/23.0.0/run @@ -0,0 +1,4 @@ +#!/bin/bash + +# Put instructions to run the runtime +escript "$@" \ No newline at end of file diff --git a/packages/erlang/23.0.0/test.erl b/packages/erlang/23.0.0/test.erl new file mode 100644 index 0000000..d898d2c --- /dev/null +++ b/packages/erlang/23.0.0/test.erl @@ -0,0 +1,3 @@ + +main(_) -> + io:format("OK~n"). \ No newline at end of file