build: fix Mac M1 build on my Mini

Fix the Mac builder on my M1 Mini.

Update glib and get it building.

Add command line tools include and lib directories to flags.

Add a necessary clang flag to fix vbam build with CoreAudio.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2025-07-19 17:16:20 +00:00
parent 92230e0003
commit 3d4c03d0e6
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
3 changed files with 14 additions and 9 deletions

View File

@ -394,6 +394,9 @@ if(APPLE)
default default
) )
endif() endif()
# Needed for CoreAudio.
target_compile_options(visualboyadvance-m PRIVATE -Wno-error=elaborated-enum-base)
endif() endif()
target_sources(visualboyadvance-m PRIVATE ${VBAM_WX_COMMON} ${VBAM_ICON_PATH}) target_sources(visualboyadvance-m PRIVATE ${VBAM_WX_COMMON} ${VBAM_ICON_PATH})

View File

@ -180,7 +180,7 @@ DISTS=$DISTS'
XML-Parser https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.47.tar.gz perl5/man/man3/XML*Parser.3* XML-Parser https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.47.tar.gz perl5/man/man3/XML*Parser.3*
intltool https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz bin/intltoolize intltool https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz bin/intltoolize
ninja https://github.com/ninja-build/ninja/archive/v1.12.1.tar.gz bin/ninja ninja https://github.com/ninja-build/ninja/archive/v1.12.1.tar.gz bin/ninja
glib https://download.gnome.org/sources/glib/2.85/glib-2.85.0.tar.xz lib/libglib-2.0.a glib https://download.gnome.org/sources/glib/2.85/glib-2.85.1.tar.xz lib/libglib-2.0.a
libgpg-error https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.54.tar.bz2 lib/libgpg-error.a libgpg-error https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.54.tar.bz2 lib/libgpg-error.a
libgcrypt https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.11.0.tar.bz2 lib/libgcrypt.a libgcrypt https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.11.0.tar.bz2 lib/libgcrypt.a
libsecret https://gitlab.gnome.org/GNOME/libsecret/-/archive/0.21.7/libsecret-0.21.7.tar.bz2 lib/libsecret-1.a libsecret https://gitlab.gnome.org/GNOME/libsecret/-/archive/0.21.7/libsecret-0.21.7.tar.bz2 lib/libsecret-1.a
@ -374,7 +374,7 @@ DIST_ARGS="$DIST_ARGS
graphviz --disable-ltdl --without-x --disable-swig CFLAGS=\"-include \$PWD/declspec.h \$CFLAGS\" CC=\"\$CXX\" graphviz --disable-ltdl --without-x --disable-swig CFLAGS=\"-include \$PWD/declspec.h \$CFLAGS\" CC=\"\$CXX\"
python2 --with-ensurepip=install --with-system-expat python2 --with-ensurepip=install --with-system-expat
python3 --with-ensurepip=install --with-system-expat python3 --with-ensurepip=install --with-system-expat
glib -Dtests=false glib -Dtests=false -Ddtrace=disabled
XML-Parser EXPATINCPATH=\"\$BUILD_ROOT/root/include\" EXPATLIBPATH=\"\$BUILD_ROOT/root/lib\" XML-Parser EXPATINCPATH=\"\$BUILD_ROOT/root/include\" EXPATLIBPATH=\"\$BUILD_ROOT/root/lib\"
libcroco --disable-Bsymbolic libcroco --disable-Bsymbolic
snappy -DSNAPPY_BUILD_TESTS=OFF -DSNAPPY_BUILD_BENCHMARKS=OFF snappy -DSNAPPY_BUILD_TESTS=OFF -DSNAPPY_BUILD_BENCHMARKS=OFF

View File

@ -126,14 +126,14 @@ export PATH="$best_llvm_path/bin:$BREW_PREFIX/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export CC="$clang_path/bin/clang $target_build_arch" export CC="$clang_path/bin/clang $target_build_arch"
export CPP="$clang_path/bin/clang -E $target_build_arch" export CPP="$clang_path/bin/clang -E $target_build_arch"
export CXX="$clang_path/bin/clang++ $target_build_arch" export CXX="$clang_path/bin/clang++ $target_build_arch"
export CPPFLAGS="-DICONV_CONST=" export CPPFLAGS="-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -DICONV_CONST="
export CFLAGS="-framework Carbon -framework Foundation -framework CoreServices -framework SystemConfiguration -Wno-unused-command-line-argument -Wl,-no_compact_unwind" export CFLAGS="-framework Carbon -framework Foundation -framework CoreServices -framework SystemConfiguration -Wno-unused-command-line-argument"
export CXXFLAGS="-framework Carbon -framework Foundation -framework CoreServices -framework SystemConfiguration -Wno-unused-command-line-argument -Wl,-no_compact_unwind" export CXXFLAGS="-framework Carbon -framework Foundation -framework CoreServices -framework SystemConfiguration -Wno-unused-command-line-argument"
export OBJCXXFLAGS="-framework Carbon -framework Foundation -framework CoreServices -framework SystemConfiguration -Wno-unused-command-line-argument -Wl,-no_compact_unwind" export OBJCXXFLAGS="-framework Carbon -framework Foundation -framework CoreServices -framework SystemConfiguration -Wno-unused-command-line-argument"
export LDFLAGS="-framework Carbon -framework Foundation -framework CoreServices -framework SystemConfiguration -Wno-unused-command-line-argument -Wl,-no_compact_unwind" export LDFLAGS="-L\"\$BUILD_ROOT/root/lib\" -lintl -liconv -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -F/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks -framework Carbon -framework Foundation -framework CoreServices -framework SystemConfiguration -Wno-unused-command-line-argument -Wl,-no_compact_unwind"
export UUID_CFLAGS="-I\$BUILD_ROOT/root/stow/libuuid/include" export UUID_CFLAGS="-I\"\$BUILD_ROOT/root/stow/libuuid/include\""
export UUID_LIBS="-L\$BUILD_ROOT/root/stow/libuuid/lib -luuid" export UUID_LIBS="-L\"\$BUILD_ROOT/root/stow/libuuid/lib\" -luuid"
EOF EOF
) )
@ -231,6 +231,8 @@ table_line_append DIST_CONFIGURE_OVERRIDES ffmpeg "--disable-videotoolbox --extr
#table_line_append DIST_PATCHES ffmpeg "-p0 https://gist.githubusercontent.com/rkitover/db75d083b74617b186eec11965c1da74/raw/20da2f8c6d8c02ce284096c5e805ae671351cc6e/ffmpeg-macos10-7.patch" #table_line_append DIST_PATCHES ffmpeg "-p0 https://gist.githubusercontent.com/rkitover/db75d083b74617b186eec11965c1da74/raw/20da2f8c6d8c02ce284096c5e805ae671351cc6e/ffmpeg-macos10-7.patch"
table_line_append DIST_PATCHES glib "-p0 https://gist.githubusercontent.com/rkitover/100b6ecf6e1c049aa32975be22395c4e/raw/abab7c71458c42d6750f2dec9b913ba085834fce/static-libintle-macos-glib.patch"
if [ -n "$APPLE_SILICON" ] && [ "$target_cpu" != ARM64 ]; then if [ -n "$APPLE_SILICON" ] && [ "$target_cpu" != ARM64 ]; then
table_line_append DIST_CONFIGURE_OVERRIDES ffmpeg '--disable-asm' table_line_append DIST_CONFIGURE_OVERRIDES ffmpeg '--disable-asm'
fi fi