@@ -4,35 +4,43 @@ ARG mono_version
44
55RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi
66
7- RUN dnf -y install scons mingw32-gcc mingw32-gcc-c++ mingw32-winpthreads-static mingw64-gcc mingw64-gcc-c++ mingw64-winpthreads-static yasm && dnf clean all && \
8- rpm -Uvh --replacepkgs /root/files/mingw-binutils-generic-2.30-5.fc29.godot.x86_64.rpm \
9- /root/files/mingw64-binutils-2.30-5.fc29.godot.x86_64.rpm \
10- /root/files/mingw32-binutils-2.30-5.fc29.godot.x86_64.rpm && \
11- curl https://download.mono-project.com/sources/mono/mono-${mono_version}.tar.bz2 | tar xj && \
7+ RUN dnf -y install scons mingw32-gcc mingw32-gcc-c++ mingw32-winpthreads-static mingw64-gcc mingw64-gcc-c++ mingw64-winpthreads-static yasm bzip2 xz && dnf clean all && \
8+ rpm -Uvh --force /root/files/mingw-binutils-generic-2.30-5.fc29.godot.x86_64.rpm \
9+ /root/files/mingw64-binutils-2.30-5.fc29.godot.x86_64.rpm \
10+ /root/files/mingw32-binutils-2.30-5.fc29.godot.x86_64.rpm && \
11+ if [ ${mono_version%%.*} -ge 6 ]; then \
12+ curl https://download.mono-project.com/sources/mono/mono-${mono_version}.tar.xz | tar xJ; \
13+ else \
14+ curl https://download.mono-project.com/sources/mono/mono-${mono_version}.tar.bz2 | tar xj; \
15+ fi && \
16+ cp -r mono-${mono_version} mono-${mono_version}-32 && \
1217 cd mono-${mono_version} && \
1318 ./configure --prefix=/root/dependencies/mono-64 --host=x86_64-w64-mingw32 --disable-boehm --disable-mcs-build --disable-executables && \
1419 echo '#define HAVE_STRUCT_SOCKADDR_IN6 1' >> config.h && \
1520 make -j && \
1621 make install && \
17- make distclean && \
22+ cd .. && \
23+ rm -rf mono-${mono_version} && \
1824 cp /root/dependencies/mono-64/bin/libMonoPosixHelper.dll /root/dependencies/mono-64/bin/MonoPosixHelper.dll && \
1925 rm -f /root/dependencies/mono-64/bin/mono /root/dependencies/mono-64/bin/mono-sgen && \
2026 ln -s /usr/bin/mono /root/dependencies/mono-64/bin/mono && \
2127 ln -s /usr/bin/mono-sgen /root/dependencies/mono-64/bin/mono-sgen && \
2228 ln -sf /usr/lib/mono/* /root/dependencies/mono-64/lib/mono || /bin/true && \
23- cp -rvp /etc/mono /root/dependencies/mono-64/etc && \
29+ cp -rvp /etc/mono /root/dependencies/mono-64/etc
30+
31+ RUN cd mono-${mono_version}-32 && \
2432 ./configure --prefix=/root/dependencies/mono-32 --host=i686-w64-mingw32 --disable-boehm --disable-mcs-build --disable-executables && \
2533 echo '#define HAVE_STRUCT_SOCKADDR_IN6 1' >> config.h && \
2634 make -j && \
2735 make install && \
28- make distclean && \
36+ cd .. && \
37+ rm -rf mono-${mono_version}-32 && \
2938 cp /root/dependencies/mono-32/bin/libMonoPosixHelper.dll /root/dependencies/mono-32/bin/MonoPosixHelper.dll && \
3039 rm -f /root/dependencies/mono-32/bin/mono /root/dependencies/mono-32/bin/mono-sgen && \
3140 ln -s /usr/bin/mono /root/dependencies/mono-32/bin/mono && \
3241 ln -s /usr/bin/mono-sgen /root/dependencies/mono-32/bin/mono-sgen && \
3342 ln -sf /usr/lib/mono/* /root/dependencies/mono-32/lib/mono || /bin/true && \
34- cp -rvp /etc/mono /root/dependencies/mono-32/etc && \
35- rm -rf /root/mono-${mono_version}
43+ cp -rvp /etc/mono /root/dependencies/mono-32/etc
3644
3745ENV MONO32_PREFIX=/root/dependencies/mono-32
3846ENV MONO64_PREFIX=/root/dependencies/mono-64
0 commit comments