{% set name = "jxrlib" %}
{% set version = "1.1" %}
{% set sha256 = "c7287b86780befa0914f2eeb8be2ac83e672ebd4bd16dc5574a36a59d9708303" %}

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

source:
  url: http://http.debian.net/debian/pool/main/{{ name[0] }}/{{ name }}/{{ name }}_{{ version }}.orig.tar.gz
  sha256: {{ sha256 }}
  patches:
    - usecmake.patch  # [unix]

build:
  number: 2
  run_exports:
    - {{ pin_subpackage('jxrlib', max_pin='x.x') }}

requirements:
  build:
    - {{ compiler('c') }}
    - cmake  # [unix]
    - make  # [unix]

test:
  commands:
    - test -f ${PREFIX}/lib/libjxrglue${SHLIB_EXT}  # [unix]
    - test -f ${PREFIX}/lib/libjpegxr${SHLIB_EXT}  # [unix]
    - if not exist %LIBRARY_LIB%\\libjxrglue.lib exit 1  # [win]
    - if not exist %LIBRARY_LIB%\\libjpegxr.lib exit 1  # [win]

about:
  home: https://packages.debian.org/source/sid/jxrlib
  license: BSD-2-Clause
  summary: "jxrlib - JPEG XR Library by Microsoft, built from Debian hosted sources."
  description: "This package seems to be no longer maintained by the original developer (Microsoft)."
  license_family: BSD
  license_file: LICENSE

extra:
  recipe-maintainers:
    - csachs
    - hmaarrfk
