e282ee3ed2d95a8b96f210af5af392eade2af32d
9 sub print_category
($) {
12 return unless $category{$cat};
14 print "menu \"$cat\"\n\n";
15 my %spkg = %{$category{$cat}};
16 foreach my $spkg (sort {uc($a) cmp uc($b)} keys %spkg) {
17 foreach my $pkg (@
{$spkg{$spkg}}) {
18 my $title = $pkg->{name
};
19 my $c = (72 - length($pkg->{name
}) - length($pkg->{title
}));
21 $title .= ("." x
$c). " ". $pkg->{title
};
24 $pkg->{menu
} and print "menu";
25 print "config PACKAGE_".$pkg->{name
}."\n";
26 print "\t\ttristate \"$title\"\n";
27 print "\t\tdefault ".$pkg->{default}."\n";
28 foreach my $depend (@
{$pkg->{depends
}}) {
29 print "\t\tdepends PACKAGE_$depend\n";
32 print $pkg->{description
};
35 $pkg->{config
} and print $pkg->{config
}."\n";
40 undef $category{$cat};
46 $line =~ /^Source-Makefile: \s*(.+\/([^\
/]+)\/Makefile
)\s
*$/ and do {
51 $line =~ /^Package: \s*(.+)\s*$/ and do {
54 $pkg->{makefile
} = $makefile;
56 $pkg->{default} = "m if ALL";
58 $line =~ /^Version: \s*(.+)\s*$/ and $pkg->{version
} = $1;
59 $line =~ /^Title: \s*(.+)\s*$/ and $pkg->{title
} = $1;
60 $line =~ /^Menu: \s*(.+)\s*$/ and $pkg->{menu
} = $1;
61 $line =~ /^Default: \s*(.+)\s*$/ and $pkg->{default} = $1;
62 $line =~ /^Depends: \s*(.+)\s*$/ and do {
63 my @dep = split /,\s*/, $1;
64 $pkg->{depends
} = \
@dep;
66 $line =~ /^Category: \s*(.+)\s*$/ and do {
67 $pkg->{category
} = $1;
68 defined $category{$1} or $category{$1} = {};
69 defined $category{$1}->{$src} or $category{$1}->{$src} = [];
70 push @
{$category{$1}->{$src}}, $pkg;
72 $line =~ /^Description: \s*(.*)\s*$/ and do {
73 my $desc = "\t\t$1\n\n";
76 last if $line =~ /^@@/;
79 $pkg->{description
} = $desc;
81 $line =~ /^Config: \s*(.*)\s*$/ and do {
85 last if $line =~ /^@@/;
88 $pkg->{config
} = $conf;
92 print_category
'Base system';
93 foreach my $cat (keys %category) {
This page took 0.054059 seconds and 3 git commands to generate.