distributable:
  url: https://github.com/mesonbuild/meson/releases/download/{{version}}/meson-{{version}}.tar.gz
  strip-components: 1

versions:
  github: mesonbuild/meson/tags

dependencies:
  pkgx.sh: ^1
  linux:
    python.org: ~3.11 # needs libpython3.11.so.1.0

build:
  dependencies:
    python.org: ~3.11
  script:
    - bkpyvenv stage {{prefix}} {{version}}
    - ${{prefix}}/venv/bin/pip install .
    - bkpyvenv seal {{prefix}} meson

test:
  dependencies:
    ninja-build.org: ^1
    llvm.org: <17
  script: |
    meson ..
    test -f build.ninja
  working-directory: build

provides:
  - bin/meson
