{% set version = "0.5.0" %}

package:
  name: glog
  version: {{ version }}

source:
  fn: glog-{{ version }}.tar.gz
  url: https://github.com/google/glog/archive/v{{ version }}.tar.gz
  sha256: eede71f28371bf39aa69b45de23b329d37214016e2055269b3b5e7cfd40b59f5
  patches:
    # Work around clang bug that does not raise SIGFPE
    - 0001-Always-raise-SIGFPE.patch  # [osx]
    - 0003-Remove-non-existent-USAGE-level-from-tests.patch
    - 0004-Ignore-unmangled-cxx11-symbols.patch

build:
  number: 0
  run_exports:
    # Recent releases have been stable
    # https://abi-laboratory.pro/index.php?view=timeline&l=glog
    - {{ pin_subpackage('glog', max_pin="x.x") }}

requirements:
  build:
    - cmake
    - ninja
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
  host:
    - gflags

test:
  commands:
    - test -f ${PREFIX}/lib/libglog${SHLIB_EXT}  # [unix]
    - if not exist %PREFIX%\\Library\\bin\\glog.dll exit 1  # [win]

about:
  home: https://github.com/google/glog
  license: BSD-3-Clause
  license_file: COPYING
  summary: C++ implementation of the Google logging module.

extra:
  recipe-maintainers:
    - jakirkham
    - xhochy
