1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-20 01:57:09 +03:00

Add Dockerfile and try finding sash

This commit is contained in:
Vasilij Schneidermann 2017-09-13 09:57:43 +02:00
parent d209e68a49
commit d7d982e8b2
2 changed files with 66 additions and 1 deletions

59
scheme/Dockerfile Normal file
View File

@ -0,0 +1,59 @@
FROM ubuntu:xenial
MAINTAINER Joel Martin <github@martintribe.org>
##########################################################
# General requirements for testing or common across many
# implementations
##########################################################
RUN apt-get -y update
# Required for running tests
RUN apt-get -y install make python
# Some typical implementation and test requirements
RUN apt-get -y install curl libreadline-dev libedit-dev
RUN mkdir -p /mal
WORKDIR /mal
##########################################################
# Specific implementation requirements
##########################################################
# Prepackaged Scheme implementations
RUN apt-get -y install gauche chicken-bin
# Chibi
RUN apt-get -y install bison gcc g++ flex
RUN cd /tmp && curl -Lo chibi-0.7.3.tar.gz https://github.com/ashinn/chibi-scheme/archive/0.7.3.tar.gz \
&& tar xvzf chibi-0.7.3.tar.gz && cd chibi-scheme-0.7.3 \
&& make && make install && rm -rf /tmp/chibi-*
# Kawa
RUN apt-get -y install openjdk-8-jdk-headless groff
RUN cd /tmp && curl -O http://ftp.gnu.org/pub/gnu/kawa/kawa-2.4.tar.gz \
&& tar xvzf kawa-2.4.tar.gz && cd kawa-2.4 \
&& ./configure && make && make install && rm -rf /tmp/kawa-2.4*
# Sagittarius
RUN apt-get -y install cmake libgc-dev zlib1g-dev libffi-dev
RUN cd /tmp && curl -LO https://bitbucket.org/ktakashi/sagittarius-scheme/downloads/sagittarius-0.8.3.tar.gz \
&& tar xvzf sagittarius-0.8.3.tar.gz && cd sagittarius-0.8.3 \
&& cmake . && make && make install && rm -rf /tmp/sagittarius-0.8.3*
# Cyclone
RUN apt-get -y install git libtommath-dev
RUN cd /tmp && curl -O http://concurrencykit.org/releases/ck-0.6.0.tar.gz \
&& tar xvzf ck-0.6.0.tar.gz && cd ck-0.6.0 && ./configure PREFIX=/usr \
&& make all && make install && ldconfig && rm -rf /tmp/ck-0.6.0*
RUN cd /tmp && git clone https://github.com/justinethier/cyclone-bootstrap \
&& cd cyclone-bootstrap && make CFLAGS="-O2 -fPIC -rdynamic -Wall -Iinclude -L." \
&& make install && rm -rf /tmp/cyclone-bootstrap
# Foment
RUN cd /tmp && git clone https://github.com/leftmike/foment \
&& cd foment/unix && make && cp release/foment /usr/bin/foment \
&& rm -rf /tmp/foment
ENV HOME /mal

View File

@ -3,12 +3,18 @@ basedir=$(dirname $0)
kawa=${KAWA_JAR:-/usr/share/kawa/lib/kawa.jar}
step=${STEP:-stepA_mal}
if [[ $(which sash 2>/dev/null) ]]; then
sagittarius=sash
elif [[ $(which sagittarius 2>/dev/null) ]]; then
sagittarius=sagittarius
fi
case ${scheme_MODE:-chibi} in
chibi) exec chibi-scheme -I$basedir $basedir/$step.scm "${@}" ;;
kawa) exec java -cp $kawa:$basedir/out $step "${@}" ;;
gauche) exec gosh -I$basedir $basedir/$step.scm "${@}" ;;
chicken) CHICKEN_REPOSITORY=$basedir/eggs exec $basedir/$step "${@}" ;;
sagittarius) exec sagittarius -n -L$basedir $basedir/$step.scm "${@}" ;;
sagittarius) exec $sagittarius -n -L$basedir $basedir/$step.scm "${@}" ;;
cyclone) exec $basedir/$step "${@}" ;;
foment) exec foment $basedir/$step.scm "${@}" ;;
*) echo "Invalid scheme_MODE: ${scheme_MODE}"; exit 2 ;;