# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Camille Moncelier <pix@devlife.org>

pkgname=m17n-lib
pkgver=1.8.5
pkgrel=1
pkgdesc='Multilingual text processing library (runtimes)'
url='https://www.nongnu.org/m17n/'
arch=('x86_64')
license=('GPL')
depends=('libxft' 'm17n-db' 'fribidi' 'libthai' 'libxml2' 'gd' 'libotf')
makedepends=('anthy' 'ispell')
optdepends=('anthy: to use the anthy input method'
            'ispell: to use the ispell input method')
options=('!makeflags' '!emptydirs')
validpgpkeys=('D68584F9B40A6502FD7C53015F592A4029890630')
source=("https://download.savannah.gnu.org/releases/m17n/${pkgname}-${pkgver}.tar.gz")
sha256sums=('7b6c425f792d06d14e4f5b17204d3627e2c8ebb423ebdae92c0c646710d3d6c7')

prepare() {
  cd ${pkgname}-${pkgver}
  sed -i 's/freetype-config/pkg-config freetype2/' configure
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}
