{% set name = "graphite2" %}
{% set version = "1.3.13" %}
{% set sha256 = "dd63e169b0d3cf954b397c122551ab9343e0696fb2045e1b326db0202d875f06" %}

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

source:
  url: https://github.com/silnrsi/graphite/releases/download/{{ version }}/{{ name }}-{{ version }}.tgz
  sha256: {{ sha256 }}
  patches:
    # Windows patches from https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-graphite2
    # 003 updated for 1.3.13.
    - 001-graphite2-1.3.12-win64.patch          # [win]
    - 002-graphite2-1.2.1-pkgconfig.patch       # [win]
    #- 003-graphite2-1.3.13-staticbuild.patch    # [win]
    - 004-graphite2-1.3.12-dllimport-fix.patch  # [win]

build:
  number: 1001
  detect_binary_files_with_prefix: true

requirements:
  build:
    - m2-make  # [win]
    - m2-patch  # [win]
    - cmake
    - ninja  # [win]
    - {{ compiler('c') }}    # [not win]
    - {{ compiler('cxx') }}  # [not win]
    - vs2015_win-64          # [win] - no VS2008 since it's too much of a hassle to support
    - make                   # [unix]
  host:

test:
  commands:
    - conda inspect linkages -p $PREFIX $PKG_NAME  # [not win]
    - conda inspect objects -p $PREFIX $PKG_NAME  # [osx]

about:
  home: http://graphite.sil.org/
  license: LGPLv2
  license_file: COPYING
  summary: 'A "smart font" system that handles the complexities of lesser-known languages of the world.'

extra:
  recipe-maintainers:
    - pkgw
    - ocefpaf
