{% set version = "2.2.2" %}

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

source:
  fn: gflags-{{ version }}.tar.gz
  url: https://github.com/gflags/gflags/archive/v{{ version }}.tar.gz
  sha1: 4d42470afb7236fb0cf90f8bbb0cec588073c17c


build:
  number: 1004
  run_exports:
    - {{ pin_subpackage('gflags', max_pin='x.x') }}

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

test:
  commands:
    - test -f ${PREFIX}/lib/libgflags.dylib                           # [osx]
    - test -f ${PREFIX}/lib/libgflags_nothreads.dylib                 # [osx]
    - test -f ${PREFIX}/lib/libgflags.so                              # [linux]
    - test -f ${PREFIX}/lib/libgflags_nothreads.so                    # [linux]
    - test ! -f ${PREFIX}/lib/libgflags.a                             # [not win]
    - test ! -f ${PREFIX}/lib/libgflags_nothreads.a                   # [not win]
    - if not exist %PREFIX%\\Library\\bin\\gflags.dll exit 1          # [win]
    - if not exist %PREFIX%\\Library\\lib\\gflags.lib exit 1          # [win]
    - if exist %PREFIX%\\Library\\lib\\gflags_static.lib exit 1       # [win]

about:
  home: https://github.com/gflags/gflags
  license: BSD-3-Clause
  license_file: COPYING.txt
  summary: A C++ library that implements commandline flags processing.

extra:
  recipe-maintainers:
    - jakirkham
    - wesm
    - xhochy
