# Maintainer: Alexey Pavlov <Alexpux@gmail.com>
# Contributor: Renato Silva <br.renatosilva@gmail.com>
# Contributor: Niklas Holm <jadedcyborg@gmail.com>

_realname=perl
pkgbase="mingw-w64-${_realname}"
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
         $([[ ${CARCH} == i686 ]] || echo "${MINGW_PACKAGE_PREFIX}-${_realname}-doc"))
# If you are upgrading to a new version, please run setup_perl_dirs.sh on the
# (patched) source tree to update hard-coded path values. If there are any
# changes, update the exisitng patches or add a new one.
#
# Run updpkgprovs after the package is built and installed to update the
# provides array, then repackage.
pkgver="5.38.4"
#       v    ^
pkgrel=1
pkgdesc="A highly capable, feature-rich programming language (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://www.perl.org"
msys2_repository_url="https://github.com/Perl/perl5"
msys2_references=(
  'archlinux: perl'
  "cpe: cpe:/a:larry_wall:perl"
  "cpe: cpe:/a:perl:perl"
)
license=('spdx:Artistic-1.0-Perl OR GPL-1.0-or-later')
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
             "${MINGW_PACKAGE_PREFIX}-make")
depends=("${MINGW_PACKAGE_PREFIX}-cc-libs")
optdepends=("${MINGW_PACKAGE_PREFIX}-make: for using cpan")
source=("https://www.cpan.org/src/5.0/${_realname}-${pkgver}.tar.xz"
        "perlprofile.in"
        "perlinstall.in"
        "001-fhs-directory-structure.patch"
        "002-relocate-html-documentation.patch"
        "003-replace-batch-scripts-with-bare-perl.patch"
        "004-fix-cpan-external-programs.patch"
        "005-rename-cpan-home.patch"
        "006-generate-manpages.patch"
        "007-use-winsock-socket-functions.patch"
        "008-ucrt-stdio-internals.patch"
        "009-fix-CCLIBDIR.patch"
        "012-errno-gen-reduce-includes.patch"
        "013-no-explib.patch"
        "014-no-description-in-def.patch"
        "015-noreturn.patch"
        "017-arm64.patch"
        "018-copy-clang-runtime.patch"
        "https://github.com/Perl/perl5/commit/f6691a84dfa9fe39c67d0f974bf4663aefe26695.patch")
sha256sums=('f6777e856b22460e8091f9524593e93299f421cc23dbd408d3f5ed3328d357a7'
            'a98fc21fb079a9b31194292191ea8be1590b97be16b57cc25c3cf73a5d2bd25e'
            'ec41f5054fcc61cd3f0942dc42fe24fcca50a9ff13cb42003b119e221a207d40'
            'be096d0ed38ca4375a017e5b1163e03d65973b536fc45d54bdeea15c07996761'
            '9f77b5674eda8553422d2e1f547b176d5a97ed292e0a13271a6a9936c519d897'
            '05079d31773abaee40ae9398f380dc45d05eeb02d493e6d8a7454fe8d83069e0'
            '39dbdca9647e0e72733801e078d0d262940afea8bd48b767c224746e18e6f939'
            'ecf7d1e70976b25aad329ef7f77ddd6ba6c2efed3b94e30946e250d03cdd6d2e'
            '72b674a75e87a2d8b48ff34a7d100e72f11cdfa219427c2e7f7e67c156a7e0ee'
            'ba62014f623680703f518326f5a2230aff5b6d3656c3bfaf3a9ae0747f66a1ca'
            '0cdddf4d3a1b545c18a451bac2a13a99a4eb10d27b12a67157a7f35a6283becf'
            '85d5ca288551c8749c900e618b39dca124ff94c1e1d02687940cc63f11a7619c'
            'e19052547c9f8b9ce9d19236061fabbd1ffed9678d0089b1476344e70e51527c'
            '64b7dfd31b2881be30bf86ad05bd8232537bf97fbe4b0611df89c085b2d3b14d'
            '68fc914809ab3402ed2afed110c18ae2934500026c23669e1e543edc58df45a2'
            '749e96f97a162c53f4cf7bda83d1b18f4d3e587e7980e07f5e8968943d6ea774'
            '7861675f02698537f3ea99230b0d95ba9581253df258ebb81a528a3861b485ce'
            'b6fbca2f89ee4bae4f28321759c76078f1d1de574d9bceb7eae033ca3d3626c0'
            '79dc3bdcbf671161648ce0565780d6a5dbd9c2631bc6c8aa5a58e56378690bcb')
## Populated by the updpkgprovs script
provides=(
    "${MINGW_PACKAGE_PREFIX}-perl-amiga-arexx=0.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-amiga-exec=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-anydbm_file=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-app-cpan=1.678.0"
    "${MINGW_PACKAGE_PREFIX}-perl-app-prove-state-result-test=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-app-prove-state-result=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-app-prove-state=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-app-prove=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-archive-tar-constant=2.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-archive-tar-file=2.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-archive-tar=2.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-attribute-handlers=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-attributes=0.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-exception-system=2.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-exception=2.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-hints=2.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-scope-guard=2.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-scope-guardstack=2.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-skip=2.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie-util=2.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autodie=2.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autoloader=5.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autosplit=1.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-autouse=1.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-b-concise=1.7.0"
    "${MINGW_PACKAGE_PREFIX}-perl-b-deparse=1.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-b-op_private=5.38.4"
    "${MINGW_PACKAGE_PREFIX}-perl-b-showlex=1.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-b-terse=1.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-b-xref=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-b=1.880.0"
    "${MINGW_PACKAGE_PREFIX}-perl-base=2.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-benchmark=1.240.0"
    "${MINGW_PACKAGE_PREFIX}-perl-bigfloat=0.660.0"
    "${MINGW_PACKAGE_PREFIX}-perl-bigint=0.660.0"
    "${MINGW_PACKAGE_PREFIX}-perl-bignum=0.660.0"
    "${MINGW_PACKAGE_PREFIX}-perl-bigrat=0.660.0"
    "${MINGW_PACKAGE_PREFIX}-perl-blib=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-builtin=0.8.0"
    "${MINGW_PACKAGE_PREFIX}-perl-bytes=1.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-carp-heavy=1.540.0"
    "${MINGW_PACKAGE_PREFIX}-perl-carp=1.540.0"
    "${MINGW_PACKAGE_PREFIX}-perl-charnames=1.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-class-struct=0.680.0"
    "${MINGW_PACKAGE_PREFIX}-perl-compress-raw-bzip2=2.204.1"
    "${MINGW_PACKAGE_PREFIX}-perl-compress-raw-zlib=2.204.1"
    "${MINGW_PACKAGE_PREFIX}-perl-compress-zlib=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-config-extensions=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-config-perl-v=0.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-config=5.38.4"
    "${MINGW_PACKAGE_PREFIX}-perl-constant=1.330.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-author=5.500.200"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-bundle=5.500.500"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-cachemgr=5.500.200"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-complete=5.500.100"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-debug=5.500.100"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-deferredcode=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-distribution=2.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-distroprefs=6.0.100"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-distrostatus=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-exception-blocked_urllist=1.1.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-exception-recursivedependency=5.500.100"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-exception-yaml_not_installed=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-exception-yaml_process_error=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-firsttime=5.531.700"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-ftp-netrc=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-ftp=5.501.600"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-handleconfig=5.501.200"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-http-client=1.960.200"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-http-credentials=1.960.100"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-index=2.290.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-infoobj=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-kwalify=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-lwp-useragent=1.960.100"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-converter=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-feature=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-history=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-merge=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-prereqs=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-requirements=2.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-spec=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-validator=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta-yaml=0.18.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-meta=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-mirrors=2.270.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-module=5.500.300"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-nox=5.500.100"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-plugin-specfile=0.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-plugin=0.970.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-prompt=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-queue=5.500.300"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-shell=5.500.900"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-tarzip=5.501.300"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-url=5.500.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan-version=5.500.300"
    "${MINGW_PACKAGE_PREFIX}-perl-cpan=2.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-cwd=3.890.0"
    "${MINGW_PACKAGE_PREFIX}-perl-data-dumper=2.188.0"
    "${MINGW_PACKAGE_PREFIX}-perl-db=1.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dbm_filter-compress=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dbm_filter-encode=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dbm_filter-int32=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dbm_filter-null=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dbm_filter-utf8=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dbm_filter=0.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-db_file=1.858.0"
    "${MINGW_PACKAGE_PREFIX}-perl-deprecate=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-devel-peek=1.330.0"
    "${MINGW_PACKAGE_PREFIX}-perl-devel-ppport=3.710.0"
    "${MINGW_PACKAGE_PREFIX}-perl-devel-selfstubber=1.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-diagnostics=1.390.0"
    "${MINGW_PACKAGE_PREFIX}-perl-digest-base=1.200.0"
    "${MINGW_PACKAGE_PREFIX}-perl-digest-file=1.200.0"
    "${MINGW_PACKAGE_PREFIX}-perl-digest-md5=2.580.100"
    "${MINGW_PACKAGE_PREFIX}-perl-digest-sha=6.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-digest=1.200.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dirhandle=1.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dumpvalue=1.210.0"
    "${MINGW_PACKAGE_PREFIX}-perl-dynaloader=1.540.100"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-alias=2.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-byte=2.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-cjkconstants=2.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-cn-hz=2.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-cn=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-config=2.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-ebcdic=2.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-encoder=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-encoding=2.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-gsm0338=2.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-guess=2.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-jp-h2z=2.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-jp-jis7=2.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-jp=2.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-kr-2022_kr=2.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-kr=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-mime-header-iso_2022_jp=1.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-mime-header=2.290.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-mime-name=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-symbol=2.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-tw=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-unicode-utf7=2.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode-unicode=2.200.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encode=3.190.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encoding-warnings=0.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-encoding=3.0.0"
    "${MINGW_PACKAGE_PREFIX}-perl-english=1.110.0"
    "${MINGW_PACKAGE_PREFIX}-perl-env=1.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-errno=1.370.0"
    "${MINGW_PACKAGE_PREFIX}-perl-experimental=0.31.0"
    "${MINGW_PACKAGE_PREFIX}-perl-exporter-heavy=5.770.0"
    "${MINGW_PACKAGE_PREFIX}-perl-exporter=5.770.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-base=0.280.238"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-aix=0.280.238"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-android=0.280.238"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-cygwin=0.280.238"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-darwin=0.280.238"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-dec_osf=0.280.238"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-os2=0.280.238"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-unix=0.280.238"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-vms=0.280.238"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-windows-bcc=0.280.238"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-windows-gcc=0.280.238"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-windows-msvc=0.280.238"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder-platform-windows=0.280.238"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-cbuilder=0.280.238"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-command-mm=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-command=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-constant-base=0.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-constant-proxysubs=0.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-constant-utils=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-constant-xs=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-constant=0.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-embed=1.350.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-install=2.220.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-installed=2.220.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-liblist-kid=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-liblist=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-makemaker-config=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-makemaker-locale=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-makemaker-version-regex=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-makemaker-version=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-makemaker=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-manifest=1.730.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-miniperl=1.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mkbootstrap=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mksymlists=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_aix=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_any=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_beos=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_cygwin=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_darwin=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_dos=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_macos=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_nw5=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_os2=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_os390=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_qnx=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_unix=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_uwin=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_vms=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_vos=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_win32=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-mm_win95=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-my=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-packlist=2.220.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-parsexs-constants=3.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-parsexs-countlines=3.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-parsexs-eval=3.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-parsexs-utilities=3.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-parsexs=3.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-pl2bat=0.5.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-testlib=7.700.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-typemaps-cmd=3.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-typemaps-inputmap=3.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-typemaps-outputmap=3.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-typemaps-type=3.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-typemaps=3.510.0"
    "${MINGW_PACKAGE_PREFIX}-perl-extutils-xssymset=1.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-fatal=2.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-fcntl=1.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-feature=1.820.0"
    "${MINGW_PACKAGE_PREFIX}-perl-fields=2.240.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-basename=2.860.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-compare=1.100.700"
    "${MINGW_PACKAGE_PREFIX}-perl-file-copy=2.410.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-dosglob=1.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-fetch=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-find=1.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-glob=1.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-globmapper=1.1.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-path=2.180.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-amigaos=3.880.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-cygwin=3.880.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-epoc=3.880.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-functions=3.880.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-mac=3.880.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-os2=3.880.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-unix=3.880.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-vms=3.880.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec-win32=3.880.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-spec=3.880.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-stat=1.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-file-temp=0.231.100"
    "${MINGW_PACKAGE_PREFIX}-perl-filecache=1.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-filehandle=2.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-filetest=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-filter-simple=0.960.0"
    "${MINGW_PACKAGE_PREFIX}-perl-filter-util-call=1.640.0"
    "${MINGW_PACKAGE_PREFIX}-perl-findbin=1.530.0"
    "${MINGW_PACKAGE_PREFIX}-perl-gdbm_file=1.240.0"
    "${MINGW_PACKAGE_PREFIX}-perl-getopt-long=2.540.0"
    "${MINGW_PACKAGE_PREFIX}-perl-getopt-std=1.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-hash-util-fieldhash=1.260.0"
    "${MINGW_PACKAGE_PREFIX}-perl-hash-util=0.300.0"
    "${MINGW_PACKAGE_PREFIX}-perl-http-tiny=0.86.0"
    "${MINGW_PACKAGE_PREFIX}-perl-i18n-collate=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-i18n-langinfo=0.220.0"
    "${MINGW_PACKAGE_PREFIX}-perl-i18n-langtags-detect=1.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-i18n-langtags-list=0.410.0"
    "${MINGW_PACKAGE_PREFIX}-perl-i18n-langtags=0.450.0"
    "${MINGW_PACKAGE_PREFIX}-perl-if=0.61.0"
    "${MINGW_PACKAGE_PREFIX}-perl-integer=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-adapter-bzip2=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-adapter-deflate=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-adapter-identity=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-base-common=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-base=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-bzip2=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-deflate=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-gzip-constants=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-gzip=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-rawdeflate=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-zip-constants=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-zip=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-zlib-constants=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-compress-zlib-extra=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-dir=1.520.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-file=1.520.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-handle=1.520.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-pipe=1.520.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-poll=1.520.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-seekable=1.520.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-select=1.520.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-socket-inet=1.520.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-socket-ip=0.410.100"
    "${MINGW_PACKAGE_PREFIX}-perl-io-socket-unix=1.520.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-socket=1.520.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-adapter-bunzip2=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-adapter-identity=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-adapter-inflate=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-anyinflate=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-anyuncompress=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-base=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-bunzip2=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-gunzip=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-inflate=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-rawinflate=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-uncompress-unzip=2.204.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io-zlib=1.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-io=1.520.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ipc-cmd=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ipc-msg=2.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ipc-open2=1.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ipc-open3=1.220.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ipc-semaphore=2.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ipc-sharedmem=2.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ipc-sysv=2.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-json-pp-boolean=4.160.0"
    "${MINGW_PACKAGE_PREFIX}-perl-json-pp=4.160.0"
    "${MINGW_PACKAGE_PREFIX}-perl-less=0.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-lib=0.650.0"
    "${MINGW_PACKAGE_PREFIX}-perl-list-util-xs=1.630.0"
    "${MINGW_PACKAGE_PREFIX}-perl-list-util=1.630.0"
    "${MINGW_PACKAGE_PREFIX}-perl-locale-maketext-guts=1.200.0"
    "${MINGW_PACKAGE_PREFIX}-perl-locale-maketext-gutsloader=1.200.0"
    "${MINGW_PACKAGE_PREFIX}-perl-locale-maketext-simple=0.210.100"
    "${MINGW_PACKAGE_PREFIX}-perl-locale-maketext=1.330.0"
    "${MINGW_PACKAGE_PREFIX}-perl-locale=1.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigfloat-trace=0.660.0"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigfloat=1.999.837"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigint-calc=1.999.837"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigint-fastcalc=0.501.300"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigint-lib=1.999.837"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigint-trace=0.660.0"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigint=1.999.837"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigrat-trace=0.660.0"
    "${MINGW_PACKAGE_PREFIX}-perl-math-bigrat=0.262.400"
    "${MINGW_PACKAGE_PREFIX}-perl-math-complex=1.620.0"
    "${MINGW_PACKAGE_PREFIX}-perl-math-trig=1.620.0"
    "${MINGW_PACKAGE_PREFIX}-perl-memoize-anydbm_file=1.160.0"
    "${MINGW_PACKAGE_PREFIX}-perl-memoize-expire=1.160.0"
    "${MINGW_PACKAGE_PREFIX}-perl-memoize-ndbm_file=1.160.0"
    "${MINGW_PACKAGE_PREFIX}-perl-memoize-sdbm_file=1.160.0"
    "${MINGW_PACKAGE_PREFIX}-perl-memoize-storable=1.160.0"
    "${MINGW_PACKAGE_PREFIX}-perl-memoize=1.160.0"
    "${MINGW_PACKAGE_PREFIX}-perl-meta_notation"
    "${MINGW_PACKAGE_PREFIX}-perl-mime-base64=3.160.100"
    "${MINGW_PACKAGE_PREFIX}-perl-mime-quotedprint=3.160.100"
    "${MINGW_PACKAGE_PREFIX}-perl-module-corelist-utils=5.202.504.133.800"
    "${MINGW_PACKAGE_PREFIX}-perl-module-corelist=5.202.504.133.800"
    "${MINGW_PACKAGE_PREFIX}-perl-module-load-conditional=0.740.0"
    "${MINGW_PACKAGE_PREFIX}-perl-module-load=0.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-module-loaded=0.80.0"
    "${MINGW_PACKAGE_PREFIX}-perl-module-metadata=1.0.37"
    "${MINGW_PACKAGE_PREFIX}-perl-mro=1.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ndbm_file=1.160.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-cmd=3.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-config=3.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-domain=3.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-ftp-a=3.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-ftp-dataconn=3.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-ftp-e=3.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-ftp-i=3.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-ftp-l=3.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-ftp=3.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-hostent=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-netent=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-netrc=3.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-nntp=3.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-ping=2.760.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-pop3=3.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-protoent=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-servent=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-smtp=3.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-net-time=3.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-next=0.690.0"
    "${MINGW_PACKAGE_PREFIX}-perl-o=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-odbm_file=1.180.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ok=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-opcode=1.640.0"
    "${MINGW_PACKAGE_PREFIX}-perl-open=1.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-ops=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-os2-dll=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-os2-extattr=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-os2-prfdb=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-os2-process=1.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-os2-rexx=1.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-overload-numbers"
    "${MINGW_PACKAGE_PREFIX}-perl-overload=1.370.0"
    "${MINGW_PACKAGE_PREFIX}-perl-overloading=0.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-params-check=0.380.0"
    "${MINGW_PACKAGE_PREFIX}-perl-parent=0.241.0"
    "${MINGW_PACKAGE_PREFIX}-perl-parse-cpan-meta=2.150.10"
    "${MINGW_PACKAGE_PREFIX}-perl-perl-ostype=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-perlfaq=5.202.105.200"
    "${MINGW_PACKAGE_PREFIX}-perl-perlio-encoding=0.300.0"
    "${MINGW_PACKAGE_PREFIX}-perl-perlio-mmap=0.17.0"
    "${MINGW_PACKAGE_PREFIX}-perl-perlio-scalar=0.310.0"
    "${MINGW_PACKAGE_PREFIX}-perl-perlio-via-quotedprint=0.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-perlio-via=0.180.0"
    "${MINGW_PACKAGE_PREFIX}-perl-perlio=1.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-checker=1.750.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-escapes=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-functions-functions=1.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-functions=1.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-html-util=1.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-html=1.340.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-man=5.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-parselink=5.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-baseto=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-getoptsoo=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-toansi=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-tochecker=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-toman=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-tonroff=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-topod=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-tortf=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-toterm=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-totext=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-totk=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc-toxml=3.280.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-perldoc=3.280.100"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-blackbox=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-checker=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-debug=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-dumpastext=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-dumpasxml=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-html=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-htmlbatch=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-htmllegacy=5.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-justpod"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-linksection=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-methody=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-progress=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-pullparser=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-pullparserendtoken=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-pullparserstarttoken=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-pullparsertexttoken=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-pullparsertoken=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-rtf=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-search=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-simpletree=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-text=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-textcontent=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-tiedoutfh=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-transcode=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-transcodedumb=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-transcodesmart=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-xhtml=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple-xmloutstream=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-simple=3.430.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-text-color=5.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-text-overstrike=5.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-text-termcap=5.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-text=5.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-pod-usage=2.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-posix=2.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-re=0.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-safe=2.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-scalar-util=1.630.0"
    "${MINGW_PACKAGE_PREFIX}-perl-sdbm_file=1.170.0"
    "${MINGW_PACKAGE_PREFIX}-perl-search-dict=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-selectsaver=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-selfloader=1.260.0"
    "${MINGW_PACKAGE_PREFIX}-perl-sigtrap=1.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-socket=2.36.0"
    "${MINGW_PACKAGE_PREFIX}-perl-sort=2.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-stable=0.31.0"
    "${MINGW_PACKAGE_PREFIX}-perl-storable=3.320.0"
    "${MINGW_PACKAGE_PREFIX}-perl-strict=1.120.0"
    "${MINGW_PACKAGE_PREFIX}-perl-sub-util=1.630.0"
    "${MINGW_PACKAGE_PREFIX}-perl-subs=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-symbol=1.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-sys-hostname=1.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-sys-syslog-win32"
    "${MINGW_PACKAGE_PREFIX}-perl-sys-syslog=0.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-base=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-formatter-base=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-formatter-color=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-formatter-console-parallelsession=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-formatter-console-session=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-formatter-console=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-formatter-file-session=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-formatter-file=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-formatter-session=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-harness-env=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-harness=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-object=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-aggregator=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-grammar=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-iterator-array=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-iterator-process=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-iterator-stream=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-iterator=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-iteratorfactory=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-multiplexer=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result-bailout=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result-comment=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result-plan=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result-pragma=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result-test=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result-unknown=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result-version=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result-yaml=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-result=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-resultfactory=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-scheduler-job=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-scheduler-spinner=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-scheduler=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-source=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-sourcehandler-executable=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-sourcehandler-file=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-sourcehandler-handle=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-sourcehandler-perl=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-sourcehandler-rawtap=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-sourcehandler=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-yamlish-reader=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser-yamlish-writer=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tap-parser=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-term-ansicolor=5.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-term-cap=1.180.0"
    "${MINGW_PACKAGE_PREFIX}-perl-term-complete=1.403.0"
    "${MINGW_PACKAGE_PREFIX}-perl-term-readline=1.170.0"
    "${MINGW_PACKAGE_PREFIX}-perl-test-builder-formatter=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test-builder-io-scalar=2.114.0"
    "${MINGW_PACKAGE_PREFIX}-perl-test-builder-module=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test-builder-tester-color=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test-builder-tester=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test-builder-tododiag=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test-builder=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test-harness=3.440.0"
    "${MINGW_PACKAGE_PREFIX}-perl-test-more=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test-simple=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test-tester-capture=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test-tester-capturerunner=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test-tester-delegate=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test-tester=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test-use-ok=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-api-breakage=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-api-context=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-api-instance=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-api-interceptresult-event=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-api-interceptresult-facet=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-api-interceptresult-hub=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-api-interceptresult-squasher=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-api-interceptresult=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-api-stack=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-api=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-bail=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-diag=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-encoding=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-exception=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-fail=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-generic=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-note=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-ok=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-pass=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-plan=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-skip=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-subtest=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-tap-version=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-v2=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event-waiting=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-event=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-about=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-amnesty=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-assert=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-control=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-error=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-hub=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-info-table=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-info=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-meta=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-parent=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-plan=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-render=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet-trace=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-eventfacet=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-formatter-tap=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-formatter=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-hub-interceptor-terminator=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-hub-interceptor=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-hub-subtest=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-hub=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-ipc-driver-files=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-ipc-driver=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-ipc=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-tools-tiny=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-util-externalmeta=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-util-facets2legacy=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-util-hashbase=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-util-trace=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2-util=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test2=1.302.194"
    "${MINGW_PACKAGE_PREFIX}-perl-test=1.310.0"
    "${MINGW_PACKAGE_PREFIX}-perl-text-abbrev=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-text-balanced=2.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-text-parsewords=3.310.0"
    "${MINGW_PACKAGE_PREFIX}-perl-text-tabs=2021.81.400"
    "${MINGW_PACKAGE_PREFIX}-perl-text-wrap=2021.81.400"
    "${MINGW_PACKAGE_PREFIX}-perl-thread-queue=3.140.0"
    "${MINGW_PACKAGE_PREFIX}-perl-thread-semaphore=2.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-thread=3.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-threads-shared=1.680.0"
    "${MINGW_PACKAGE_PREFIX}-perl-threads=2.360.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-array=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-file=1.70.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-handle=4.300.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-hash-namedcapture=0.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-hash=1.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-memoize=1.100.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-refhash=1.400.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-scalar=1.60.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-stdhandle=4.600.0"
    "${MINGW_PACKAGE_PREFIX}-perl-tie-substrhash=1.10.0"
    "${MINGW_PACKAGE_PREFIX}-perl-time-gmtime=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-time-hires=1.977.500"
    "${MINGW_PACKAGE_PREFIX}-perl-time-local=1.300.0"
    "${MINGW_PACKAGE_PREFIX}-perl-time-localtime=1.30.0"
    "${MINGW_PACKAGE_PREFIX}-perl-time-piece=1.340.101"
    "${MINGW_PACKAGE_PREFIX}-perl-time-seconds=1.340.100"
    "${MINGW_PACKAGE_PREFIX}-perl-time-tm=1.0.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate-cjk-big5=1.310.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate-cjk-gb2312=1.310.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate-cjk-jisx0208=1.310.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate-cjk-korean=1.310.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate-cjk-pinyin=1.310.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate-cjk-stroke=1.310.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate-cjk-zhuyin=1.310.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate-locale=1.310.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-collate=1.310.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-normalize=1.320.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode-ucd=0.780.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicode=15.0.0"
    "${MINGW_PACKAGE_PREFIX}-perl-unicore-name"
    "${MINGW_PACKAGE_PREFIX}-perl-universal=1.150.0"
    "${MINGW_PACKAGE_PREFIX}-perl-user-grent=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-user-pwent=1.20.0"
    "${MINGW_PACKAGE_PREFIX}-perl-utf8=1.250.0"
    "${MINGW_PACKAGE_PREFIX}-perl-vars=1.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-version-regex=0.992.900"
    "${MINGW_PACKAGE_PREFIX}-perl-version=0.992.900"
    "${MINGW_PACKAGE_PREFIX}-perl-vms-dclsym=1.90.0"
    "${MINGW_PACKAGE_PREFIX}-perl-vms-filespec=1.130.0"
    "${MINGW_PACKAGE_PREFIX}-perl-vms-stdio=2.460.0"
    "${MINGW_PACKAGE_PREFIX}-perl-vmsish=1.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-warnings-register=1.50.0"
    "${MINGW_PACKAGE_PREFIX}-perl-warnings=1.650.0"
    "${MINGW_PACKAGE_PREFIX}-perl-win32=0.590.0"
    "${MINGW_PACKAGE_PREFIX}-perl-win32api-file=0.120.301"
    "${MINGW_PACKAGE_PREFIX}-perl-win32core=0.40.0"
    "${MINGW_PACKAGE_PREFIX}-perl-xs-apitest=1.320.0"
    "${MINGW_PACKAGE_PREFIX}-perl-xs-typemap=0.190.0"
    "${MINGW_PACKAGE_PREFIX}-perl-xsloader=0.320.0"
    "${MINGW_PACKAGE_PREFIX}-perl-_charnames=1.500.0"
)
## End of pkgupdprovs modifications

declare -gA _destdir=()

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
  for _patch in "$@"
  do
    msg2 "Applying $_patch"
    patch -Np1 -i "${srcdir}/$_patch"
  done
}

prepare() {
    cd "${srcdir}/${_realname}-${pkgver}"
    attrib.exe -R //S
    apply_patch_with_msg \
        001-fhs-directory-structure.patch \
        002-relocate-html-documentation.patch \
        003-replace-batch-scripts-with-bare-perl.patch \
        004-fix-cpan-external-programs.patch \
        005-rename-cpan-home.patch \
        006-generate-manpages.patch \
        007-use-winsock-socket-functions.patch \
        009-fix-CCLIBDIR.patch \
        012-errno-gen-reduce-includes.patch \
        013-no-explib.patch \
        014-no-description-in-def.patch \
        015-noreturn.patch \
        017-arm64.patch \
        018-copy-clang-runtime.patch \
        f6691a84dfa9fe39c67d0f974bf4663aefe26695.patch

    if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]] || [[ ${MINGW_PACKAGE_PREFIX} == *-ucrt-* ]]; then
        apply_patch_with_msg \
            008-ucrt-stdio-internals.patch
    fi

    [[ -d "${srcdir}/build-${MSYSTEM}" ]] && rm -rf "${srcdir}/build-${MSYSTEM}"
    cp -r "${srcdir}/${_realname}-${pkgver}" "${srcdir}/build-${MSYSTEM}"

    local postfix
    [[ "${CARCH}" == "i686" ]] && postfix="w32" || postfix="w64"
    sed -ri "/@@CPAN_HOME@@/{N;s/([\._])cpan/\1cpan-${postfix}/g;D}" \
        "${srcdir}/build-${MSYSTEM}/cpan/CPAN/lib/CPAN/HandleConfig.pm"
}

_make() {
    # Please read README.win32 in the source package.
    # Using pkgdirbase here is not supported but required since we need the
    # package directory at build time, something which makepkg doesn't consider.
    : "${_destdir["core"]:="${pkgdirbase}/build-core"}"
    : "${_destdir["doc"]:="${pkgdirbase}/build-doc"}"
    local prefix="$(cygpath -w "${_destdir["core"]}${MINGW_PREFIX}")"
    local docprefix="$(cygpath -w "${_destdir["doc"]}${MINGW_PREFIX}")"
    local cchome="$(cygpath -w "${MINGW_PREFIX}")"
    local sysroot="$(cygpath -u "${SYSTEMROOT}")"
    local -i jobs="${JOBS:-$(nproc)}"
    local path="${sysroot}/system32:${sysroot}:${MINGW_PREFIX}/bin"
    # README.win32 recommends building under Windows' default shell (cmd.exe)
    # and win32/makefile.mk recommends setting SHELL to it as well
    local cmd="$(cygpath -u "${COMSPEC}")"
    local cmdline=(
        "${cmd}" //C mingw32-make
        -j"${jobs}"
        TEST_JOBS="${jobs}"
        CCTYPE=GCC
        CCHOME="${cchome}"
        INST_DRV="${prefix:0:2}"
        INST_TOP="${prefix}"
        INST_DOC="${docprefix}"
        USE_64_BIT_INT=define
        USE_MINGW_ANSI_STDIO=define
        SHELL="${COMSPEC}"
        PLMAKE=mingw32-make
    )
    if [[ "$(uname --machine)" == "x86_64" && "${CARCH}" == "i686" ]]; then
        cmdline+=(WIN64=undef)
    fi

    if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]]; then
      cmdline+=(EXTRACFLAGS="-Wno-compound-token-split-by-macro -Wno-implicit-function-declaration")
      cmdline+=(USE_MULTI=undef USE_ITHREADS=undef USE_IMP_SYS=undef)
    fi

    if check_option "debug" "y"; then
      cmdline+=(CFG=Debug)
    fi
    cd "${srcdir}/build-${MSYSTEM}/win32"
    msg2 "Running \"%s\"" "${cmdline[*]}$( (($#)) && echo -n " $*")"
    # Setting PATH here is not strictly necessary but it might make compilation
    # slightly faster to have the mostly used commands early on the PATH and
    # avoids interference with other programs on the PATH during tests.
    PATH="${path}" SHELL="" LC_ALL=C LANG=C "${cmdline[@]}" "$@"
}

build() {
    _make
}

check() {
    # Some tests will fail, this is expected on Windows. Still, it might be good
    # to have this information in the build logs.
    _make test || warning '%s' "
        Some of the tests failed, but this is more or less expected on Windows.
        Please consult the log files for specifics."
}

_package_common() {
    install="${pkgname}.install"

    pushd "${pkgdir}${MINGW_PREFIX}" &>/dev/null
    find -O3 . -type d -empty -delete

    # Path relocation. This is done by replacing hard-coded paths with relocate
    # patterns that will be resolved on package installation.

    local grep_args=() sed_args=() single= double= html= path=
    for path in "${_destdir[@]/%/\/}" /; do
        single="$(cygpath -w "${path}")"
        single="${single//\\/\\\\}"        # \  -> \\
        double="${single//\\\\/\\\\\\\\}"  # \\ -> \\\\
        html="${single//\\\\/\\\/}"        # \\ -> \/
        grep_args+=(
            -e "${html}"
            -e "${double}"
            -e "${single}"
        )
        sed_args+=(
            -e "s/${html}/@PERL_RELOCATE_HTML@\\//g"
            -e "s/${double}/@PERL_RELOCATE_DOUBLE@\\\\\\\\/g"
            -e "s/${single}/@PERL_RELOCATE@\\\\/g"
        )
    done

    msg2 "Creating relocate patterns for:"
    local -i i
    for ((i=0; i<${#grep_args[@]}; ++i)); do
        if ((i%2 == 1)); then
            plain "%b" "${grep_args[i]}"
        fi
    done

    # Attach list of files containing relocate patterns for use in post-install script.
    local relocate_list="$(mktemp)"
    grep -rilZ "${grep_args[@]}" . > "${relocate_list}"

    xargs -0 -a "${relocate_list}" sed -i "${sed_args[@]}"

    install -Dvm644 <(\
        sed -e "s/@PREFIX@/${MINGW_PREFIX//\//\\\/}/g" \
            -e "/@REM@/d" \
            "${srcdir}"/perlinstall.in
        gzip -c -9 "${relocate_list}" | base64
    ) "${startdir}/${install}"

    rm "${relocate_list}"
    popd &>/dev/null
}

_package_doc() {
    mv -T "${_destdir["doc"]}" "${pkgdir}"
    _package_common
}

_package_core() {
    _make install

    cd "${pkgdirbase}"
    attrib.exe -R //S

    msg2 "Cleaning up"
    find -O3 "${_destdir[@]}" \( -type f \( \
            -name '.packlist' -o -name 'perllocal.pod' -o -name '*.tmp' \
        \) -o -type d -empty \) -delete

    cd "${_destdir["core"]}${MINGW_PREFIX}"
    local config_heavy="$(find . -name Config_heavy.pl -print -quit)"

    local inst_bin="$(cygpath -u "$(sed -nr "s/^installbin='([^']+)'.*/\\1/p" "${config_heavy}")")"
    local inst_script="$(cygpath -u "$(sed -nr "s/^installscript='([^']+)'.*/\\1/p" "${config_heavy}")")"
    local inst_man="$(cygpath -u "$(sed -nr "s/^installman1dir='([^']+)'.*/\\1/p" "${config_heavy}")")"
    local man1ext="$(cygpath -u "$(sed -nr "s/^man1ext='([^']+)'.*/\\1/p" "${config_heavy}")")"

    local patterns=() pathext=() ext=
    mapfile -d ';' -t pathext <<< "${PATHEXT}"
    mapfile -d $'\0' -t patterns < <(\
        find -O3 "$inst_bin" "$inst_script" -maxdepth 1 -type f -executable -print0
    )
    patterns=("${patterns[@]/#*\//\/}")
    for ext in "${pathext[@]}"; do
        patterns=("${patterns[@]%${ext,,}}")
    done
    patterns=("${patterns[@]/%/".${man1ext}"}")

    msg2 "Moving pods to documentation package"
    cd "${_destdir["core"]}"
    local pods=()
    mapfile -t -d $'\0' pods < <(\
        find -O3 . \( \
                -type d -name pods -o \
                -type f -name '*.pod' ! -iname 'Config.pod' ! -iname 'POSIX.pod' \
            \) -print0 -prune
    )
    if (( ${#pods[@]} )); then
        printf '%s\0' "${pods[@]}" | xargs -r -0 cp --parents -rlpt "${_destdir["doc"]}"
        printf '%s\0' "${pods[@]}" | xargs -r -0 rm -r
    fi

    msg2 "Moving manpages for core programs to core package"
    cd "${_destdir["doc"]}"
    mapfile -t -d $'\0' pods < <(\
        find -O3 ".${inst_man#"${PWD}"}" -maxdepth 1 -type f -print0 \
            | grep -zZFf <(printf '%s\n' "${patterns[@]}") \
        || true
    )
    if (( ${#pods[@]} )); then
        printf '%s\0' "${pods[@]}" | xargs -r -0 cp --parents -lpt "${_destdir["core"]}"
        printf '%s\0' "${pods[@]}" | xargs -r -0 rm
    fi

    mv -T "${_destdir["core"]}" "${pkgdir}"
    _package_common

    msg2 "Post-install configuration"
    cd "${pkgdir}${MINGW_PREFIX}"

    ### Perl Settings ###
    # Change man page extensions for site and vendor module builds.
    sed -i -e '/^man1ext=/ s/=.*/='"'"'1p'"'"'/' \
           -e '/^man3ext=/ s/=.*/='"'"'3pm'"'"'/' \
           "${config_heavy}"

    msg2 "Getting PATH components"
    local skip_paths=("${MINGW_PREFIX}/bin")
    local path_arr=()
    # Parse the configuration for paths that should be added to PATH
    # The sorting is a bit hacky...
    local p
    while IFS='' read -r p; do
        p="${p//\\/\/}"
        if [[ -n "${p}" \
              && ! "$(printf '%s\n' "${skip_paths[@]}" "${path_arr[@]}")" \
              =~ (^|$'\n')"${p}"($'\n'|$) ]]; then
            path_arr+=("${p}")
        fi
    done < <(\
        sed -nr \
            -e "s/^installsitebin='@PERL_.*?@(.*)'/1\\t\\1/p" \
            -e "s/^installsitescript='@PERL_.*?@(.*)'/2\\t\\1/p" \
            -e "s/^installvendorbin='@PERL_.*?@(.*)'/3\\t\\1/p" \
            -e "s/^installvendorscript='@PERL_.*?@(.*)'/4\\t\\1/p" \
            -e "s/^installbin='@PERL_.*?@(.*)'/5\\t\\1/p" \
            -e "s/^installscript='@PERL_.*?@(.*)'/6\\t\\1/p" \
            "${config_heavy}" \
        | sort -n -k1,1 | cut -f2- | uniq
    )
    local path="$(IFS=':'; echo "${path_arr[*]}")"

    msg2 "Adding extra files"
    local profile="/etc/profile.d/z-${_realname}-${MINGW_PACKAGE_PREFIX/mingw-w64-}.sh"
    install -Dvm644 <(sed \
            -e "/^\s*local\s\+mypath=/ s/=.*/=\"${path//\//\\\/}\"/" \
            -e "s/@PREFIX@/${MINGW_PREFIX//\//\\\/}/g" \
            -e "s/@FILENAME@/${profile//\//\\\/}/g" \
            -e "/@REM@/d" \
            "${srcdir}"/perlprofile.in) \
        "${pkgdir}${profile}"

    # Link perl executable to main bin directory
    local perldir="$(dirname "$(find ./bin -name "perl.exe" -print -quit)")"
    if [[ "${perldir}" != ./bin ]]; then
        ln -vt ./bin/ "${perldir}/perl"{.exe,5*.dll}
    fi

    # Add these so we have them on PATH before installing the first package
    # XXX: Is this a necessary?
    sed -nr \
        "s/^install(vendor|site)(bin|script|lib|arch|(man|html)[13]dir)='@PERL_.*?@(.*)'/\\4/p" \
        "${config_heavy}" \
        | sort | uniq | while IFS='' read -r p; do
            p="${pkgdir}${p//\\/\/}"; [[ -e "${p}" ]] || echo "${p}"
        done \
        | xargs -r install -dvm755

    # Licenses
    install -Dvm644 -t "share/licenses/${_realname}" "${srcdir}/build-${MSYSTEM}/"{"Copying","Artistic"}
    # Other docs
    install -Dvm644 -t "share/doc/${_realname}"      "${srcdir}/build-${MSYSTEM}/"{"README","Changes"}
}


package_perl() {
    optdepends=("${MINGW_PACKAGE_PREFIX}-perl-doc: Extra manpages, perldocs and html documentation")
    _package_core
}

package_perl-doc() {
    pkgdesc="Perl manpages and html documentation (mingw-64)"
    depends=()
    optdepends=()
    provides=()
    _package_doc
}

# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
# vim: set ft=bash :

# generate wrappers
for _name in "${pkgname[@]}"; do
  _short="package_${_name#${MINGW_PACKAGE_PREFIX}-}"
  _func="$(declare -f "${_short}")"
  eval "${_func/#${_short}/package_${_name}}"
done
# template end;
