Changeset 27774

Show
Ignore:
Timestamp:
08.07.2013 17:20:54 (6 years ago)
Author:
davidb
Message:

Change to work with the Greenstone 3 release-kit/installer

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/XMLParser.pm

    r27241 r27774  
    3737        $perl_dir="perl-5.".substr($],3,2); 
    3838    } 
    39     elsif ($]>5.008) {  
    40     # perl 5.8.1 or above 
    41     $perl_dir = "perl-5.8"; 
    42     } 
    4339    elsif ($]>=5.008) {  
    4440    # perl 5.8.1 or above 
    4541    $perl_dir = "perl-5.8"; 
    4642    } 
    47     elsif ($]<5.008) { 
     43#    elsif ($]>=5.008) {  
     44#   # perl 5.8.1 or above 
     45#   $perl_dir = "perl-5.8"; 
     46#    } 
     47#    elsif ($]<5.008) { 
     48    else { 
    4849    # assume perl 5.6 
    4950    $perl_dir = "perl-5.6"; 
    5051    } 
    51     else { 
    52     print STDERR "Warning: Perl 5.8.0 is not a maintained release.\n"; 
    53     print STDERR "         Please upgrade to a newer version of Perl.\n"; 
    54     $perl_dir = "perl-5.8"; 
     52#    else { 
     53#   print STDERR "Warning: Perl 5.8.0 is not a maintained release.\n"; 
     54#   print STDERR "         Please upgrade to a newer version of Perl.\n"; 
     55#   $perl_dir = "perl-5.8"; 
     56#    } 
     57 
     58 
     59    my $opt_bin_dir = ""; 
     60    if (-e "$ENV{'GSDLHOME'}/perllib/cpan/XML-Parser") { 
     61    # Where the files end up with the Greenstone3 release-kit/installer 
     62 
     63    $opt_bin_dir = "/XML-Parser"; 
    5564    } 
    5665 
    57     #if ($ENV{'GSDLOS'} !~ /^windows$/i) { # test no longer necessary now cpan/auto is in cpan/perl-5.8/auto 
    58         # Use push to put this on the end, so an existing XML::Parser will be used by default 
    59         if (-d "$ENV{'GSDLHOME'}/perllib/cpan/$perl_dir-mt" && $Config{usethreads}){ 
    60             push (@INC, "$ENV{'GSDLHOME'}/perllib/cpan/$perl_dir-mt"); 
    61         } 
    62         else{ 
    63             push (@INC, "$ENV{'GSDLHOME'}/perllib/cpan/$perl_dir"); 
    64         } 
    65     #} 
     66    # Use push to put this on the end, so an existing XML::Parser will be  
     67    # used by default 
     68 
     69    if (-d "$ENV{'GSDLHOME'}/perllib/cpan$opt_bin_dir/$perl_dir-mt" && $Config{usethreads}){ 
     70    push (@INC, "$ENV{'GSDLHOME'}/perllib/cpan$opt_bin_dir/$perl_dir-mt"); 
     71    } 
     72    else{ 
     73    push (@INC, "$ENV{'GSDLHOME'}/perllib/cpan$opt_bin_dir/$perl_dir"); 
     74    } 
    6675} 
    6776