2019-01-29 21:58:21 +00:00
|
|
|
# Build the image using the --build-arg option, e.g.:
|
|
|
|
# docker build -t boret/myimage:0.1 --build-arg=mxe_sha=123ABC456 .
|
2019-01-24 21:45:54 +00:00
|
|
|
|
2024-09-26 21:49:15 +00:00
|
|
|
FROM ubuntu:24.04 as base
|
2020-10-28 21:19:45 +00:00
|
|
|
|
2024-01-20 12:07:33 +00:00
|
|
|
# update and set up the packages we need for the build
|
|
|
|
RUN apt-get update && \
|
2024-05-07 07:27:42 +00:00
|
|
|
apt-get dist-upgrade -y && \
|
2024-01-20 12:07:33 +00:00
|
|
|
apt-get install -y \
|
2019-01-24 21:45:54 +00:00
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
autopoint \
|
|
|
|
bash \
|
|
|
|
binutils \
|
|
|
|
bzip2 \
|
2020-05-30 11:21:22 +00:00
|
|
|
ca-certificates \
|
2019-01-24 21:45:54 +00:00
|
|
|
g++ \
|
|
|
|
g++-multilib \
|
|
|
|
gettext \
|
|
|
|
git \
|
|
|
|
intltool \
|
|
|
|
libltdl-dev \
|
|
|
|
libssl-dev \
|
2020-05-30 11:21:22 +00:00
|
|
|
libtool \
|
2019-01-24 21:45:54 +00:00
|
|
|
libtool-bin \
|
|
|
|
make \
|
|
|
|
openssl \
|
|
|
|
p7zip-full \
|
|
|
|
patch \
|
|
|
|
perl \
|
|
|
|
pkg-config \
|
|
|
|
sed \
|
|
|
|
unzip \
|
|
|
|
wget \
|
2024-01-20 12:07:33 +00:00
|
|
|
lzip && \
|
|
|
|
apt-get clean
|
|
|
|
|
|
|
|
|
|
|
|
FROM base as build
|
|
|
|
|
|
|
|
# set up the packages we need additionally for this cross build
|
|
|
|
RUN apt-get install -y \
|
|
|
|
bison \
|
|
|
|
flex \
|
|
|
|
gperf \
|
|
|
|
libc6-dev-i386 \
|
|
|
|
libgdk-pixbuf2.0-dev \
|
|
|
|
libxml-parser-perl \
|
|
|
|
python3 \
|
|
|
|
python3-mako \
|
2024-10-21 23:07:49 +00:00
|
|
|
python3-setuptools \
|
2024-01-20 12:07:33 +00:00
|
|
|
python-is-python3 \
|
|
|
|
ruby \
|
2019-01-24 21:45:54 +00:00
|
|
|
xz-utils \
|
2019-05-17 22:55:17 +00:00
|
|
|
scons
|
2019-11-24 21:35:09 +00:00
|
|
|
|
2024-01-20 12:07:33 +00:00
|
|
|
# very often master is broken, so we pass in a known good SHA
|
2024-10-21 23:07:49 +00:00
|
|
|
ARG mxe_sha=d6377b2f2334694dbb040294fd0d848327e63328
|
2024-01-20 12:07:33 +00:00
|
|
|
ENV _ver=${mxe_sha}
|
|
|
|
|
|
|
|
WORKDIR /win
|
|
|
|
|
2020-10-28 21:19:45 +00:00
|
|
|
# checkout MXE at the right version
|
2024-01-20 12:07:33 +00:00
|
|
|
RUN git clone https://github.com/mxe/mxe && \
|
|
|
|
cd mxe && \
|
|
|
|
git checkout ${_ver}
|
|
|
|
|
|
|
|
WORKDIR /win/mxe
|
|
|
|
|
|
|
|
# Move the settings into place to build everything that we need
|
|
|
|
ADD settings.mk .
|
2020-10-28 21:19:45 +00:00
|
|
|
|
2020-05-30 11:21:22 +00:00
|
|
|
# Patch the qtconnectivity build to explicilty enable native-win32-bluetooth and ensure another
|
|
|
|
# backend is not picked
|
2024-01-20 12:07:33 +00:00
|
|
|
ADD qtconnectivity-1.patch src/
|
|
|
|
|
2020-10-28 21:19:45 +00:00
|
|
|
# separate download from build so that we can redo the build
|
2024-01-20 12:07:33 +00:00
|
|
|
RUN make -j download 2>&1 | tee mxe-build.log
|
|
|
|
|
|
|
|
RUN make -j 2>&1 | tee -a mxe-build.log
|
2020-10-28 21:19:45 +00:00
|
|
|
|
|
|
|
# for some reason smtk2ssrf needs a static build of mdbtools
|
2024-01-20 12:07:33 +00:00
|
|
|
RUN make MXE_TARGETS=x86_64-w64-mingw32.static glib mdbtools -j 2>&1 | tee -a mxe-build.log
|
|
|
|
|
|
|
|
RUN rm -rf pkg log docs
|
|
|
|
|
|
|
|
|
|
|
|
FROM base as final
|
|
|
|
|
|
|
|
WORKDIR /win
|
2020-10-28 21:19:45 +00:00
|
|
|
|
2024-01-20 12:07:33 +00:00
|
|
|
COPY --from=build /win/mxe mxe
|