{% set name = "libutf8proc" %}
{% set version = "2.6.1" %}

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

source:
  url: https://github.com/JuliaStrings/utf8proc/archive/v{{ version }}.tar.gz
  sha256: 4c06a9dc4017e8a2438ef80ee371d45868bda2237a98b26554de7a95406b283b

build:
  number: 0
  run_exports:
    # Appears to have pretty good compatibility.
    # ref: https://abi-laboratory.pro/?view=timeline&l=utf8proc
    - {{ pin_subpackage('libutf8proc', max_pin='x') }}

requirements:
  build:
    - {{ compiler('c') }}
    - cmake
    - make
  host:

test:
  commands:
    - test -f "${PREFIX}/include/utf8proc.h"                # [unix]
    - test -f "${PREFIX}/lib/libutf8proc${SHLIB_EXT}"       # [unix]
    - test ! -f "${PREFIX}/lib/libutf8proc.a"               # [unix]

    - if not exist "%LIBRARY_INC%\utf8proc.h"    exit 1     # [win]
    - if not exist "%LIBRARY_BIN%\utf8proc.dll"  exit 1     # [win]
    - if not exist "%LIBRARY_LIB%\utf8proc.lib"  exit 1     # [win]
    - if exist "%LIBRARY_LIB%\utf8proc_static.lib"  exit 1  # [win]

about:
  home: https://juliastrings.github.io/utf8proc/
  license: MIT
  license_family: MIT
  license_file: LICENSE.md
  summary: a clean C library for processing UTF-8 Unicode data
  description: |
    utf8proc is a small, clean C library that provides Unicode normalization,
    case-folding, and other operations for data in the UTF-8 encoding
  doc_url: https://juliastrings.github.io/utf8proc/doc/
  dev_url: https://github.com/JuliaStrings/utf8proc

extra:
  recipe-maintainers:
    - jakirkham
    - mingwandroid
    - nehaljwani
    - xhochy
