# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# 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'
        '2d7922774a6eac7b180092a8a23a0c8d8a675cf2e0d698106258c4a9d036fb0eb2cfde9c21df96e1d842a0cbccd01035c83328ff8b06a008253fb8760c9e28a3')

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:
