applied suggested patch, adapted for all platforms
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / MM_OS2.pm
index e88b899..d34367b 100644 (file)
@@ -8,7 +8,6 @@ require Exporter;
 Exporter::import('ExtUtils::MakeMaker',
        qw( $Verbose &neatvalue));
 
-$ENV{EMXSHELL} = 'sh'; # to run `commands`
 unshift @MM::ISA, 'ExtUtils::MM_OS2';
 
 sub dlsyms {
@@ -16,6 +15,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($imports)  = $attribs{IMPORTS} || $self->{IMPORTS} || {};
     my(@m);
     (my $boot = $self->{NAME}) =~ s/:/_/g;
@@ -28,8 +28,10 @@ $self->{BASEEXT}.def: Makefile.PL
      Mksymlists("NAME" => "', $self->{NAME},
      '", "DLBASE" => "',$self->{DLBASE},
      '", "DL_FUNCS" => ',neatvalue($funcs),
+     '", "FUNCLIST" => ',neatvalue($funclist),
      ', "IMPORTS" => ',neatvalue($imports),
-     ', "DL_VARS" => ', neatvalue($vars), ');\'
+     ', "VERSION" => "',$self->{VERSION},
+     '", "DL_VARS" => ', neatvalue($vars), ');\'
 ');
     }
     join('',@m);
@@ -43,6 +45,7 @@ sub replace_manpage_separator {
 
 sub maybe_command {
     my($self,$file) = @_;
+    $file =~ s,[/\\]+,/,g;
     return $file if -x $file && ! -d _;
     return "$file.exe" if -x "$file.exe" && ! -d _;
     return "$file.cmd" if -x "$file.cmd" && ! -d _;
@@ -54,6 +57,17 @@ sub file_name_is_absolute {
     $file =~ m{^([a-z]:)?[\\/]}i ;
 }
 
+sub perl_archive
+{
+ return "\$(PERL_INC)/libperl\$(LIB_EXT)";
+}
+
+sub export_list
+{
+ my ($self) = @_;
+ return "$self->{BASEEXT}.def";
+}
+
 1;
 __END__
 
@@ -61,6 +75,10 @@ __END__
 
 ExtUtils::MM_OS2 - methods to override UN*X behaviour in ExtUtils::MakeMaker
 
+=head1 SYNOPSIS
+
+ use ExtUtils::MM_OS2; # Done internally by ExtUtils::MakeMaker if needed
+
 =head1 DESCRIPTION
 
 See ExtUtils::MM_Unix for a documentation of the methods provided