Merge pull request #378 from asarhaddon/test-macro-not-changing-function
[jackhill/mal.git] / logo / Dockerfile
CommitLineData
4eb88ef2
DM
1FROM ubuntu:vivid
2MAINTAINER Joel Martin <github@martintribe.org>
3
4##########################################################
5# General requirements for testing or common across many
6# implementations
7##########################################################
8
9RUN apt-get -y update
10
11# Required for running tests
12RUN apt-get -y install make python
13
14# Some typical implementation and test requirements
15RUN apt-get -y install curl libreadline-dev libedit-dev
16
17RUN mkdir -p /mal
18WORKDIR /mal
19
20##########################################################
21# Specific implementation requirements
22##########################################################
23
24# Install g++ for any C/C++ based implementations
25RUN apt-get -y install g++
26
27# Install UCBLogo 6.0:
28# * Fix the makefile to build correctly
29# * Tweat GC settings to improve performance (it's still very slow)
30# * Add the timems function implemented in C
31RUN apt-get -y install libx11-dev \
32 && cd /tmp \
33 && curl -O -J -L http://www.cs.berkeley.edu/~bh/downloads/ucblogo.tar.gz \
34 && tar xf ucblogo.tar.gz \
35 && cd /tmp/ucblogo-6.0 \
36 && rm -rf csls/CVS \
37 && ./configure \
38 && sed -i -e 's/svnversion/echo 206/' -e 's/^\s*(cd docs/#\0/' makefile \
39 && echo "all: everything" >> makefile \
40 && sed -i -e 's/^#define *SEG_SIZE *16000 /#define SEG_SIZE 6400000 /' logo.h \
41 && sed -i -e 's/^#define GCMAX 16000$/#define GCMAX 16000000/' mem.c \
42 && echo "extern NODE *ltimems(NODE *);" >> globals.h \
43 && echo "NODE *ltimems(NODE *args) { struct timeval tv; gettimeofday(&tv, NULL); return(make_floatnode(((FLONUM)tv.tv_sec) * 1000.0 + (tv.tv_usec / 1000))); }" >> coms.c \
44 && sed -i -e 's/^\(.*lthrow.*\)$/\1 {"timems", 0, 0, 0, PREFIX_PRIORITY, ltimems},/' init.c \
45 && make install \
46 && cd /tmp \
47 && rm -rf /tmp/ucblogo.tar.gz /tmp/ucblogo-6.0
48
49ENV HOME /mal