[Bio] / FigCommon / bootstrap.pl Repository:
ViewVC logotype

Diff of /FigCommon/bootstrap.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25, Tue May 17 17:36:05 2005 UTC revision 1.28, Mon Dec 5 19:10:06 2005 UTC
# Line 1  Line 1 
1  #  #
2    # Copyright (c) 2003-2006 University of Chicago and Fellowship
3    # for Interpretations of Genomes. All Rights Reserved.
4    #
5    # This file is part of the SEED Toolkit.
6    #
7    # The SEED Toolkit is free software. You can redistribute
8    # it and/or modify it under the terms of the SEED Toolkit
9    # Public License.
10    #
11    # You should have received a copy of the SEED Toolkit Public License
12    # along with this program; if not write to the University of Chicago
13    # at info@ci.uchicago.edu or the Fellowship for Interpretation of
14    # Genomes at veronika@thefig.info or download a copy from
15    # http://www.theseed.org/LICENSE.TXT.
16    #
17    
18    #
19  # FIG bootstrap script.  # FIG bootstrap script.
20  #  #
21  # Control is passed here from the toplevel configure (or dists/releases/install depending  # Control is passed here from the toplevel configure (or dists/releases/install depending
# Line 200  Line 217 
217    
218      push(@$Env, ["PATH", join(":", @path), 1]);      push(@$Env, ["PATH", join(":", @path), 1]);
219    
220      push(@$Env, ["LD_LIBRARY_PATH", "${env_lib}", 1]);      #
221        # Compute  LD_LIBRARY_PATH.
222        #
223        # Some packages, like mysql, place their shared libs in subdirectories
224        # of the libdir.
225        #
226    
227        my @ld_path = ($env_lib);
228    
229        my $dh;
230        if (!opendir($dh, $env_lib))
231        {
232            warn "Could not opendir $env_lib: $!";
233        }
234    
235        while ($_ = readdir($dh))
236        {
237            next if /^\./;
238    
239            my $path = "$env_lib/$_";
240            next unless -d $path;
241    
242            #
243            # See if there are any .so's in here.
244            #
245    
246            my @solist = <$path/*.so*>;
247            if (@solist > 0)
248            {
249                push(@ld_path, $path);
250            }
251        }
252        closedir($dh);
253    
254        #
255        # And if perl is dynamically linked, we need to add the perl core directory
256        # to the path too.
257        #
258    
259        my @coredir = <$env_lib/perl5/*/*/CORE>;
260        if (@coredir)
261        {
262            if ( -f "$coredir[0]/libperl.so" )
263            {
264                print "Found libperl in $coredir[0]\n";
265                push(@ld_path, $coredir[0]);
266            }
267        }
268    
269        my $ld_path = join(":", @ld_path);
270        $OtherConfig->{ld_library_path} = $ld_path;
271    
272        push(@$Env, ["LD_LIBRARY_PATH", $ld_path, 1]);
273    
274      my @perllib = grep({ $_ ne "." } @INC,      my @perllib = grep({ $_ ne "." } @INC,
275                         $release_lib,                         $release_lib,
# Line 649  Line 718 
718      print $fh "RTPERLIMPORTS=FIG_Config\n";      print $fh "RTPERLIMPORTS=FIG_Config\n";
719      print $fh "RTSETENV=BLASTMAT=$fig_disk/BLASTMAT\n";      print $fh "RTSETENV=BLASTMAT=$fig_disk/BLASTMAT\n";
720      print $fh "RTSETENV=FIG_HOME=$fig_disk\n";      print $fh "RTSETENV=FIG_HOME=$fig_disk\n";
721        print $fh "#RTLD_LDPATH=$OtherConfig->{ld_library_path}\n";
722  }  }
723    
724  setup_directories("$fig_disk/bin",  setup_directories("$fig_disk/bin",

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.28

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3