distributable:
  url: https://downloads.sourceforge.net/project/matio/matio/{{version}}/matio-{{version}}.tar.gz
  strip-components: 1

display-name: libmatio

versions:
  url: https://sourceforge.net/projects/matio/files/matio/
  match: /files\/matio\/\d+.\d+.\d+/
  strip: /^files\/matio\//

dependencies:
  hdfgroup.org/HDF5: '*'
  zlib.net: '*'

build:
  script:
    - ./configure $ARGS
    - make --jobs {{ hw.concurrency }} install
  env:
    ARGS:
      - --prefix="{{prefix}}"
      - --disable-debug
      - --disable-dependency-tracking
      - --enable-extended-sparse=yes
      - --enable-mat73=yes
      - --with-hdf5={{deps.hdfgroup.org/HDF5.prefix}}
      - --with-zlib={{deps.zlib.net.prefix}}

provides:
  - bin/matdump

test: matdump --version | grep {{version}}
