This repository was archived by the owner on Feb 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (41 loc) · 1.25 KB
/
Dockerfile
File metadata and controls
50 lines (41 loc) · 1.25 KB
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
FROM ubuntu:wily
ENV BOOST_DIR /tmp/boost_1_59_0
ENV GCCVERSION 4.2
ENV MINGW_COMPILER i686-w64-mingw32-g++
# Install dependencies
RUN apt-get -y update && apt-get -y install \
bzip2 \
g++ \
gcc-multilib \
g++-multilib \
g++-mingw-w64-i686 \
make \
wget \
&& apt-get clean && apt-get purge
# Download boost library
RUN wget -P /tmp/ http://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.bz2
RUN tar -xf /tmp/boost_1_59_0.tar.bz2 -C /tmp/
WORKDIR $BOOST_DIR
# Compile Windows library
RUN HOST=i686-w64-mingw32 && \
echo "using gcc : $GCCVERSION : $HOST-g++ \
: \
<rc>$HOST-windres \
<archiver>$HOST-ar \
<cxxflags>-frandom-seed=boost1 \
<ranlib>$HOST-ranlib \
;" > user-config.jam && \
./bootstrap.sh --without-icu
RUN ./b2 toolset=gcc target-os=windows variant=release \
threading=multi threadapi=win32 link=static \
runtime-link=static --user-config=user-config.jam \
--without-mpi --without-python -sNO_BZIP2=1 \
--without-context --without-coroutine --without-coroutine2 \
--prefix=/usr/lib/boost stage
RUN mv stage stage_windows
# Compile Linux library
RUN ./bootstrap.sh
RUN ./b2 address-model=32 link=static \
--without-python --without-mpi \
-sNO_BZIP2=1 stage
RUN mv stage stage_linux