From 3355ffafb2af4c7c387d707eae9837586a977c62 Mon Sep 17 00:00:00 2001 From: Victor Frazao <31864869+vfrazao-ns1@users.noreply.github.com> Date: Tue, 27 Apr 2021 19:02:59 -0400 Subject: [PATCH] pkg(cobol-3.1.2): Adds cobol 3.1.2 (gnucobol) (#235) --- packages/cobol/3.1.2/build.sh | 20 ++++++++++++++++++++ packages/cobol/3.1.2/compile | 4 ++++ packages/cobol/3.1.2/environment | 5 +++++ packages/cobol/3.1.2/metadata.json | 5 +++++ packages/cobol/3.1.2/run | 5 +++++ packages/cobol/3.1.2/test.cob | 8 ++++++++ 6 files changed, 47 insertions(+) create mode 100755 packages/cobol/3.1.2/build.sh create mode 100755 packages/cobol/3.1.2/compile create mode 100644 packages/cobol/3.1.2/environment create mode 100644 packages/cobol/3.1.2/metadata.json create mode 100755 packages/cobol/3.1.2/run create mode 100644 packages/cobol/3.1.2/test.cob diff --git a/packages/cobol/3.1.2/build.sh b/packages/cobol/3.1.2/build.sh new file mode 100755 index 0000000..1156fa8 --- /dev/null +++ b/packages/cobol/3.1.2/build.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# Put instructions to build your package in here +PREFIX=$(realpath $(dirname $0)) + +mkdir -p build + +cd build + +curl -OL "https://downloads.sourceforge.net/project/gnucobol/gnucobol/3.1/gnucobol-3.1.2.tar.xz" + +tar xf gnucobol-3.1.2.tar.xz --strip-components=1 + +# === autoconf based === +./configure --prefix "$PREFIX" --without-db + +make -j$(nproc) +make install -j$(nproc) +cd ../ +rm -rf build diff --git a/packages/cobol/3.1.2/compile b/packages/cobol/3.1.2/compile new file mode 100755 index 0000000..051eb75 --- /dev/null +++ b/packages/cobol/3.1.2/compile @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +cobc -o binary --free -x -L lib "$@" +chmod +x binary + diff --git a/packages/cobol/3.1.2/environment b/packages/cobol/3.1.2/environment new file mode 100644 index 0000000..ca711d7 --- /dev/null +++ b/packages/cobol/3.1.2/environment @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +export PATH=$PWD/bin:$PATH +export LD_LIBRARY_PATH=$PWD/lib + diff --git a/packages/cobol/3.1.2/metadata.json b/packages/cobol/3.1.2/metadata.json new file mode 100644 index 0000000..cf3e7e1 --- /dev/null +++ b/packages/cobol/3.1.2/metadata.json @@ -0,0 +1,5 @@ +{ + "language": "cobol", + "version": "3.1.2", + "aliases": ["cob"] +} diff --git a/packages/cobol/3.1.2/run b/packages/cobol/3.1.2/run new file mode 100755 index 0000000..9dcedfa --- /dev/null +++ b/packages/cobol/3.1.2/run @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +shift +./binary "$@" + diff --git a/packages/cobol/3.1.2/test.cob b/packages/cobol/3.1.2/test.cob new file mode 100644 index 0000000..1a03e66 --- /dev/null +++ b/packages/cobol/3.1.2/test.cob @@ -0,0 +1,8 @@ +*> Test Program +identification division. +program-id. ok-test. + +procedure division. +display "OK" +goback. +end program ok-test.