build-containers/Dockerfile.osx

29 lines
1.1 KiB
Docker

ARG img_version
FROM godot-fedora:${img_version}
ENV OSX_SDK=14.5
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 ff8d100f3f026b4ffbe4ce96d8aac4ce06f1278b && \
curl -LO https://github.com/tpoechtrager/osxcross/pull/415.patch && \
git apply 415.patch && \
ln -s /root/files/MacOSX${OSX_SDK}.sdk.tar.xz /root/osxcross/tarballs && \
export UNATTENDED=1 && \
export SDK_VERSION=${OSX_SDK} && \
# 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}"
CMD /bin/bash