{% set version = "2.3.4" %}

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

source:
  url: https://ftp.gnu.org/gnu/libidn/libidn2-{{ version }}.tar.gz
  sha256: 93caba72b4e051d1f8d4f5a076ab63c99b77faee019b72b9783b267986dbb45f

build:
  skip: true  # [win]
  number: 0
  run_exports:
    # _Amazing_ backwards compatibility so pin to major number:
    #    https://abi-laboratory.pro/tracker/timeline/libidn2/
    - {{ pin_subpackage('libidn2', min_pin='x', max_pin='x') }}

requirements:
  build:
    - gnuconfig  # [unix]
    - {{ compiler('c') }}
    - make
    - pkg-config
  host:
    - gettext
    - libunistring

test:
  commands:
    - test -f "${PREFIX}/include/idn2.h"
    - test -f "${PREFIX}/lib/libidn2${SHLIB_EXT}"

about:
  home: https://www.gnu.org/software/libidn/#libidn2
  license: LGPLv2
  license_file: COPYING
  summary: Library for internationalized domain names (IDNA2008) support

extra:
  recipe-maintainers:
    - hmaarrfk
    # This recipe I got from
    # - chenghlee
