{% set version = "4.1.5" %}
{% set ver_maj_min_str = "-".join(version.split(".")[:2]) %}

package:
  name: zeromq
  version: {{ version }}

source:
  fn: zeromq-{{ version }}.tar.gz
  url: https://github.com/zeromq/zeromq{{ ver_maj_min_str }}/releases/download/v{{ version }}/zeromq-{{ version }}.tar.gz
  sha1: 2b7490b77860be3060b1b1f92cd73184d309ca69
  patches:
    # Patch to avoid failing tests on Mac. See issues for details.
    # https://github.com/zeromq/libzmq/issues/1509
    # https://github.com/zeromq/libzmq/issues/1878
    # https://github.com/zeromq/libzmq/issues/1464
    - Makefile.am.mac.patch    # [osx]
    # Patch to avoid a failing test on Linux. See issue for details.
    # https://github.com/zeromq/libzmq/issues/1462
    - Makefile.am.linux.patch  # [linux]

build:
  skip: true      # [win]
  number: 0

requirements:
  build:
    - automake    # [unix]
    - autoconf    # [unix]
    - libtool     # [unix]
    - pkg-config  # [unix]
    - libsodium   # [unix]

  run:
    - libsodium   # [unix]

test:
  commands:
    - test -f ${PREFIX}/lib/libzmq.a           # [unix]
    - test -f ${PREFIX}/lib/libzmq.dylib       # [osx]
    - test -f ${PREFIX}/lib/libzmq.so          # [linux]

about:
  home: http://zeromq.org
  license: LGPL 3
  summary: A high-performance asynchronous messaging library.

extra:
  recipe-maintainers:
    - jakirkham
    - minrk
