# Maintainer: Kreijstal <kreijstal@hotmail.com>

_realname=svgpp
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=1.3.1
pkgrel=1
pkgdesc="C++ SVG framework, header-only (mingw-w64)"
arch=('any')
mingw_arch=('ucrt64' 'clang64' 'clangarm64')
url='https://github.com/svgpp/svgpp'
msys2_repository_url='https://github.com/svgpp/svgpp'
license=('spdx:BSL-1.0')
depends=("${MINGW_PACKAGE_PREFIX}-boost-libs")
makedepends=()
source=("https://github.com/svgpp/svgpp/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('be8a89df72d01cf062cc9815dd64c9576b4d20910d6d7aee7f0ea26484dc5e76')

package() {
  cd "${srcdir}/${_realname}-${pkgver}"

  # Header-only library: install all svgpp headers under the standard
  # include dir so consumers can `#include <svgpp/svgpp.hpp>` without any
  # extra -I flags. svgpp also ships a sibling `exboost/` directory that
  # some of its headers include via `<exboost/parameter.hpp>` (it's a
  # vendored fix for Boost.Parameter quirks), so ship both.
  install -d "${pkgdir}${MINGW_PREFIX}/include"
  cp -r "include/svgpp" "${pkgdir}${MINGW_PREFIX}/include/"
  cp -r "include/exboost" "${pkgdir}${MINGW_PREFIX}/include/"

  # License
  install -Dm644 LICENSE_1_0.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE_1_0.txt"
}
