pkgname=at-spi2-core
pkgver=2.56.5
pkgdesc="D-Bus accessibility specifications and registration daemon"
DEPEND="
    >=sys-apps/dbus-1.5[${MULTILIB_USEDEP}]
    >=dev-libs/glib-2.67.4:2[${MULTILIB_USEDEP}]
    >=dev-libs/libxml2-2.9.1:2=[${MULTILIB_USEDEP}]
    introspection? ( >=dev-libs/gobject-introspection-1.82.0-r2:= )
    systemd? ( sys-apps/systemd[${MULTILIB_USEDEP}] )
    !<dev-libs/atk-2.46.0
"
RDEPEND="${DEPEND}"
BDEPEND="
    dev-util/glib-utils
    >=sys-devel/gettext-0.19.8
    virtual/pkgconfig
"
sources=("${pkgname}-${pkgver}.tar.xz")
urls=("https://download.gnome.org/sources/${pkgname}/${pkgver%.*}/${sources[@]}")
sha512sums=("b495a9f7f8539c9d7a3929d8bdceb98ce0b8dac9ea735fa85aada6e1062658b7fff323c8e76a4ae34131febffa9664976f3e1e3e171154c0ff8e923c4db9d9e5")

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

src_build() {
  local meson_args=(
    --prefix=/usr
    --buildtype=release
    --wrap-mode=nodownload
    -D python.bytecompile=1
    -D default_bus=dbus-daemon
    -D use_systemd=true
    -D gtk2_atk_adaptor=true
    -D docs=false
    -D introspection=enabled
    -D x11=disabled
    -D atk_only=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:
