apkbuild-cpan.in: remove perl-dev package wherever it occurs

if the package does not have any xs files and the old APKBUILD data is used

The regex to get perl-dev wherever it might occur was breaking my head
This commit is contained in:
Timothy Legge 2024-02-09 23:18:35 -04:00 committed by Natanael Copa
parent b0fb5c7038
commit 5710eefb63

View File

@ -583,6 +583,9 @@ sub do_depends {
if ( defined $makedeps && $makedeps eq '' ) {
if (defined $oldapkbuild->{'makedepends'} && ! $meta) {
$makedeps = $oldapkbuild->{'makedepends'};
my @tmp = split(" ", $makedeps);
@tmp = grep ! /$perldev/, @tmp if ! $has_xs;
$makedeps = format_depends(join(" ", @tmp));
} else {
$makedeps = $perldev;
}