{% set xorg_name = "xorgproto" %}
{% set xorg_category = "proto" %}
{% set name = "xorg-" ~ xorg_name %}
{% set version = "2024.1" %}
{% set sha256 = "372225fd40815b8423547f5d890c5debc72e88b91088fbfb13158c20495ccb59" %}
{% set am_version = "1.15" %} # keep synchronized with build.sh

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

source:
  url: https://www.x.org/releases/individual/{{ xorg_category }}/{{ xorg_name }}-{{ version }}.tar.xz
  sha256: {{ sha256 }}
  patches:
    - 0001-windows-fds-bits.patch  # [win]

build:
  number: 1

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

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

about:
  home: https://www.x.org/
  license: MIT
  license_family: MIT
  license_file: licenses/
  summary: X.org protocol headers

extra:
  recipe-maintainers:
    - pkgw
