#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=vala
pkgver=0.56.5
pkgrel=01
pkgdesc='Compiler for the GObject type system'
url='https://wiki.gnome.org/Projects/Vala'
depends=(glib2 gtk-doc graphviz ttf-liberation pkg-config gcc)
makedepends=(libxslt vala git help2man autoconf-archive)
checkdepends=(dbus libx11 gobject-introspection)
provides=(valadoc libvala-${pkgver%.*}.so libvaladoc-${pkgver%.*}.so)
conflicts=(valadoc)
replaces=(valadoc)
#options=(debug)  ## uncomment this to have the debug package produced
_commit=9c8ee8f065e572ed9feecdf118145d5b1748fada  # tags/0.56.5^0
source=("git+https://gitlab.gnome.org/GNOME/vala.git#commit=$_commit")

pkgver() {
  cd vala
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd vala
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd vala
  ./configure --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

check() {
  cd vala
  make check
}

package() {
  cd vala
  make DESTDIR="$pkgdir" install
}

#---- arch license gpg-key & sha256sums ----

arch=(x86_64)

license=(LGPL)

sha256sums=('SKIP')

##  8374cf68031add788557ca8f4263f9f6d0eacdad7b7475ba03a3e16903aca0b5  vala-0.56.5-01-x86_64.pkg.tar.lz

