Files
poky/meta/classes/cpan-base.bbclass
Konrad Weihmann ded1504299 cpan-base: set default UPSTREAM_CHECK_REGEX
as cpan release versions are almost always follow an a.b version scheme,
it's better to filter out beta releases such as a.b.c.
Use the first resource fetched from https://cpan.metacpan.org as base
for calculating the needed regex.
In case nothing can be calculated fall back to nothing.
Add this to cpan-base to enable it for new & old style cpan integration.

(From OE-Core rev: 3df2cf383b58a3100bd78ebb0369047221121512)

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18 11:37:25 +01:00

28 lines
839 B
Plaintext

#
# cpan-base providers various perl related information needed for building
# cpan modules
#
FILES_${PN} += "${libdir}/perl5 ${datadir}/perl5"
DEPENDS += "${@["perl", "perl-native"][(bb.data.inherits_class('native', d))]}"
RDEPENDS_${PN} += "${@["perl", ""][(bb.data.inherits_class('native', d))]}"
inherit perl-version
def is_target(d):
if not bb.data.inherits_class('native', d):
return "yes"
return "no"
PERLLIBDIRS = "${libdir}/perl5"
PERLLIBDIRS_class-native = "${libdir}/perl5"
def cpan_upstream_check_pattern(d):
for x in (d.getVar('SRC_URI') or '').split(' '):
if x.startswith("https://cpan.metacpan.org"):
_pattern = x.split('/')[-1].replace(d.getVar('PV'), '(?P<pver>\d+.\d+)')
return _pattern
return ''
UPSTREAM_CHECK_REGEX ?= "${@cpan_upstream_check_pattern(d)}"