git » cairomm.git » main » tree

[main] / PKGBUILD

# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Kevin <kevin@archlinux.org>
# Contributor: criminy <criminy@gmail.com>

pkgbase=cairomm
pkgname=(
  cairomm
  cairomm-docs
)
pkgver=1.14.5
pkgrel=1
pkgdesc="C++ bindings for Cairo"
url="https://www.cairographics.org/cairomm/"
arch=(armv7h)
license=(
  LGPL
  MPL
)
depends=(
  cairo
  libsigc++
)
makedepends=(
  git
  meson
  mm-common
)
options=(!emptydirs)
_commit=669e87a460bca3fa8d57cdaeac70bff183636354  # tags/1.14.5^0
source=("git+https://gitlab.freedesktop.org/cairo/cairomm.git#commit=$_commit")
b2sums=('SKIP')

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

prepare() {
  cd cairomm
}

build() {
  local meson_options=(
    -D maintainer-mode=true
  )

  arch-meson cairomm build "${meson_options[@]}"
  meson compile -C build
}

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

package_cairomm() {
  depends+=(libsigc-2.0.so)
  provides=(libcairomm-1.0.so)

  meson install -C build --destdir "$pkgdir"

  # Split -docs
  mkdir -p docs/usr/share
  mv -t docs/usr/share "$pkgdir"/usr/share/{devhelp,doc}
}

package_cairomm-docs() {
  pkgdesc+=" (documentation)"
  depends=()
  options=(!strip)

  mv -t "$pkgdir" docs/*
}

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