{% set name = "libedit" %}
{% set version = "3.1" %}
{% set date = "20181209" %}
{% set sha256 = "2811d70c0b000f2ca91b7cb1a37203134441743c4fcc9c37b0b687f328611064" %}

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: 0
  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:
    - {{ compiler('c') }}
    - automake
    - autoconf
    - m4
    - perl
    - make

  host:
    - ncurses

test:
  downstreams:
    - sqlite
  commands:
    - test -f $PREFIX/lib/libedit.dylib  # [osx]
    - test -f $PREFIX/lib/libedit.so     # [linux]

about:
  home: http://thrysoee.dk/editline/
  license: NetBSD
  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:
    - dougalsutherland
    - scopatz
    - mingwandroid
