Building QEMU 5.2.0 on MacOS Catalina

Notes

#!/bin/sh

# ==============
# configure_qemu
# ==============

./configure									\
	--extra-cflags="-Werror=unguarded-availability-new"			\
	--disable-pie								\
	--disable-auth-pam							\
	--audio-drv-list=""							\
	--target-list="i386-softmmu x86_64-softmmu aarch64-softmmu arm-softmmu"	\
	--prefix=/Users/Shared/qemu-5.2.0					\
	"$@"

tar zxf packages/pkg-config-0.29.2.tar.gz
cd pkg-config-0.29.2
./configure --prefix=/Users/Shared/qemu-5.2.0 --with-internal-glib
make
make install
cd ..

rm -fr bin
cd bin
unzip ../packages/ninja-mac.zip
cd ..

tar zxf packages/meson-0.56.2.tar.gz

export PATH="$PATH:/Users/Shared/qemu-5.2.0/bin:/Users/Shared/Build/qemu/bin"

/Users/Shared/xz/bin/xzcat packages/glib-2.67.2.tar.xz | tar xf -

rm -fr glib_build

python3 /Users/Shared/Build/qemu/meson-0.56.2/meson.py setup --prefix=/Users/Shared/qemu-5.2.0 glib_build glib-2.67.2

cd glib_build
../bin/ninja
../bin/ninja install
cd ..

tar zxf packages/pixman-0.40.0.tar.gz
cd pixman-0.40.0/
./configure --prefix=/Users/Shared/qemu-5.2.0
make
make install
cd ..

/Users/Shared/xz/bin/xzcat packages/qemu-5.2.0.tar.xz | tar xf -
cd qemu-5.2.0
./configure --prefix=/Users/Shared/qemu-5.2.0 (see ../configure_qemu)
make
make install
cd ..

Create softlink from qemu-5.2.0 to qemu in /Users/Shared