{% set version = "5.2.1" %}

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

source:
  - url: http://downloads.sourceforge.net/project/giflib/giflib-{{ version }}.tar.gz
    sha256: 31da5562f44c5f15d63340a09a4fd62b48c45620cd302f77a6d9acf0077879bd
    patches:
      - fix_win.patch  # [win]
  # add a getopt polyfill
  - path: getopt.h  # [win]

build:
  number: 2
  skip: true  # [win and vc<14]
  run_exports:
    # SONAME changes at minor revs.
    #    https://abi-laboratory.pro/tracker/timeline/giflib/
    - {{ pin_subpackage('giflib', max_pin='x.x') }}

requirements:
  build:
    - {{ compiler('c') }}
    - make  # [not win]
    - git  # [win]
    - cmake

test:
  commands:
    - gif2rgb -h
    - gifbuild -h
    - giffix -h
    - giftext -h
    - gifclrmp -h

about:
  home: http://giflib.sourceforge.net
  license: MIT
  license_file:
    - COPYING
    - getopt_LICENSE.txt  # [win]
  summary: Library for reading and writing gif images

extra:
  recipe-maintainers:
    - ocefpaf
    - 183amir
    - msarahan
    - isuruf
    - wolfv
