pkgname=libsigc++
pkgver=2.12.1
_ver=${pkgver%.*}
pkgdesc="Callback Framework for C++"
homepage="https://libsigcplusplus.github.io/libsigcplusplus/"
arch=(x86_64)
license=(LGPL-2.1-or-later)
depends=(
  gcc
  glibc
)
makedepends=(
  meson
)
sources=("${pkgname}-${pkgver}.tar.xz")
urls=("https://download.gnome.org/sources/${pkgname}/${_ver}/${sources[0]}")
sha512sums=("5e5c920807952c732a9acb139f707fdf556786133c18bc8842130803f864ba1f260e1d4a51be0a9892c2228bcfdf129a9a2ce91e3d20077870431a53a87a9f2a")

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

src_build() {
  #leaf_filter_flags "-fno-exceptions" #`leaf_filter_flags` to be implymented
  local meson_args=(
    --prefix=/usr
    --buildtype=release
    --wrap-mode=nodownload
    -D python.bytecompile=1
    -D benchmark=false
    -D build-documentation=false
    -D build-examples=false
    -D build-tests=false
  )
  meson setup build "${meson_args[@]}"
  meson compile -C build
}

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

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