build-containers/Dockerfile.osx

48 lines
1.8 KiB
Docker
Raw Normal View History

2019-01-07 21:51:22 +01:00
ARG mono_version
FROM godot-mono:${mono_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 && \
dnf clean all && \
2019-01-07 21:51:22 +01:00
git clone https://github.com/tpoechtrager/osxcross.git && \
cd /root/osxcross && \
git checkout 542acc2ef6c21aeb3f109c03748b1015a71fed63 && \
2019-10-01 22:04:13 +02:00
ln -s /root/files/MacOSX10.14.sdk.tar.xz /root/osxcross/tarballs && \
UNATTENDED=1 ./build.sh
ENV OSXCROSS_ROOT=/root/osxcross
ENV PATH="/root/osxcross/target/bin:${PATH}"
RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
cd mono && git submodule update --init && \
export CMAKE=/root/osxcross/target/bin/x86_64-apple-darwin18-cmake && \
NOCONFIGURE=1 ./autogen.sh && \
./configure --prefix=/root/dependencies/mono \
2019-01-07 21:51:22 +01:00
--build=x86_64-linux-gnu \
--host=x86_64-apple-darwin18 \
2019-01-07 21:51:22 +01:00
--disable-boehm \
--disable-mcs-build \
--with-tls=pthread \
--disable-dtrace \
--disable-executables \
2019-01-07 21:51:22 +01:00
mono_cv_uscore=yes \
_lt_dar_can_shared=yes \
CC=o64-clang \
CXX=o64-clang++ && \
make -j && \
make install && \
cd .. && \
2019-01-07 21:51:22 +01:00
rm -f /root/dependencies/mono/bin/mono /root/dependencies/mono/bin/mono-sgen && \
ln -s /usr/bin/mono /root/dependencies/mono/bin/mono && \
ln -s /usr/bin/mono-sgen /root/dependencies/mono/bin/mono-sgen && \
ln -sf /usr/lib/mono/* /root/dependencies/mono/lib/mono && \
2019-01-07 21:51:22 +01:00
cp -rvp /etc/mono /root/dependencies/mono/etc && \
cp /root/files/mono-config-macosx /root/dependencies/mono/etc/config && \
rm -rf /root/mono
2019-01-07 21:51:22 +01:00
ENV MONO64_PREFIX=/root/dependencies/mono
CMD /bin/bash