perl-docs-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject cvs commit: modperl-docs/src/docs/2.0/os/win32 install.pod mpinstall
Date Sun, 06 Jul 2003 17:33:18 GMT
randyk      2003/07/06 10:33:18

  Modified:    src/docs/1.0/os/win32 install.pod mpinstall
               src/docs/2.0/os/win32 install.pod mpinstall
  Log:
  For Win32,
  - record the fact that mod_perl 1 now compiles with ActivePerl 8xx,
  - give locations of where to get mod_perl 1 ppm packages for ActivePerl 8xx,
  - adjust the mpinstall script to offer to get mod_perl 1 for ActivePerl 8xx,
    if requested.
  
  Revision  Changes    Path
  1.25      +63 -51    modperl-docs/src/docs/1.0/os/win32/install.pod
  
  Index: install.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/1.0/os/win32/install.pod,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- install.pod	8 Jun 2003 18:01:29 -0000	1.24
  +++ install.pod	6 Jul 2003 17:33:18 -0000	1.25
  @@ -22,18 +22,17 @@
   mod_perl/Apache environment; you can obtain such a prebuilt Perl
   binary from L<http://www.activestate.com/>.
   
  -Note that, currently, mod_perl 1.0 does not work with an
  -ActivePerl Perl in the 8xx series (based on perl-5.8), due
  -to some issues with I<LARGE_FILES> support. You should either
  -then use an ActivePerl Perl in the 6xx series (based on perl-5.6.1),
  -or else, if you need perl-5.8, build or obtain a binary
  -Perl compiled without the I<USE_LARGE_FILES> compile-time option
  -(beware that such a Perl, and XS-based extensions compiled with it,
  -may not be binary compatible with ActivePerl 8xx and its
  -XS-based extensions). Another possibility, if you desire perl-5.8,
  -is to consider trying mod_perl 2.0, which does work
  -with an ActivePerl Perl in the 8xx series (and is in fact
  -the minimum required Perl version) - see
  +mod_perl 1 builds and tests successfully with either 
  +an ActivePerl Perl in the 6xx series, based on perl-5.6.1,
  +or with an ActivePerl Perl in the 8xx series, based on perl-5.8.0
  +(for the latter, at the time of writing this requires the
  +mod_perl cvs sources to build - see
  +see the discussion on the
  +L<Development Source Distribution|download::source/Development_Source_Distribution>
  +for details on how to access this). If you are using perl-5.8,
  +you may want to consider mod_perl 2.0, which although still
  +in a development phase offers several significant performance
  +improvements for Win32 - see
   L<modperl-2 in Win32|docs::2.0::os::win32::install>
   for details.
   
  @@ -69,9 +68,11 @@
   =item *
   
   As of version 1.24_01, mod_perl will build on Win32 ActivePerls
  -based on Perl-5.6.x (builds 6xx). For binary compatibility you 
  -should use the same compiler in building mod_perl that was used 
  -to compile your Perl binary; for ActivePerl, this means using VC++ 6.
  +based on Perl-5.6.x (builds 6xx). For ActivePerl builds 8xx,
  +at the time of writing you will need the mod_perl 1 cvs sources.
  +For binary compatibility you should use the same compiler in 
  +building mod_perl that was used to compile your Perl binary; 
  +for ActivePerl, this means using VC++ 6.
   
   =back
   
  @@ -177,7 +178,10 @@
   
   This gives the location of where to install mod_perl.so
   (eg, F<\Apache\modules>). No default is assumed - if this argument
  -is not given, mod_perl.so must be copied manually.
  +is not given, mod_perl.so must be copied manually (in the
  +current cvs mod_perl 1 sources, INSTALL_DLL, if not supplied, 
  +will assume a default of F<APACHE_SRC/modules>, if this directory
  +exists).
   
   =item DEBUG
   
  @@ -257,11 +261,8 @@
   
   =head2 PPM Packages
   
  -For users of ActivePerl builds 6xx I<only>, obtainable from
  -L<http://www.activestate.com/>,
  -there are also C<PPM> mod_perl packages available (as discussed
  -in the introduction, no C<ppm> mod_perl 1.0 ppm packages for
  -ActivePerl builds 8xx are presently available). For this, if you
  +For ActivePerl users (or compatible), there are also C<PPM> 
  +mod_perl packages available. For this, if you
   don't already have it, get and install the latest Win32 Apache binary
   from L<http://httpd.apache.org/>.
   
  @@ -288,43 +289,54 @@
     C:\> ppm install
          http://theoryx5.uwinnipeg.ca/ppmpackages/mod_perl.ppd
   
  -Another way, which will be useful if you plan on installing additional
  -Apache modules, is to add the repository where the mod_perl package
  -is kept to the C<ppm> shell utility. For C<ppm2> this may be
  -done as (the C<set repository ...> command has been broken over two
  -lines for readability):
  -
  -   C:\> ppm
  -   PPM> set repository theoryx5 
  -         http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer
  -
  -while for C<ppm3> the appropriate command is (again broken over
  -two lines for readability):
  -
  -   C:\> ppm3
  -   PPM> repository add theoryx5 
  -         http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer
  -
  -After this, you can do
  -
  -   PPM> install mod_perl
  -   PPM> quit
  -   C:\>
  +for Activeperl 6xx builds, and as
  +
  +  C:\> ppm install
  +       http://theoryx5.uwinnipeg.ca/ppms/mod_perl-1.ppd
   
  -For C<ppm2>, use the C<set save> command to save the C<theoryx5> repository

  -to your PPM configuration file, so that future PPM sessions will search this
  +for 8xx builds. Another way, which will be useful if you plan 
  +on installing additional Apache modules, is to add the repository 
  +where the mod_perl package is kept to the C<ppm> shell utility. 
  +For C<ppm2> this may be done with the C<set repository alias location> 
  +command, while for C<ppm3> (the default with ActivePerl 8xx) the 
  +appropriate command is C<repository add alias location>; see the 
  +help utility within the C<ppm> shell for details. For 6xx builds, 
  +the appropriate location is
  +
  +  http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer
  +
  +while for for 8xx builds it is
  +
  +  http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer58
  +
  +After this, you can, within the ppm shell, use the C<install>
  +command to either install C<mod_perl>, for 6xx, or
  +C<mod_perl-1>, for 8xx. For C<ppm2>, use the C<set save> command to save

  +the C<theoryx5> repository to your PPM configuration file, 
  +so that future PPM sessions will search this
   repository, as well as ActiveState's, for requested packages.
   If you are running mod_ssl under Apache, then you should
  -obtain the C<mod_perl-eapi.ppd> package instead.
  +obtain the C<mod_perl-eapi> package for 6xx or the 
  +C<mod_perl-eapi-1> package for 8xx instead.
  +
  +Note that, because of binary incompatibilities, one should
  +I<not> install packages for ActivePerl 8xx from a repository
  +containing packages for ActivePerl 6xx, and vice-versa, particularly
  +if these packages contain XS-based modules.
   
   The mod_perl PPM package also includes the necessary Apache DLL
   C<mod_perl.so>; a post-installation script should be run which will
   offer to copy this file to your Apache modules directory (eg,
  -I<C:\Apache\modules>). This might not occur with C<ppm3>, in
  -which case you can grab F<mod_perl.tar.gz> from
  -L<http://theoryx5.uwinnipeg.ca/ppmpackages/x86/>; when
  -unpacked, this will contain F<mod_perl.so> in the top-level
  -directory.
  +I<C:\Apache\modules>). If this fails, you can grab
  +the appropriate dll and install it manually. For 6xx builds,
  +this is at L<http://theoryx5.uwinnipeg.ca/ppmpackages/x86/>,
  +for which the relevant file is either C<mod_perl.so> or,
  +for EAPI support, C<mod_perl-eapi.so>. For 8xx builds,
  +the location is L<http://theoryx5.uwinnipeg.ca/ppms/x86/>,
  +for which the relevant file is either C<mod_perl-1.so> or,
  +for EAPI support, C<mod_perl-eapi-1.so>. You should then
  +copy this file to your Apache modules directory and rename
  +it as C<mod_perl.so>, if necessary.
   
   The mod_perl package available from this site will always
   use the latest mod_perl sources compiled against the latest official
  
  
  
  1.6       +61 -26    modperl-docs/src/docs/1.0/os/win32/mpinstall
  
  Index: mpinstall
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/1.0/os/win32/mpinstall,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mpinstall	8 Jun 2003 18:01:29 -0000	1.5
  +++ mpinstall	6 Jul 2003 17:33:18 -0000	1.6
  @@ -10,27 +10,28 @@
   use warnings;
   use ExtUtils::MakeMaker;
   use LWP::Simple;
  -use Archive::Tar;
  -use Compress::Zlib;
   use File::Copy;
   use Config;
   use Safe;
   use Digest::MD5;
   use IO::File;
   require Win32;
  +require File::Spec;
   
   die "This only works for Win32" unless $^O =~ /Win32/i;
   die "No mod_perl ppm package available for this Perl" if ($] < 5.006001);
   
   my ($apache2, $apache);
  +my @drives = drives();
   
   # find a possible Apache2 directory
   APACHE2: {
  -    for my $drive ('C'..'G') {
  +    for my $drive (@drives) {
           for my $p ('Apache2', 'Program files/Apache2', 
  -                   'Program Files/Apache Group/Apache2') { 
  -            if (-d "$drive:/$p") {
  -                $apache2 = "$drive:/$p";
  +                   'Program Files/Apache Group/Apache2') {
  +            my $candidate = File::Spec->catpath($drive, $p);
  +            if (-d $candidate) {
  +                $apache2 = $candidate;
                   last APACHE2;
               }
           }
  @@ -45,11 +46,12 @@
   # if no Apache2, try to find Apache1
   unless ($apache2) {
     APACHE: {
  -        for my $drive ('C'..'G') {
  +        for my $drive (@drives) {
               for my $p ('Apache', 'Program Files/Apache', 
                          'Program Files/Apache Group/Apache') {
  -                if (-d "$drive:/$p") {
  -                    $apache = "$drive:/$p";
  +                my $candidate = File::Spec->catpath($drive, $p);
  +                if (-d $candidate) {
  +                    $apache = $candidate;
                       last APACHE;
                   }
               }
  @@ -106,7 +108,12 @@
   
   die 'Please specify an Apache directory' unless ($apache or $apache2);
   my $theoryx5 = 'http://theoryx5.uwinnipeg.ca';
  -my ($ppd, $tgz, $ppdfile, $tgzfile, $checksums);
  +my $ppms = $theoryx5 . '/ppms/';
  +my $ppmsx86 = $ppms . 'x86/';
  +my $ppmpackages = $theoryx5 . '/ppmpackages/';
  +my $ppmpackagesx86 = $ppmpackages . 'x86/';
  +my ($ppd, $tgz, $ppdfile, $tgzfile, $checksums, $so_fetch, $so_fake);
  +my $so = 'mod_perl.so';
   my $cs = 'CHECKSUMS';
   
   # set appropriate ppd and tar.gz files
  @@ -120,15 +127,16 @@
           if ($ans =~ /^n/i) {
               $ppdfile = 'mod_perl.ppd';
               $tgzfile = 'mod_perl.tar.gz';
  -            $ppd = $theoryx5 . '/ppmpackages/' . $ppdfile;
  -            $tgz = $theoryx5 . '/ppmpackages/x86/' . $tgzfile;
  +            $so_fake = 'mod_perl.so';
           }
           else {
               $ppdfile = 'mod_perl-eapi.ppd';
               $tgzfile = 'mod_perl-eapi.tar.gz';
  -            $ppd = $theoryx5 . '/ppmpackages/' . $ppdfile;
  -            $tgz = $theoryx5 . '/ppmpackages/x86/' . $tgzfile;
  +            $so_fake = 'mod_perl-eapi.so';
           }
  +        $ppd = $ppmpackages . $ppdfile;
  +        $tgz = $ppmpackagesx86 . $tgzfile;
  +        $so_fetch = $ppmpackagesx86 . $so_fake;
       }
   }
   else {
  @@ -136,11 +144,26 @@
       if ($apache2) {
           $ppdfile = 'mod_perl.ppd';
           $tgzfile = 'mod_perl.tar.gz';
  -        $ppd = $theoryx5 . '/ppms/' . $ppdfile;
  -        $tgz = $theoryx5 . '/ppms/x86/' . $tgzfile;
  +        $ppd = $ppms . $ppdfile;
  +        $tgz = $ppmsx86 . $tgzfile;
  +        $so_fake = 'mod_perl.so';
  +        $so_fetch = $ppmsx86 . $so_fake;
       }
       else {
  -        die 'No mod_perl 1 package available for this perl version';
  +        my $ans = prompt('Do you need EAPI support for mod_ssl?', 'no');
  +        if ($ans =~ /^n/i) {
  +            $ppdfile = 'mod_perl-1.ppd';
  +            $tgzfile = 'mod_perl-1.tar.gz';
  +            $so_fake = 'mod_perl-1.so';
  +        }
  +        else {
  +            $ppdfile = 'mod_perl-eapi-1.ppd';
  +            $tgzfile = 'mod_perl-eapi-1.tar.gz';
  +            $so_fake = 'mod_perl-eapi-1.so';
  +        }
  +        $ppd = $ppms . $ppdfile;
  +        $tgz = $ppmsx86 . $tgzfile;
  +        $so_fetch = $ppmsx86 . $so_fake;
       }
   }
   
  @@ -156,6 +179,10 @@
   getstore($tgz, $tgzfile);
   print " done!\n";
   die "Failed to fetch $tgz" unless -e $tgzfile;
  +print "Fetching $so_fetch ...";
  +getstore($so_fetch, $so_fake);
  +print " done!\n";
  +die "Failed to fetch $so_fetch" unless -e $so_fake;
   print "Fetching $checksums ...";
   getstore($checksums, $cs);
   print " done!\n";
  @@ -165,6 +192,10 @@
       unless (verifyMD5($tgzfile)) {
           die qq{CHECKSUM check for "$tgzfile" failed.\n};
       }
  +    unless (verifyMD5($so_fake)) {
  +        die qq{CHECKSUM check for "$so_fake" failed.\n};
  +    }
  +    rename($so_fake, $so) or die "Rename of $so_fake to $so failed: $!";
   }
   else {
       die "Failed to fetch $checksums - cannot verify CHECKSUMS.";
  @@ -190,14 +221,6 @@
   print "\n@args\n";
   system(@args) == 0 or die "system @args failed: $?";
   
  -# extract mod_perl.so from the tar.gz file
  -my $so = 'mod_perl.so';
  -my $archive = Archive::Tar->new($tgzfile, 1);
  -print "\nExtracting mod_perl.so ...";
  -$archive->extract($so);
  -die "Extraction of $so failed" unless (-e $so);
  -print " done!\n";
  -
   # figure out where to place mod_perl.so
   my $modules = $apache ? "$apache/modules" : "$apache2/modules";
   $modules = prompt("Where should $so be placed?", $modules);
  @@ -228,7 +251,7 @@
   # clean up, if desired
   my $ans = prompt("Remove temporary installation files from $tmp?", 'yes');
   if ($ans =~ /^y/i) {
  -    unlink ($ppdfile, $old, $tgzfile, $cs) 
  +    unlink ($ppdfile, $old, $tgzfile, $cs, $so) 
           or warn "Cannot unlink files from $tmp: $!";
   }
   
  @@ -307,3 +330,15 @@
       return $file;
   }
   
  +sub drives {
  +    my @drives = ();
  +    eval{require Win32API::File;};
  +    return map {"$_:\\"} ('C' .. 'Z') if $@;
  +    my @r = Win32API::File::getLogicalDrives();
  +    return unless @r > 0;
  +    for (@r) {
  +        my $t = Win32API::File::GetDriveType($_);
  +        push @drives, $_ if ($t == 3 or $t == 4);
  +    }
  +    return @drives > 0 ? @drives : undef;
  +}
  
  
  
  1.24      +16 -24    modperl-docs/src/docs/2.0/os/win32/install.pod
  
  Index: install.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/os/win32/install.pod,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- install.pod	8 Jun 2003 20:55:28 -0000	1.23
  +++ install.pod	6 Jul 2003 17:33:18 -0000	1.24
  @@ -112,8 +112,8 @@
   
   =head2 PPM Packages
   
  -The following assumes you already have ActivePerl 8xx from 
  -L<http://www.activestate.com/> and a Win32 Apache 2.0 binary from 
  +The following assumes you already have ActivePerl 8xx (I<not> 6xx)
  +from L<http://www.activestate.com/> and a Win32 Apache 2.0 binary from 
   L<http://httpd.apache.org/>. In installing this, you might avoid
   some future problems by choosing installation directories that do
   not have spaces in their names (eg, F<C:/Apache2>).
  @@ -134,26 +134,18 @@
     C:\> ppm install
          http://theoryx5.uwinnipeg.ca/ppms/mod_perl.ppd
   
  -for ActivePerl 8xx builds. Another way, which will be useful if you 
  -plan on installing additional Apache modules, is to set the repository
  +Another way, which will be useful if you plan on installing 
  +additional Apache modules, is to set the repository
   within the C<ppm> shell utility to
   
      http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer58
   
  -for ActivePerl 8xx builds. The repository may be set using
  -
  -   ppm> set repository NAME LOCATION
  -
  -for C<ppm2> and by
  -
  -   ppm> rep add NAME LOCATION
  -
  -for C<ppm3> - see the help utility within the C<ppm> shell for
  -details. mod_perl 2.0 can then be installed as
  -
  -   ppm> install mod_perl
  -
  -This will install the necessary modules under an F<Apache2>
  +using the C<repository add alias location> for I<ppm3> (the
  +default with ActivePerl 8xx), and using C<set repository alias location> 
  +for C<ppm2>; see the help utility within the C<ppm> shell for
  +details. mod_perl 2.0 can then be installed as C<install mod_perl>
  +within the ppm shell, which
  +will install the necessary modules under an F<Apache2>
   subdirectory in your Perl tree, so as not to disturb a possible existing
   F<Apache> directory from mod_perl 1.0. See the section below on
   configuring mod_perl to add this directory to the C<@INC> path for
  @@ -162,11 +154,9 @@
   The mod_perl PPM package also includes the necessary Apache DLL
   F<mod_perl.so>; a post-installation script should be run which will
   offer to copy this file to your Apache2 modules directory (eg,
  -F<C:/Apache2/modules/>). If this is not done, get
  -F<mod_perl.tar.gz> from
  -L<http://theoryx5.uwinnipeg.ca/ppms/x86/>; 
  -when unpacked, this file
  -contains F<mod_perl.so> in the top-level directory.
  +F<C:/Apache2/modules/>). If this fails, you can get
  +F<mod_perl.so> from L<http://theoryx5.uwinnipeg.ca/ppms/x86/>
  +and install it to your Apache2 modules directory by hand. 
   
   Note that, because of binary incompatibilities, one should
   I<not> install packages for ActivePerl 8xx from a repository
  @@ -189,7 +179,9 @@
   
   =head2 All in one packages
   
  -At L<http://perl.apache.org/dist/win32-bin/> there is a self-extracting
  +There is an IndigoPerl Perl/Apache 2 binary package available from
  +L<http://www.indigostar.com/> containing mod_perl 2. As well,
  +at L<http://perl.apache.org/dist/win32-bin/> there is a self-extracting
   archive F<Perl-5.8-win32-bin.exe> containing a binary version
   of perl-5.8 (compatible with ActivePerl 8xx), together with Apache 2.0
   and mod_perl 2.0. See the file F<Perl-5.8-win32-bin.readme> for
  
  
  
  1.6       +61 -26    modperl-docs/src/docs/2.0/os/win32/mpinstall
  
  Index: mpinstall
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/os/win32/mpinstall,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mpinstall	8 Jun 2003 18:01:29 -0000	1.5
  +++ mpinstall	6 Jul 2003 17:33:18 -0000	1.6
  @@ -10,27 +10,28 @@
   use warnings;
   use ExtUtils::MakeMaker;
   use LWP::Simple;
  -use Archive::Tar;
  -use Compress::Zlib;
   use File::Copy;
   use Config;
   use Safe;
   use Digest::MD5;
   use IO::File;
   require Win32;
  +require File::Spec;
   
   die "This only works for Win32" unless $^O =~ /Win32/i;
   die "No mod_perl ppm package available for this Perl" if ($] < 5.006001);
   
   my ($apache2, $apache);
  +my @drives = drives();
   
   # find a possible Apache2 directory
   APACHE2: {
  -    for my $drive ('C'..'G') {
  +    for my $drive (@drives) {
           for my $p ('Apache2', 'Program files/Apache2', 
  -                   'Program Files/Apache Group/Apache2') { 
  -            if (-d "$drive:/$p") {
  -                $apache2 = "$drive:/$p";
  +                   'Program Files/Apache Group/Apache2') {
  +            my $candidate = File::Spec->catpath($drive, $p);
  +            if (-d $candidate) {
  +                $apache2 = $candidate;
                   last APACHE2;
               }
           }
  @@ -45,11 +46,12 @@
   # if no Apache2, try to find Apache1
   unless ($apache2) {
     APACHE: {
  -        for my $drive ('C'..'G') {
  +        for my $drive (@drives) {
               for my $p ('Apache', 'Program Files/Apache', 
                          'Program Files/Apache Group/Apache') {
  -                if (-d "$drive:/$p") {
  -                    $apache = "$drive:/$p";
  +                my $candidate = File::Spec->catpath($drive, $p);
  +                if (-d $candidate) {
  +                    $apache = $candidate;
                       last APACHE;
                   }
               }
  @@ -106,7 +108,12 @@
   
   die 'Please specify an Apache directory' unless ($apache or $apache2);
   my $theoryx5 = 'http://theoryx5.uwinnipeg.ca';
  -my ($ppd, $tgz, $ppdfile, $tgzfile, $checksums);
  +my $ppms = $theoryx5 . '/ppms/';
  +my $ppmsx86 = $ppms . 'x86/';
  +my $ppmpackages = $theoryx5 . '/ppmpackages/';
  +my $ppmpackagesx86 = $ppmpackages . 'x86/';
  +my ($ppd, $tgz, $ppdfile, $tgzfile, $checksums, $so_fetch, $so_fake);
  +my $so = 'mod_perl.so';
   my $cs = 'CHECKSUMS';
   
   # set appropriate ppd and tar.gz files
  @@ -120,15 +127,16 @@
           if ($ans =~ /^n/i) {
               $ppdfile = 'mod_perl.ppd';
               $tgzfile = 'mod_perl.tar.gz';
  -            $ppd = $theoryx5 . '/ppmpackages/' . $ppdfile;
  -            $tgz = $theoryx5 . '/ppmpackages/x86/' . $tgzfile;
  +            $so_fake = 'mod_perl.so';
           }
           else {
               $ppdfile = 'mod_perl-eapi.ppd';
               $tgzfile = 'mod_perl-eapi.tar.gz';
  -            $ppd = $theoryx5 . '/ppmpackages/' . $ppdfile;
  -            $tgz = $theoryx5 . '/ppmpackages/x86/' . $tgzfile;
  +            $so_fake = 'mod_perl-eapi.so';
           }
  +        $ppd = $ppmpackages . $ppdfile;
  +        $tgz = $ppmpackagesx86 . $tgzfile;
  +        $so_fetch = $ppmpackagesx86 . $so_fake;
       }
   }
   else {
  @@ -136,11 +144,26 @@
       if ($apache2) {
           $ppdfile = 'mod_perl.ppd';
           $tgzfile = 'mod_perl.tar.gz';
  -        $ppd = $theoryx5 . '/ppms/' . $ppdfile;
  -        $tgz = $theoryx5 . '/ppms/x86/' . $tgzfile;
  +        $ppd = $ppms . $ppdfile;
  +        $tgz = $ppmsx86 . $tgzfile;
  +        $so_fake = 'mod_perl.so';
  +        $so_fetch = $ppmsx86 . $so_fake;
       }
       else {
  -        die 'No mod_perl 1 package available for this perl version';
  +        my $ans = prompt('Do you need EAPI support for mod_ssl?', 'no');
  +        if ($ans =~ /^n/i) {
  +            $ppdfile = 'mod_perl-1.ppd';
  +            $tgzfile = 'mod_perl-1.tar.gz';
  +            $so_fake = 'mod_perl-1.so';
  +        }
  +        else {
  +            $ppdfile = 'mod_perl-eapi-1.ppd';
  +            $tgzfile = 'mod_perl-eapi-1.tar.gz';
  +            $so_fake = 'mod_perl-eapi-1.so';
  +        }
  +        $ppd = $ppms . $ppdfile;
  +        $tgz = $ppmsx86 . $tgzfile;
  +        $so_fetch = $ppmsx86 . $so_fake;
       }
   }
   
  @@ -156,6 +179,10 @@
   getstore($tgz, $tgzfile);
   print " done!\n";
   die "Failed to fetch $tgz" unless -e $tgzfile;
  +print "Fetching $so_fetch ...";
  +getstore($so_fetch, $so_fake);
  +print " done!\n";
  +die "Failed to fetch $so_fetch" unless -e $so_fake;
   print "Fetching $checksums ...";
   getstore($checksums, $cs);
   print " done!\n";
  @@ -165,6 +192,10 @@
       unless (verifyMD5($tgzfile)) {
           die qq{CHECKSUM check for "$tgzfile" failed.\n};
       }
  +    unless (verifyMD5($so_fake)) {
  +        die qq{CHECKSUM check for "$so_fake" failed.\n};
  +    }
  +    rename($so_fake, $so) or die "Rename of $so_fake to $so failed: $!";
   }
   else {
       die "Failed to fetch $checksums - cannot verify CHECKSUMS.";
  @@ -190,14 +221,6 @@
   print "\n@args\n";
   system(@args) == 0 or die "system @args failed: $?";
   
  -# extract mod_perl.so from the tar.gz file
  -my $so = 'mod_perl.so';
  -my $archive = Archive::Tar->new($tgzfile, 1);
  -print "\nExtracting mod_perl.so ...";
  -$archive->extract($so);
  -die "Extraction of $so failed" unless (-e $so);
  -print " done!\n";
  -
   # figure out where to place mod_perl.so
   my $modules = $apache ? "$apache/modules" : "$apache2/modules";
   $modules = prompt("Where should $so be placed?", $modules);
  @@ -228,7 +251,7 @@
   # clean up, if desired
   my $ans = prompt("Remove temporary installation files from $tmp?", 'yes');
   if ($ans =~ /^y/i) {
  -    unlink ($ppdfile, $old, $tgzfile, $cs) 
  +    unlink ($ppdfile, $old, $tgzfile, $cs, $so) 
           or warn "Cannot unlink files from $tmp: $!";
   }
   
  @@ -307,3 +330,15 @@
       return $file;
   }
   
  +sub drives {
  +    my @drives = ();
  +    eval{require Win32API::File;};
  +    return map {"$_:\\"} ('C' .. 'Z') if $@;
  +    my @r = Win32API::File::getLogicalDrives();
  +    return unless @r > 0;
  +    for (@r) {
  +        my $t = Win32API::File::GetDriveType($_);
  +        push @drives, $_ if ($t == 3 or $t == 4);
  +    }
  +    return @drives > 0 ? @drives : undef;
  +}
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org


Mime
View raw message