# Maintainer: Christoph Reiter <reiter.christoph@gmail.com>

pkgname=xorgproto
pkgver=2024.1
pkgrel=1
pkgdesc="combined X.Org X11 Protocol headers"
arch=(any)
license=('custom')
groups=('development')
conflicts=('xproto')
provides=('xproto')
replaces=('xproto')
url="https://xorg.freedesktop.org/"
msys2_references=(
  "anitya: 17190"
)
makedepends=('meson' 'ninja' 'gcc')
source=("https://xorg.freedesktop.org/archive/individual/proto/${pkgname}-${pkgver}.tar.xz")
sha256sums=('372225fd40815b8423547f5d890c5debc72e88b91088fbfb13158c20495ccb59')

prepare() {
  cd "${pkgname}-${pkgver}"

}

build() {
  mkdir "${srcdir}"/build && cd "${srcdir}"/build

  meson setup \
    --wrap-mode=nodownload \
    --auto-features=enabled \
    --buildtype=plain \
    --prefix=/usr \
    "../${pkgname}-${pkgver}"

  meson compile
}

package() {
  cd "${srcdir}"/build

  DESTDIR="$pkgdir" meson install
}
