}
use strict;
-use vars qw($Is_VMS $Is_W32 $Is_OS2 $Is_Cygwin $Is_Darwin $Is_NetWare
+use vars qw($Is_VMS $Is_W32 $Is_OS2 $Is_Cygwin $Is_Darwin $Is_NetWare $Is_AmigaOS
%opts $packlist);
my $versiononly;
if ($Is_VMS) { eval 'use VMS::Filespec;' }
}
+# HP-UX (at least) needs to maintain execute permissions
+# on dynamically-loadable libraries. So we do it for all.
+#
+# In AmigaOS, the 0777 means 'rwed' (e = execute, d = delete),
+# (not 'rwx') and having the 'd' makes updates more convenient.
+my $SO_MODE = $Is_AmigaOS ? 0777 : 0555;
+my $NON_SO_MODE = $Is_AmigaOS ? 0666 : 0444;
+
my $scr_ext = ($Is_VMS ? '.Com' : $Is_W32 ? '.bat' : '');
use File::Find;
open SCRIPTS, "utils.lst" or die "Can't open utils.lst: $!";
while (<SCRIPTS>) {
next if /^#/;
- next if /a2p/; # a2p is binary, to be installed separately
chomp;
if (/(\S*)\s*#\s*link\s*=\s*(\S*)/) {
push @scripts, $1;
my %archpms = (
Config => 1,
lib => 1,
- Cwd => 1,
);
if ($^O eq 'dos') {
if ($Is_Cygwin) {
$perldll = $libperl;
} else {
- $perldll = 'perl5'.$Config{patchlevel}.'.'.$dlext;
+ $perldll = 'perl5'.$Config{patchlevel}.'.'.$so;
}
if ($dlsrc ne "dl_none.xs") {
safe_unlink("$installbin/$ndbg$perl$exe_ext");
copy("$ndbg$perl$exe_ext", "$installbin/$ndbg$perl$exe_ext");
chmod(0755, "$installbin/$ndbg$perl$exe_ext");
- safe_unlink("$installbin/${dbg}a2p$exe_ext");
- copy("x2p/${dbg}a2p$exe_ext", "$installbin/${dbg}a2p$exe_ext");
- chmod(0755, "$installbin/${dbg}a2p$exe_ext");
}
}
elsif ($^O ne 'dos') {
else {
# If installing onto a NetWare server
if ($opts{netware}) {
- # Copy perl.nlm, echo.nlm, type.nlm, a2p.nlm & cgi2perl.nlm
+ # Copy perl.nlm, echo.nlm, type.nlm & cgi2perl.nlm
mkpath($Config{installnwsystem});
copy("netware\\".$ENV{'MAKE_TYPE'}."\\perl.nlm", $Config{installnwsystem});
copy("netware\\testnlm\\echo\\echo.nlm", $Config{installnwsystem});
copy("netware\\testnlm\\type\\type.nlm", $Config{installnwsystem});
- copy("x2p\\a2p.nlm", $Config{installnwsystem});
chmod(0755, "$Config{installnwsystem}\\perl.nlm");
mkpath($Config{installnwlcgi});
copy("lib\\auto\\cgi2perl\\cgi2perl.nlm", $Config{installnwlcgi});
# AIX needs perl.exp installed as well.
push(@corefiles,'perl.exp') if $^O eq 'aix';
}
+
+
foreach my $file (@corefiles) {
- # HP-UX (at least) needs to maintain execute permissions
- # on dynamically-loadable libraries. So we do it for all.
if (copy_if_diff($file,"$installarchlib/CORE/$file")) {
if ($file =~ /\.(\Q$so\E|\Q$dlext\E)$/) {
strip("-S", "$installarchlib/CORE/$file") if $^O eq 'darwin';
- chmod(0555, "$installarchlib/CORE/$file");
+ chmod($SO_MODE, "$installarchlib/CORE/$file");
} else {
- chmod(0444, "$installarchlib/CORE/$file");
+ chmod($NON_SO_MODE, "$installarchlib/CORE/$file");
}
}
}
}
}
-# Make links to ordinary names if installbin directory isn't current directory.
-if (!$Is_NetWare && $dbg eq '') {
- if (! samepath($installbin, 'x2p')) {
- my $base = 'a2p';
- $base .= $ver if $versiononly;
- safe_unlink("$installbin/$base$exe_ext");
- copy("x2p/a2p$exe_ext", "$installbin/$base$exe_ext");
- strip("$installbin/$base$exe_ext");
- chmod(0755, "$installbin/$base$exe_ext");
- }
-}
-
# cppstdin is just a script, but it is architecture-dependent, so
# it can't safely be shared. Place it in $installbin.
# Note that Configure doesn't build cppstin if it isn't needed, so
(my $base = $_) =~ s#.*/##;
copy($_, "$installscript/$base");
chmod(0755, "$installscript/$base");
+ if ($Is_AmigaOS) {
+ my $amigapath = unixtoamiga("$installscript/$base");
+ amigaprotect($amigapath,"+s");
+ }
}
for (@tolink) {
# ignore the cpan script in lib/CPAN/bin, the instmodsh and xsubpp
# scripts in lib/ExtUtils, the prove script in lib/Test/Harness,
# the corelist script from lib/Module/CoreList/bin and ptar* in
- # lib/Archive/Tar/bin, the config_data script in lib/Module/Build/scripts
- # and zipdetails in cpan/IO-Compress/bin
+ # lib/Archive/Tar/bin and zipdetails in cpan/IO-Compress/bin
# (they're installed later with other utils)
- return if $name =~ /^(?:cpan|instmodsh|prove|corelist|ptar|ptardiff|ptargrep|config_data|zipdetails)\z/;
+ return if $name =~ /^(?:cpan|instmodsh|prove|corelist|ptar|ptardiff|ptargrep|zipdetails)\z/;
# ignore the Makefiles
return if $name =~ /^makefile$/i;
# ignore the test extensions
if (copy_if_diff($_, "$installlib/$name")) {
strip("-S", "$installlib/$name")
if $^O eq 'darwin' and /\.(?:so|$dlext|a)$/;
- chmod(/\.(so|$dlext)$/ ? 0555 : 0444, "$installlib/$name");
+ chmod(/\.(so|$dlext)$/ ? $SO_MODE : $NON_SO_MODE,
+ "$installlib/$name");
}
}
}
}
}
-# Local variables:
-# cperl-indent-level: 4
-# indent-tabs-mode: nil
-# End:
-#
# ex: set ts=8 sts=4 sw=4 et: