Merge branch 'master' of https://github.com/engineer-man/piston
This commit is contained in:
commit
6b138f2377
|
@ -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
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
cobc -o binary --free -x -L lib "$@"
|
||||||
|
chmod +x binary
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
export PATH=$PWD/bin:$PATH
|
||||||
|
export LD_LIBRARY_PATH=$PWD/lib
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"language": "cobol",
|
||||||
|
"version": "3.1.2",
|
||||||
|
"aliases": ["cob"]
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
shift
|
||||||
|
./binary "$@"
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
*> Test Program
|
||||||
|
identification division.
|
||||||
|
program-id. ok-test.
|
||||||
|
|
||||||
|
procedure division.
|
||||||
|
display "OK"
|
||||||
|
goback.
|
||||||
|
end program ok-test.
|
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -13,6 +13,10 @@
|
||||||
{
|
{
|
||||||
"language": "d",
|
"language": "d",
|
||||||
"aliases": ["gdc"]
|
"aliases": ["gdc"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"language": "fortran",
|
||||||
|
"aliases": ["fortran", "f90"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
program test
|
||||||
|
print "(a)", 'OK'
|
||||||
|
end program test
|
|
@ -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
|
||||||
|
|
|
@ -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 .
|
|
@ -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
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
groovy "$@"
|
# Run the jar created during compile
|
||||||
|
shift
|
||||||
|
java -jar out.jar "$@"
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue