pkgname=libXcursor
pkgver=1.2.3
pkgdesc="X cursor management library"
arch=('x86_64')
homepage="https://gitlab.freedesktop.org/xorg/lib/libxcursor"
license=('HPND-sell-variant')
depends=('libXfixes' 'libXrender' 'libX11' 'glibc' 'xorg-proto')
sources=("${pkgname}-${pkgver}.tar.xz")
urls=("https://xorg.freedesktop.org/releases/individual/lib/${sources[0]}")
md5sums=("5ce55e952ec2d84d9817169d5fdb7865")

src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
}

src_build() {
  local conf_args=(
    --prefix=/usr
    --sysconfdir=/etc
    --disable-static
    --with-icondir=/usr/share/cursors/xorg-x11
    --with-cursorpath='~/.cursors:~/.icons:/usr/local/share/cursors/xorg-x11:/usr/local/share/cursors:/usr/local/share/icons:/usr/local/share/pixmaps:/usr/share/cursors/xorg-x11:/usr/share/cursors:/usr/share/pixmaps/xorg-x11:/usr/share/icons:/usr/share/pixmaps'
  )
  ./configure "${conf_args[@]}"
  make
}

src_install() {
  make DESTDIR="${pkgdir}" install

  install -Dm644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim:ft=sh syn=sh et sw=2:
