sneumann at pubhealth.ku.dk
2007-Jun-29 11:53 UTC
[Rd] R CMD build with mingw and msys (PR#9766)
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),
On 29/06/2007 7:53 AM, sneumann at pubhealth.ku.dk wrote:> 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,It sounds as though you're not using the tar.exe that comes with the R toolset, you're using the MSYS one. Or am I misunderstanding what you're doing? What does "which tar" give you? (I'm assuming MSYS provides "which", it's not part of the R toolset.). I'd like the R toolset to work if someone is running in an MSYS shell, but I don't want to support arbitrary toolsets, it's just too much work to try to keep up with changes to them all. Duncan Murdoch> > 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), > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel