Skip to content

Commit c59a31c

Browse files
committed
update cosmopolitan versions, add category to apperlm list
1 parent 1b8afa0 commit c59a31c

File tree

1 file changed

+38
-10
lines changed

1 file changed

+38
-10
lines changed

lib/Perl/Dist/APPerl.pm

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ my %defconfig = (
649649
nobuild_perl_bin => ['src/perl.com', $^X],
650650
},
651651
'v5.36.0-full-v0.1.0' => {
652-
desc => 'Full perl v5.36.0',
652+
desc => 'Full perl v5.36.0 built with Cosmopolitan Libc 2.1.1',
653653
perl_id => 'cosmo-apperl',
654654
cosmo_id => '38df0a41866eda5a763730d56f2733a319b78afa',
655655
cosmo_mode => '',
@@ -663,13 +663,13 @@ my %defconfig = (
663663
zip_extra_files => {},
664664
},
665665
'v5.36.0-full-v0.1.0-vista' => {
666-
desc => 'Full perl v5.36.0, but with non-standard cosmopolitan libc that still supports vista',
666+
desc => 'Full perl v5.36.0, but with non-standard Cosmopolitan Libc that still supports vista',
667667
base => 'v5.36.0-full-v0.1.0',
668-
cosmo_id => 'f4ff1729d145b2e404b9aa6cc98a623d7740d6b3',
668+
cosmo_id => '9c5a7795add7add5a214afce27d896084e0861c5',
669669
dest => 'perl-vista.com',
670670
},
671671
'v5.36.0-small-v0.1.0' => {
672-
desc => 'small perl v5.36.0',
672+
desc => 'small perl v5.36.0 built with Cosmopolitan Libc 2.1.1',
673673
base => 'v5.36.0-full-v0.1.0',
674674
perl_onlyextensions => [qw(Cwd Fcntl File/Glob Hash/Util IO List/Util POSIX Socket attributes re)],
675675
perl_extra_flags => ['-Doptimize=-Os', '-de'],
@@ -678,9 +678,9 @@ my %defconfig = (
678678
dest => 'perl-small.com',
679679
},
680680
'v5.36.0-small-v0.1.0-vista' => {
681-
desc => 'small perl v5.36.0, but with non-standard cosmopolitan libc that still supports vista',
681+
desc => 'small perl v5.36.0, but with non-standard Cosmopolitan Libc that still supports vista',
682682
base => 'v5.36.0-small-v0.1.0',
683-
cosmo_id => 'f4ff1729d145b2e404b9aa6cc98a623d7740d6b3',
683+
cosmo_id => '9c5a7795add7add5a214afce27d896084e0861c5',
684684
dest => 'perl-small-vista.com',
685685
},
686686
'full' => { desc => 'moving target: full', base => 'v5.36.0-full-v0.1.0' },
@@ -702,7 +702,7 @@ my %defconfig = (
702702
perl_cosmo_dev_on_vista => {
703703
desc => "For developing cosmo platform perl without apperl additions on vista",
704704
base => "perl_cosmo_dev",
705-
cosmo_id => 'f4ff1729d145b2e404b9aa6cc98a623d7740d6b3',
705+
cosmo_id => '9c5a7795add7add5a214afce27d896084e0861c5',
706706
},
707707
}
708708
);
@@ -799,6 +799,15 @@ sub InstallBuildDeps {
799799
print "apperlm install-build-deps: wrote site config to ".SITE_CONFIG_FILE."\n";
800800
}
801801

802+
sub _remove_arr_items_from_arr {
803+
my ($src, $toremove) = @_;
804+
foreach my $item (@{$toremove}) {
805+
my $index = 0;
806+
$index++ until $src->[$index] eq $item;
807+
splice(@$src, $index, 1);
808+
}
809+
}
810+
802811
sub Status {
803812
my $Configs = _load_apperl_configs();
804813
my @configlist = sort(keys %{$Configs->{apperl_configs}});
@@ -814,8 +823,27 @@ sub Status {
814823
$CurAPPerlName = $Configs->{'defaultconfig'};
815824
exists $Configs->{apperl_configs}{$CurAPPerlName} or die("non-existent default apperl config $CurAPPerlName");
816825
}
817-
foreach my $item (@configlist) {
818-
print (sprintf "%s %-30.30s | %s\n", $CurAPPerlName && ($item eq $CurAPPerlName) ? '*' : ' ', $item, ($Configs->{apperl_configs}{$item}{desc} // ''));
826+
827+
my @projectitems;
828+
my $projectconfig = _load_json(PROJECT_FILE);
829+
if($projectconfig && exists $projectconfig->{apperl_configs}) {
830+
@projectitems = sort (keys %{$projectconfig->{apperl_configs}});
831+
}
832+
my @stable = grep( /v\d+\.\d+\.\d+(\-vista)?$/, @configlist);
833+
my @rolling = ('full', 'full-vista', 'small', 'small-vista');
834+
my @internal = ('dontuse_threads', 'perl_cosmo_dev', 'perl_cosmo_dev_on_vista');
835+
my @categories = (
836+
['PROJECT', \@projectitems],
837+
['STABLE', \@stable],
838+
['ROLLING', \@rolling],
839+
['UNSTABLE/INTERNAL', \@internal],
840+
['UNKNOWN', \@configlist]
841+
);
842+
foreach my $cat (@categories) {
843+
foreach my $item (@{$cat->[1]}) {
844+
print (sprintf "%s %-30.30s | %-17.17s |%s\n", $CurAPPerlName && ($item eq $CurAPPerlName) ? '*' : ' ', $item, $cat->[0], ($Configs->{apperl_configs}{$item}{desc} // ''));
845+
}
846+
_remove_arr_items_from_arr(\@configlist, \@{$cat->[1]});
819847
}
820848
}
821849

@@ -1386,7 +1414,7 @@ and building APPerl.
13861414
=item *
13871415
13881416
C<apperlm install-build-deps> installs APPerl build dependencies,
1389-
currently, a fork of the perl5 source and the cosmopolitan libc. This
1417+
currently, a fork of the perl5 source and the Cosmopolitan Libc. This
13901418
is only necessary if you are building APPerl from scratch (not using a
13911419
nobuild configuration). Initialization of the repos can be skipped by
13921420
passing the path to them locally. The cosmopolitan repo

0 commit comments

Comments
 (0)