Files
build-containers/Dockerfile.osx
Rémi Verschelde dede88afa4 Update to Mono 6.12.0.102, use Fedora 32
- Base container: Fedora 32
- Mono uses version 6.12.0.102, MSBuild 16.6
- Linux builds use GCC 9
- Windows builds use Fedora 32's mingw-gcc (GCC 9)
- JavaScript uses Emscripten 1.39.9 (Mono 6.12 requires 1.39.7 but that version
  fails generating .wasm, so we backport a patch to get 1.39.9)
- Install SCons 4.0.1 from pip
2020-10-20 13:27:57 +02:00

49 lines
2.0 KiB
Docker

ARG img_version
FROM godot-mono:${img_version}
ARG mono_version
RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
dnf -y install --setopt=install_weak_deps=False \
automake autoconf bzip2-devel clang libicu-devel libtool libxml2-devel llvm-devel openssl-devel yasm && \
git clone --progress https://github.com/tpoechtrager/osxcross.git && \
cd /root/osxcross && \
git checkout 45d2f7ec2ee68c9ad51d590869609b5b3b028605 && \
ln -s /root/files/MacOSX10.15.sdk.tar.xz /root/osxcross/tarballs && \
UNATTENDED=1 ./build.sh
ENV OSXCROSS_ROOT=/root/osxcross
ENV PATH="/root/osxcross/target/bin:${PATH}"
RUN cp -a /root/files/${mono_version} /root && \
cd /root/${mono_version} && \
patch -p1 < /root/files/patches/mono-xcode-allow-weak-import.patch && \
patch -p1 < /root/files/patches/mono-sys-uio-fix-preadv-misdetection.patch && \
export CMAKE=/root/osxcross/target/bin/x86_64-apple-darwin19-cmake && \
NOCONFIGURE=1 ./autogen.sh && \
./configure --prefix=/root/dependencies/mono \
--build=x86_64-linux-gnu \
--host=x86_64-apple-darwin19 \
--disable-boehm \
--disable-mcs-build \
--with-tls=pthread \
--disable-dtrace \
--disable-executables \
mono_cv_uscore=yes \
_lt_dar_can_shared=yes \
CC=o64-clang \
CXX=o64-clang++ && \
make -j && \
make install && \
cd /root && \
rm -rf /root/dependencies/mono/bin/mono{,-sgen} /root/dependencies/mono/lib/mono && \
ln -s /usr/bin/mono /root/dependencies/mono/bin/mono && \
ln -s /usr/bin/mono-sgen /root/dependencies/mono/bin/mono-sgen && \
ln -s /usr/lib/mono /root/dependencies/mono/lib/mono && \
mkdir -p /root/dependencies/mono/etc && \
cp -rvp /etc/mono /root/dependencies/mono/etc/ && \
cp /root/files/mono-config-macosx /root/dependencies/mono/etc/mono/config && \
rm -rf /root/${mono_version}
CMD /bin/bash