# Maintainer: Bruno Pagani <archange@archlinux.org>
# Contributor: Eli Schwartz <eschwartz@archlinux.org>
# Contributor: Nate Simon <aurpkg (at natesimon.net)>

pkgname=xed
pkgver=3.8.4
pkgrel=1
pkgdesc="A small and lightweight text editor. X-Apps Project."
arch=(x86_64)
url="https://github.com/linuxmint/${pkgname}"
license=(GPL)
groups=(x-apps)
depends=(gspell gtksourceview4 libpeas xapp)
makedepends=(meson samurai gobject-introspection intltool itstool glib2-devel)
optdepends=('python: required for some plugins')
source=(${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
        libxml-2.12.patch)
sha256sums=('1660fd85506ff1c12ff09953f70abcd67e425d5a7a0c3f6ba7f49a0a38458c4f'
            'ed19b6f419a4f703d290d8c97ed5d904c88a90fc475c738a0e65f7ab31697c40')
b2sums=('fe311f47850615a14077904af8beeba11b054f849f399f2916b7338dd3b5bc7e29a71cde70d32d1201b01bbca12ef4417cf2078db038a747aa21281c0d8b204a'
        'bd3f1c73b5873b05db1a734d2b42025d460f6862dbb13813e3fc97602c43e6758e2857f2e2db14e739780a7d58fdb48e87186cfde4393b7799070def14750353')

prepare() {
  patch -d $pkgname-$pkgver -p1 < libxml-2.12.patch
}

build() {
  arch-meson ${pkgname}-${pkgver} build
  samu -C build
}

package(){
  DESTDIR="${pkgdir}" samu -C build install
}
