{% set name = "libedit" %}
{% set version = "3.1" %}
{% set date = "20191231" %}
{% set sha256 = "dbb82cb7e116a5f8025d35ef5b4f7d4a3cdd0a3909a146a39112095a2d229071" %}

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

source:
  fn: {{ name }}-{{ date }}-{{ version }}.tar.gz
  url: http://thrysoee.dk/editline/{{ name }}-{{ date }}-{{ version }}.tar.gz
  sha256: {{ sha256 }}
  patches:
    # - 0001-Also-look-in-libtinfo-for-tgetent.patch


build:
  number: 2
  run_exports:
    # no info available.  Guessing at x.x.  Change if you know better.
    - {{ pin_subpackage('libedit', max_pin='x.x') }}
  skip: True   # [win]

requirements:
  build:
    - libtool  # [unix]
    - {{ compiler('c') }}
    - automake
    - autoconf
    - perl
    - make
    - m4
  host:
    - ncurses
  run:
    - ncurses

test:
  commands:
    - test -f $PREFIX/lib/libedit.dylib  # [osx]
    - test -f $PREFIX/lib/libedit.so     # [linux]
    - test ! -f $PREFIX/lib/libedit.a   # [unix]

about:
  home: http://thrysoee.dk/editline/
  license: BSD-2-Clause
  license_family: BSD
  license_file: COPYING
  summary: Editline Library (libedit)
  description: |
    This is an autotool- and libtoolized port of the NetBSD Editline library
    (libedit). This Berkeley-style licensed command line editor library provides
    generic line editing, history, and tokenization functions, similar to those
    found in GNU Readline

extra:
  recipe-maintainers:
    - djsutherland
    - scopatz
    - mingwandroid
