{% set name = "qwt" %}
{% set version = "6.1.4" %}

package:
  name: qwt
  version: {{ version }}

source:
  fn: {{ name }}-{{ version }}.tar.bz2
  url: https://sourceforge.net/projects/qwt/files/qwt/{{ version }}/{{ name }}-{{ version }}.tar.bz2
  sha256: 1529215329e51fc562e0009505a838f427919a18b362afff441f035b2d9b5bd9
  patches:
    # Can't seem to avoid /usr/local/ install without patch
    - qwtconfig.pri.patch
    # build in release mode
    - windows.patch

build:
  number: 1001

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - {{ cdt('mesa-libgl-devel') }}  # [linux]
    - {{ cdt('mesa-dri-drivers') }}  # [linux]
    - {{ cdt('libselinux') }}  # [linux]
    - {{ cdt('libxdamage') }}  # [linux]
    - {{ cdt('libxfixes') }}  # [linux]
    - {{ cdt('libxxf86vm') }}  # [linux]
  host:
    - qt
  run:
    - qt

test:
  requires:
    - python {{ os.environ.get('PY_VER', '') + '*' }}  # [win]
  commands:
    - test -f ${PREFIX}/lib/libqwt${SHLIB_EXT}  # [unix]
    - if not exist %PREFIX%\\Library\\include\\qwt.h exit 1  # [win]
    - if not exist %PREFIX%\\Library\\bin\\qwt.dll exit 1  # [win]
    - if not exist %PREFIX%\\Library\\lib\\qwt.lib exit 1  # [win]

about:
  home: http://qwt.sourceforge.net/ 
  license: Qwt, Version 1.0
  license_file: COPYING
  summary: Qt widgets for technical applications. 
  doc_url: http://qwt.sourceforge.net/
  dev_url: https://sourceforge.net/projects/qwt/

extra:
  recipe-maintainers:
    - ceholden
    - jschueller
    - marcelotrevisani
