# vim: filetype=yaml sw=2
filename: '[% project %]-[% c("version") %]-[% c("arch") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
version: 14.4
container:
  use_container: 1
var:
  setup: |
    mkdir -p /var/tmp/dist
    tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %]
    export sysrootdir=/var/tmp/dist/[% project %]/MacOSX[% c("version") %].sdk/
    export clangdir=/var/tmp/dist/[% project %]/clang
    export cctoolsdir=/var/tmp/dist/[% project %]/cctools/bin
    export PATH="$clangdir/bin:$cctoolsdir:$PATH"
    export LD_LIBRARY_PATH=/var/tmp/dist/[% project %]/clang/lib
    export CC="$clangdir/bin/clang [% c('var/FLAGS') %]"
    export LDFLAGS="[% c('var/LDFLAGS') %]"
    export MACOSX_DEPLOYMENT_TARGET=[% c("var/macosx_deployment_target") %]

input_files:
  - project: container-image
  - name: clang
    project: clang
  - name: cctools
    project: cctools
  - name: cmake
    project: cmake
  - name: ninja
    project: ninja
  - name: SDK
    # Original URL: https://swcdn.apple.com/content/downloads/14/48/052-59890-A_I0F5YGAY0Y/p9n40hio7892gou31o1v031ng6fnm9sb3c/CLTools_macOSNMOS_SDK.pkg
    URL: https://build-sources.tbb.torproject.org/CLTools_macOSNMOS_SDK-14.4.pkg
    sha512sum: a4e05d2a051027620c86f72694da126a2ceed59b8740270426c4ca3adb38e16fe981b536a373a7f0cdcc84bbe9d9149608ccd03967dbd94262548ccadbfa0f5d
  - name: llvm-project
    project: llvm-project
  - project: wasi-sysroot
    name: wasi-compiler-rt
    pkg_type: build_compiler_rt
  - filename: macpkg.py
  - filename: unpack-sdk.py
  - filename: tools.diff
