{% set name = "groff" %}
{% set version = "1.22.4" %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://ftp.gnu.org/gnu/groff/groff-{{ version }}.tar.gz
  sha256: e78e7b4cb7dec310849004fa88847c44701e8d133b5d4c13057d876c1bad0293
  patches:
    # xref: https://trac.macports.org/ticket/59783
    # xref: https://github.com/openembedded/openembedded-core/commit/e9beba2a
    - 0001-Include-config.h.patch

build:
  number: 0
  skip: True  # [win]

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - make
    - automake
    - texinfo
    - pkg-config
    - flex
    - bison
  host:
    - perl
    - libiconv  # [osx]
  run:
    - perl

test:
  commands:
    - eqn --version
    - grn --version
    - grodvi --version
    - groff --version
    - grolbp --version
    - grolj4 --version
    - grops --version
    - grotty --version
    - indxbib --version
    - post-grohtml --version
    - pre-grohtml --version
    - preconv --version
    - troff --version
    - chem --version
    - gperl --version
    - gpinyin --version
    - groffer --version
    - grog --version
    - gropdf --version
    - neqn --version
    - nroff --version
    - test -f $PREFIX/bin/glilypond
    - test -f $PREFIX/bin/afmtodit

about:
  home: https://www.gnu.org/software/groff/
  license: GPL-3.0-or-later
  license_family: GPL
  license_file: COPYING
  summary: 'Groff (GNU troff) is a typesetting system'
  description: |
    The Groff package contains programs for processing and formatting text.
  doc_url: https://www.gnu.org/software/groff/#documentation
  dev_url: http://git.savannah.gnu.org/cgit/groff.git

extra:
  recipe-maintainers:
    - nehaljwani
