From 959830c6520970d01d12a055d8baad0f0e4ada15 Mon Sep 17 00:00:00 2001 From: Dan Vargas <10914883+dvargas46@users.noreply.github.com> Date: Mon, 26 Apr 2021 19:18:52 -0500 Subject: [PATCH 1/5] pkg(groovy-3.0.7): add compile step (#232) Co-authored-by: Vargas, Dan --- packages/groovy/3.0.7/build.sh | 3 ++- packages/groovy/3.0.7/compile | 17 +++++++++++++++++ packages/groovy/3.0.7/environment | 7 ++++++- packages/groovy/3.0.7/run | 4 +++- 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 packages/groovy/3.0.7/compile 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 "$@" From 65cbefa94e0bcc53103dffdc04ed765e0be502ae Mon Sep 17 00:00:00 2001 From: Victor Frazao <31864869+vfrazao-ns1@users.noreply.github.com> Date: Tue, 27 Apr 2021 19:02:17 -0400 Subject: [PATCH 2/5] pkg(gcc-10.2.0): Adds Fortran support for GCC (#236) --- packages/gcc/10.2.0/build.sh | 2 +- packages/gcc/10.2.0/compile | 4 ++++ packages/gcc/10.2.0/environment | 1 + packages/gcc/10.2.0/metadata.json | 4 ++++ packages/gcc/10.2.0/test.f90 | 3 +++ 5 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 packages/gcc/10.2.0/test.f90 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 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 3/5] 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. From 08ea3b37402c3311ea52c649871a9fc28ec50dd1 Mon Sep 17 00:00:00 2001 From: Dan Vargas <10914883+dvargas46@users.noreply.github.com> Date: Tue, 27 Apr 2021 18:03:33 -0500 Subject: [PATCH 4/5] pkg(lolcode-0.11.2): add dep for correct version (#234) Co-authored-by: Vargas, Dan --- repo/Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 From 3dfade7c910a462248cb284d937b70f749147b42 Mon Sep 17 00:00:00 2001 From: Dan Vargas <10914883+dvargas46@users.noreply.github.com> Date: Tue, 27 Apr 2021 21:15:34 -0500 Subject: [PATCH 5/5] pkg(lolcode-0.11.2): update build script to use correct lolcode version (#237) Co-authored-by: Vargas, Dan --- packages/lolcode/0.11.2/build.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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