Rev 14388 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
Macintosh porting of R======================In this directory you can find all the files needed to compile aversion of R for MacOS. The original code for MacOS was written byRoss Ihaka, Julian Harris and Wing Kwong (Tiki) Wan. More recentlyStefano M. Iacus has written new code, modified or simply updated mostof the older files to work with current versions of R sources and theWaste Text Engine.From version 1.2.3 R is a Carbon application that will run nativelyunder MacOS X System.Before building R=================There are only two files that must be uncompressed beforestarting compiling R. These aresrc/macintosh/res/R.rsrc.hqx - the R application resource filesrc/macintosh/cwpro/R.mcp.hqx - the CodeWarrior Project fileand you need to expand them via any hqx decoding utility.Some files need to be created on a Unix/Linux/MacOS X platform. Unpackthe sources on such a platform and run (you will probably need GNUmake)cd src/macintoshmakemake distributionand then copy the file dist.zip to the Macintosh and unpack it at thetop level of the R sources. It creates the library folder, and addsfiles in doc/html and some header files in src/macintosh.Building R==========The R binary can be compiled using Code Warrior Pro 6, called CWsubsequently, by simply opening the file "R.mcp" in the "cwpro" directory.To build the R application you need version 2.x of the Waste Libraryby Marco Piovanelli. This should be included in the CW6 distribution.In case you don't have this, please download the full archive from theofficial Waste library site, http://www.merzwaren.com/waste.You also need a fortran compiler or an F2C tool to compile the *.ffortran files in src/appl directory. The R.mcp project assumes thatyou have converted the files with F2C and put the *.c sources in/src/appl directory. The CW6 distribution includes Mac F2C. You justneed to drag and drop fortran *.f files on the Mac F2C icon to convertthe files.Please note: take care to remove or rename the file "fp.h" in thef2clib directory of Mac F2C distribution. This file conflictswith the standard "fp.h" in the Apple Universal Libraries thatis needed in order to use IEEE 754 arithmetics.If you use ABSoft Fortran Compiler you should use option -N15 to addtrailing underscores to fortran subroutines. Thanks to Andreas Papritzand Jan Deleew.Once you have built the R application, copy the "R" binary from"src/macintosh/bin" in the folder where you put also the "library"directory (with all packages built), the "afm", "demos" and "tests"directories. The distribution folder should appear asafm/ (dir)demo/ (dir)library/ (dir)R (file)tests/ (dir)You should also copy the ".Renviron" file in the same directory.Before building R :===================1) Please copy the file `src/macintosh/config.mac.h' to`src/include/config.h' before you build the R application.2) if you do not use F2C you need a Fortran compilerand also to change the R.mcp project.Building packages=================To build compiled code for the standard packages, expand therespective archives "src/<pkg>/src/<pkg>.mcp.hqx" that containa CW project. Once you have built a package you should move theresulting file to the "libs" directory in the "library/<pkg>"folder.Brian Ripley has written a "makefile" that you can run under MacOS Xthat automates most of the things needed to build the R application,configure it, build help and doc files etc. If you are not able torun this "makefile" you can take the help and examples files from theWindows version by simply copying the whole directories {help, html,R-ex} from the Windows distribution to the package directory here.At present this applies to the data and R directories too.Futher directions=================The GUI sources are adapted from the WasteDemo application from the WasteText Engine distribution.Thanks to Marco Piovanelli for providing these sources for free.Note that the process of building R for the Macintosh is still notsatisfactory to us, and we are working on improvements.---------For comments and feedback, please contact either theR Core Development Team (and Stefano M. Iacus) atR-core@R-project.orgor onlyStefano M. Iacus <stefano.iacus@unimi.it>