distributable:
  url: https://github.com/universal-ctags/ctags/archive/refs/tags/{{version.tag}}.tar.gz
  strip-components: 1

versions:
  github: universal-ctags/ctags

dependencies:
  digip.org/jansson: ^2
  pyyaml.org/libyaml: ^0.2
  pcre.org/v2: ^10
  gnome.org/libxml2: ^2

build:
  dependencies:
    gnu.org/autoconf: '*'
    gnu.org/automake: '*'
    docutils.org: '*'
    python.org: '>=3.11'
  script:
    - ./autogen.sh
    - ./configure $ARGS
    - make --jobs {{ hw.concurrency }}
    - make --jobs {{ hw.concurrency }} install
  env:
    ARGS:
      - --disable-debug
      - --disable-dependency-tracking
      - --prefix={{prefix}}
      - --libdir={{prefix}}/lib

provides:
  - bin/ctags

test:
  - ctags -R .
  - cat tags | grep 'test.c'
  - ctags --version | grep {{version}}