#!/bin/bash set -e export MACOSX_DEPLOYMENT_TARGET=11.0 INSTALLDIR="$HOME/deps" NPROCS="$(getconf _NPROCESSORS_ONLN)" SDL=SDL2-2.28.4 PNG=1.6.37 JPG=9e FFMPEG=6.0 QT=6.6.0 mkdir deps-build cd deps-build export PKG_CONFIG_PATH="$INSTALLDIR/lib/pkgconfig:$PKG_CONFIG_PATH" export LDFLAGS="-L$INSTALLDIR/lib -dead_strip $LDFLAGS" export CFLAGS="-I$INSTALLDIR/include -Os $CFLAGS" export CXXFLAGS="-I$INSTALLDIR/include -Os $CXXFLAGS" cat > SHASUMS < #import int main() { return 0; }" HAVE_FRAMEWORK_COREHAPTICS) - if(HAVE_FRAMEWORK_GAMECONTROLLER AND HAVE_FRAMEWORK_COREHAPTICS) + if(HAVE_FRAMEWORK_GAMECONTROLLER AND HAVE_FRAMEWORK_COREHAPTICS AND FALSE) # Only enable MFI if we also have CoreHaptics to ensure rumble works set(SDL_JOYSTICK_MFI 1) set(SDL_FRAMEWORK_GAMECONTROLLER 1) EOF cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DSDL_X11=OFF make -C build "-j$NPROCS" make -C build install cd .. echo "Installing libpng..." tar xf "libpng-$PNG.tar.xz" cd "libpng-$PNG" ./configure --prefix "$INSTALLDIR" --disable-dependency-tracking make "-j$NPROCS" make install cd .. echo "Installing FFmpeg..." tar xf "ffmpeg-$FFMPEG.tar.xz" cd "ffmpeg-$FFMPEG" ./configure --prefix="$INSTALLDIR" --disable-all --disable-autodetect --disable-static --enable-shared \ --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale \ --enable-audiotoolbox --enable-videotoolbox \ --enable-encoder=ffv1,qtrle,pcm_s16be,pcm_s16le,*_at,*_videotoolbox \ --enable-muxer=avi,matroska,mov,mp3,mp4,wav \ --enable-protocol=file make "-j$NPROCS" make install cd .. echo "Installing Qt Base..." tar xf "qtbase-everywhere-src-$QT.tar.xz" cd "qtbase-everywhere-src-$QT" cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_optimize_size=ON -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF make -C build "-j$NPROCS" make -C build install cd .. echo "Installing Qt SVG..." tar xf "qtsvg-everywhere-src-$QT.tar.xz" cd "qtsvg-everywhere-src-$QT" cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=MinSizeRel make -C build "-j$NPROCS" make -C build install cd .. echo "Installing Qt Image Formats..." tar xf "qtimageformats-everywhere-src-$QT.tar.xz" cd "qtimageformats-everywhere-src-$QT" cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=MinSizeRel make -C build "-j$NPROCS" make -C build install cd .. echo "Installing Qt Tools..." tar xf "qttools-everywhere-src-$QT.tar.xz" cd "qttools-everywhere-src-$QT" # Linguist relies on a library in the Designer target, which takes 5-7 minutes to build on the CI # Avoid it by not building Linguist, since we only need the tools that come with it patch -u src/linguist/CMakeLists.txt <