# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=dvisvgm
pkgver=3.5
pkgrel=2
pkgdesc='A fast DVI, EPS, and PDF to SVG converter'
arch=(x86_64 aarch64)
url='https://dvisvgm.de/'
license=(GPL-3.0-or-later)
depends=(brotli
         freetype2
         gcc-libs
         ghostscript
         glibc
         potrace
         texlive-basic
         texlive-bin
         woff2
         xxhash
         zlib)
optdepends=('mupdf-tools: to process PDF files')
makedepends=(autoconf-archive
             git
             python
             python-lxml)
source=(git+https://github.com/mgieseki/dvisvgm#tag=$pkgver)
sha256sums=('ce49a6a01905589ae5ad267b19a3955eb7172b6cd40db6c8976e5318f9efd349')

prepare() {
  cd $pkgname
  autoreconf -vi
}

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

check() {
  cd $pkgname
  make check
}

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