# Contributor: Jan de Groot <jgc@archlinux.org>

_pkgname=libxdamage
pkgname=static-compat-$_pkgname
pkgver=1.1.6
pkgrel=1
pkgdesc="X11 damaged region extension library"
arch=('x86_64')
url="https://xorg.freedesktop.org/"
license=('custom')
depends=('static-compat-libxfixes')
makedepends=('static-compat-xorgproto' 'static-compat-configure')
options=(staticlibs !emptydirs)
source=(${url}/releases/individual/lib/libXdamage-${pkgver}.tar.xz{,.sig})
sha512sums=('624dcefa1c79064569df952892f7f1351dc19ad338ce73d1a57041e406cb3e18abe531bab352b93d1f0f5c9b5c6b2652cc84a8f1fbfcbba648343812695a8acb'
            'SKIP')
validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # "Alan Coopersmith <alan.coopersmith@oracle.com>"

build() {
  source static-compat-environment
  cd libXdamage-${pkgver}
  static-compat-configure --disable-shared --enable-static
  make
}

package() {
  source static-compat-environment
  cd libXdamage-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
