Ignore:
Timestamp:
2013-08-02T14:48:49+12:00 (11 years ago)
Author:
ak19
Message:

For darwin, need to get the imagemagick binaries that Max had pre-built, rather than compile up the imagemagick src as we do for linux.

File:
1 edited

Legend:

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

    r27765 r27962  
    268268   
    269269    if($isMac) {
    270         $imagickzip .= "-10.5.tar.gz";
    271 #       &File::Path::make_path($ENV{'DATA_DIR'}."$sep$gsdl$sep$os"); # need to ensure gsdl/bin/darwin exists
    272 # the following mac img bin contains binaries that points to libraries containing fixed paths to /home/max
    273 #       $cmd = "svn export http://svn.greenstone.org/main/trunk/binaries/mac/intel/imagemagick bin/darwin/imagemagick";
    274 #       $status = system($cmd);
     270#       $imagickzip .= "-10.5.tar.gz";
     271        # at present, only the Imagemagick binaries created by Max for darwin work on the Macs
     272        &File::Path::make_path($ENV{'DATA_DIR'}."$sep$gsdl$sep$os"); # need to ensure gsdl/bin/darwin exists
     273        $cmd = "svn export http://svn.greenstone.org/main/trunk/binaries/mac/intel/imagemagick bin/darwin/imagemagick";
     274        $status = system($cmd);
    275275    } else { # linux
    276276        my $extension64 = ($bit_arch =~ m/64$/) ? "-x64" : "";
    277277        $imagickzip .= "$extension64.tar.gz";
    278     }
    279 
    280     $cmd = "svn export http://svn.greenstone.org/gs2-extensions/imagemagick/trunk/$imagickzip ext/$imagickzip";
    281     $status = system ($cmd);
    282     system("cd ext && tar -xvzf $imagickzip");
    283    
     278   
     279        # now these next imagemagick steps (and those near the end of this sub) are just for linux, no longer also for mac
     280        $cmd = "svn export http://svn.greenstone.org/gs2-extensions/imagemagick/trunk/$imagickzip ext/$imagickzip";
     281        $status = system ($cmd);
     282        system("cd ext && tar -xvzf $imagickzip");
     283    }
     284
    284285    # gnomelib binary
    285286    print STDERR "setting up gnome-lib-minimal for compilation\n";
     
    347348    $status = system $cmd;
    348349
    349 
    350     # Moving imagemagick after instead of before compilation, since bin/darwin gets overwritten during compilation
    351     move("$ENV{'DATA_DIR'}$sep$gsdl$sep"."ext/imagemagick/$os", "$ENV{'DATA_DIR'}$sep$gsdl$sep"."bin/$os/imagemagick"); # http://www.perlmonks.org/?node_id=586537
    352     unlink "$ENV{'DATA_DIR'}/$gsdl"."/ext/$imagickzip" or warn "Could not unlink ext/$imagickzip: $!";
    353     &File::Path::remove_tree("$ENV{'DATA_DIR'}$sep$gsdl$sep"."ext/imagemagick"); # the untarred parent folder
     350    if(!$isMac) { # Linux
     351        # Moving imagemagick after instead of before compilation, since bin/darwin gets overwritten during compilation
     352        move("$ENV{'DATA_DIR'}$sep$gsdl$sep"."ext/imagemagick/$os", "$ENV{'DATA_DIR'}$sep$gsdl$sep"."bin/$os/imagemagick"); # http://www.perlmonks.org/?node_id=586537
     353        unlink "$ENV{'DATA_DIR'}/$gsdl"."/ext/$imagickzip" or warn "Could not unlink ext/$imagickzip: $!";
     354        &File::Path::remove_tree("$ENV{'DATA_DIR'}$sep$gsdl$sep"."ext/imagemagick"); # the untarred parent folder
     355    }
    354356
    355357    }
Note: See TracChangeset for help on using the changeset viewer.