This commit is contained in:
Thomas Hobson 2021-04-28 14:35:05 +12:00
commit 6b138f2377
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
17 changed files with 103 additions and 9 deletions

20
packages/cobol/3.1.2/build.sh vendored Executable file
View File

@ -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

4
packages/cobol/3.1.2/compile vendored Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
cobc -o binary --free -x -L lib "$@"
chmod +x binary

5
packages/cobol/3.1.2/environment vendored Normal file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
export PATH=$PWD/bin:$PATH
export LD_LIBRARY_PATH=$PWD/lib

5
packages/cobol/3.1.2/metadata.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"language": "cobol",
"version": "3.1.2",
"aliases": ["cob"]
}

5
packages/cobol/3.1.2/run vendored Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
shift
./binary "$@"

8
packages/cobol/3.1.2/test.cob vendored Normal file
View File

@ -0,0 +1,8 @@
*> Test Program
identification division.
program-id. ok-test.
procedure division.
display "OK"
goback.
end program ok-test.

View File

@ -17,7 +17,7 @@ tar xzf gcc.tar.gz --strip-components=1
cd ../obj cd ../obj
# === autoconf based === # === 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 -j$(nproc)
make install -j$(nproc) make install -j$(nproc)

View File

@ -16,6 +16,10 @@ case "${PISTON_LANGUAGE}" in
rename 's/.code$/\.d/' "$@" # Add .d extension rename 's/.code$/\.d/' "$@" # Add .d extension
gdc *.d gdc *.d
;; ;;
fortran)
rename 's/.code$/\.f90/' "$@" # Add .f90 extension
gfortran *.f90
;;
*) *)
echo "How did you get here? (${PISTON_LANGUAGE})" echo "How did you get here? (${PISTON_LANGUAGE})"
exit 1 exit 1

View File

@ -2,3 +2,4 @@
# Put 'export' statements here for environment variables # Put 'export' statements here for environment variables
export PATH=$PWD/bin:$PATH export PATH=$PWD/bin:$PATH
export LD_LIBRARY_PATH="$PWD/lib:$PWD/lib64" # Need this to properly link Fortran

View File

@ -13,6 +13,10 @@
{ {
"language": "d", "language": "d",
"aliases": ["gdc"] "aliases": ["gdc"]
},
{
"language": "fortran",
"aliases": ["fortran", "f90"]
} }
] ]
} }

3
packages/gcc/10.2.0/test.f90 vendored Normal file
View File

@ -0,0 +1,3 @@
program test
print "(a)", 'OK'
end program test

View File

@ -8,6 +8,7 @@ tar xzf java.tar.gz --strip-components=1
rm java.tar.gz rm java.tar.gz
cd .. 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 unzip -q groovy.zip
rm groovy.zip rm groovy.zip

17
packages/groovy/3.0.7/compile vendored Normal file
View File

@ -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 .

View File

@ -2,4 +2,9 @@
# Groovy requires JAVA_HOME to be set # Groovy requires JAVA_HOME to be set
export JAVA_HOME=$PWD/java 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

View File

@ -1,3 +1,5 @@
#!/bin/bash #!/bin/bash
groovy "$@" # Run the jar created during compile
shift
java -jar out.jar "$@"

View File

@ -2,9 +2,12 @@
PREFIX=$(realpath $(dirname $0)) PREFIX=$(realpath $(dirname $0))
# Cloning lolcode source mkdir -p build
git clone https://github.com/justinmeza/lci.git lolcode cd build
cd lolcode
# 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 # Building and installing lolcode
cmake -DCMAKE_INSTALL_PREFIX:STRING="$PREFIX" . cmake -DCMAKE_INSTALL_PREFIX:STRING="$PREFIX" .
@ -12,4 +15,4 @@ make -j$(nproc)
make install -j$(nproc) make install -j$(nproc)
# Cleaning up # Cleaning up
cd ../ && rm -rf lolcode cd ../ && rm -rf build

View File

@ -1,6 +1,13 @@
FROM debian:buster-slim FROM debian:buster-slim
ENV DEBIAN_FRONTEND noninteractive 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 && \ ln -sf /bin/bash /bin/sh && \
rm -rf /var/lib/apt/lists/* && \ rm -rf /var/lib/apt/lists/* && \
update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2 update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2