pkgname=vala
pkgver=0.56.18
pkgrel=5
pkgdesc='Compiler for the GObject type system'
url='https://wiki.gnome.org/Projects/Vala'
arch=(x86_64)
license=(LGPL-2.1-or-later)
depends=(
  bash
  gcc
  glib:2
  glibc
  pkg-config
  gobject-introspection
)
makedepends=(
  libxslt
)
checkdepends=(
  dbus-glib
)
sources=("${pkgname}-${pkgver}.tar.xz")
urls=("https://download.gnome.org/sources/${pkgname}/${pkgver%.*}/${sources[0]}")
sha512sums=("7ba820942ac40b54a62cbcd8a1d94d5add022b4a2c69e1276fc9fca38361d5878f3f852d270e0a5ef4bca6bd2df3a65f14b410c600b82a46da4123c90a3107e7")

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

src_build() {
  local conf_args=(
    --prefix=/usr
    --disable-unversioned
    --disable-valadoc
    VALAC=:
    WEASYPRINT=:
  )
  ./configure "${conf_args[@]}"
  make
}

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

  install -vDm644 vala.m4 vapigen/vapigen.m4 -t "${pkgdir}/usr/share/aclocal"
  install -vDm644 vapigen/Makefile.vapigen -t "${pkgdir}/usr/share/vala"
}

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