{% set name = "abseil-cpp" %}
{% set version = "20210324.2" %}

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

source:
  url: https://github.com/abseil/{{ name }}/archive/{{ version }}.tar.gz
  sha256: 59b862f50e710277f8ede96f083a5bb8d7c9595376146838b9580be90374ee1f
  patches:
    #- linux-librt.patch  # [linux]
    - clang4_osx_fix.diff  # [osx]
    - osx_framework_fix.diff  # [osx]
    - remove-4221.patch  # [win]

build:
  number: 0
  run_exports:
    - {{ pin_subpackage("abseil-cpp", max_pin="x.x") }}

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

test:
  commands:
    - test -f $PREFIX/lib/libabsl_base${SHLIB_EXT}  # [not win]
    - if not exist %LIBRARY_LIB%\\absl_base.lib exit 1  # [win]

about:
  home: https://github.com/abseil/abseil-cpp
  license: Apache-2.0
  license_family: Apache
  license_file: LICENSE
  summary: Abseil Common Libraries (C++)
  description: |
    Abseil is an open-source collection of C++ code (compliant to C++11)
    designed to augment the C++ standard library.
  doc_url: https://github.com/abseil/abseil-cpp
  dev_url: https://github.com/abseil/abseil-cpp

extra:
  recipe-maintainers:
    - njzjz
    - bluescarni
    - xhochy
