[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dirty but most simple method by which pkg install will be successful
From: |
David Bateman |
Subject: |
Re: dirty but most simple method by which pkg install will be successful in mingw octave |
Date: |
Wed, 07 Nov 2007 10:09:05 +0100 |
User-agent: |
Thunderbird 1.5.0.7 (X11/20060921) |
Tatsuro MATSUOKA wrote:
> Hi
>
> This is Tatsuro.
>
> Perhaps Benjamin's binary appear in the near future.
>
> I fount that dirty but most simple method by which pkg install will be
> successful in mingw octave.
>
> That is modify DEFUN filesep in dirfns.cc
>
> DEFUN (filesep, args, ,
> "-*- texinfo -*-\n\
> @deftypefn {Built-in Function} {} filesep ()\n\
> Return the system-dependent character used to separate directory names.\n\
> @seealso{pathsep, dir, ls}\n\
> @end deftypefn")
> {
> octave_value retval;
>
> if (args.length () == 0)
> retval = "/"; /*retval = file_ops::dir_sep_str; */ /* Dirtty hack for
> msys */
> else
> print_usage ();
>
> return retval;
> }
>
>
> retval = "/"; /*retval = file_ops::dir_sep_str; */ /* Dirtty hack for
> msys */
>
> This is the most dirty but simple solution.
>
>
> octave.exe:12> pkg prefix
> C:/Programs/msys/1.0/local/octave-2.9.16/octave-forge/main
> C:/Programs/msys/1.0/local/octave-2.9.16/octave-forge/main
> ans = C:\Programs\msys\1.0\local\octave-2.9.16\octave-forge\main
> octave.exe:13>
> octave.exe:13>
> octave.exe:13>
> octave.exe:13> cd
> C:/progra~1/cygwin/opt/octave/octave-forge-bundle-20071014/main
> octave.exe:14>
> octave.exe:14> pkg install -local io-1.0.3.tar.gz
> octave.exe:15> pkg list
> Package Name | Version | Installation directory
> --------------+---------+-----------------------
> io *| 1.0.3 | .../io-1.0.3
>
>
> However, in this patch the Octave should be exectuted on the msys shell.
>
> Tatsuro
>
>
> --------------------------------------
> Easy + Joy + Powerful = Yahoo! Bookmarks x Toolbar
> http://pr.mail.yahoo.co.jp/toolbar/
>
>
>
If this is the case then mingw should by default have a filesep
character of "/" and not "\". This is a bit strange, but in that case
the solution is to modify the section
#if defined (__WIN32__) && ! defined (__CYGWIN__)
#define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1
#elif defined (__CYGWIN__)
#define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1
#define OCTAVE_HAVE_POSIX_FILESYSTEM 1
#else
#define OCTAVE_HAVE_POSIX_FILESYSTEM 1
#endif
of configure.in to read
#if defined (__WIN32__) && ! defined (__CYGWIN__) && ! defined (__MINGW32__)
#define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1
#elif defined (__CYGWIN__) || defined (__MINGW32__)
#define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1
#define OCTAVE_HAVE_POSIX_FILESYSTEM 1
#else
#define OCTAVE_HAVE_POSIX_FILESYSTEM 1
#endif
and then the filesep character on mingw will be treated in the same
manner as for cygwin. Patch attached. Can you try this and see if it helps..
D.
--
David Bateman address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
--- configure.in.orig8 2007-11-07 10:07:29.986580738 +0100
+++ configure.in 2007-11-07 10:07:32.770434693 +0100
@@ -1784,9 +1784,9 @@
#pragma warning (disable: 4661)
#endif
-#if defined (__WIN32__) && ! defined (__CYGWIN__)
+#if defined (__WIN32__) && ! defined (__CYGWIN__) && ! defined (__MINGW32__)
#define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1
-#elif defined (__CYGWIN__)
+#elif defined (__CYGWIN__) || defined (__MINGW32__)
#define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1
#define OCTAVE_HAVE_POSIX_FILESYSTEM 1
#else
- dirty but most simple method by which pkg install will be successful in mingw octave, Tatsuro MATSUOKA, 2007/11/06
- Re: dirty but most simple method by which pkg install will be successful in mingw octave,
David Bateman <=
- Re: dirty but most simple method by which pkg install will be successful in mingw octave, Benjamin Lindner, 2007/11/07
- Re: dirty but most simple method by which pkg install will be successful in mingw octave, John W. Eaton, 2007/11/07
- Re: dirty but most simple method by which pkg install will be successful in mingw octave, David Bateman, 2007/11/07
- Re: dirty but most simple method by which pkg install will be successful in mingw octave, Benjamin Lindner, 2007/11/07
- Re: dirty but most simple method by which pkg install will be successful in mingw octave, Tatsuro MATSUOKA, 2007/11/07
- Re: dirty but most simple method by which pkg install will be successful in mingw octave, Michael Goffioul, 2007/11/08
- Re: dirty but most simple method by which pkg install will be successful in mingw octave, Tatsuro MATSUOKA, 2007/11/08
- Re: dirty but most simple method by which pkg install will be successful in mingw octave, Michael Goffioul, 2007/11/09
- Re: dirty but most simple method by which pkg install will be successful in mingw octave, Tatsuro MATSUOKA, 2007/11/09