{% set version = "2.40.1" %}  # [not win]
{% set version = "2.38" %}    # [win]

package:
  name: graphviz
  version: {{ version }}

source:
  fn:  graphviz-{{ version }}.tar.gz  # [unix]
  url: https://graphviz.gitlab.io/pub/graphviz/stable/SOURCES/graphviz.tar.gz
  md5: 4ea6fd64603536406166600bcc296fc8  # [unix]

  fn:  graphviz-{{ version }}.zip  # [win]
  url: https://graphviz.gitlab.io/_pages/Download/windows/graphviz-{{ version }}.zip  # [win]
  md5: d028f49e047e2a25fdb7c0aa323a3945  # [win]

build:
  number: 3
  detect_binary_files_with_prefix: True  # [unix]

requirements:
  build:
    - {{ compiler('c') }}
    - {{ cdt('libxrender-devel') }}  # [linux]
    - {{ cdt('libxcb') }}            # [linux]
    - {{ cdt('libxau-devel') }}      # [linux]
    - {{ cdt('libxext') }}           # [linux]
    - {{ cdt('libx11-devel') }}      # [linux and not ppc64le]
    - {{ cdt('libxext-devel') }}     # [linux and not ppc64le]
    # - libtool     # [unix]
    # - autoconf
    # - automake
    - pkg-config  # [unix]
  host:
    - cairo       # [unix]
    - expat       # [unix]
    - fontconfig  # [unix]
    - freetype    # [unix]
    - fribidi     # [unix]
    - glib        # [unix]
    - graphite2   # [unix]
    - harfbuzz    # [unix]
    - icu         # [unix]
    - jpeg        # [unix]
    - libffi      # [unix]
    - libpng      # [unix]
    - libtiff     # [unix]
    - libuuid     # [linux]
    - libxml2     # [unix]
    - pango       # [unix]
    - pcre        # [unix]
    - pixman      # [unix]
    - xz          # [unix]
    - zlib        # [unix]

test:
  commands:
    - dot -V
    - neato -?  # [unix]
    - conda inspect linkages $PKG_NAME  # [not win]
    - conda inspect objects $PKG_NAME  # [osx]
  files:
    - sample.dot

about:
  home: http://www.graphviz.org/
  license: EPL v1.0
  license_family: Other
  license_file: COPYING
  summary: Open Source graph visualization software.
  description: |
    Graphviz is an open source graph visualization software. Graph visualization
    is a way of representing structural information as diagrams of abstract
    graphs and networks.
  doc_url: http://www.graphviz.org/Documentation.php
  dev_url: https://github.com/ellson/graphviz

extra:
  recipe-maintainers:
    - jakirkham
    - ccordoba12
    - ocefpaf
    - mingwandroid
