Add the following packages libalgorithm-diff-perl libspiffy-perl libtext-diff-perl...
[pkg-perl] / deb-src / libspiffy-perl / libspiffy-perl-0.30 / inc / Module / Install / Win32.pm
1 #line 1 "inc/Module/Install/Win32.pm - /Users/ingy/local/lib/perl5/site_perl/5.8.6/Module/Install/Win32.pm"
2 package Module::Install::Win32;
3 use Module::Install::Base; @ISA = qw(Module::Install::Base);
4
5 $VERSION = '0.02';
6
7 use strict;
8
9 # determine if the user needs nmake, and download it if needed
10 sub check_nmake {
11     my $self = shift;
12     $self->load('can_run');
13     $self->load('get_file');
14
15     require Config;
16     return unless (
17         $Config::Config{make}                   and
18         $Config::Config{make} =~ /^nmake\b/i    and
19         $^O eq 'MSWin32'                        and
20         !$self->can_run('nmake')
21     );
22
23     print "The required 'nmake' executable not found, fetching it...\n";
24
25     require File::Basename;
26     my $rv = $self->get_file(
27         url         => 'http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe',
28         ftp_url     => 'ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe',
29         local_dir   => File::Basename::dirname($^X),
30         size        => 51928,
31         run         => 'Nmake15.exe /o > nul',
32         check_for   => 'Nmake.exe',
33         remove      => 1,
34     );
35
36     if (!$rv) {
37         die << '.';
38
39 -------------------------------------------------------------------------------
40
41 Since you are using Microsoft Windows, you will need the 'nmake' utility
42 before installation. It's available at:
43
44   http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe
45       or
46   ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe
47
48 Please download the file manually, save it to a directory in %PATH% (e.g.
49 C:\WINDOWS\COMMAND\), then launch the MS-DOS command line shell, "cd" to
50 that directory, and run "Nmake15.exe" from there; that will create the
51 'nmake.exe' file needed by this module.
52
53 You may then resume the installation process described in README.
54
55 -------------------------------------------------------------------------------
56 .
57     }
58 }
59
60 1;
61
62 __END__
63