# Contributor: Ed Robinson <ed@reevoo.com>
# Maintainer: Ed Robinson <ed@reevoo.com>
pkgname=fontforge
pkgver=20170731
pkgrel=0
pkgdesc="FontForge is a free (libre) font editor for Windows, Mac OS X and GNU+Linux."
url="https://github.com/fontforge/fontforge"
arch="all !s390x"
license="GPL-3.0"
source="https://github.com/fontforge/$pkgname/releases/download/$pkgver/$pkgname-dist-$pkgver.tar.xz"
builddir="$srcdir/$pkgname-2.0.$pkgver"
makedepends="autoconf automake libtool jpeg-dev tiff-dev libpng-dev giflib-dev libxt-dev freetype-dev libltdl libxml2-dev libuninameslist-dev libspiro-dev python-dev pango-dev cairo-dev coreutils"
subpackages="$pkgname-dev $pkgname-doc"

prepare() {
        default_prepare

        cd "$builddir"
        ./bootstrap --force
}

build() {
        cd "$builddir"
        ./configure --prefix=/usr
        make
}

check() {
        cd "$builddir"
        make check
}

package() {
        cd "$builddir"
        make DESTDIR="$pkgdir" install
}
sha512sums="26f7a40714460716a24dd0229fdb027f3766bcc48db64b8993436ddcb6277898f9f3b67ad4fc0be515b2b38e01370d1c7d9ee3c6ece1be862b7d8c9882411f11  fontforge-dist-20170731.tar.xz"
