subtree updates

meta-openembedded: a9e6d16e66..11df15765c:
  Adrian Fiergolski (1):
        python3-matplotlib: add missing dependency

  Adrian Freihofer (6):
        conntrack-tools: fix postinst script
        networkmanager: improve dependency handling
        networkmanager: simplify selective installation
        networkmanager: use nftables by default
        networkmanager: udpate to 1.38.0
        modemmanager: update to 1.18.8

  Armin Kuster (2):
        mariadb: update to 10.7.4
        mariadb: Fix i386 Clang builds

  Bartosz Golaszewski (2):
        python3-uinput: new package
        python3-speedtest-cli: fix RDEPENDS

  Changqing Li (1):
        redis: upgrade 7.0-rc3 -> 7.0.0

  Denys Dmytriyenko (1):
        devmem2: the source and patches moved to github repo

  Enrico Scholz (1):
        nodejs-oe-cache-native: initial checkin

  Jiaqing Zhao (1):
        openldap: Remove unnecessary use-urandom.patch

  Kai Kang (2):
        libportal: add distro features check
        graphviz: rrecommends on liberation-fonts

  Khem Raj (5):
        ubi-utils-klibc: Disable lzo compression by default
        unattended-upgrades: Disable auto-detecting modules
        sdbus-c++: Link with libatomic for rv32
        sdbus-c++-libsystemd: Fix patch fuzz
        python3-uinput: Fix build on 32bit arches using 64bit times_t

  Luca Boccassi (1):
        dbus-broker: update 29 -> 31

  Marcel Ziswiler (1):
        libavtp: add recipe for audio video transport protocol (avtp)

  Markus Volk (6):
        jack: allow to build native/nativesdk
        pipewire: reduce native/nativesdk dependencies; add backport patch
        p8platform: unbreak do_populate_sdk
        pavucontrol: update; fix build for wayland only
        gnome-disk-utility: fix build for wayland only
        unblock some recipes for wayland

  Martin Jansa (1):
        mm-common: package the files from ${PN} in ${PN}-dev and use allarch

  Ming Liu (1):
        bluealsa: uprev to 4.0.0

  Nikhil R (1):
        duktape: Add ptest

  Peter Marko (1):
        libgpiod: move test dependencies to ptest package

  Ross Burton (8):
        python3-cppy: fix inherits and DEPENDS
        python3-setuptools-scm-git-archive: add new recipe
        python3-traitlets: upgrade to 5.2.1
        python3-pathspec: add new recipe
        python3-hatchling: add new recipe and build class
        python3-editables: add new recipe
        python3-setuptools-declarative-requirements: add new recipe
        lzop: add (from oe-core)

  Samuli Piippo (2):
        flite: add recipe
        libtomcrypt: add recipe

  Thomas Perrot (1):
        nbd: update 3.20 -> 3.24

  Vyacheslav Yurkov (4):
        packagegroup-meta-filesystems: fix build issue
        overlayfs-progs: add new recipe
        overlayfs-tools: add new recipe
        xfstests: add new recipe

  Wang Mingyu (38):
        babeld: upgrade 1.12 -> 1.12.1
        ctags: upgrade 5.9.20220508.0 -> 5.9.20220515.0
        libbpf: upgrade 0.7.0 -> 0.8.0
        evtest: upgrade 1.34 -> 1.35
        nbdkit: upgrade 1.31.5 -> 1.31.7
        smarty: upgrade 4.1.0 -> 4.1.1
        thingsboard-gateway: upgrade 2.9 -> 3.1
        opencl-headers: upgrade 2022.01.04 -> 2022.05.18
        python3-robotframework: upgrade 5.0 -> 5.0.1
        python3-watchdog: upgrade 2.1.7 -> 2.1.8
        python3-web3: upgrade 5.29.0 -> 5.29.1
        python3-xmlschema: upgrade 1.10.0 -> 1.11.0
        python3-sqlalchemy: upgrade 1.4.35 -> 1.4.36
        python3-yappi: upgrade 1.3.3 -> 1.3.5
        apitrace: upgrade 11.0 -> 11.1
        ctags: upgrade 5.9.20220515.0 -> 5.9.20220529.0
        gedit: upgrade 42.0 -> 42.1
        hidapi: upgrade 0.11.2 -> 0.12.0
        libbytesize: upgrade 2.6 -> 2.7
        libdvdread: upgrade 6.1.2 -> 6.1.3
        links: upgrade 2.26 -> 2.27
        libxmlb: upgrade 0.3.8 -> 0.3.9
        ser2net: upgrade 4.3.5 -> 4.3.6
        python3-awesomeversion: upgrade 22.5.1 -> 22.5.2
        htop: upgrade 3.2.0 -> 3.2.1
        hwdata: upgrade 0.359 -> 0.360
        libnet-dns-perl: upgrade 1.33 -> 1.34
        tinyproxy: upgrade 1.11.0 -> 1.11.1
        function2: upgrade 4.2.0 -> 4.2.1
        openvpn: upgrade 2.5.6 -> 2.5.7
        poppler: upgrade 22.05.0 -> 22.06.0
        sshfs-fuse: upgrade 3.7.2 -> 3.7.3
        tgt: upgrade 1.0.82 -> 1.0.83
        tracker: upgrade 3.3.0 -> 3.3.1
        unbound: upgrade 1.15.0 -> 1.16.0
        zabbix: upgrade 6.0.4 -> 6.0.5
        botan: upgrade 2.19.1 -> 2.19.2
        evolution-data-server: upgrade 3.44.1 -> 3.44.2

  Wolfgang Meyer (1):
        fbida: remove bash from RDEPENDS

  Xu Huan (17):
        python3-pint: upgrade 0.19.1 -> 0.19.2
        python3-pylint: upgrade 2.13.7 -> 2.13.9
        python3-redis: upgrade 4.2.2 -> 4.3.1
        python3-werkzeug: upgrade 2.1.1 -> 2.1.2
        python3-zeroconf: upgrade 0.38.4 -> 0.38.6
        python3-sentry-sdk: upgrade 1.5.10 -> 1.5.12
        python3-astroid: upgrade 2.11.3 -> 2.11.5
        python3-cachetools: upgrade 5.0.0 -> 5.1.0
        python3-imageio: upgrade 2.19.1 -> 2.19.2
        python3-asyncinotify: upgrade 2.0.2 -> 2.0.3
        python3-croniter: upgrade 1.3.4 -> 1.3.5
        python3-google-api-core: upgrade 2.7.3 -> 2.8.0
        python3-flask-socketio: upgrade 5.1.2 -> 5.2.0
        python3-h5py: upgrade 3.6.0 -> 3.7.0
        python3-lz4: upgrade 4.0.0 -> 4.0.1
        python3-mypy: upgrade 0.950 -> 0.960
        python3-pyscaffold: upgrade 4.2.1 -> 4.2.2

  zhengrq.fnst (10):
        python3-google-api-python-client: upgrade 2.45.0 -> 2.48.0
        python3-grpcio-tools: upgrade 1.46.0 -> 1.46.3
        python3-openpyxl: upgrade 3.0.9 -> 3.0.10
        python3-paramiko: upgrade 2.10.4 -> 2.11.0
        python3-humanize: upgrade 4.0.0 -> 4.1.0
        python3-pychromecast: upgrade 12.1.1 -> 12.1.2
        python3-cachetools: upgrade 5.1.0 -> 5.2.0
        python3-google-api-python-client: upgrade 2.48.0 -> 2.49.0
        python3-googleapis-common-protos: upgrade 1.56.1 -> 1.56.2
        python3-imageio: upgrade 2.19.2 -> 2.19.3

  zhengruoqin (6):
        python3-bitarray: upgrade 2.5.0 -> 2.5.1
        python3-eventlet: upgrade 0.33.0 -> 0.33.1
        python3-googleapis-common-protos: upgrade 1.56.0 -> 1.56.1
        python3-imageio: upgrade 2.18.0 -> 2.19.1
        python3-pyjwt: upgrade 2.3.0 -> 2.4.0
        python3-wrapt: upgrade 1.14.0 -> 1.14.1

poky: 13d70e57f8..ee0d001b81:
  Alex Stewart (1):
        opkg: upgrade to version 0.6.0

  Alexander Kanavin (23):
        bash: submit patch upstream
        valgrind: submit arm patches upstream
        apt: fix upstream version check
        zip/unzip: mark all submittable patches as Inactive-Upstream
        less: mark upstream version as unknown
        wayland: exclude pre-releases from version check
        mesa-demos: update 8.4.0 -> 8.5.0
        seatd: update 0.6.4 -> 0.7.0
        systemd: update 250.5 -> 251.2
        btrfs-tools: update 5.16.2 -> 5.18
        llvm: update 14.0.3 -> 14.0.4
        python3-psutil: update 5.9.0 -> 5.9.1
        tiff: update 4.3.0 -> 4.4.0
        pulseaudio: update 15.0 -> 16.0
        alsa-utils-scripts: merge into alsa-utils
        alsa-utils: update 1.2.6 -> 1.2.7
        ovmf: update 202202 -> 202205
        cmake: update 3.23.1 -> 3.23.2
        ltp: upgrade 20220121 -> 20220527
        perl: update 5.34.1 -> 5.36.0
        perl: drop perltoc regeneration
        perl: clean prior to build
        perl: enable _GNU_SOURCE define via d_gnulibc

  Bruce Ashfield (7):
        linux-yocto/5.15: bpf: explicitly disable unpriv eBPF by default
        linux-yocto/5.15: update to v5.15.43
        linux-yocto/5.10: update to v5.10.118
        linux-yocto/5.15: Enable MDIO bus config
        linux-yocto/5.15: cfg/xen: Move x86 configs to separate file
        linux-yocto/5.15: update to v5.15.44
        linux-yocto/5.10: update to v5.10.119

  Chen Qi (1):
        libsdl2: add back xvm and xinerama options

  Daiane Angolini (1):
        python3-pip: Fix RDEPENDS after the update

  Davide Gardenal (2):
        efivar: add musl libc compatibility
        baremetal-image: fix broken symlink in do_rootfs

  Dmitry Baryshkov (2):
        go.bbclass: fix path to linker in native Go builds
        linux-firmware: add support for building snapshots

  Ernst Sjöstrand (2):
        cve-check: Add helper for symlink handling
        cve-check: Only include installed packages for rootfs manifest

  He Zhe (1):
        lttng-modules: Fix build failure for 5.10.119+ and 5.15.44+ kernel

  Jack Mitchell (1):
        meson.bbclass: add cython binary to cross/native toolchain config

  Jeremy Puhlman (1):
        gcc: depend on zstd-native

  Jiaqing Zhao (1):
        systemd: Correct 0001-pass-correct-parameters-to-getdents64.patch

  Joerg Vehlow (1):
        libseccomp: Add missing files for ptests

  Jose Quaresma (1):
        archiver: use bb.note instead of echo

  Kai Kang (1):
        xxhash: fix build with gcc 12

  Marcel Ziswiler (2):
        alsa-plugins: fix libavtp vs. avtp packageconfig
        gstreamer1.0-plugins-bad: add libavtp packageconfig

  Markus Volk (1):
        gcr: build with gtk+3 for wayland

  Marta Rybczynska (4):
        cve-check: move update_symlinks to a library
        cve-check: write empty fragment files in the text mode
        cve-check: fix return type in check_cves
        cve-update-db-native: make it possible to disable database updates

  Martin Jansa (9):
        makedevs: Don't use COPYING.patch just to add license file into ${S}
        insane.bbclass: make sure to close .patch files
        staging.bbclass: process direct dependencies in deterministic order
        patch.py: make sure that patches/series file exists before quilt pop
        lttng-modules: fix shell syntax
        buildhistory.bbclass: fix shell syntax when using dash
        rootfs.py: close kernel_abi_ver_file
        ltp: use bfd even when gold is used with ld-is-gold
        systemd: Fix build without utmp

  Michael Opdenacker (1):
        migration guides: release notes for 4.0.1

  Mikko Rapeli (1):
        bitbake: event.py: ignore exceptions from stdout and sterr operations in atexit

  Ming Liu (1):
        udev-extraconf: let automount base directory configurable

  Mingli Yu (4):
        perl: Fix build with gcc-12
        ccache: Fix build with gcc-12
        oescripts: change compare logic in OEListPackageconfigTests
        python3-cryptography: remove test_x509.py

  Naveen Saini (1):
        pciutils: avoid lspci conflict with busybox

  Pavel Zhukov (6):
        bitbake.conf: Make TCLIBC and TCMODE lazy assigned
        bitbake: fetch2: Honour BB_FETCH_PREMIRRORONLY option
        bitbake: Add tests to cover BB_FETCH_PREMIRRORONLY functionality
        dbus: Specify runstatedir configure option
        bitbake: tests/fetch: Drop unnecessary duplicated function
        bitbake: tests/fetch: Add tests for premirror using real project

  Peter Kjellerstedt (2):
        libseccomp: Correct LIC_FILES_CHKSUM
        license.bbclass: Bound beginline and endline in copy_license_files()

  Quentin Schulz (2):
        docs: set_versions.py: remove honister from active releases list
        docs: set_versions.py: check for first latest release tag

  Rasmus Villemoes (2):
        vim: put xxd in its own package
        e2fsprogs: add alternatives handling of lsattr as well

  Ricardo Salveti (1):
        gnu-efi: enable for riscv64

  Richard Purdie (51):
        cve-extra-exclusions: Add kernel CVEs
        lzo: Add further info to a patch and mark as Inactive-Upstream
        python3: Remove problematic paths from sysroot files
        python3: Ensure stale empty python module directories don't break the build
        Revert "qemu.inc: Remove empty egg-info directories before running meson"
        Revert "meson.bblcass: Remove empty egg-info directories before running meson"
        vim: Upgrade 8.2.4912 -> 8.2.5034 to fix 9 CVEs
        tiff: Add jbig PACKAGECONFIG and clarify CVE-2022-1210
        libxslt: Mark CVE-2022-29824 as not applying
        oeqa/imagefeatures: Replace lzo with zst
        oeqa/imagefeatures: Disable squashfs-lzo
        cve-check: Allow warnings to be disabled
        openssl: Backport fix for ptest cert expiry
        bitbake: runqueue: Fix unihash cache mismatch issues
        bitbake: cache/siggen: Add unihash cache copy function
        bitbake: bitbake: Bump to version 2.0.1
        populate_sdk_ext: Fix race condition on bb_unihashes.dat
        gcc-cross-canadian: Add nativesdk-zstd dependency
        glib-2.0: upgrade 2.72.1 -> 2.72.2
        dnf: upgrade 4.12.0 -> 4.13.0
        python3-dtschema: upgrade 2022.4 -> 2022.5
        python3-sphinx: upgrade 4.5.0 -> 5.0.0
        python3-pip: upgrade 22.1.1 -> 22.1.2
        alsa-lib: upgrade 1.2.6.1 -> 1.2.7
        sysklogd: upgrade 2.3.0 -> 2.4.0
        libxkbcommon: upgrade 1.4.0 -> 1.4.1
        piglit: upgrade to latest revision
        sysstat: upgrade 12.4.5 -> 12.6.0
        harfbuzz: upgrade 4.2.1 -> 4.3.0
        gtk+3: upgrade 3.24.33 -> 3.24.34
        xwayland: upgrade 22.1.1 -> 22.1.2
        alsa-ucm-conf: upgrade 1.2.6.3 -> 1.2.7
        gnutls: upgrade 3.7.5 -> 3.7.6
        webkitgtk: upgrade 2.36.1 -> 2.36.3
        diffoscope: upgrade 212 -> 215
        populate_sdk_ext: Fix second bb_unihashes reference
        sanity: Switch to make 4.0 as a minimum version
        perl: Add dependency on make-native to avoid race issues
        glibc: Drop make-native dependency
        bitbake: fetch/wget: Move files into place atomically
        bitbake: server/process: Avoid risk of exception deadlocks
        bitbake: server/process: Remove daemonic thread usage
        bitbake: server/process: Avoid tracebacks at exit
        uboot-sign: Fix potential index error issues
        selftest/multiconfig: Test that multiconfigs in separate layers works
        bitbake: cooker: Drop sre_constants usage
        classes/buildcfg: Move git/layer revision code into new OE module buildcfg
        lib/buildcfg: Share common clean/dirty layer function
        buildcfg: Drop unused svn revision function
        base/buildhistory/image-buildinfo: Use common buildcfg function
        image-buildinfo: Improve and extend to SDK coverage too

  Robert Yang (1):
        systemd: Set RebootWatchdogSec to 60s as watchdog

  Ross Burton (8):
        python3-pluggy: add BBCLASSEXTEND for native/nativesdk
        btrfs-tools: add a PACKAGECONFIG for lzo
        tiff: mark CVE-2022-1622 and CVE-2022-1623 as invalid
        packagegroup-self-hosted: remove lzo
        libarchive: disable LZO by default
        squashfs-tools: disable LZO by default
        lzop: remove recipe from oe-core
        setuptools3: clean up class

  Rusty Howell (1):
        oe-depends-dot: Handle new format for task-depends.dot

  Sean Anderson (1):
        rootfs.py: find .ko.zst kernel modules

  Stefan Wiehler (1):
        kernel-yocto.bbclass: Reset to exiting on non-zero return code at end of task

  Tobias Schmidl (2):
        oeqa/selftest/wic.py: Repaired test_qemu()
        wic/plugins/images/direct: Allow changes in fstab on rootfs

  Vyacheslav Yurkov (2):
        files: rootfs-postcommands: move helper commands to script
        files: respect overlayfs owner from lower layer

  Xiaobing Luo (1):
        devtool: Fix _copy_file() TypeError

  Zach Welch (2):
        test-manual/intro: reorder bitbake-selftest steps
        test-manual/intro: bitbake-selftest needs bitbake

  leimaohui (1):
        gnutls: Added fips option.

  wangmy (30):
        bind: upgrade 9.18.2 -> 9.18.3
        ccache: upgrade 4.6 -> 4.6.1
        init-system-helpers: upgrade 1.62 -> 1.63
        ninja: upgrade 1.10.2 -> 1.11.0
        python3-certifi: upgrade 2021.10.8 -> 2022.5.18.1
        python3-cython: upgrade 0.29.28 -> 0.29.30
        python3-hypothesis: upgrade 6.46.4 -> 6.46.7
        python3-importlib-metadata: upgrade 4.11.3 -> 4.11.4
        python3-magic: upgrade 0.4.25 -> 0.4.26
        python3-pip: upgrade 22.1 -> 22.1.1
        python3-setuptools: upgrade 62.3.1 -> 62.3.2
        python3-hypothesis: upgrade 6.46.7 -> 6.46.9
        python3-semantic-version: upgrade 2.9.0 -> 2.10.0
        python3-webcolors: upgrade 1.11.1 -> 1.12
        python3-pytest-subtests: upgrade 0.7.0 -> 0.8.0
        asciidoc: upgrade 10.1.4 -> 10.2.0
        cups: upgrade 2.4.1 -> 2.4.2
        iproute2: upgrade 5.17.0 -> 5.18.0
        iw: upgrade 5.16 -> 5.19
        logrotate: upgrade 3.19.0 -> 3.20.1
        dpkg: upgrade 1.21.7 -> 1.21.8
        repo: upgrade 2.25 -> 2.26
        iso-codes: upgrade 4.9.0 -> 4.10.0
        lttng-ust: upgrade 2.13.2 -> 2.13.3
        meson: upgrade 0.62.1 -> 0.62.2
        mtools: upgrade 4.0.39 -> 4.0.40
        nettle: upgrade 3.7.3 -> 3.8
        kbd: upgrade 2.4.0 -> 2.5.0
        python3-hypothesis: upgrade 6.46.9 -> 6.46.11
        xkeyboard-config: upgrade 2.35.1 -> 2.36

meta-security: 7628a3e90b..8c6fe006a1:
  Armin Kuster (18):
        swtpm: enable seccomp if DISTRO is enabled
        security-tpm2-image: add swtpm
        swtpm: enable gnutls
        oeqa/swtpm: add swtpm runtime
        oeqa/tpm2: fix and cleanup tests
        tpm2-pkcs11: we really need the symlinks
        smack-test: switch to python3
        oeqa/smack: consolidate classes
        checksec: update 2.6.0
        chkrootkit: update SRC_URI
        packagegroup-core-security: add arpwatch and chkrootkit to pkg grp
        layer.conf: Post release codename changes
        README: Update for dynamic layers
        arpwatch: riscv not supported
        packagegroup-core-security: drop arpwatch for riscv from pkg grp
        chkrootkit: Fix missing includes for musl
        arpwatch: update to 3.3
        packagegroup-core-security: don't include aprwatch for musl
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Ic83db16445cf0a1286685f11d378e1e3e9b794c3
diff --git a/poky/meta/recipes-devtools/perl/perl_5.36.0.bb b/poky/meta/recipes-devtools/perl/perl_5.36.0.bb
new file mode 100644
index 0000000..4456cdb
--- /dev/null
+++ b/poky/meta/recipes-devtools/perl/perl_5.36.0.bb
@@ -0,0 +1,410 @@
+SUMMARY = "Perl scripting language"
+HOMEPAGE = "http://www.perl.org/"
+DESCRIPTION = "Perl is a highly capable, feature-rich programming language"
+SECTION = "devel"
+LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
+LIC_FILES_CHKSUM = "file://Copying;md5=5b122a36d0f6dc55279a0ebc69f3c60b \
+                    file://Artistic;md5=71a4d5d9acc18c0952a6df2218bb68da \
+                    "
+
+
+SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
+           file://perl-rdepends.txt \
+           file://0001-Somehow-this-module-breaks-through-the-perl-wrapper-.patch \
+           file://errno_ver.diff \
+           file://native-perlinc.patch \
+           file://perl-dynloader.patch \
+           file://0002-Constant-Fix-up-shebang.patch \
+           file://determinism.patch \
+           file://0001-cpan-Sys-Syslog-Makefile.PL-Fix-_PATH_LOG-for-determ.patch \
+           file://0001-Fix-build-with-gcc-12.patch \
+           "
+SRC_URI:append:class-native = " \
+           file://perl-configpm-switch.patch \
+"
+SRC_URI:append:class-target = " \
+           file://encodefix.patch \
+"
+
+SRC_URI[perl.sha256sum] = "e26085af8ac396f62add8a533c3a0ea8c8497d836f0689347ac5abd7b7a4e00a"
+
+S = "${WORKDIR}/perl-${PV}"
+
+inherit upstream-version-is-even update-alternatives
+
+DEPENDS += "perlcross-native zlib virtual/crypt"
+# make 4.1 has race issues with the double-colon usage of MakeMaker, see #14096
+DEPENDS += "make-native"
+
+PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0"
+
+PACKAGECONFIG ??= "gdbm"
+PACKAGECONFIG[bdb] = ",-Ui_db,db"
+PACKAGECONFIG[gdbm] = ",-Ui_gdbm,gdbm"
+
+# Don't generate comments in enc2xs output files. They are not reproducible
+export ENC2XS_NO_COMMENTS = "1"
+
+do_configure:prepend() {
+    cp -rfp ${STAGING_DATADIR_NATIVE}/perl-cross/* ${S}
+}
+
+do_configure:class-target() {
+    ./configure --prefix=${prefix} --libdir=${libdir} \
+    --target=${TARGET_SYS} \
+    -Duseshrplib \
+    -Dusethreads \
+    -Dsoname=libperl.so.5 \
+    -Dvendorprefix=${prefix} \
+    -Dvendorlibdir=${libdir} \
+    -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
+    -Dlibpth='${libdir} ${base_libdir}' \
+    -Dglibpth='${libdir} ${base_libdir}' \
+    -Alddlflags=' ${LDFLAGS}' \
+    -Dd_gnulibc=define \
+    ${PACKAGECONFIG_CONFARGS}
+
+    #perl.c uses an ARCHLIB_EXP define to generate compile-time code that
+    #adds the archlibexp path to @INC during run-time initialization of a
+    #new perl interpreter.
+
+    #Because we've changed this value in a temporary way to make it
+    #possible to use ExtUtils::Embed in the target build (the temporary
+    #value in config.sh gets re-stripped out during packaging), the
+    #ARCHLIB_EXP value that gets generated still uses the temporary version
+    #instead of the original expected version (i.e. becauses it's in the
+    #generated config.h, it doesn't get stripped out during packaging like
+    #the others in config.sh).
+
+    sed -i -e "s,${STAGING_LIBDIR},${libdir},g" config.h
+}
+
+do_configure:class-nativesdk() {
+    ./configure --prefix=${prefix} \
+    --target=${TARGET_SYS} \
+    -Duseshrplib \
+    -Dusethreads \
+    -Dsoname=libperl.so.5 \
+    -Dvendorprefix=${prefix} \
+    -Darchlibexp=${STAGING_LIBDIR}/perl5/${PV}/${TARGET_ARCH}-linux \
+    -Alddlflags=' ${LDFLAGS}' \
+    ${PACKAGECONFIG_CONFARGS}
+
+    # See the comment above
+    sed -i -e "s,${STAGING_LIBDIR},${libdir},g" config.h
+}
+
+do_configure:class-native() {
+    ./configure --prefix=${prefix} \
+    -Dbin=${bindir}/perl-native \
+    -Duseshrplib \
+    -Dusethreads \
+    -Dsoname=libperl.so.5 \
+    -Dvendorprefix=${prefix} \
+    -Ui_xlocale \
+    -Alddlflags=' ${LDFLAGS}' \
+    ${PACKAGECONFIG_CONFARGS}
+}
+
+do_configure:append() {
+    if [ -n "$SOURCE_DATE_EPOCH" ]; then
+        PERL_BUILD_DATE="$(${PYTHON} -c "\
+from datetime import datetime, timezone; \
+print(datetime.fromtimestamp($SOURCE_DATE_EPOCH, timezone.utc).strftime('%a %b %d %H:%M:%S %Y')) \
+            ")"
+        echo "#define PERL_BUILD_DATE \"$PERL_BUILD_DATE\"" >> config.h
+    fi
+    oe_runmake clean
+}
+
+do_compile() {
+    oe_runmake
+}
+
+do_install() {
+    oe_runmake 'DESTDIR=${D}' install
+
+    install -d ${D}${libdir}/perl5
+    install -d ${D}${libdir}/perl5/${PV}/
+    install -d ${D}${libdir}/perl5/${PV}/ExtUtils/
+
+    # Save native config
+    install config.sh ${D}${libdir}/perl5
+    install lib/Config.pm ${D}${libdir}/perl5/${PV}/
+    install lib/ExtUtils/typemap ${D}${libdir}/perl5/${PV}/ExtUtils/
+
+    # Fix up shared library
+    dir=$(echo ${D}/${libdir}/perl5/${PV}/*/CORE)
+    rm $dir/libperl.so
+    ln -sf ../../../../libperl.so.${PERL_LIB_VER} $dir/libperl.so
+
+    # Try to catch Bug #13946
+    if [ -e ${D}/${libdir}/perl5/${PV}/Storable.pm ]; then
+        bbfatal 'non-arch specific Storable.pm found! See https://bugzilla.yoctoproject.org/show_bug.cgi?id=13946'
+    fi
+}
+
+do_install:append:class-target() {
+    # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch
+    ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl
+
+    # This contains host-specific information used for building miniperl (a helper executable built with host compiler)
+    # and therefore isn't reproducible. I believe the file isn't actually needed on target.
+    rm ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/xconfig.h
+}
+
+do_install:append:class-nativesdk() {
+    # This is used to substitute target configuration when running native perl via perl-configpm-switch.patch
+    ln -s Config_heavy.pl ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy-target.pl
+
+    create_wrapper ${D}${bindir}/perl \
+        PERL5LIB='$PERL5LIB:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/site_perl/${PV}:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/vendor_perl/${PV}:${SDKPATHNATIVE}/${libdir_nativesdk}/perl5/${PV}'
+}
+
+do_install:append:class-native () {
+    # Those wrappers mean that perl installed from sstate (which may change
+    # path location) works and that in the nativesdk case, the SDK can be
+    # installed to a different location from the one it was built for.
+    create_wrapper ${D}${bindir}/perl-native/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl5/site_perl/${PV}:${STAGING_LIBDIR}/perl5/vendor_perl/${PV}:${STAGING_LIBDIR}/perl5/${PV}'
+
+    # Use /usr/bin/env nativeperl for the perl script.
+    for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
+            sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f
+    done
+}
+
+PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
+
+perl_package_preprocess () {
+        # Fix up installed configuration
+        sed -i -e "s,${D},,g" \
+               -e "s,${DEBUG_PREFIX_MAP},,g" \
+               -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
+               -e "s,-isystem${STAGING_INCDIR} ,,g" \
+               -e "s,${STAGING_LIBDIR},${libdir},g" \
+               -e "s,${STAGING_BINDIR},${bindir},g" \
+               -e "s,${STAGING_INCDIR},${includedir},g" \
+               -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
+               -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
+               -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
+               -e 's:${RECIPE_SYSROOT}::g' \
+            ${PKGD}${bindir}/h2xs.perl \
+            ${PKGD}${bindir}/h2ph.perl \
+            ${PKGD}${bindir}/pod2man.perl \
+            ${PKGD}${bindir}/pod2text.perl \
+            ${PKGD}${bindir}/pod2usage.perl \
+            ${PKGD}${bindir}/podchecker.perl \
+            ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/config.h \
+            ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/perl.h \
+            ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/pp.h \
+            ${PKGD}${libdir}/perl5/${PV}/Config.pm \
+            ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \
+            ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pod \
+            ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_git.pl \
+            ${PKGD}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config_heavy.pl \
+            ${PKGD}${libdir}/perl5/${PV}/ExtUtils/Liblist/Kid.pm \
+            ${PKGD}${libdir}/perl5/${PV}/FileCache.pm \
+            ${PKGD}${libdir}/perl5/${PV}/pod/*.pod \
+            ${PKGD}${libdir}/perl5/config.sh
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE:${PN}-misc = "corelist cpan enc2xs encguess h2ph h2xs instmodsh json_pp libnetcfg \
+                     piconv pl2pm pod2html pod2man pod2text pod2usage podchecker \
+                     prove ptar ptardiff ptargrep shasum splain streamzip xsubpp zipdetails"
+ALTERNATIVE_LINK_NAME[corelist] = "${bindir}/corelist"
+ALTERNATIVE_LINK_NAME[cpan] = "${bindir}/cpan"
+ALTERNATIVE_LINK_NAME[enc2xs] = "${bindir}/enc2xs"
+ALTERNATIVE_LINK_NAME[encguess] = "${bindir}/encguess"
+ALTERNATIVE_LINK_NAME[h2ph] = "${bindir}/h2ph"
+ALTERNATIVE_LINK_NAME[h2xs] = "${bindir}/h2xs"
+ALTERNATIVE_LINK_NAME[instmodsh] = "${bindir}/instmodsh"
+ALTERNATIVE_LINK_NAME[json_pp] = "${bindir}/json_pp"
+ALTERNATIVE_LINK_NAME[libnetcfg] = "${bindir}/libnetcfg"
+ALTERNATIVE_LINK_NAME[piconv] = "${bindir}/piconv"
+ALTERNATIVE_LINK_NAME[pl2pm] = "${bindir}/pl2pm"
+ALTERNATIVE_LINK_NAME[pod2html] = "${bindir}/pod2html"
+ALTERNATIVE_LINK_NAME[pod2man] = "${bindir}/pod2man"
+ALTERNATIVE_LINK_NAME[pod2text] = "${bindir}/pod2text"
+ALTERNATIVE_LINK_NAME[pod2usage] = "${bindir}/pod2usage"
+ALTERNATIVE_LINK_NAME[podchecker] = "${bindir}/podchecker"
+ALTERNATIVE_LINK_NAME[prove] = "${bindir}/prove"
+ALTERNATIVE_LINK_NAME[ptar] = "${bindir}/ptar"
+ALTERNATIVE_LINK_NAME[ptardiff] = "${bindir}/ptardiff"
+ALTERNATIVE_LINK_NAME[ptargrep] = "${bindir}/ptargrep"
+ALTERNATIVE_LINK_NAME[shasum] = "${bindir}/shasum"
+ALTERNATIVE_LINK_NAME[splain] = "${bindir}/splain"
+ALTERNATIVE_LINK_NAME[streamzip] = "${bindir}/streamzip"
+ALTERNATIVE_LINK_NAME[xsubpp] = "${bindir}/xsubpp"
+ALTERNATIVE_LINK_NAME[zipdetails] = "${bindir}/zipdetails"
+
+require perl-ptest.inc
+
+FILES:${PN} = "${bindir}/perl ${bindir}/perl.real ${bindir}/perl${PV} ${libdir}/libperl.so* \
+               ${libdir}/perl5/site_perl \
+               ${libdir}/perl5/${PV}/Config.pm \
+               ${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/Config.pm \
+               ${libdir}/perl5/${PV}/*/Config_git.pl \
+               ${libdir}/perl5/${PV}/*/Config_heavy-target.pl \
+               ${libdir}/perl5/config.sh \
+               ${libdir}/perl5/${PV}/strict.pm \
+               ${libdir}/perl5/${PV}/warnings.pm \
+               ${libdir}/perl5/${PV}/warnings \
+               ${libdir}/perl5/${PV}/vars.pm \
+               ${libdir}/perl5/site_perl \
+               ${libdir}/perl5/${PV}/ExtUtils/MANIFEST.SKIP \
+               ${libdir}/perl5/${PV}/ExtUtils/xsubpp \
+               ${libdir}/perl5/${PV}/ExtUtils/typemap \
+               "
+RPROVIDES:${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \
+                    perl-module-warnings-register"
+
+FILES:${PN}-staticdev:append = " ${libdir}/perl5/${PV}/*/CORE/libperl.a"
+
+FILES:${PN}-dev:append = " ${libdir}/perl5/${PV}/*/CORE"
+
+FILES:${PN}-doc:append = " ${libdir}/perl5/${PV}/Unicode/Collate/*.txt \
+                           ${libdir}/perl5/${PV}/*/.packlist \
+                           ${libdir}/perl5/${PV}/Encode/encode.h \
+                         "
+PACKAGES += "${PN}-misc"
+
+FILES:${PN}-misc = "${bindir}/*"
+
+PACKAGES += "${PN}-pod"
+
+FILES:${PN}-pod = "${libdir}/perl5/${PV}/pod \
+                   ${libdir}/perl5/${PV}/*.pod \
+                   ${libdir}/perl5/${PV}/*/*.pod \
+                   ${libdir}/perl5/${PV}/*/*/*.pod \ 
+                   ${libdir}/perl5/${PV}/*/*/*/*.pod \ 
+                  "
+
+PACKAGES += "${PN}-module-cpan ${PN}-module-unicore"
+
+FILES:${PN}-module-cpan += "${libdir}/perl5/${PV}/CPAN \
+                          "
+FILES:${PN}-module-unicore += "${libdir}/perl5/${PV}/unicore"
+
+ALTERNATIVE_PRIORITY = "40"
+ALTERNATIVE:${PN}-doc = "Thread.3"
+ALTERNATIVE_LINK_NAME[Thread.3] = "${mandir}/man3/Thread.3"
+
+# Create a perl-modules package recommending all the other perl
+# packages (actually the non modules packages and not created too)
+ALLOW_EMPTY:${PN}-modules = "1"
+PACKAGES += "${PN}-modules "
+
+PACKAGESPLITFUNCS:prepend = "split_perl_packages "
+
+python split_perl_packages () {
+    libdir = d.expand('${libdir}/perl5/${PV}')
+    do_split_packages(d, libdir, r'.*/auto/([^.]*)/[^/]*\.(so|ld|ix|al)', '${PN}-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
+    do_split_packages(d, libdir, r'.*linux/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+    do_split_packages(d, libdir, r'Module/([^\/]*)\.pm', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+    do_split_packages(d, libdir, r'Module/([^\/]*)/.*', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+    do_split_packages(d, libdir, r'.*linux/([^\/].*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+    do_split_packages(d, libdir, r'(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/|.*linux\/)[^\/]).*)\.(pm|pl|e2x)', '${PN}-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+
+    # perl-modules should recommend every perl module, and only the
+    # modules. Don't attempt to use the result of do_split_packages() as some
+    # modules are manually split (eg. perl-module-unicore).
+    packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES').split())
+    d.setVar(d.expand("RRECOMMENDS:${PN}-modules"), ' '.join(packages))
+
+    # Read the pre-generated dependency file, and use it to set module dependecies
+    for line in open(d.expand("${WORKDIR}") + '/perl-rdepends.txt').readlines():
+        splitline = line.split()
+        # Filter empty lines and comments
+        if len(splitline) == 0 or splitline[0].startswith("#"):
+            continue
+        if bb.data.inherits_class('native', d):
+            module = splitline[0] + '-native'
+            depends = "perl-native"
+        else:
+            module = splitline[0].replace("RDEPENDS:perl", "RDEPENDS:${PN}")
+            depends = splitline[2].strip('"').replace("perl-module", "${PN}-module")
+        d.appendVar(d.expand(module), " " + depends)
+}
+
+python() {
+    if d.getVar('CLASSOVERRIDE') == "class-target":
+        d.setVar("PACKAGES_DYNAMIC", "^${MLPREFIX}perl-module-.*(?<!native)$")
+    elif d.getVar('CLASSOVERRIDE') == "class-native":
+        d.setVar("PACKAGES_DYNAMIC", "^perl-module-.*-native$")
+    elif d.getVar('CLASSOVERRIDE') == "class-nativesdk":
+        d.setVar("PACKAGES_DYNAMIC", "^nativesdk-perl-module-.*")
+}
+
+RDEPENDS:${PN}-misc += "perl perl-modules"
+RDEPENDS:${PN}-pod += "perl"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
+
+do_create_rdepends_inc() {
+    cd ${WORKDIR}
+    cat <<'EOPREAMBLE' > ${WORKDIR}/perl-rdepends.inc
+
+# Some additional dependencies that the above doesn't manage to figure out
+RDEPENDS:${PN}-module-file-spec += "${PN}-module-file-spec-unix"
+RDEPENDS:${PN}-module-scalar-util += "${PN}-module-list-util"
+RDEPENDS:${PN}-module-file-temp += "${PN}-module-scalar-util"
+RDEPENDS:${PN}-module-file-temp += "${PN}-module-file-spec"
+RDEPENDS:${PN}-module-io-file += "${PN}-module-symbol"
+RDEPENDS:${PN}-module-io-file += "${PN}-module-carp"
+RDEPENDS:${PN}-module-math-bigint += "${PN}-module-math-bigint-calc"
+RDEPENDS:${PN}-module-test-builder += "${PN}-module-list-util"
+RDEPENDS:${PN}-module-test-builder += "${PN}-module-scalar-util"
+RDEPENDS:${PN}-module-test-builder-formatter += "${PN}-module-test2-formatter-tap"
+RDEPENDS:${PN}-module-test2-api += "${PN}-module-test2-event-fail"
+RDEPENDS:${PN}-module-test2-api += "${PN}-module-test2-event-pass"
+RDEPENDS:${PN}-module-test2-api += "${PN}-module-test2-event-v2"
+RDEPENDS:${PN}-module-test2-formatter-tap += "${PN}-module-test2-formatter"
+RDEPENDS:${PN}-module-thread-queue += "${PN}-module-attributes"
+RDEPENDS:${PN}-module-overload += "${PN}-module-overloading"
+
+# Generated depends list beyond this line
+EOPREAMBLE
+    test -e packages-split.new && rm -rf packages-split.new
+    cp -r packages-split packages-split.new && cd packages-split.new
+    find . -name \*.pm | xargs sed -i '/^=head/,/^=cut/d'
+    egrep -r "^\s*(\<use .*|\<require .*);?" perl-module-* --include="*.pm" | \
+    sed "s/\/.*\.pm: */ += /g;s/[\"\']//g;s/;.*/\"/g;s/+= .*\(require\|use\)\> */+= \"perl-module-/g;s/CPANPLUS::.*/cpanplus/g;s/CPAN::.*/cpan/g;s/::/-/g;s/ [^+\"].*//g;s/_/-/g;s/\.pl\"$/\"/;s/\"\?\$/\"/;s/(//;s/)//;" | tr [:upper:] [:lower:] | \
+    awk '{if ($3 != "\x22"$1"\x22"){ print $0}}'| \
+    grep -v -e "\-vms\-" -e module-5 -e "^$" -e "\\$" -e your -e tk -e autoperl -e html -e http -e parse-cpan -e perl-ostype -e ndbm-file -e module-mac -e fcgi -e lwp -e dbd -e dbix | \
+    sort -u | \
+    sed 's/^/RDEPENDS:/;s/perl-module-/${PN}-module-/g;s/module-\(module-\)/\1/g;s/\(module-load\)-conditional/\1/g;s/encode-configlocal/&-pm/;' | \
+    egrep -wv '=>|module-a|module-apache.?|module-apr|module-authen-sasl|module-b-asmdata|module-convert-ebcdic|module-devel-size|module-digest-perl-md5|module-dumpvalue|module-extutils-constant-aaargh56hash|module-extutils-xssymset|module-file-bsdglob|module-for|module-it|module-io-socket-inet6|module-io-socket-ssl|module-io-string|module-ipc-system-simple|module-lexical|module-local-lib|metadata|module-modperl-util|module-pluggable-object|module-test-builder-io-scalar|module-text-unidecode|module-unicore|module-win32|objects\sload|syscall.ph|systeminfo.ph|%s' | \
+    egrep -wv '=>|module-algorithm-diff|module-carp|module-c<extutils-mm-unix>|module-l<extutils-mm-unix>|module-encode-hanextra|module-extutils-makemaker-version-regex|module-file-spec|module-io-compress-lzma|module-io-uncompress-unxz|module-locale-maketext-lexicon|module-log-agent|module-meta-notation|module-net-localcfg|module-net-ping-external|module-b-deparse|module-scalar-util|module-some-module|module-symbol|module-uri|module-win32api-file' > ${WORKDIR}/perl-rdepends.generated
+    cat ${WORKDIR}/perl-rdepends.inc ${WORKDIR}/perl-rdepends.generated > ${THISDIR}/files/perl-rdepends.txt
+}
+
+# bitbake perl -c create_rdepends_inc
+addtask do_create_rdepends_inc
+
+SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
+
+perl_sysroot_create_wrapper () {
+       mkdir -p ${SYSROOT_DESTDIR}${bindir}
+       # Create a wrapper that /usr/bin/env perl will use to get perl-native.
+       # This MUST live in the normal bindir.
+       cat > ${SYSROOT_DESTDIR}${bindir}/nativeperl << EOF
+#!/bin/sh
+realpath=\`readlink -fn \$0\`
+exec \`dirname \$realpath\`/perl-native/perl "\$@"
+EOF
+       chmod 0755 ${SYSROOT_DESTDIR}${bindir}/nativeperl
+       cat ${SYSROOT_DESTDIR}${bindir}/nativeperl
+}
+
+SSTATE_HASHEQUIV_FILEMAP = " \
+    populate_sysroot:*/lib*/perl5/*/*/Config_heavy.pl:${TMPDIR} \
+    populate_sysroot:*/lib*/perl5/*/*/Config_heavy.pl:${COREBASE} \
+    populate_sysroot:*/lib*/perl5/config.sh:${TMPDIR} \
+    populate_sysroot:*/lib*/perl5/config.sh:${COREBASE} \
+    "