2016-11-27 00:25:08 +01:00
|
|
|
FROM dockcross/base:latest
|
2015-05-06 06:08:21 +02:00
|
|
|
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
|
2014-10-12 13:21:43 +02:00
|
|
|
|
2015-05-06 06:08:21 +02:00
|
|
|
# WINE is used as an emulator for try_run and tests with CMake.
|
|
|
|
# Other dependencies are from the listed MXE requirements:
|
|
|
|
# http://mxe.cc/#requirements
|
|
|
|
# 'cmake' is omitted because it is installed from source in the base image
|
|
|
|
RUN apt-get update && apt-get -y install \
|
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
autopoint \
|
|
|
|
bash \
|
|
|
|
bison \
|
|
|
|
bzip2 \
|
|
|
|
flex \
|
|
|
|
gettext \
|
|
|
|
git \
|
|
|
|
g++ \
|
|
|
|
g++-multilib \
|
|
|
|
gperf \
|
|
|
|
intltool \
|
|
|
|
libffi-dev \
|
2016-04-12 05:59:12 +02:00
|
|
|
libgdk-pixbuf2.0-dev \
|
2015-05-06 06:08:21 +02:00
|
|
|
libtool-bin \
|
|
|
|
libltdl-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libxml-parser-perl \
|
|
|
|
libc6-dev-i386 \
|
|
|
|
make \
|
|
|
|
openssl \
|
2016-04-12 05:59:12 +02:00
|
|
|
p7zip-full \
|
2015-05-06 06:08:21 +02:00
|
|
|
patch \
|
|
|
|
perl \
|
|
|
|
pkg-config \
|
|
|
|
python \
|
|
|
|
ruby \
|
|
|
|
scons \
|
|
|
|
sed \
|
|
|
|
unzip \
|
|
|
|
wget \
|
|
|
|
wine \
|
|
|
|
xz-utils
|
|
|
|
# Set up wine
|
|
|
|
RUN dpkg --add-architecture i386 && \
|
|
|
|
apt-get update && \
|
|
|
|
apt-get install -y wine32
|
|
|
|
ENV WINEARCH win64
|
|
|
|
RUN wine hostname
|
2014-10-12 13:21:43 +02:00
|
|
|
|
2015-05-06 06:08:21 +02:00
|
|
|
WORKDIR /usr/src
|
2017-10-25 18:13:05 +02:00
|
|
|
# mxe master 2017-10-25
|
2015-05-06 06:08:21 +02:00
|
|
|
RUN git clone https://github.com/mxe/mxe.git && \
|
|
|
|
cd mxe && \
|
2017-10-25 18:13:05 +02:00
|
|
|
git checkout 994ad47302e8811614b7eb49fc05234942b95b89
|
2015-05-06 06:08:21 +02:00
|
|
|
WORKDIR /usr/src/mxe
|
|
|
|
COPY settings.mk /usr/src/mxe/
|
|
|
|
RUN make -j$(nproc)
|
2014-10-12 13:21:43 +02:00
|
|
|
|
2015-05-06 06:08:21 +02:00
|
|
|
ENV PATH ${PATH}:/usr/src/mxe/usr/bin
|
2016-04-13 03:16:23 +02:00
|
|
|
ENV CROSS_TRIPLE x86_64-w64-mingw32.static
|
|
|
|
ENV AS=/usr/src/mxe/usr/bin/${CROSS_TRIPLE}-as \
|
|
|
|
AR=/usr/src/mxe/usr/bin/${CROSS_TRIPLE}-ar \
|
|
|
|
CC=/usr/src/mxe/usr/bin/${CROSS_TRIPLE}-gcc \
|
|
|
|
CPP=/usr/src/mxe/usr/bin/${CROSS_TRIPLE}-cpp \
|
|
|
|
CXX=/usr/src/mxe/usr/bin/${CROSS_TRIPLE}-g++ \
|
|
|
|
LD=/usr/src/mxe/usr/bin/${CROSS_TRIPLE}-ld
|
2015-05-06 06:08:21 +02:00
|
|
|
|
2016-07-16 05:46:08 +02:00
|
|
|
ENV DEFAULT_DOCKCROSS_IMAGE dockcross/windows-x64
|
2016-07-16 07:12:58 +02:00
|
|
|
WORKDIR /work
|
2016-07-04 06:10:36 +02:00
|
|
|
|
|
|
|
ENV CMAKE_TOOLCHAIN_FILE /usr/src/mxe/usr/x86_64-w64-mingw32.static/share/cmake/mxe-conf.cmake
|
|
|
|
RUN echo 'set(CMAKE_CROSSCOMPILING_EMULATOR "/usr/bin/wine")' >> ${CMAKE_TOOLCHAIN_FILE}
|
2017-10-25 18:13:05 +02:00
|
|
|
RUN cd /usr/local/bin \
|
|
|
|
&& rm cmake \
|
2018-04-13 20:53:21 +02:00
|
|
|
&& rm cpack \
|
2017-10-25 18:13:05 +02:00
|
|
|
&& ln -s /usr/src/mxe/usr/bin/x86_64-w64-mingw32.static-cmake cmake \
|
|
|
|
&& ln -s /usr/src/mxe/usr/bin/x86_64-w64-mingw32.static-cpack cpack
|
2016-10-31 04:57:04 +01:00
|
|
|
|
|
|
|
# Build-time metadata as defined at http://label-schema.org
|
|
|
|
ARG BUILD_DATE
|
|
|
|
ARG IMAGE
|
|
|
|
ARG VCS_REF
|
|
|
|
ARG VCS_URL
|
|
|
|
LABEL org.label-schema.build-date=$BUILD_DATE \
|
|
|
|
org.label-schema.name=$IMAGE \
|
|
|
|
org.label-schema.vcs-ref=$VCS_REF \
|
|
|
|
org.label-schema.vcs-url=$VCS_URL \
|
|
|
|
org.label-schema.schema-version="1.0"
|