# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>

_realname=gsfonts
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=20200910
pkgrel=2
pkgdesc='(URW)++ Core Font Set [Level 2] (mingw-w64)'
url='https://github.com/ArtifexSoftware/urw-base35-fonts'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
license=('AGPL3')
makedepends=('git')
source=("git+https://github.com/ArtifexSoftware/urw-base35-fonts#tag=${pkgver}")
sha256sums=('SKIP')

package() {
  cd urw-base35-fonts
  install -Dt "${pkgdir}${MINGW_PREFIX}/share/fonts/${_realname}" -m644 fonts/*.otf
  install -Dt "${pkgdir}${MINGW_PREFIX}/share/appdata" -m644 appstream/*.xml

  install -d "${pkgdir}"${MINGW_PREFIX}/etc/fonts/conf.{avail,d}
  for _f in fontconfig/*.conf; do
     _fn="${pkgdir}${MINGW_PREFIX}/etc/fonts/conf.avail/69-${_f##*/}"
     install -m644 ${_f} "${_fn}"
     ln -srt "${pkgdir}${MINGW_PREFIX}/etc/fonts/conf.d" "${_fn}"
  done
}
