summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/lib
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1999-05-02 15:18:32 +0000
committermarkm <markm@FreeBSD.org>1999-05-02 15:18:32 +0000
commit8742766878414945d0cecb1457129302fabddd85 (patch)
tree33096f1dfde39267745e30df4ef65012c7888850 /contrib/perl5/lib
parent4418c9ba633b0e845402d78aa862b0cdfc10741f (diff)
downloadFreeBSD-src-8742766878414945d0cecb1457129302fabddd85.zip
FreeBSD-src-8742766878414945d0cecb1457129302fabddd85.tar.gz
Merge conflicts. More elegant improvements will follow in a couple
of days.
Diffstat (limited to 'contrib/perl5/lib')
-rw-r--r--contrib/perl5/lib/Cwd.pm4
-rw-r--r--contrib/perl5/lib/ExtUtils/Liblist.pm20
-rw-r--r--contrib/perl5/lib/ExtUtils/MM_Unix.pm75
3 files changed, 68 insertions, 31 deletions
diff --git a/contrib/perl5/lib/Cwd.pm b/contrib/perl5/lib/Cwd.pm
index 28361b7..fa6e736 100644
--- a/contrib/perl5/lib/Cwd.pm
+++ b/contrib/perl5/lib/Cwd.pm
@@ -32,7 +32,7 @@ The getcwd() function re-implements the getcwd(3) (or getwd(3)) functions
in Perl.
The abs_path() function takes a single argument and returns the
-absolute pathname for that argument. It uses the same algoritm as
+absolute pathname for that argument. It uses the same algorithm as
getcwd(). (actually getcwd() is abs_path("."))
The fastcwd() function looks the same as getcwd(), but runs faster.
@@ -269,7 +269,7 @@ sub fast_abs_path {
# --- PORTING SECTION ---
# VMS: $ENV{'DEFAULT'} points to default directory at all times
-# 06-Mar-1996 Charles Bailey bailey@genetics.upenn.edu
+# 06-Mar-1996 Charles Bailey bailey@newman.upenn.edu
# Note: Use of Cwd::chdir() causes the logical name PWD to be defined
# in the process logical name table as the default device and directory
# seen by Perl. This may not be the same as the default device
diff --git a/contrib/perl5/lib/ExtUtils/Liblist.pm b/contrib/perl5/lib/ExtUtils/Liblist.pm
index c32d452..89a2421 100644
--- a/contrib/perl5/lib/ExtUtils/Liblist.pm
+++ b/contrib/perl5/lib/ExtUtils/Liblist.pm
@@ -2,7 +2,7 @@ package ExtUtils::Liblist;
use vars qw($VERSION);
# Broken out of MakeMaker from version 4.11
-$VERSION = substr q$Revision: 1.1.1.1 $, 10;
+$VERSION = substr q$Revision: 1.1.1.2 $, 10;
use Config;
use Cwd 'cwd';
@@ -225,6 +225,9 @@ sub _win32_ext {
my $search = 1;
my($fullname, $thislib, $thispth);
+ # add "$Config{installarchlib}/CORE" to default search path
+ push @libpath, "$Config{installarchlib}/CORE";
+
foreach (Text::ParseWords::quotewords('\s+', 0, $potential_libs)){
$thislib = $_;
@@ -240,8 +243,8 @@ sub _win32_ext {
# if searching is disabled, do compiler-specific translations
unless ($search) {
- s/^-L/-libpath:/ if $VC;
s/^-l(.+)$/$1.lib/ unless $GC;
+ s/^-L/-libpath:/ if $VC;
push(@extralibs, $_);
$found++;
next;
@@ -575,7 +578,7 @@ Unix-OS/2 version in several respects:
=item *
Input library and path specifications are accepted with or without the
-C<-l> and C<-L> prefices used by Unix linkers. If neither prefix is
+C<-l> and C<-L> prefixes used by Unix linkers. If neither prefix is
present, a token is considered a directory to search if it is in fact
a directory, and a library to search for otherwise. Authors who wish
their extensions to be portable to Unix or OS/2 should use the Unix
@@ -586,7 +589,7 @@ prefixes, since the Unix-OS/2 version of ext() requires them.
Wherever possible, shareable images are preferred to object libraries,
and object libraries to plain object files. In accordance with VMS
naming conventions, ext() looks for files named I<lib>shr and I<lib>rtl;
-it also looks for I<lib>lib and libI<lib> to accomodate Unix conventions
+it also looks for I<lib>lib and libI<lib> to accommodate Unix conventions
used in some ported software.
=item *
@@ -625,14 +628,15 @@ Unix-OS/2 version in several respects:
If C<$potential_libs> is empty, the return value will be empty.
Otherwise, the libraries specified by C<$Config{libs}> (see Config.pm)
will be appended to the list of C<$potential_libs>. The libraries
-will be searched for in the directories specified in C<$potential_libs>
-as well as in C<$Config{libpth}>. For each library that is found, a
-space-separated list of fully qualified library pathnames is generated.
+will be searched for in the directories specified in C<$potential_libs>,
+C<$Config{libpth}>, and in C<$Config{installarchlib}/CORE>.
+For each library that is found, a space-separated list of fully qualified
+library pathnames is generated.
=item *
Input library and path specifications are accepted with or without the
-C<-l> and C<-L> prefices used by Unix linkers.
+C<-l> and C<-L> prefixes used by Unix linkers.
An entry of the form C<-La:\foo> specifies the C<a:\foo> directory to look
for the libraries that follow.
diff --git a/contrib/perl5/lib/ExtUtils/MM_Unix.pm b/contrib/perl5/lib/ExtUtils/MM_Unix.pm
index 421bd54..bb662ec 100644
--- a/contrib/perl5/lib/ExtUtils/MM_Unix.pm
+++ b/contrib/perl5/lib/ExtUtils/MM_Unix.pm
@@ -8,8 +8,8 @@ use strict;
use vars qw($VERSION $Is_Mac $Is_OS2 $Is_VMS $Is_Win32 $Is_Dos $Is_PERL_OBJECT
$Verbose %pm %static $Xsubpp_Version);
-$VERSION = substr q$Revision: 1.2 $, 10;
-# $Id: MM_Unix.pm,v 1.2 1998/09/09 13:10:46 markm Exp $
+$VERSION = substr q$Revision: 1.1.1.2 $, 10;
+# $Id: MM_Unix.pm,v 1.1.1.2 1999/05/02 14:25:31 markm Exp $
Exporter::import('ExtUtils::MakeMaker',
qw( $Verbose &neatvalue));
@@ -19,7 +19,7 @@ $Is_Mac = $^O eq 'MacOS';
$Is_Win32 = $^O eq 'MSWin32';
$Is_Dos = $^O eq 'dos';
-$Is_PERL_OBJECT = 1 if $Config{'ccflags'} =~ /-DPERL_OBJECT/;
+$Is_PERL_OBJECT = $Config{'ccflags'} =~ /-DPERL_OBJECT/;
if ($Is_VMS = $^O eq 'VMS') {
require VMS::Filespec;
@@ -84,10 +84,10 @@ sub canonpath {
if ( $^O eq 'qnx' && $path =~ s|^(//\d+)/|/| ) {
$node = $1;
}
- $path =~ s|/+|/|g ; # xx////xx -> xx/xx
+ $path =~ s|(?<=[^/])/+|/|g ; # xx////xx -> xx/xx
$path =~ s|(/\.)+/|/|g ; # xx/././xx -> xx/xx
$path =~ s|^(\./)+|| unless $path eq "./"; # ./xx -> xx
- $path =~ s|/$|| unless $path eq "/"; # xx/ -> xx
+ $path =~ s|(?<=[^/])/$|| ; # xx/ -> xx
"$node$path";
}
@@ -233,6 +233,7 @@ sub ExtUtils::MM_Unix::tools_other ;
sub ExtUtils::MM_Unix::top_targets ;
sub ExtUtils::MM_Unix::writedoc ;
sub ExtUtils::MM_Unix::xs_c ;
+sub ExtUtils::MM_Unix::xs_cpp ;
sub ExtUtils::MM_Unix::xs_o ;
sub ExtUtils::MM_Unix::xsubpp_version ;
@@ -374,9 +375,9 @@ sub cflags {
$self->{uc $_} ||= $cflags{$_}
}
- if ($self->{CAPI} && $Is_PERL_OBJECT == 1) {
+ if ($self->{CAPI} && $Is_PERL_OBJECT) {
$self->{CCFLAGS} =~ s/-DPERL_OBJECT(\s|$)//;
- $self->{CCFLAGS} .= '-DPERL_CAPI';
+ $self->{CCFLAGS} .= ' -DPERL_CAPI ';
if ($Is_Win32 && $Config{'cc'} =~ /^cl.exe/i) {
# Turn off C++ mode of the MSC compiler
$self->{CCFLAGS} =~ s/-TP(\s|$)//;
@@ -818,7 +819,7 @@ ci :
=item dist_core (o)
-Defeines the targets dist, tardist, zipdist, uutardist, shdist
+Defines the targets dist, tardist, zipdist, uutardist, shdist
=cut
@@ -915,6 +916,7 @@ sub dlsyms {
my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
my($vars) = $attribs{DL_VARS} || $self->{DL_VARS} || [];
+ my($funclist) = $attribs{FUNCLIST} || $self->{FUNCLIST} || [];
my(@m);
push(@m,"
@@ -931,7 +933,8 @@ static :: $self->{BASEEXT}.exp
$self->{BASEEXT}.exp: Makefile.PL
",' $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e \'use ExtUtils::Mksymlists; \\
Mksymlists("NAME" => "',$self->{NAME},'", "DL_FUNCS" => ',
- neatvalue($funcs),', "DL_VARS" => ', neatvalue($vars), ');\'
+ neatvalue($funcs), ', "FUNCLIST" => ', neatvalue($funclist),
+ ', "DL_VARS" => ', neatvalue($vars), ');\'
');
join('',@m);
@@ -2019,7 +2022,7 @@ uninstall_from_sitedirs ::
=item installbin (o)
-Defines targets to install EXE_FILES.
+Defines targets to make and to install EXE_FILES.
=cut
@@ -2046,7 +2049,7 @@ EXE_FILES = @{$self->{EXE_FILES}}
} : q{FIXIN = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::MakeMaker \
-e "MY->fixin(shift)"
}).qq{
-all :: @to
+pure_all :: @to
$self->{NOECHO}\$(NOOP)
realclean ::
@@ -2348,7 +2351,7 @@ $tmp/perlmain\$(OBJ_EXT): $tmp/perlmain.c
$tmp/perlmain.c: $makefilename}, q{
}.$self->{NOECHO}.q{echo Writing $@
}.$self->{NOECHO}.q{$(PERL) $(MAP_PERLINC) -MExtUtils::Miniperl \\
- -e "writemain(grep s#.*/auto/##, qw|$(MAP_STATIC)|)" > $@t && $(MV) $@t $@
+ -e "writemain(grep s#.*/auto/##, split(q| |, q|$(MAP_STATIC)|))" > $@t && $(MV) $@t $@
};
push @m, "\t",$self->{NOECHO}.q{$(PERL) $(INSTALLSCRIPT)/fixpmain
@@ -2747,10 +2750,13 @@ sub ppd {
push(@m, "\t\@\$(PERL) -e \"print qq{<SOFTPKG NAME=\\\"$self->{DISTNAME}\\\" VERSION=\\\"$pack_ver\\\">\\n}");
push(@m, ". qq{\\t<TITLE>$self->{DISTNAME}</TITLE>\\n}");
my $abstract = $self->{ABSTRACT};
+ $abstract =~ s/\n/\\n/sg;
$abstract =~ s/</&lt;/g;
$abstract =~ s/>/&gt;/g;
push(@m, ". qq{\\t<ABSTRACT>$abstract</ABSTRACT>\\n}");
my ($author) = $self->{AUTHOR};
+ $author =~ s/</&lt;/g;
+ $author =~ s/>/&gt;/g;
$author =~ s/@/\\@/g;
push(@m, ". qq{\\t<AUTHOR>$author</AUTHOR>\\n}");
push(@m, ". qq{\\t<IMPLEMENTATION>\\n}");
@@ -2758,9 +2764,11 @@ sub ppd {
foreach $prereq (sort keys %{$self->{PREREQ_PM}}) {
my $pre_req = $prereq;
$pre_req =~ s/::/-/g;
- push(@m, ". qq{\\t\\t<DEPENDENCY NAME=\\\"$pre_req\\\" />\\n}");
+ my ($dep_ver) = join ",", (split (/\./, $self->{PREREQ_PM}{$prereq}), (0) x 4) [0 .. 3];
+ push(@m, ". qq{\\t\\t<DEPENDENCY NAME=\\\"$pre_req\\\" VERSION=\\\"$dep_ver\\\" />\\n}");
}
push(@m, ". qq{\\t\\t<OS NAME=\\\"\$(OSNAME)\\\" />\\n}");
+ push(@m, ". qq{\\t\\t<ARCHITECTURE NAME=\\\"$Config{'archname'}\\\" />\\n}");
my ($bin_location) = $self->{BINARY_LOCATION};
$bin_location =~ s/\\/\\\\/g;
if ($self->{PPM_INSTALL_SCRIPT}) {
@@ -2784,7 +2792,7 @@ Returns the attribute C<PERM_RW> or the string C<644>.
Used as the string that is passed
to the C<chmod> command to set the permissions for read/writeable files.
MakeMaker chooses C<644> because it has turned out in the past that
-relying on the umask provokes hard-to-track bugreports.
+relying on the umask provokes hard-to-track bug reports.
When the return value is used by the perl function C<chmod>, it is
interpreted as an octal value.
@@ -2890,13 +2898,18 @@ sub processPL {
return "" unless $self->{PL_FILES};
my(@m, $plfile);
foreach $plfile (sort keys %{$self->{PL_FILES}}) {
+ my $list = ref($self->{PL_FILES}->{$plfile})
+ ? $self->{PL_FILES}->{$plfile}
+ : [$self->{PL_FILES}->{$plfile}];
+ foreach $target (@$list) {
push @m, "
-all :: $self->{PL_FILES}->{$plfile}
+all :: $target
$self->{NOECHO}\$(NOOP)
-$self->{PL_FILES}->{$plfile} :: $plfile
- \$(PERL) -I\$(INST_ARCHLIB) -I\$(INST_LIB) -I\$(PERL_ARCHLIB) -I\$(PERL_LIB) $plfile
+$target :: $plfile
+ \$(PERL) -I\$(INST_ARCHLIB) -I\$(INST_LIB) -I\$(PERL_ARCHLIB) -I\$(PERL_LIB) $plfile $target
";
+ }
}
join "", @m;
}
@@ -2944,7 +2957,11 @@ form Foo/Bar and replaces the slash with C<::>. Returns the replacement.
sub replace_manpage_separator {
my($self,$man) = @_;
- $man =~ s,/+,::,g;
+ if ($^O eq 'uwin') {
+ $man =~ s,/+,.,g;
+ } else {
+ $man =~ s,/+,::,g;
+ }
$man;
}
@@ -3305,7 +3322,7 @@ sub tool_xsubpp {
}
}
- $xsubpp = $self->{CAPI} ? "xsubpp -object_capi" : "xsubpp";
+ my $xsubpp = $self->{CAPI} ? "xsubpp -object_capi" : "xsubpp";
return qq{
XSUBPPDIR = $xsdir
@@ -3455,7 +3472,7 @@ Version_check:
=item writedoc
-Obsolete, depecated method. Not used since Version 5.21.
+Obsolete, deprecated method. Not used since Version 5.21.
=cut
@@ -3479,7 +3496,22 @@ sub xs_c {
return '' unless $self->needs_linking();
'
.xs.c:
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs >$*.tc && $(MV) $*.tc $@
+ $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs >xstmp.c && $(MV) xstmp.c $*.c
+';
+}
+
+=item xs_cpp (o)
+
+Defines the suffix rules to compile XS files to C++.
+
+=cut
+
+sub xs_cpp {
+ my($self) = shift;
+ return '' unless $self->needs_linking();
+ '
+.xs.cpp:
+ $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs >xstmp.c && $(MV) xstmp.c $*.cpp
';
}
@@ -3510,6 +3542,7 @@ and Win32 do.
sub perl_archive
{
+ return '$(PERL_INC)' . "/$Config{libperl}" if $^O eq "beos";
return "";
}
OpenPOWER on IntegriCloud