Changeset 27710

Show
Ignore:
Timestamp:
26.06.2013 22:11:32 (6 years ago)
Author:
ak19
Message:

Now checking out imagemagick binary (tested on linux) to work with image model collections like backdrop. However, the imagemagick binary does not work as it's looking for the libjpeg.so.62 library file, but only libjpeg.so.8.0.2 and its symlinks and an .la file exist.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • other-projects/nightly-tasks/diffcol/trunk/task.pl

    r27704 r27710  
    222222    # use existing compiled-up greenstone installation, if a GSDLHOME set 
    223223    if(defined $ENV{'GSDL3SRCHOME'} || defined $ENV{'GSDLHOME'}) { 
    224     print STDERR "Found existing Greenstone home, will use that instead"; 
     224    print STDERR "Found existing Greenstone home, will use that instead\n"; 
    225225    return; 
    226226    } 
     
    256256        $status = system $cmd; 
    257257         
    258     } else { # if we're on linux/darwin, need gnome-lib for the correct architecture. 
    259      
     258    } else { # if we're on linux/darwin, need gnome-lib for the correct architecture. And need imagemagick to build imgs in collections 
     259        
     260    my $isMac = ($^O =~ m/macos|darwin/i) ? 1 : 0; 
     261    my $bit_arch=`uname -m`; 
     262 
     263    # imagmagick binary 
     264    print STDERR "Getting imagemagick binary\n"; 
     265     
     266    if($isMac) { 
     267        $cmd = "svn export http://svn.greenstone.org/main/trunk/binaries/mac/intel/imagemagick bin/darwin/imagemagick"; 
     268        $status = system($cmd); 
     269    } else { # linux 
     270        my $extension64 = ($bit_arch =~ m/64$/) ? "-x64" : ""; 
     271        my $imagickzip = "imagemagick-linux$extension64.tar.gz"; 
     272        $cmd = "svn export http://svn.greenstone.org/gs2-extensions/imagemagick/trunk/imagemagick-linux$extension64.tar.gz ext/$imagickzip"; 
     273        $status = system ($cmd); 
     274        system("cd ext && tar -xvzf $imagickzip"); 
     275 
     276        move("$ENV{'DATA_DIR'}$sep$gsdl$sep"."ext/imagemagick/linux", "$ENV{'DATA_DIR'}$sep$gsdl$sep"."bin/linux/imagemagick"); # http://www.perlmonks.org/?node_id=586537 
     277        unlink "ext/$imagickzip" or warn "Could not unlink ext/$imagickzip: $!"; 
     278        &File::Path::remove_tree("$ENV{'DATA_DIR'}$sep$gsdl$sep"."ext/imagemagick"); # the untarred parent folder 
     279    } 
     280     
     281    # gnomelib binary 
    260282    print STDERR "setting up gnome-lib-minimal for compilation\n"; 
    261283 
     
    266288    # But since we know we're on a Linux/Darwin machine at this point, wecan just run `uname -m` and other linux cmds 
    267289 
    268     my $gnome_lib_file = ($^O =~ m/macos|darwin/i) ? "darwin-intel" : "linux"; # assuming all darwin is intel, not ppc!! 
    269  
    270     my $bit_arch=`uname -m`; 
     290    my $gnome_lib_file = $isMac ? "darwin-intel" : "linux"; # assuming all darwin is intel, not ppc!! 
     291 
    271292    $gnome_lib_file .= "-x64" if($bit_arch =~ m/64$/); 
    272293