From 8a778f70331dc2b770d480f2ebf0496cd4379399 Mon Sep 17 00:00:00 2001 From: RVG|lory <87276663+LoryPelli@users.noreply.github.com> Date: Sat, 8 Apr 2023 22:07:40 +0200 Subject: [PATCH] Updated to `Pascal 3.2.2` --- packages/pascal/3.2.2/build.sh | 25 +++++++++++++++++++++++++ packages/pascal/3.2.2/compile | 5 +++++ packages/pascal/3.2.2/environment | 1 + packages/pascal/3.2.2/metadata.json | 5 +++++ packages/pascal/3.2.2/run | 4 ++++ packages/pascal/3.2.2/test.pp | 5 +++++ 6 files changed, 45 insertions(+) create mode 100644 packages/pascal/3.2.2/build.sh create mode 100644 packages/pascal/3.2.2/compile create mode 100644 packages/pascal/3.2.2/environment create mode 100644 packages/pascal/3.2.2/metadata.json create mode 100644 packages/pascal/3.2.2/run create mode 100644 packages/pascal/3.2.2/test.pp diff --git a/packages/pascal/3.2.2/build.sh b/packages/pascal/3.2.2/build.sh new file mode 100644 index 0000000..aa4ad60 --- /dev/null +++ b/packages/pascal/3.2.2/build.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +PREFIX=$(realpath $(dirname $0)) + +mkdir -p build + +cd build +curl -L "https://sourceforge.net/projects/freepascal/files/Linux/3.2.2/fpc-3.2.2.x86_64-linux.tar/download" -o pascal.tar +tar xf pascal.tar --strip-components=1 + +# FreePascal uses an interactive installer +./install.sh << ANSWERS +$PREFIX +n +n +n +ANSWERS + +cd .. +rm -rf build + +# A sample config (needed for each "project") is written to /etc +# We'll copy that into the local lib dir (fpc searches there too on compile) +mkdir lib/fpc/etc +cp -r /etc/fp* lib/fpc/etc/ \ No newline at end of file diff --git a/packages/pascal/3.2.2/compile b/packages/pascal/3.2.2/compile new file mode 100644 index 0000000..20b1280 --- /dev/null +++ b/packages/pascal/3.2.2/compile @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +# Compile pascal files +fpc -oout -v0 "$@" +chmod +x out \ No newline at end of file diff --git a/packages/pascal/3.2.2/environment b/packages/pascal/3.2.2/environment new file mode 100644 index 0000000..bd0ff98 --- /dev/null +++ b/packages/pascal/3.2.2/environment @@ -0,0 +1 @@ +export PATH=$PWD/bin:$PATH \ No newline at end of file diff --git a/packages/pascal/3.2.2/metadata.json b/packages/pascal/3.2.2/metadata.json new file mode 100644 index 0000000..cd85425 --- /dev/null +++ b/packages/pascal/3.2.2/metadata.json @@ -0,0 +1,5 @@ +{ + "language": "pascal", + "version": "3.2.2", + "aliases": ["freepascal", "pp", "pas"] +} \ No newline at end of file diff --git a/packages/pascal/3.2.2/run b/packages/pascal/3.2.2/run new file mode 100644 index 0000000..eb7e9c3 --- /dev/null +++ b/packages/pascal/3.2.2/run @@ -0,0 +1,4 @@ +#!/bin/bash + +shift # Filename is only used to compile +./out "$@" \ No newline at end of file diff --git a/packages/pascal/3.2.2/test.pp b/packages/pascal/3.2.2/test.pp new file mode 100644 index 0000000..3c5165d --- /dev/null +++ b/packages/pascal/3.2.2/test.pp @@ -0,0 +1,5 @@ +program test; + + begin + writeln('OK'); + end. \ No newline at end of file