-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
120 lines (97 loc) · 3.97 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#FROM ubuntu:trusty
FROM debian:oldstable
ARG ARCH=x86_64
RUN apt-get update && apt-get -q -y install git autoconf python binutils \
texinfo gcc libtool vim desktop-file-utils pkgconf libcairo2-dev \
libssl-dev libfuse-dev zsync wget fuse bzip2 gawk g++ gperf \
libgtk-3-dev doxygen libatspi2.0-dev ninja-build make flatpak flatpak-builder \
libwebkit2gtk-4.0-dev appstream appstream-util curl
# Debian-oldstable provides a sbcl. But as sbcl is evolving rapidly we want to use
# a more recent version.
RUN wget --quiet 'http://prdownloads.sourceforge.net/sbcl/sbcl-2.2.8-x86-64-linux-binary.tar.bz2' -O /tmp/sbcl.tar.bz2 && \
mkdir /sbcl && \
tar jxf /tmp/sbcl.tar.bz2 --strip-components=1 -C /sbcl && \
cd /sbcl && \
sh install.sh && \
rm -f /tmp/sbcl.tar.bz2
# Debian-oldstable provides too old an cmake3 version for building wxMaxima.
# At least the debian-oldstable that was active in Jan 2019 did.
RUN wget --quiet 'https://github.com/Kitware/CMake/releases/download/v3.13.3/cmake-3.13.3.tar.gz' && \
zcat cmake-3.13.3.tar.gz | tar xf - && \
cd cmake-3.13.3 && \
./bootstrap && \
make -s -j 2&& \
make install
RUN wget --quiet 'https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.1/wxWidgets-3.2.1.tar.bz2' && \
bzcat wxWidgets-3.2.1.tar.bz2 | tar xf -
RUN cd wxWidgets-3.2.1 && \
./configure && \
make -j 2 && \
make install && \
ldconfig
RUN git clone https://git.code.sf.net/p/gnuplot/gnuplot-main && \
cd gnuplot-main && \
git checkout tags/5.2.8
RUN cd gnuplot-main && \
./prepare && \
./configure --prefix=`pwd`/dist && \
make -s -j 2 && \
make install
RUN wget --quiet -O libpng-1.2.59.tar 'https://sourceforge.net/projects/libpng/files/libpng12/1.2.59/libpng-1.2.59.tar.gz/download' && \
zcat libpng-1.2.59.tar | tar xf -
RUN cd libpng-1.2.59 && \
./configure && \
make -s -j 2&& \
make install
ENV maxima_build tags/5.46.0
RUN git clone https://git.code.sf.net/p/maxima/code maxima-code && \
cd maxima-code && \
git checkout ${maxima_build}
RUN cd maxima-code && \
mkdir dist && \
./bootstrap && \
./configure --enable-sbcl-exec --enable-quiet-build --prefix=`pwd`/dist && \
make -s -j 2&& \
make install
ENV wxmaxima_build Version-23.02.0
RUN git clone https://github.com/wxMaxima-developers/wxmaxima.git && \
cd wxmaxima && \
git checkout ${wxmaxima_build}
RUN cd wxmaxima && \
mkdir -p build && \
cd build && \
cmake -DCMAKE_INSTALL_PREFIX:PATH=/wxmaxima-inst -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++" -DCMAKE_LD_FLAGS="-static-libgcc -static-libstdc++" .. && \
cmake -- build . && \
cmake --build . -- install
COPY appimagetool-$ARCH.AppImage /
RUN chmod +x appimagetool-$ARCH.AppImage
RUN ./appimagetool-$ARCH.AppImage --appimage-extract && \
cp -R squashfs-root/* .
RUN mkdir maxima-squashfs
WORKDIR maxima-squashfs
RUN mkdir -p usr/bin
RUN cp -ar /gnuplot-main/dist gnuplot-inst
RUN ln -s ../../gnuplot-inst/bin/gnuplot usr/bin/gnuplot
RUN (cd .. && tar cf - sbcl) | tar xf -
RUN ln -s ../../sbcl/run-sbcl.sh usr/bin/sbcl
RUN mkdir -p usr/lib
RUN cp -a /usr/local/lib/libwx* /usr/local/lib/libpng* usr/lib
RUN mkdir maxima-inst && \
(cd ../maxima-code/dist && tar cf - *) | (cd maxima-inst && tar xf -)
RUN ln -s share/info maxima-inst/info
RUN ln -s ../../maxima-inst/bin/maxima usr/bin/maxima
RUN (cd .. && tar cf - wxmaxima-inst) | tar xf -
RUN ln -s ../../wxmaxima-inst/bin/wxmaxima usr/bin/wxmaxima
RUN mkdir -p usr/share/metainfo
COPY io.github.wxmaxima_developers.wxMaxima.appdata.xml usr/share/metainfo/
COPY linux_1.png .
COPY AppRun .
RUN chmod +x AppRun
COPY io.github.wxmaxima_developers.wxMaxima.desktop .
RUN mkdir -p /usr/share/applications/
COPY io.github.wxmaxima_developers.wxMaxima.desktop /usr/share/applications/
COPY maxima.png .
RUN mkdir -p /usr/share/pixmaps/
COPY maxima.png /usr/share/pixmaps/io.github.wxmaxima_developers.wxMaxima.png
WORKDIR /
RUN ARCH=$ARCH appimagetool maxima-squashfs