Skip to content

Commit

Permalink
Apk: add subpackage handling code to the recipe parser
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Dec 6, 2024
1 parent 997fdd5 commit b4ce84e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Build/Apk.pm
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ sub glob2re {
$g =~ s/\\\-/-/g;
$g =~ s/\\\*/.*$nogreed/g;
$g =~ s/\\\?/./g;
$g =~ s/\\\[([^\[\]\\]*?)\\\]/[$1]/g;
$g =~ s/\\\[([^\[\]]*?)\\\]/[$1]/g;
return $g;
}

Expand Down Expand Up @@ -407,6 +407,13 @@ sub parse {
push @{$ret->{'deps'}}, split(" ", $vars{$_} ) if defined $vars{$_};
}
if ($vars{'subpackages'}) {
$ret->{'subpacks'} = [ $ret->{'name'} ];
for (split(' ', $vars{'subpackages'})) {
push @{$ret->{'subpacks'}}, /^(.*?):/ ? $1 : $_;
}
}
# convert name~ver to name=~ver
s/^([a-zA-Z0-9\._+-]+)~/$1=~/ for @{$ret->{'deps'}};
Expand Down

0 comments on commit b4ce84e

Please sign in to comment.