image: debian/bookworm
packages:
  - qtbase5-dev
  - qttools5-dev
  - cmake
  - clang
  - libcurl4-openssl-dev
  - wget
  - fuse
  - file
  - xorg-dev # shouldn't install Xorg!
  - libwayland-client0
  - libwayland-dev
  - pkg-config
sources:
  - https://hg.sr.ht/~mrpapersonic/minori
  - https://github.com/tpoechtrager/osxcross
environment:
  BUILD_SUBMITTER: hg.sr.ht
  MACOSX_DEPLOYMENT_TARGET: 10.9
tasks:
  - build: |
      cd osxcross/tarballs
      wget "https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.9.sdk.tar.xz"
      cd ..
      export TARGET_DIR="$PWD/target"
      UNATTENDED=1 ./build.sh
      export PATH="$TARGET_DIR/bin:$PATH"
      cd ..
      osxcross-macports install qt5-qtbase qt5-qttools
      CC="o64-clang" CXX="o64-clang++" CXXFLAGS="-stdlib=libc++" cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER= -DCMAKE_CXX_COMPILER=o64-clang++
      make
triggers:
  - action: email
    condition: failure
    to: Paper <mrpapersonic@gmail.com>
