Skip to content

Commit b4ce84e

Browse files
committed
Apk: add subpackage handling code to the recipe parser
1 parent 997fdd5 commit b4ce84e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Build/Apk.pm

+8-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ sub glob2re {
206206
$g =~ s/\\\-/-/g;
207207
$g =~ s/\\\*/.*$nogreed/g;
208208
$g =~ s/\\\?/./g;
209-
$g =~ s/\\\[([^\[\]\\]*?)\\\]/[$1]/g;
209+
$g =~ s/\\\[([^\[\]]*?)\\\]/[$1]/g;
210210
return $g;
211211
}
212212

@@ -407,6 +407,13 @@ sub parse {
407407
push @{$ret->{'deps'}}, split(" ", $vars{$_} ) if defined $vars{$_};
408408
}
409409
410+
if ($vars{'subpackages'}) {
411+
$ret->{'subpacks'} = [ $ret->{'name'} ];
412+
for (split(' ', $vars{'subpackages'})) {
413+
push @{$ret->{'subpacks'}}, /^(.*?):/ ? $1 : $_;
414+
}
415+
}
416+
410417
# convert name~ver to name=~ver
411418
s/^([a-zA-Z0-9\._+-]+)~/$1=~/ for @{$ret->{'deps'}};
412419

0 commit comments

Comments
 (0)