{% set version = "0.11.1" %}
{% set checksum = "c524f3d47f0cdb7445c0326b20e79f60485e12daeb2adc8ad6a845ad6c19c1ac" %}

package:
  name: arrow-cpp
  version: {{ version }}

source:
  url: http://apache.cs.utah.edu/arrow/arrow-{{ version }}/apache-arrow-{{ version }}.tar.gz
  sha256: {{ checksum }}
  # patches:
  #   - 0003-add-orc-Exceptions.hh-to-adapter.cc.patch
  #   - 0004-guard-CXXFLAGS-setting-with-check-to-see-if-it-s-alr.patch

build:
  number: 0
  skip: true  # [(win and vc<14) or win32 or linux32]
  run_exports:
    - {{ pin_subpackage("arrow-cpp", max_pin="x.x") }}

requirements:
  build:
    - cmake
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - autoconf              # [unix]
  host:
    - brotli
    - flatbuffers
    - glog
    - libboost {{ boost }}
    - libprotobuf-static  {{ libprotobuf }}
    - lz4-c
    # arrow builds its own, because they do some squirrelly mods to it
    # - jemalloc      # [unix]
    - numpy-devel  {{ numpy }}
    # - protobuf
    - python
    - rapidjson
    - snappy
    - thrift-cpp >=0.11
    - zlib
    - zstd

  run:
    - libboost {{ boost }}
    - python

test:
  commands:
    - test -f $PREFIX/lib/libarrow.a  # [unix]
    - test -f $PREFIX/lib/libarrow.so  # [linux]
    - test -f $PREFIX/lib/libarrow_python.so  # [linux]
    - test -f $PREFIX/lib/libplasma.so  # [linux]
    - test -f $PREFIX/lib/libarrow.dylib  # [osx]
    - test -f $PREFIX/lib/libarrow_python.dylib  # [osx]
    - test -f $PREFIX/lib/libplasma.dylib  # [osx]
    - if not exist %LIBRARY_INC%\\arrow\\api.h exit 1               # [win]
    - if not exist %PREFIX%\\Library\\bin\\arrow.dll exit 1         # [win]
    - if not exist %PREFIX%\\Library\\bin\\arrow_python.dll exit 1  # [win]

about:
  home: http://github.com/apache/arrow
  license: Apache 2.0
  summary: 'C++ libraries for Apache Arrow'

extra:
  recipe-maintainers:
    - wesm
    - xhochy
    - leifwalsh
    - jreback
    - cpcloud
    - pcmoritz
    - robertnishihara
    - siddharthteotia
    - kou
    - kszucs
    - pitrou
    - msarahan
