[GRASS-dev] [grass-code P][305] Add Mac OS X application build option

code P item #305, was opened at 2007-02-20 21:35
Status: Open
Priority: 3
Submitted By: William Kyngesburye (kyngchaos)
Assigned to: Nobody (None)
Summary: Add Mac OS X application build option
Patch status: None
Patch type: enhancement
GRASS component: build
GRASS version: CVS HEAD
GRASS CVS checkout date, if applies (YYMMDD): 070220

Initial Comment:
This set of patches adds the option to build GRASS as a standalone double-clickable OSX application.

The core is the 'macosx' folder. This has two subfolders - the app and modbuild (for building external modules, similar to GEM). app builds the application package and binary, and includes a custom startup shell script that is used in place of the grass6 script.

platform.make.in needs a flag to tell the build system this is an OSX build, and this needs a configure setting (suggest --macosx-app, but I don't know how to do configure.in stuff). Platform.make also needs to set the INST_DIR a little differently - 'prefix' is where GRASS.app will be installed, instead of grass-{someversion}. Patch included.

The main Makefile needs to add the macosx subdir to the default target. Then there is a big difference in the installation process. And some additional cleaning. Patch included.

In Mac OS X, it's not a good idea to add to a binary package after installation. So to accomodate addon modules, the startup script adds /Library/GRASS/[version]/Modules/bin and ~/Library/GRASS/[version]/Modules/bin to the PATH and /Library/GRASS/[version]/Modules/lib and ~/Library/GRASS/[version]/Modules/lib to DYLD_LIBRARY_PATH. /Library modules are available to all users and ~/Library modules are only available to one user. The [version] is the grass major.minor version.

For help files, some changes are needed to build_html_index.sh and html.make to add an index file in the user's home to the help indexes and pages. This addon help index file is regenerated whenever GRASS is started, so no install procedure is needed to maintain the addon help index. Patches included.

Tested with current 6.3 CVS. Could be easily backported to 6.2.

It should not interfere with any other platform, or a standard unix build on OSX if the user doesn't set the configure flag.

----------------------------------------------------------------------

You can respond by visiting:
http://wald.intevation.org/tracker/?func=detail&atid=205&aid=305&group_id=21