Subject: | [PATCH] BioPerl installation 'technically unsuccessful' on Win32. |
Installation on Win32 fails in the symlinking script after installation
(because Win32 cannot symlink files, only directories, and only if the
Win32::Symlink module compiles and is loaded).
A proposed patch to that script is provided (that copies the file
instead) and I'll be testing it in about 4 hours.
Subject: | BioPerl-1.6.1.symlink.patch |
diff -r -u3 BioPerl-1.6.1/maintenance/symlink_script.pl BioPerl-1.6.1-patched/maintenance/symlink_script.pl
--- BioPerl-1.6.1/maintenance/symlink_script.pl 2009-09-29 11:33:45.000000000 -0600
+++ BioPerl-1.6.1-patched/maintenance/symlink_script.pl 2010-02-17 07:14:58.485036800 -0700
@@ -18,8 +18,15 @@
chdir($install_dir);
while (my ($source, $destination) = each %symlink_scripts) {
- eval { symlink($source, $destination) };
- $build->log_warn("Cannot create symbolic link named $destination on your system for $source in $install_dir\n") if $@;
+ if ($^O !~ /Win32/) {
+ eval { symlink($source, $destination) };
+ $build->log_warn("Cannot create symbolic link named $destination on your system for $source in $install_dir\n") if $@;
+ } else {
+ # Win32 perl does not implement symlink(), as it would not work on all filesystems.
+ require File::Copy;
+ eval { File::Copy::copy($source, $destination) };
+ $build->log_warn("Cannot create copy of script named $destination on your system for $source in $install_dir\n") if $@;
+ }
}
chdir($orig_dir);