39 lines
1.5 KiB
Docker
39 lines
1.5 KiB
Docker
ARG img_version
|
|
FROM godot-mono:${img_version}
|
|
|
|
ARG mono_version
|
|
|
|
RUN dnf -y install --setopt=install_weak_deps=False \
|
|
automake autoconf bzip2-devel cmake gcc gcc-c++ libdispatch libicu-devel libtool \
|
|
libxml2-devel openssl-devel uuid-devel yasm && \
|
|
git clone --progress https://github.com/tpoechtrager/osxcross && \
|
|
cd /root/osxcross && \
|
|
git checkout 5e1b71fcceb23952f3229995edca1b6231525b5b && \
|
|
ln -s /root/files/MacOSX14.0.sdk.tar.xz /root/osxcross/tarballs && \
|
|
export UNATTENDED=1 && \
|
|
# Custom build Apple Clang to ensure compatibility.
|
|
# Find the equivalent LLVM version for the SDK from:
|
|
# https://en.wikipedia.org/wiki/Xcode#Toolchain_versions
|
|
CLANG_VERSION=16.0.0 ENABLE_CLANG_INSTALL=1 INSTALLPREFIX=/usr ./build_apple_clang.sh && \
|
|
./build.sh && \
|
|
./build_compiler_rt.sh && \
|
|
rm -rf /root/osxcross/build
|
|
|
|
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-btls-cmake-wrapper.patch && \
|
|
export MONO_SOURCE_ROOT=/root/${mono_version} && \
|
|
export OSXCROSS_SDK=23 && \
|
|
cd /root/${mono_version}/godot-mono-builds && \
|
|
python3 osx.py configure -j --target=x86_64 --target=arm64 && \
|
|
python3 osx.py make -j --target=x86_64 --target=arm64 && \
|
|
python3 bcl.py make --product=desktop && \
|
|
python3 osx.py copy-bcl --target=x86_64 --target=arm64 && \
|
|
cd /root && \
|
|
rm -rf /root/${mono_version}
|
|
|
|
CMD /bin/bash
|