# Maintainer: Alexey Pavlov <Alexpux@gmail.com>

_realname=Devel-GlobalDestruction
pkgname=perl-${_realname}
pkgver=0.14
pkgrel=1
pkgdesc="Expose the flag which marks global"
arch=('any')
url="https://metacpan.org/release/Sub-Exporter"
license=('PerlArtistic' 'GPL')
depends=('perl' 'perl-Sub-Exporter' 'perl-Sub-Exporter-Progressive')
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/H/HA/HAARG/Devel-GlobalDestruction-${pkgver}.tar.gz
        01-msysize.patch)
sha512sums=('75c346feae98897fb202dea0295f0225bf3cac59f21915da5dd1cdcf845052f4f8bcd0362d357020fb0facb6358175112b3685860ca1c1f173421c7c6a54f45d'
            'dc035e61962cc21e05033690b7a23ce898a0ae23eb3c6d1842419408c2ad655816fe08b65c6e1f3353123dab37b31c2d6579992cbd223a3bd82bb45ae28a9bf1')

prepare() {
  cd ${_realname}-${pkgver}
  patch -p1 -i ${srcdir}/01-msysize.patch
}

build() {
  cd ${_realname}-${pkgver}
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

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