From 7cbfdd9f4c566ff71931da52f3a21db73b2cddaa Mon Sep 17 00:00:00 2001 From: Dan Vargas <10914883+dvargas46@users.noreply.github.com> Date: Tue, 6 Apr 2021 00:07:54 -0500 Subject: [PATCH] pkg(ocaml-4.12.0): Add ocaml 4.12.0 (#200) --- packages/ocaml/4.12.0/build.sh | 17 +++++++++++++++++ packages/ocaml/4.12.0/compile | 3 +++ packages/ocaml/4.12.0/environment | 3 +++ packages/ocaml/4.12.0/metadata.json | 5 +++++ packages/ocaml/4.12.0/run | 4 ++++ packages/ocaml/4.12.0/test.ml | 1 + 6 files changed, 33 insertions(+) create mode 100755 packages/ocaml/4.12.0/build.sh create mode 100644 packages/ocaml/4.12.0/compile create mode 100644 packages/ocaml/4.12.0/environment create mode 100644 packages/ocaml/4.12.0/metadata.json create mode 100644 packages/ocaml/4.12.0/run create mode 100644 packages/ocaml/4.12.0/test.ml diff --git a/packages/ocaml/4.12.0/build.sh b/packages/ocaml/4.12.0/build.sh new file mode 100755 index 0000000..fd91cdd --- /dev/null +++ b/packages/ocaml/4.12.0/build.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +PREFIX=$(realpath $(dirname $0)) + +mkdir -p build +cd build + +curl -L "https://github.com/ocaml/ocaml/archive/4.12.0.tar.gz" -o ocaml.tar.gz +tar xzf ocaml.tar.gz --strip-components=1 +rm ocaml.tar.gz + +./configure --prefix="$PREFIX" +make -j$(nproc) +make install -j$(nproc) + +cd .. +rm -rf build diff --git a/packages/ocaml/4.12.0/compile b/packages/ocaml/4.12.0/compile new file mode 100644 index 0000000..c1d3e6a --- /dev/null +++ b/packages/ocaml/4.12.0/compile @@ -0,0 +1,3 @@ +#!/bin/bash + +ocamlc -o out "$@" diff --git a/packages/ocaml/4.12.0/environment b/packages/ocaml/4.12.0/environment new file mode 100644 index 0000000..116e7aa --- /dev/null +++ b/packages/ocaml/4.12.0/environment @@ -0,0 +1,3 @@ +#!/bin/bash + +export PATH=$PWD/bin:$PATH diff --git a/packages/ocaml/4.12.0/metadata.json b/packages/ocaml/4.12.0/metadata.json new file mode 100644 index 0000000..ddbfb89 --- /dev/null +++ b/packages/ocaml/4.12.0/metadata.json @@ -0,0 +1,5 @@ +{ + "language": "ocaml", + "version": "4.12.0", + "aliases": ["ocaml", "ml"] +} diff --git a/packages/ocaml/4.12.0/run b/packages/ocaml/4.12.0/run new file mode 100644 index 0000000..e2663b1 --- /dev/null +++ b/packages/ocaml/4.12.0/run @@ -0,0 +1,4 @@ +#!/bin/bash + +shift +./out "$@" diff --git a/packages/ocaml/4.12.0/test.ml b/packages/ocaml/4.12.0/test.ml new file mode 100644 index 0000000..ef98f8c --- /dev/null +++ b/packages/ocaml/4.12.0/test.ml @@ -0,0 +1 @@ +print_string "OK\n";