Changeset 30625

Show
Ignore:
Timestamp:
26.07.2016 19:58:24 (3 years ago)
Author:
ak19
Message:

Switch to including Strawberry Perl (v5.18) which has a vendor folder with a lib subfolder. In gsdlCGI.pm, add perl\vendor\lib to PERL5LIB (for linux) and additionally into PATH for windows, since DLL paths go into PATH for windows as there's no LIBRARY_PATH. Not sure if this is needed as it works on the cmdline without adding perl\vendor\lib or any other lib subfolder to the PATH. At that point it finds vendor, as GLI or building through GLI fails if the vendor subfolder didn.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/cgi-bin/gsdlCGI.pm

    r30624 r30625  
    576576    $ENV{'PERL5LIB'} = &FileUtils::filenameConcatenate($perl_home, "lib"); 
    577577 
     578    # add vendor\lib if it exists to PERL5LIB 
     579    # Strawberry Perl has a perl\vendor\lib folder. Check for it, if it exists add it to PATH for windows 
     580    # (Windows adds paths to library/dll files to PATH) 
     581    my $vendor_lib = &FileUtils::filenameConcatenate($perl_home, "vendor", "lib"); 
     582    if(FileUtils::fileExists($vendor_lib)) { 
     583        &util::envvar_prepend("PATH", $vendor_lib) if $gsdlos eq "windows"; 
     584        &util::envvar_append("PERL5LIB", $vendor_lib);  
     585    } 
     586 
    578587    if($gsdlos eq "darwin") { 
    579588        &util::envvar_prepend("DYLD_LIBRARY_PATH", &FileUtils::filenameConcatenate($perl_home,"5.8.9","darwin-thread-multi-2level","CORE")); 
     
    590599    if(-e $perl_bin_dir) { 
    591600        &util::envvar_append("PATH", $perl_bin_dir); 
     601 
     602        my ($tailname,$perl_home) = File::Basename::fileparse($perl_bin_dir, "\\.(?:[^\\.]+?)\$"); 
     603        my $vendor_lib = &FileUtils::filenameConcatenate($perl_home, "vendor", "lib"); 
     604        if(FileUtils::fileExists($vendor_lib)) { 
     605        #&util::envvar_prepend("PATH", $vendor_lib) if $gsdlos eq "windows"; 
     606        &util::envvar_append("PERL5LIB", $vendor_lib);  
     607        } 
    592608    } 
    593609    }