def METHOD_NAME(an, at):
    # libunwind subpackages
    cond = an in _targets
    @subpackage(f"libunwind-cross-{an}-static", cond)
    def _unwst(self):
        self.pkgdesc = f"Cross-toolchain LLVM libunwind ({an} static library)"
        self.depends = [f"libunwind-cross-{an}={pkgver}-r{pkgrel}"]
        return [f"usr/{at}/usr/lib/libunwind.a"]
    @subpackage(f"libunwind-cross-{an}", cond)
    def _unw(self):
        self.pkgdesc = f"Cross-toolchain LLVM libunwind ({an})"
        self.depends = [f"musl-cross-{an}", f"libatomic-chimera-cross-{an}"]
        self.options = [
            "!scanshlibs",
            "!scanrundeps",
            "!splitstatic",
            "foreignelf",
        ]
        return [
            f"usr/{at}/usr/lib/libunwind.*",
            f"usr/{at}/usr/include/*unwind*",
            f"usr/{at}/usr/include/mach-o",
        ]
    # libc++abi subpackages
    @subpackage(f"libcxxabi-cross-{an}-static", cond)
    def _abist(self):
        self.pkgdesc = f"Cross-toolchain LLVM libc++abi ({an} static library)"
        self.depends = [f"libcxxabi-cross-{an}={pkgver}-r{pkgrel}"]
        return [f"usr/{at}/usr/lib/libc++abi.a"]
    @subpackage(f"libcxxabi-cross-{an}", cond)
    def _abi(self):
        self.pkgdesc = f"Cross-toolchain LLVM libc++abi ({an})"
        self.depends = [f"libunwind-cross-{an}={pkgver}-r{pkgrel}"]
        self.options = [
            "!scanshlibs",
            "!scanrundeps",
            "!splitstatic",
            "foreignelf",
        ]
        return [
            f"usr/{at}/usr/lib/libc++abi*",
            f"usr/{at}/usr/include/c++/v1/*cxxabi*.h",
        ]
    # libc++ subpackages
    @subpackage(f"libcxx-cross-{an}-static", cond)
    def _subp_static(self):
        self.pkgdesc = f"{pkgdesc} ({an} static library)"
        self.depends = [
            f"libcxx-cross-{an}={pkgver}-r{pkgrel}",
        ]
        return [f"usr/{at}/usr/lib/libc++.a"]
    @subpackage(f"libcxx-cross-{an}", cond)
    def _subp(self):
        self.pkgdesc = f"{pkgdesc} ({an})"
        self.depends = [f"libcxxabi-cross-{an}={pkgver}-r{pkgrel}"]
        self.options = [
            "!scanshlibs",
            "!scanrundeps",
            "!splitstatic",
            "foreignelf",
        ]
        return [f"usr/{at}"]
    if cond:
        depends.append(f"libcxx-cross-{an}={pkgver}-r{pkgrel}")