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. diff --git a/packages/gcc/10.2.0/build.sh b/packages/gcc/10.2.0/build.sh index 0f4be80..0ed183a 100755 --- a/packages/gcc/10.2.0/build.sh +++ b/packages/gcc/10.2.0/build.sh @@ -17,7 +17,7 @@ tar xzf gcc.tar.gz --strip-components=1 cd ../obj # === autoconf based === -../build/configure --prefix "$PREFIX" --enable-languages=c,c++,d --disable-multilib --disable-bootstrap +../build/configure --prefix "$PREFIX" --enable-languages=c,c++,d,fortran --disable-multilib --disable-bootstrap make -j$(nproc) make install -j$(nproc) diff --git a/packages/gcc/10.2.0/compile b/packages/gcc/10.2.0/compile index b381537..a77ba35 100644 --- a/packages/gcc/10.2.0/compile +++ b/packages/gcc/10.2.0/compile @@ -16,6 +16,10 @@ case "${PISTON_LANGUAGE}" in rename 's/.code$/\.d/' "$@" # Add .d extension gdc *.d ;; + fortran) + rename 's/.code$/\.f90/' "$@" # Add .f90 extension + gfortran *.f90 + ;; *) echo "How did you get here? (${PISTON_LANGUAGE})" exit 1 diff --git a/packages/gcc/10.2.0/environment b/packages/gcc/10.2.0/environment index 780b668..a0b5a11 100644 --- a/packages/gcc/10.2.0/environment +++ b/packages/gcc/10.2.0/environment @@ -2,3 +2,4 @@ # Put 'export' statements here for environment variables export PATH=$PWD/bin:$PATH +export LD_LIBRARY_PATH="$PWD/lib:$PWD/lib64" # Need this to properly link Fortran diff --git a/packages/gcc/10.2.0/metadata.json b/packages/gcc/10.2.0/metadata.json index 800e652..f969bf5 100644 --- a/packages/gcc/10.2.0/metadata.json +++ b/packages/gcc/10.2.0/metadata.json @@ -13,6 +13,10 @@ { "language": "d", "aliases": ["gdc"] + }, + { + "language": "fortran", + "aliases": ["fortran", "f90"] } ] } diff --git a/packages/gcc/10.2.0/test.f90 b/packages/gcc/10.2.0/test.f90 new file mode 100644 index 0000000..99fc062 --- /dev/null +++ b/packages/gcc/10.2.0/test.f90 @@ -0,0 +1,3 @@ +program test + print "(a)", 'OK' +end program test diff --git a/packages/groovy/3.0.7/build.sh b/packages/groovy/3.0.7/build.sh index ae1ecc5..fb6321d 100755 --- a/packages/groovy/3.0.7/build.sh +++ b/packages/groovy/3.0.7/build.sh @@ -8,6 +8,7 @@ tar xzf java.tar.gz --strip-components=1 rm java.tar.gz cd .. -curl -L "https://dl.bintray.com/groovy/maven/apache-groovy-binary-3.0.7.zip" -o groovy.zip +# Download Groovy binaries +curl -L "https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/apache-groovy-binary-3.0.7.zip" -o groovy.zip unzip -q groovy.zip rm groovy.zip diff --git a/packages/groovy/3.0.7/compile b/packages/groovy/3.0.7/compile new file mode 100644 index 0000000..c501c9e --- /dev/null +++ b/packages/groovy/3.0.7/compile @@ -0,0 +1,17 @@ +#!/bin/bash + +# Compile groovy scripts into a separate "classes" directory +# NOTE: - Main file MUST be a groovy script +# - not supporting object class entry points as of now +groovyc -d classes "$@" + +# Create the Manifest and include groovy jars: +# NOTE: - main class will be the first file ('.' becomes '_' and without the extension) +# - groovy lib jars MUST be in the class path in order to work properly +echo "Main-Class: $(sed 's/\./\_/g'<<<${1%.*}) +Class-Path: $(echo $GROOVY_HOME/lib/*.jar | sed 's/\s/\n /g') + +" > manifest.txt + +# Create the jar from the manifest and classes +jar cfm out.jar manifest.txt -C classes . diff --git a/packages/groovy/3.0.7/environment b/packages/groovy/3.0.7/environment index 842a62b..1817781 100644 --- a/packages/groovy/3.0.7/environment +++ b/packages/groovy/3.0.7/environment @@ -2,4 +2,9 @@ # Groovy requires JAVA_HOME to be set export JAVA_HOME=$PWD/java -export PATH=$PWD/groovy-3.0.7/bin:$PATH + +# GROOVY_HOME needed to get the groovy libs +export GROOVY_HOME=$PWD/groovy-3.0.7 + +# Add java and groovy binaries to the path +export PATH=$PWD/java/bin:$PWD/groovy-3.0.7/bin:$PATH diff --git a/packages/groovy/3.0.7/run b/packages/groovy/3.0.7/run index e31d7d4..813d3bc 100644 --- a/packages/groovy/3.0.7/run +++ b/packages/groovy/3.0.7/run @@ -1,3 +1,5 @@ #!/bin/bash -groovy "$@" +# Run the jar created during compile +shift +java -jar out.jar "$@" diff --git a/packages/lolcode/0.11.2/build.sh b/packages/lolcode/0.11.2/build.sh index 72a9ea3..007fe82 100755 --- a/packages/lolcode/0.11.2/build.sh +++ b/packages/lolcode/0.11.2/build.sh @@ -2,9 +2,12 @@ PREFIX=$(realpath $(dirname $0)) -# Cloning lolcode source -git clone https://github.com/justinmeza/lci.git lolcode -cd lolcode +mkdir -p build +cd build + +# lolcode release +curl -L "https://github.com/justinmeza/lci/archive/refs/tags/v0.11.2.tar.gz" -o lolcode.tar.gz +tar xzf lolcode.tar.gz --strip-components=1 # Building and installing lolcode cmake -DCMAKE_INSTALL_PREFIX:STRING="$PREFIX" . @@ -12,4 +15,4 @@ make -j$(nproc) make install -j$(nproc) # Cleaning up -cd ../ && rm -rf lolcode +cd ../ && rm -rf build diff --git a/repo/Dockerfile b/repo/Dockerfile index 90d6547..fb4a315 100644 --- a/repo/Dockerfile +++ b/repo/Dockerfile @@ -1,6 +1,13 @@ FROM debian:buster-slim ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update && apt-get install -y unzip autoconf build-essential libssl-dev pkg-config zlib1g-dev libargon2-dev libsodium-dev libcurl4-openssl-dev sqlite3 libsqlite3-dev libonig-dev libxml2 libxml2-dev bc curl git linux-headers-amd64 perl xz-utils python3 python3-pip gnupg jq zlib1g-dev cmake cmake-doc extra-cmake-modules build-essential gcc binutils bash coreutils util-linux pciutils usbutils coreutils binutils findutils grep libncurses5-dev libncursesw5-dev python3-pip libgmp-dev libmpfr-dev python2 libffi-dev && \ +RUN apt-get update && apt-get install -y unzip autoconf build-essential libssl-dev \ + pkg-config zlib1g-dev libargon2-dev libsodium-dev libcurl4-openssl-dev \ + sqlite3 libsqlite3-dev libonig-dev libxml2 libxml2-dev bc curl git \ + linux-headers-amd64 perl xz-utils python3 python3-pip gnupg jq zlib1g-dev \ + cmake cmake-doc extra-cmake-modules build-essential gcc binutils bash coreutils \ + util-linux pciutils usbutils coreutils binutils findutils grep libncurses5-dev \ + libncursesw5-dev python3-pip libgmp-dev libmpfr-dev python2 libffi-dev \ + libreadline-dev && \ ln -sf /bin/bash /bin/sh && \ rm -rf /var/lib/apt/lists/* && \ update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2