Re: [Rd] R CMD build with mingw and msys (PR#9766)

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Mon, 02 Jul 2007 17:14:53 -0400

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



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 02 Jul 2007 - 21:17:30 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 02 Jul 2007 - 23:35:54 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.