{% set name = "lcms2" %}
{% set version = "2.12" %}

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

source:
  url: https://github.com/mm2/Little-CMS/archive/{{ version }}.tar.gz
  sha256: e501f1482fc424550ef3abbf86bf1c66090e1661249e89552d39ed5bf935df66
  patches:
    - windows_linux_compat.patch          # [win]

build:
  number: 0
  skip: true  # [win and vc<14]
  run_exports:
    - {{ pin_subpackage("lcms2") }}

requirements:
  build:
    - libtool  # [unix]
    - {{ compiler('c') }}
    - make  # [not win]
  host:
    - jpeg
    - libtiff

test:
  commands:
    - test -f ${PREFIX}/include/lcms2.h  # [not win]
    - test -f ${PREFIX}/lib/liblcms2.a  # [not win]
    - test -f ${PREFIX}/lib/liblcms2${SHLIB_EXT}  # [not win]
    - jpgicc
    - tificc
    - linkicc
    - transicc
    - psicc
    - if not exist %LIBRARY_INC%\\lcms2.h exit 1  # [win]
    - if not exist %LIBRARY_LIB%\\lcms2.lib exit 1  # [win]
    - if not exist %LIBRARY_BIN%\\lcms2.dll exit 1  # [win]

about:
  home: http://www.littlecms.com/
  license: MIT
  license_family: MIT
  license_file: COPYING
  summary: Open Source Color Management Engine

extra:
  recipe-maintainers:
    - isuruf
    - hmaarrfk
