Skip to content

Commit

Permalink
Rethink how to configure macports.
Browse files Browse the repository at this point in the history
This will configure macports based on the BUILDARCH env variable.

This is why sleep is a good thing.
  • Loading branch information
ProjectSynchro committed Jan 5, 2024
1 parent 7c8741b commit 985cca7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 1 addition & 3 deletions naev-macos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ WORKDIR /
COPY --from=build /usr/lib/osxcross /usr/lib/osxcross
COPY --from=build /usr/local/bin/dmg /usr/bin
# Copy Entrypoint
COPY docker-entrypoint.sh /tmp
COPY macports-configure.sh /usr/bin

LABEL org.opencontainers.image.authors "Naev Dev Team"
LABEL org.opencontainers.image.source "https://github.com/naev/naev-infrastructure"
Expand Down Expand Up @@ -111,5 +111,3 @@ RUN microdnf --nodocs --setopt=install_weak_deps=0 -y install clang cmake gettex
# Set WORKDIR when you spin up the image.
mkdir -p /tmp/naevBuild
WORKDIR /tmp/naevBuild
ENTRYPOINT ["/tmp/docker-entrypoint.sh"]
CMD ["bash"]
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@
if [[ "$BUILDARCH" == "aarch64" ]] then
export HOST="aarch64-apple-darwin23"
export MACOSX_DEPLOYMENT_TARGET="$AARCH64_DEPLOYMENT_TARGET"
mv /usr/lib/osxcross/macports.aarch64 /usr/lib/osxcross/macports
rm -f /usr/lib/osxcross/macports
ln -s /usr/lib/osxcross/macports.aarch64 /usr/lib/osxcross/macports
elif [[ "$BUILDARCH" == "x86_64" ]] then
export HOST="x86_64-apple-darwin23"
export MACOSX_DEPLOYMENT_TARGET="$X86_64_DEPLOYMENT_TARGET"
mv /usr/lib/osxcross/macports.x86_64 /usr/lib/osxcross/macports
rm -f /usr/lib/osxcross/macports
ln -s /usr/lib/osxcross/macports.x86_64 /usr/lib/osxcross/macports
# Fallback
else
export HOST="x86_64-apple-darwin23"
export MACOSX_DEPLOYMENT_TARGET="$X86_64_DEPLOYMENT_TARGET"
mv /usr/lib/osxcross/macports.x86_64 /usr/lib/osxcross/macports
rm -f /usr/lib/osxcross/macports
ln -s /usr/lib/osxcross/macports.x86_64 /usr/lib/osxcross/macports
fi

exec "$@"

0 comments on commit 985cca7

Please sign in to comment.