}
my $distname = $data->{DISTNAME} || $data->{NAME};
$distname = "Distribution $distname";
- my $comment = "Perl (v$Config::Config{version}$threaded) module $data->{NAME}";
+ my $patchlevel = $Config{perl_patchlevel} || '';
+ $patchlevel = " pl$patchlevel" if $patchlevel;
+ my $comment = <<EOC;
+Perl (v$Config::Config{version}$threaded$patchlevel) module $data->{NAME}
+EOC
+ chomp $comment;
if ($data->{INSTALLDIRS} and $data->{INSTALLDIRS} eq 'perl') {
$distname = 'perl5-porters@perl.org';
$comment = "Core $comment";
$define{$1} = 1 while /-D(\w+)/g;
}
if ($PLATFORM eq 'os2') {
- $CONFIG_ARGS = $1 if /^(?:config_args)='(.+)'$/;
- $ARCHNAME = $1 if /^(?:archname)='(.+)'$/;
+ $CONFIG_ARGS = $1 if /^config_args='(.+)'$/;
+ $ARCHNAME = $1 if /^archname='(.+)'$/;
+ $PATCHLEVEL = $1 if /^perl_patchlevel='(.+)'$/;
}
}
close(CFG);
}
}
+my $sym_ord = 0;
+
$define{PERL_IMPLICIT_CONTEXT} ||=
$define{USE_ITHREADS} ||
$define{USE_5005THREADS} ||
}
}
elsif ($PLATFORM eq 'os2') {
+ if (open my $fh, '<', 'perl5.def') {
+ while (<$fh>) {
+ last if /^\s*EXPORTS\b/;
+ }
+ while (<$fh>) {
+ $ordinal{$1} = $2 if /^\s*"(\w+)"\s*\@(\d+)\s*$/;
+ # This allows skipping ordinals which were used in older versions
+ $sym_ord = $1 if /^\s*;\s*LAST_ORDINAL\s*=\s*(\d+)\s*$/;
+ }
+ $sym_ord < $_ and $sym_ord = $_ for values %ordinal; # Take the max
+ }
($v = $]) =~ s/(\d\.\d\d\d)(\d\d)$/$1_$2/;
$v .= '-thread' if $ARCHNAME =~ /-thread/;
($dll = $define{PERL_DLL}) =~ s/\.dll$//i;
+ $v .= "\@$PATCHLEVEL" if $PATCHLEVEL;
$d = "DESCRIPTION '\@#perl5-porters\@perl.org:$v#\@ Perl interpreter, configured as $CONFIG_ARGS'";
$d = substr($d, 0, 249) . "...'" if length $d > 253;
print <<"---EOP---";
# that the last symbol will not contain a comma else
# Watcom linker cribs
print "\tdummy\n";
+} elsif ($PLATFORM eq 'os2') {
+ print "; LAST_ORDINAL=$sym_ord\n";
}
sub emit_symbol {
$export{$symbol} = 1;
}
-my $sym_ord = 0;
-
sub output_symbol {
my $symbol = shift;
$symbol = $bincompat5005{$symbol}
# }
}
elsif ($PLATFORM eq 'os2') {
- printf qq( %-31s \@%s\n), qq("$symbol"), ++$sym_ord;
+ printf qq( %-31s \@%s\n),
+ qq("$symbol"), $ordinal{$symbol} || ++$sym_ord;
}
elsif ($PLATFORM eq 'aix' || $PLATFORM eq 'MacOS') {
print "$symbol\n";