[Rd] R CMD build with mingw and msys (PR#9766)
sneumann at pubhealth.ku.dk
sneumann at pubhealth.ku.dk
Fri Jun 29 13:53:33 CEST 2007
Full_Name: Steffen
Version: 2-5-0
OS: Windows
Submission from: (NULL) (192.124.243.162)
Hi,
the R CMD build script is using
if($WINDOWS) {
## workaround for paths in Cygwin tar
$filepath =~ s+^([A-Za-z]):+/cygdrive/\1+;
}
which does not work if the build environment is a MINGW.
I have added the patch below,
Yours,
Steffen
$ diff -u build build.orig
--- build Fri Jun 29 13:50:16 2007
+++ build.orig Fri Jun 29 08:51:48 2007
@@ -47,7 +47,6 @@
R::Vars::error("R_HOME", "R_EXE");
my $WINDOWS = ($R::Vars::OSTYPE eq "windows");
-my $MSYS = ( $ENV{OSTYPE} eq "msys" );
my @exclude_patterns = R::Utils::get_exclude_patterns();
@@ -222,14 +221,10 @@
my $filepath = &file_path($startdir, $filename);
## under Windows, need separate Cygwin and Windows versions of path.
my $origfilepath = $filepath;
- if ($MSYS) {
- ## different workwaround for MSYS
- $filepath =~ s+^([A-Za-z]):+/\1/+;
- } elsif ($WINDOWS) {
- ## workaround for paths in Cygwin tar
- $filepath =~ s+^([A-Za-z]):+/cygdrive/\1+;
+ if($WINDOWS) {
+ ## workaround for paths in Cygwin tar
+ $filepath =~ s+^([A-Za-z]):+/cygdrive/\1+;
}
-
R_system(join(" ",
("$tar chf",
&shell_quote_file_path($filepath),
More information about the R-devel
mailing list