Skip to content

Commit 63c294b

Browse files
authored
Merge pull request #3587 from pygame-community/ankith26-deps-updates
Cross compile for x86_64 macs on arm macs, bump some mac/manylinux deps
2 parents 8fba92d + 9df1afb commit 63c294b

28 files changed

+145
-87
lines changed

.github/workflows/build-macos.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
matrix:
2525
# make arm64 deps and x86_64 deps
2626
include:
27-
- { macarch: arm64, os: macos-14 }
28-
- { macarch: x86_64, os: macos-13 }
27+
- { macarch: arm64, os: macos-15 }
28+
- { macarch: x86_64, os: macos-15 }
2929

3030
steps:
3131
- uses: actions/checkout@v5.0.0
@@ -64,8 +64,8 @@ jobs:
6464
fail-fast: false # if a particular matrix build fails, don't skip the rest
6565
matrix:
6666
include:
67-
- { macarch: arm64, os: macos-14 }
68-
- { macarch: x86_64, os: macos-13 }
67+
- { macarch: arm64, os: macos-15 }
68+
- { macarch: x86_64, os: macos-15 }
6969

7070
env:
7171
MAC_ARCH: ${{ matrix.macarch }}

buildconfig/macdependencies/build_mac_deps.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,21 @@ else
4949
# install NASM to generate optimised x86_64 libjpegturbo builds
5050
brew install nasm
5151

52+
# for scripts using ./configure to make x86_64 binaries
53+
export CC="clang -target x86_64-apple-macos10.11"
54+
export CXX="clang++ -target x86_64-apple-macos10.11"
55+
56+
export PG_BASE_CONFIGURE_FLAGS="$PG_BASE_CONFIGURE_FLAGS --host=x86_64-apple-darwin"
57+
58+
# configure cmake to cross-compile
59+
export PG_BASE_CMAKE_FLAGS="$PG_BASE_CMAKE_FLAGS -DCMAKE_OSX_ARCHITECTURES=x86_64"
60+
5261
# SDL 2.26.5 new minimum macos is 10.11, so we build our x86 mac deps
5362
# for 10.11 as well.
5463
export MACOSX_DEPLOYMENT_TARGET=10.11
5564

56-
# needs native-file that has correct macosx deployment target
57-
export PG_BASE_MESON_FLAGS="$PG_BASE_MESON_FLAGS --native-file $(pwd)/macos_x86_64.ini"
65+
# configure meson to cross-compile with correct target
66+
export PG_BASE_MESON_FLAGS="$PG_BASE_MESON_FLAGS --cross-file $(pwd)/macos_x86_64.ini"
5867
fi
5968

6069
cd ../manylinux-build/docker_base
@@ -90,7 +99,7 @@ bash wavpack/build-wavpack.sh
9099

91100
# fluidsynth (for sdl_mixer)
92101
# bash gettext/build-gettext.sh
93-
bash glib/build-glib.sh
102+
# bash glib/build-glib.sh
94103
bash sndfile/build-sndfile.sh
95104
bash fluidsynth/build-fluidsynth.sh
96105

buildconfig/macdependencies/clean_usr_local.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ln -s /usr/bin/git /usr/local/bin/git
1313
ln -s /usr/bin/git /opt/homebrew/bin/git
1414

1515
rm -rf /usr/local/lib/libtiff*
16-
rm -rf /usr/local/lib/libzstd*
16+
rm -rf /usr/local/lib/libzstd* /opt/homebrew/lib/libzstd*
1717
rm -rf /usr/local/lib/libwebp*
1818
rm -rf /usr/local/lib/libdeflate*
1919
rm -rf /usr/local/lib/libsndfile*
@@ -25,6 +25,7 @@ rm -rf /usr/local/lib/libbrotlidec*
2525
rm -rf /usr/local/lib/libopus*
2626
rm -rf /usr/local/lib/freetype*
2727
rm -rf /usr/local/opt/freetype*
28+
rm -rf /opt/homebrew/lib/libgif*
2829

2930
rm -rf /usr/local/Cellar/libtiff /opt/homebrew/Cellar/libtiff
3031
rm -rf /usr/local/Cellar/libsndfile /opt/homebrew/Cellar/libsndfile

buildconfig/macdependencies/macos_x86_64.ini

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
[constants]
2-
macos_ver = ['-mmacosx-version-min=10.11']
2+
macos_ver = ['-target', 'x86_64-apple-macos10.11']
3+
4+
[host_machine]
5+
system = 'darwin'
6+
cpu_family = 'x86_64'
7+
cpu = 'x86_64'
8+
endian = 'little'
39

410
[binaries]
511
c = ['clang']

buildconfig/manylinux-build/docker_base/Dockerfile-aarch64

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# pin version on image for CI stability
2-
FROM quay.io/pypa/manylinux2014_aarch64:2025.07.25-1
2+
FROM quay.io/pypa/manylinux2014_aarch64:2025.10.10-1
33
ENV MAKEFLAGS="-j 4"
44
ENV PG_DEP_PREFIX="/usr/local"
55

@@ -94,12 +94,12 @@ RUN ["bash", "/libjpegturbo_build/build-jpeg-turbo.sh"]
9494
ADD libpng /libpng_build/
9595
RUN ["bash", "/libpng_build/build-png.sh"]
9696

97-
ADD libwebp /webp_build/
98-
RUN ["bash", "/webp_build/build-webp.sh"]
99-
10097
ADD libtiff /libtiff_build/
10198
RUN ["bash", "/libtiff_build/build-tiff.sh"]
10299

100+
ADD libwebp /webp_build/
101+
RUN ["bash", "/webp_build/build-webp.sh"]
102+
103103
ADD brotli /brotli_build/
104104
RUN ["bash", "/brotli_build/build-brotli.sh"]
105105

@@ -142,8 +142,8 @@ RUN ["bash", "/libxmp_build/build-libxmp.sh"]
142142
# ADD gettext /gettext_build/
143143
# RUN ["bash", "/gettext_build/build-gettext.sh"]
144144

145-
ADD glib /glib_build/
146-
RUN ["bash", "/glib_build/build-glib.sh"]
145+
# ADD glib /glib_build/
146+
# RUN ["bash", "/glib_build/build-glib.sh"]
147147

148148
ADD fluidsynth /fluidsynth_build/
149149
RUN ["bash", "/fluidsynth_build/build-fluidsynth.sh"]

buildconfig/manylinux-build/docker_base/Dockerfile-i686

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# pin version on image for CI stability
2-
FROM quay.io/pypa/manylinux2014_i686:2025.07.25-1
2+
FROM quay.io/pypa/manylinux2014_i686:2025.10.10-1
33
ENV MAKEFLAGS="-j 4"
44
ENV PG_DEP_PREFIX="/usr/local"
55

@@ -94,12 +94,12 @@ RUN ["linux32", "bash", "/libjpegturbo_build/build-jpeg-turbo.sh"]
9494
ADD libpng /libpng_build/
9595
RUN ["linux32", "bash", "/libpng_build/build-png.sh"]
9696

97-
ADD libwebp /webp_build/
98-
RUN ["linux32", "bash", "/webp_build/build-webp.sh"]
99-
10097
ADD libtiff /libtiff_build/
10198
RUN ["linux32", "bash", "/libtiff_build/build-tiff.sh"]
10299

100+
ADD libwebp /webp_build/
101+
RUN ["linux32", "bash", "/webp_build/build-webp.sh"]
102+
103103
ADD brotli /brotli_build/
104104
RUN ["linux32", "bash", "/brotli_build/build-brotli.sh"]
105105

@@ -142,8 +142,8 @@ RUN ["linux32", "bash", "/libxmp_build/build-libxmp.sh"]
142142
# ADD gettext /gettext_build/
143143
# RUN ["bash", "/gettext_build/build-gettext.sh"]
144144

145-
ADD glib /glib_build/
146-
RUN ["linux32", "bash", "/glib_build/build-glib.sh"]
145+
# ADD glib /glib_build/
146+
# RUN ["linux32", "bash", "/glib_build/build-glib.sh"]
147147

148148
ADD fluidsynth /fluidsynth_build/
149149
RUN ["linux32", "bash", "/fluidsynth_build/build-fluidsynth.sh"]

buildconfig/manylinux-build/docker_base/Dockerfile-x86_64

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# pin version on image for CI stability
2-
FROM quay.io/pypa/manylinux2014_x86_64:2025.07.25-1
2+
FROM quay.io/pypa/manylinux2014_x86_64:2025.10.10-1
33
ENV MAKEFLAGS="-j 4"
44
ENV PG_DEP_PREFIX="/usr/local"
55

@@ -94,12 +94,12 @@ RUN ["bash", "/libjpegturbo_build/build-jpeg-turbo.sh"]
9494
ADD libpng /libpng_build/
9595
RUN ["bash", "/libpng_build/build-png.sh"]
9696

97-
ADD libwebp /webp_build/
98-
RUN ["bash", "/webp_build/build-webp.sh"]
99-
10097
ADD libtiff /libtiff_build/
10198
RUN ["bash", "/libtiff_build/build-tiff.sh"]
10299

100+
ADD libwebp /webp_build/
101+
RUN ["bash", "/webp_build/build-webp.sh"]
102+
103103
ADD brotli /brotli_build/
104104
RUN ["bash", "/brotli_build/build-brotli.sh"]
105105

@@ -142,8 +142,8 @@ RUN ["bash", "/libxmp_build/build-libxmp.sh"]
142142
# ADD gettext /gettext_build/
143143
# RUN ["bash", "/gettext_build/build-gettext.sh"]
144144

145-
ADD glib /glib_build/
146-
RUN ["bash", "/glib_build/build-glib.sh"]
145+
# ADD glib /glib_build/
146+
# RUN ["bash", "/glib_build/build-glib.sh"]
147147

148148
ADD fluidsynth /fluidsynth_build/
149149
RUN ["bash", "/fluidsynth_build/build-fluidsynth.sh"]

buildconfig/manylinux-build/docker_base/buildtools/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
1717

1818
# pin versions for stability (remember to keep updated)
1919
python3 -m pip install $PG_PIP_EXTRA_FLAGS \
20-
setuptools==80.9.0 meson==1.8.2 ninja==1.11.1.4
20+
setuptools==80.9.0 meson==1.9.1 ninja==1.13.0
2121

2222
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
2323
cp /root/.local/bin/* /usr/bin

buildconfig/manylinux-build/docker_base/fluidsynth/build-fluidsynth.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ set -e -x
33

44
cd $(dirname `readlink -f "$0"`)
55

6-
FSYNTH_VER="2.4.7"
6+
FSYNTH_VER="2.5.0"
77
FSYNTH="fluidsynth-$FSYNTH_VER"
88

99
curl -sL --retry 10 https://github.com/FluidSynth/fluidsynth/archive/v${FSYNTH_VER}.tar.gz > ${FSYNTH}.tar.gz
1010
sha512sum -c fluidsynth.sha512
1111
tar xzf ${FSYNTH}.tar.gz
1212

1313
cd $FSYNTH
14+
# Vendor in the fix from https://github.com/FluidSynth/fluidsynth/pull/1687
15+
# this can be removed when we bump fluidsynth next
16+
patch -p1 < ../pr-1687.patch
1417
mkdir build
1518
cd build
1619

@@ -22,6 +25,7 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
2225
fi
2326

2427
cmake .. $PG_BASE_CMAKE_FLAGS -Denable-readline=OFF $FLUIDSYNTH_EXTRA_PLAT_FLAGS \
28+
-Denable-openmp=OFF -Dosal=cpp11 -Denable-libinstpatch=0 \
2529
-Denable-pulseaudio=NO \
2630
-Denable-pipewire=NO
2731

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8f5d9e20ab5a50b966ae9abee349913611a3e4ebb6c4a39c8b0f56aaba06483e82a761e3d38a37af689e45a0940957c9db9d324ff77352b0841da40be1ff3899 fluidsynth-2.4.7.tar.gz
1+
8f326db4049b3241c7a0472aa5db8c715dcfc0a1ce9c5fda492bf84e6c17e27a2298131a58a51e275797259a434e59bfe3f53d85358f903652dca8de753a3376 fluidsynth-2.5.0.tar.gz

0 commit comments

Comments
 (0)