# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=mm-common
pkgver=1.0.6
pkgrel=1
pkgdesc="Common build files of the C++ bindings"
url="https://www.gtkmm.org/"
arch=(any)
license=(GPL-2.0-or-later)
depends=(
  doxygen
  graphviz
  gtk-doc
  libsigc++-docs
  perl-xml-parser
)
makedepends=(
  git
  libsigc++
  meson
)
_commit=7d50a613306499f525033498ea922e3887ed7e9a  # tags/1.0.6^0
source=(
  "git+https://gitlab.gnome.org/GNOME/mm-common.git#commit=$_commit"
  https://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag
)
b2sums=('SKIP'
        '1c532b8369667bbca42b446c757de784d0f06c4987f0174972d98378b2fc38f7877b731c26d0b0fa9858f13ddfcf8331e39fc04f8a957e0c15c6e1a5168cc0e7')

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

prepare() {
  cd $pkgname
  cp ../libstdc++.tag doctags
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
