{% set xorg_name = "xf86vidmodeproto" %}
{% set xorg_category = "proto" %}
{% set name = "xorg-" ~ xorg_name %}
{% set version = "2.3.1" %}
{% set sha256 = "45d9499aa7b73203fd6b3505b0259624afed5c16b941bd04fcf123e5de698770" %}
{% set am_version = "1.15" %} # keep synchronized with build.sh

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

source:
  fn: {{ name }}-{{ version }}.tar.bz2
  url: https://www.x.org/releases/individual/{{ xorg_category }}/{{ xorg_name }}-{{ version }}.tar.bz2
  sha256: {{ sha256 }}
  patches:
    - 0001-update-config-guess.patch

build:
  number: 1002
  detect_binary_files_with_prefix: true

requirements:
  build:
    - m2-autoconf  # [win]
    - m2-automake{{ am_version }}  # [win]
    - m2-libtool  # [win]
    - m2w64-pkg-config  # [win]
    - pkg-config  # [not win]
    - posix  # [win]
    - gnuconfig  # [unix]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
    - make  # [unix]
  host:
    - xorg-util-macros

test:
  commands:
    - test -e $PREFIX/include/X11/extensions/xf86vmproto.h  # [not win]

about:
  home: https://www.x.org/
  license: MIT
  license_family: MIT
  license_file: COPYING
  summary: 'Print extension headers'

extra:
  recipe-maintainers:
    - epruesse
    - pkgw
