grass64 stable port information

Info2: <<
Package: grass64%type_pkg[gui]
Type: gui (-mac -x11)
Distribution: (%type_raw[gui] = -x11) 10.4, (%type_raw[gui] = -x11) 10.5, (%type_raw[gui] = -x11) 10.6, (%type_raw[gui] = -mac) 10.6
Version: 6.4.1
Revision: 3
Conflicts: grass64, grass64-mac, grass64-x11
Replaces: grass64, grass64-mac, grass64-x11

Description: Powerful GIS software
License: GPL
Homepage: http://grass.osgeo.org/grass64/
Maintainer:BABA Yoshihiko
DescDetail: <<
Very Powerful Geographical Information System with CLI and GUI.

PostgreSQL: 9.0
Python: 2.7
SQLite: 3

Mac version (10.6 only) uses Mac's TclTk.

X11 version uses Fink's TclTk and lacks OpenGL/NVIZ support.
<<

DescUsage: <<
Just type double click GRASS-6.4.app in %p/Applications.
<<

# Dependencies.
Depends: <<
%n-shlibs (=%v-%r)
<<
BuildDepends: <<
fink (>= 0.28),
libncurses5-dev,
libiconv-dev, readline5, libgettext8-dev, gettext-tools,
fftw3,
gdal-dev,
libjpeg, libpng14, libtiff,
unixodbc2 | unixodbc2-nox,
szip, xerces-c31-dev, libogdi3,
postgresql90-dev,
python27,
sqlite3-dev
<<
# hdf5-18-bin | hdf5-bin,
# (%type_raw[gui] = -mac) wxmac28

Source: http://grass.osgeo.org/grass64/source/grass-%v.tar.gz
Source-MD5: d8ca83d416b5b0cf2aa9d36c81a77b23

# Patch Phase.
PatchFile: grass64.patch
PatchFile-MD5: e3bf9a0a35baea73d3eca03af93321b7
PatchScript: sed 's|@PREFIX@|%p|g' < %{PatchFile} | patch -p1

# Compile Phase.
SetCFLAGS: -I%p/include
SetLDFLAGS: -L%p/lib -lcurses

ConfigureParams: --with-curses --with-freetype --with-freetype-includes=%p/lib/freetype219/include/freetype2 --with-freetype-libs=%p/lib/freetype219/lib --with-gdal=%p/bin/gdal-config --with-proj --with-proj-includes=%p/include --with-proj-libs=%p/lib --with-proj-share=%p/share/proj --with-jpeg-includes=%p/include --with-jpeg-libs=%p/lib --with-png-includes=%p/include --with-png-libs=%p/lib --with-tiff-includes=%p/include --with-tiff-libs=%p/lib --without-mysql --with-odbc --with-sqlite --with-sqlite-libs=%p/lib --with-sqlite-includes=%p/include --with-fftw-includes=%p/include --with-fftw-libs=%p/lib --with-cxx --without-motif --without-glw --without-readline --with-python=%p/bin/python2.7-config --prefix=%p/Applications --enable-macosx-app



CompileScript: <<
#!/bin/bash -xe

PGSQLPARAM=" --with-postgres --with-postgres-includes=%p/opt/postgresql-9.0/include --with-postgres-libs=%p/opt/postgresql-9.0/lib "

if [ "%type_raw[gui]" == "-mac" ]; then
./configure %c $PGSQLPARAM --without-x '--with-tcltk-includes=/System/Library/Frameworks/Tcl.framework/Headers /System/Library/Frameworks/Tk.framework/Headers /System/Library/Frameworks/Tk.framework/PrivateHeaders' --with-tcltk-libs=/usr/lib --with-opengl=aqua '--with-opengl-includes=/System/Library/Frameworks/OpenGL.framework/Headers /System/Library/Frameworks/GLUT.framework/Headers /System/Library/Frameworks/AGL.framework/Headers'
# --with-wxwidgets=%p/lib/wx/config/mac-ansi-release-2.8
perl -pi -e "s|^TCLINCDIR|TCLINCDIR = -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tk.framework/Headers -I/System/Library/Frameworks/Tk.framework/PrivateHeaders #|" include/Make/Platform.make
perl -pi -e "s|^TKINCDIR|TKINCDIR = -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tk.framework/Headers -I/System/Library/Frameworks/Tk.framework/PrivateHeaders #|" include/Make/Platform.make
perl -pi -e "s|^TCLTKLIBPATH|TCLTKLIBPATH = -framework Tcl -framework Tk #|" include/Make/Platform.make
perl -pi -e "s|^TCLTKLIBS|TCLTKLIBS = #|" include/Make/Platform.make
else
./configure %c $PGSQLPARAM --with-x --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --with-tcltk-includes=%p/include --with-tcltk-libs=%p/lib --with-opengl=no
fi
# INST_DIR is given to set dylib install name
make INST_DIR='%p/Applications/GRASS-6.4.app/Contents/MacOS'

mkdir -p %b/Applications/GRASS-6.4.app/Contents/MacOS/share/doc/GRASS-6.4
make install INST_DIR='%b' GISBASE_SYSTEM='%b/lib/GRASS/%v'
if [ "%type_raw[gui]" == "-mac" ]; then
perl -pi -e "s|MACORX11|/usr|g" %b/Applications/GRASS-6.4.app/Contents/MacOS/grass.sh

# Recompile python scripts to fix path
%p/bin/python2.7 %p/lib/python2.7/compileall.py -f -d %p/Applications/GRASS-6.4.app/Contents/MacOS/etc/wxpython %b/Applications/GRASS-6.4.app/Contents/MacOS/etc/wxpython/
%p/bin/python2.7 -O %p/lib/python2.7/compileall.py -f -d %p/Applications/GRASS-6.4.app/Contents/MacOS/etc/wxpython %b//Applications/GRASS-6.4.app/Contents/MacOS/etc/wxpython/
else
perl -pi -e "s|MACORX11|%p|g" %b/Applications/GRASS-6.4.app/Contents/MacOS/grass.sh
fi
<<



# Install Phase.
InstallScript: <<
#!/bin/sh -xe
echo "Nothing "
<<
AppBundles: Applications/GRASS-6.4.app

DocFiles:








# Additional Phase.
SplitOff: <<
Package: %N-dev
Description: GRASS Development Headers
Depends: %N-shlibs (= %v-%r)
Conflicts: grass64-dev, grass64-mac-dev, grass64-x11-dev
Replaces: grass64-dev, grass64-mac-dev, grass64-x11-dev
BuildDependsOnly: true
Files: Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_*.a
DocFiles:
<<






SplitOff2: <<
Package: %N-shlibs
Description: GRASS Shared Libraries
Conflicts: grass64-shlibs, grass64-mac-shlibs, grass64-x11-shlibs
Replaces: grass64-shlibs, grass64-mac-shlibs, grass64-x11-shlibs
Depends: <<
libncurses5-shlibs,
fftw3-shlibs,
gdal-shlibs,
libgettext8-shlibs, libjpeg-shlibs, libpng14-shlibs, libtiff-shlibs,
xerces-c31-shlibs,
postgresql90-shlibs,
python27-shlibs,
sqlite3-shlibs,
unixodbc2-shlibs | unixodbc2-nox-shlibs
<<
# (%type_raw[gui] = -mac) wxmac28-shlibs

Files: Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_*.dylib
Shlibs: <<
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_I.%v.dylib
(%type_raw[gui] = -x11) !%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_Iortho.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_arraystats.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_bitmap.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_btree.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_cdhc.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_cluster.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_datetime.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_dbmibase.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_dbmiclient.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_dbmidriver.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_dbstubs.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_dgl.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_dig2.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_display.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_driver.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_dspf.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_edit.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_form.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_g3d.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_gis.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_gmath.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_gpde.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_gproj.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_interpdata.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_interpfl.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_lidar.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_linkm.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_lrs.%v.dylib
(%type_raw[gui] = -mac) !%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_nviz.%v.dylib
(%type_raw[gui] = -mac) !%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_ogsf.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_pngdriver.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_psdriver.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_qtree.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_raster.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_rli.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_rowio.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_rtree.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_segment.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_shape.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_sim.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_sites.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_sqlp.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_stats.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_symb.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_trans.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_vask.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_vect.%v.dylib
!%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_vedit.%v.dylib
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_I.dylib 6.4.0 %n (>= 6.4.0-1)
(%type_raw[gui] = -x11) %p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_Iortho.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_arraystats.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_bitmap.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_btree.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_cdhc.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_cluster.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_datetime.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_dbmibase.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_dbmiclient.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_dbmidriver.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_dbstubs.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_dgl.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_dig2.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_display.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_driver.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_dspf.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_edit.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_form.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_g3d.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_gis.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_gmath.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_gpde.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_gproj.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_interpdata.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_interpfl.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_lidar.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_linkm.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_lrs.dylib 6.4.0 %n (>= 6.4.0-1)
(%type_raw[gui] = -mac) %p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_nviz.dylib 6.4.0 %n (>= 6.4.0-1)
(%type_raw[gui] = -mac) %p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_ogsf.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_pngdriver.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_psdriver.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_qtree.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_raster.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_rli.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_rowio.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_rtree.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_segment.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_shape.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_sim.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_sites.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_sqlp.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_stats.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_symb.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_trans.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_vask.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_vect.dylib 6.4.0 %n (>= 6.4.0-1)
%p/Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_vedit.dylib 6.4.0 %n (>= 6.4.0-1)
<<
DocFiles:
<<

# End of Info2
<<

grass64 stable port .patch

diff -ruN grass-6.4.1-orig/lib/init/init.sh grass-6.4.1/lib/init/init.sh
--- grass-6.4.1-orig/lib/init/init.sh 2011-05-23 20:38:02.000000000 +0900
+++ grass-6.4.1/lib/init/init.sh 2011-05-23 21:34:33.000000000 +0900
@@ -25,7 +25,8 @@
trap "echo 'User break!' ; exit" 2 3 15

# Set default GUI
-DEFAULT_GUI="wxpython"
+# Fink's GRASS does not support wxPython.
+DEFAULT_GUI="tcltk"

# the following is only meant to be an internal variable for debugging this script.
# use 'g.gisenv set="DEBUG=[0-5]"' to turn GRASS debug mode on properly.
@@ -303,11 +304,12 @@
fi

if [ ! "$GRASS_PYTHON" ] ; then
- if [ "$MACOSX" ] ; then
- GRASS_PYTHON=pythonw
- else
+# if [ "$MACOSX" ] ; then
+# GRASS_PYTHON=pythonw
+# else
+# Fink's python does not include pythonw
GRASS_PYTHON=python
- fi
+# fi
export GRASS_PYTHON
fi

@@ -819,16 +821,13 @@

# Check for tcltk interface
tcltk | gis.m)
- if [ "$sh" != "bash" ] && [ "$sh" != "msh" ] && [ "$sh" != "cygwin" ]; then
- # trap is not supported by csh/tcsh and rc
- "$GISBASE/scripts/gis.m"
- fi;
+ "$GISBASE/scripts/gis.m"
;;
oldtcltk | d.m)
"$GISBASE/scripts/d.m"
;;
wxpython)
- "$GRASS_PYTHON" "$GISBASE/etc/wxpython/wxgui.py" &
+ "$GISBASE/etc/wxpython/scripts/wxgui"
;;

# Ignore others
@@ -971,11 +970,6 @@

echo "export PATH=\"$PATH\"" >> "$bashrc"
echo "export HOME=\"$USERHOME\"" >> "$bashrc" # restore user home path
- echo 'export GRASS_SHELL_PID=$$' >> "$bashrc" # can be used to terminate GRASS session from GUI
- if [ "$GRASS_GUI" = tcltk ] || [ "$GRASS_GUI" = gis.m ]; then
- echo '$GISBASE/scripts/gis.m' >> "$bashrc" # Start gis.m
- fi;
- echo 'trap "echo \"GUI issued an exit\"; exit" SIGQUIT' >> "$bashrc"

"$ETC/run" "$SHELL"
EXIT_VAL=$?
@@ -1025,15 +1019,6 @@
d.mon stop="$MON"
done

-# Attempt to close any open gis.m instances.
-if [ -n "$TCLTKGRASSBASE" ] && [ `ps -a | grep -c "$GRASS_WISH"` -ge 1 ] ; then
- echo "Closing open gis.m sessions....."
- echo 'foreach gwin [lsearch -all -inline [winfo interps] gm_tcl*] {
- catch {send -async $gwin Gm::remoteExit $env(GIS_LOCK)}
- }
- exit' | "$GRASS_WISH" #>/dev/null 2>&1
-fi
-
echo "Cleaning up temporary files ..."

"$ETC/clean_temp" > /dev/null
diff -ruN grass-6.4.1-orig/macosx/Makefile grass-6.4.1/macosx/Makefile
--- grass-6.4.1-orig/macosx/Makefile 2011-05-23 20:38:04.000000000 +0900
+++ grass-6.4.1/macosx/Makefile 2011-05-23 21:35:02.000000000 +0900
@@ -4,8 +4,8 @@

MACOSX_APP_NAME = GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app
MACOSX_APPDIR = ${MACOSX_APP_NAME}/Contents/MacOS
-INST_DIR_MACOSX = ${prefix}/${MACOSX_APPDIR}
-MACOSX_SUPPDIR = /Library/GRASS/${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}
+INST_DIR_MACOSX = ${INST_DIR}/Applications/${MACOSX_APPDIR}
+MACOSX_SUPPDIR = ${INST_DIR}/lib/GRASS/${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}
MACOSX_BUNDLE_PREFIX = ${GRASS_HOME}/macosx/dist/${MACOSX_APPDIR}
VER_MINOR_REL = `printf "%d0%d" ${GRASS_VERSION_MINOR} ${GRASS_VERSION_RELEASE}`
VER_DATE = `date +"%g%m%d"`
@@ -50,12 +50,12 @@

# Duplicated, mostly, from the top-level makefile.

-real-install-macosx: INST_DIR_TARGET = ${INST_DIR}
-real-install-macosx: PREFIX_TARGET = ${prefix}
+real-install-macosx: INST_DIR_TARGET = ${INST_DIR_MACOSX}
+real-install-macosx: PREFIX_TARGET = ${INST_DIR}
real-install-macosx: install-basic-macosx macosx-support-dir bundle-macosx
-cd ${GISBASE} ; tar cBf - modbuild | (cd ${MACOSX_SUPPDIR} ; tar xBf - ) 2>/dev/null
@# help file package
- ${LN_DIR} "${INST_DIR_TARGET}/docs/html" /Library/Documentation/Help/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}
+ ${LN_DIR} "${INST_DIR_TARGET}/docs/html" ${INST_DIR_MACOSX}/share/doc/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}

# create a packagemaker installer package.
# pretty much the same as install, but needs intermediate install location
@@ -85,7 +85,7 @@

install-basic-macosx:
${MAKE_DIR_CMD} ${INST_DIR_TARGET}
- -cd ${GISBASE} ; tar cBf - ${MACOSX_APP_NAME} | (cd ${PREFIX_TARGET} ; tar xBf - ) 2>/dev/null
+ -cd ${GISBASE} ; tar cBf - ${MACOSX_APP_NAME} | (cd ${PREFIX_TARGET}/Applications ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - $(FILES) | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - bin | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - bwidget | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
@@ -99,10 +99,10 @@
-cd ${GISBASE} ; tar cBf - include | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - lib | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
-sed 's#'${GISBASE}'#'${INST_DIR_TARGET}'#g' ${GISBASE}/etc/monitorcap > ${INST_DIR_TARGET}/etc/monitorcap
- -chmod -R a+rX ${PREFIX_TARGET}/${MACOSX_APP_NAME} 2>/dev/null
+ -chmod -R a+rX ${PREFIX_TARGET}/Applications/${MACOSX_APP_NAME} 2>/dev/null
-cd ${GRASS_HOME} ; tar cBf - gem/skeleton | (cd ${INST_DIR_TARGET}/etc ; tar xBf - ) 2>/dev/null
-${INSTALL} ${GRASS_HOME}/gem/gem6 ${INST_DIR_TARGET} 2>/dev/null
- -touch ${PREFIX_TARGET}/${MACOSX_APP_NAME}
+ -touch ${PREFIX_TARGET}/Applications/${MACOSX_APP_NAME}

macosx-support-dir:
${MAKE_DIR_CMD} ${MACOSX_SUPPDIR}
diff -ruN grass-6.4.1-orig/macosx/app/build_gui_user_menu.sh grass-6.4.1/macosx/app/build_gui_user_menu.sh
--- grass-6.4.1-orig/macosx/app/build_gui_user_menu.sh 2011-05-23 20:38:04.000000000 +0900
+++ grass-6.4.1/macosx/app/build_gui_user_menu.sh 2011-05-24 07:27:20.000000000 +0900
@@ -13,7 +13,7 @@

GRASS_MMVER=`cut -d . -f 1-2 "$GISBASE/etc/VERSIONNUMBER"`
BINDIR="$HOME/Library/GRASS/$GRASS_MMVER/Modules/bin"
-BINDIRG="/Library/GRASS/$GRASS_MMVER/Modules/bin"
+BINDIRG="@PREFIX@/lib/GRASS/$GRASS_MMVER/Modules/bin"
MENUDIR="$HOME/Library/GRASS/$GRASS_MMVER/Modules/etc"

echo "Rebuilding Addon menu..."
diff -ruN grass-6.4.1-orig/macosx/app/build_html_user_index.sh grass-6.4.1/macosx/app/build_html_user_index.sh
--- grass-6.4.1-orig/macosx/app/build_html_user_index.sh 2011-05-23 20:38:04.000000000 +0900
+++ grass-6.4.1/macosx/app/build_html_user_index.sh 2011-05-24 07:31:21.000000000 +0900
@@ -19,13 +19,13 @@
GRASS_MMVER=`cut -d . -f 1-2 "$GISBASE/etc/VERSIONNUMBER"`
GRASSVERSION=`cat "$GISBASE/etc/VERSIONNUMBER"`
HTMLDIR="$HOME/Library/GRASS/$GRASS_MMVER/Modules/docs/html"
-HTMLDIRG="/Library/GRASS/$GRASS_MMVER/Modules/docs/html"
+HTMLDIRG="@PREFIX@/lib/GRASS/$GRASS_MMVER/Modules/docs/html"

# $1 is current path to GRASS.app/Contents/MacOS, defaults to /Applications
if [ "$1" != "" ] ; then
GISBASE=$1
else
- GISBASE="/Applications/GRASS-$GRASS_MMVER.app/Contents/MacOS"
+ GISBASE="@PREFIX@/Applications/GRASS-$GRASS_MMVER.app/Contents/MacOS"
fi

write_html_header()
@@ -184,4 +184,5 @@

# add Help Viewer link in user docs folder

+mkdir -p $HOME/Library/Documentation/Help/GRASS-$GRASS_MMVER
ln -sfh ../../GRASS/$GRASS_MMVER/Modules/docs/html $HOME/Library/Documentation/Help/GRASS-$GRASS_MMVER
diff -ruN grass-6.4.1-orig/macosx/app/grass.sh.in grass-6.4.1/macosx/app/grass.sh.in
--- grass-6.4.1-orig/macosx/app/grass.sh.in 2011-05-23 20:38:04.000000000 +0900
+++ grass-6.4.1/macosx/app/grass.sh.in 2011-05-24 07:28:43.000000000 +0900
@@ -32,7 +32,7 @@
grass_ver=`cut -d . -f 1-2 "$GISBASE/etc/VERSIONNUMBER"`

GISBASE_USER="$HOME/Library/GRASS/$grass_ver"
-GISBASE_SYSTEM="/Library/GRASS/$grass_ver"
+GISBASE_SYSTEM="@PREFIX@/lib/GRASS/$grass_ver"

# for extra utils
# ideally user should have these in their PATH, but make sure here
@@ -96,47 +96,13 @@
# assume user TclTk progs in default build location /usr/local/bin.
# check even if /usr/local/bin not in PATH, this is where Aqua will be
# also assume matching tclsh alongside wish
-if [ ! "$GRASS_WISH" ] ; then
- gwish=""
- gtclsh=""
- if [ -e "/usr/local/bin/wish8.5" ] ; then
- gwish="/usr/local/bin/wish8.5"
- gtclsh="/usr/local/bin/tclsh8.5"
- else
- # check for any other wish8.5
- wish85=`type -p wish8.5`
- tclsh85=`type -p tclsh8.5`
- if [ "$wish85" ] ; then
- gwish="$wish85"
- gtclsh="$tclsh85"
- else
- # check for any wish8.4
- wish84=`type -p wish8.4`
- tclsh84=`type -p tclsh8.4`
- if [ ! "$wish84" ] ; then
- # or maybe /usr/local/bin not in PATH
- wish84="/usr/local/bin/wish8.4"
- tclsh84="/usr/local/bin/tclsh8.4"
- fi
- if [ -e "$wish84" ] ; then
- # make sure it's not aqua
- # aqua wish is a shell script that starts framework wish
- if [ "`file $wish84 | grep 'shell script'`" ] ; then
- echo "Warning: TclTk Aqua 8.4 unsupported"
- else
- gwish="$wish84"
- gtclsh="$tclsh84"
- fi
- fi
- fi
- fi
- if [ "$gwish" ] ; then
- GRASS_WISH="$gwish"
- export GRASS_WISH
- GRASS_TCLSH="$gtclsh"
- export GRASS_TCLSH
- fi
-fi
+
+gwish="MACORX11/bin/wish"
+gtclsh="MACORX11/bin/tclsh"
+GRASS_WISH="$gwish"
+export GRASS_WISH
+GRASS_TCLSH="$gtclsh"
+export GRASS_TCLSH

### X11 stuff

@@ -184,62 +150,15 @@
# change GRASS_WXBUNDLED and pyver_want here from bundle.make, or manually
GRASS_WXBUNDLED=
export GRASS_WXBUNDLED
-pyexe="pythonw"
+pyexe="python"
GRASS_PYTHONWX="$pyexe"
pyver_want="@PYVER@"
GRASS_WX64BIT="@WX64BIT@"
export GRASS_WX64BIT
-# make sure python version used matches what wxpython wants
-py=""
-# did user set GRASS_PYTHON already? check it (must have pythonw)
-if [ "$GRASS_PYTHON" ] ; then
- py=`echo "$GRASS_PYTHON" | grep pythonw`
- if [ "$py" ] ; then
- case $GRASS_PYTHON in
- /*) py="$GRASS_PYTHON" ;;
- *) py=`type -p $GRASS_PYTHON`
- esac
- pyver=`$py -V 2>&1 | grep " $pyver_want"`
- if [ ! "$pyver" ] ; then
- py=""
- fi
- else
- py=""
- fi
-fi # GRASS_PYTHON
-# try in shell path
-if [ ! "$py" ] ; then
- py=`type -p pythonw$pyver_want`
- if [ "$py" ] ; then
- pyver=`$py -V 2>&1 | grep " $pyver_want"`
- if [ ! "$pyver" ] ; then
- py=""
- fi
- fi
-fi
-# try standard framework
-if [ ! "$py" ] ; then
- py="/Library/Frameworks/Python.framework/Versions/$pyver_want/bin/python"
- if [ ! -x "$py" ] ; then
- py=""
- fi
-fi
-# try system (may be the same as in shell path)
-if [ ! "$py" ] ; then
- py="/usr/bin/pythonw$pyver_want"
- pyver=`$py -V 2>&1 | grep " $pyver_want"`
- if [ ! "$pyver" ] ; then
- py=""
- fi
-fi

-if [ "$py" ] ; then
- echo "$pyver found."
- GRASS_PYTHONWX="$py"
-else
- echo "Warning: No Python $pyver_want found, needed by wxPython."
- echo " The wxPython GUI may not work properly."
-fi
+
+# Use Fink's python
+GRASS_PYTHONWX="@PREFIX@/bin/python"
export GRASS_PYTHONWX
# we will execute python scripts from the python wrapper script
GRASS_PYTHON="python"
@@ -252,8 +171,8 @@
if [ -f "$GRASSRC" ] ; then
GRASS_GUI=`awk '/GRASS_GUI/ {print $2}' "$GRASSRC"`
fi
- if [ -z "$GRASS_GUI" ] ; then
- unset GRASS_GUI
+ if [ ! "$GRASS_GUI" ] ; then
+ GRASS_GUI="tcltk"
fi
fi
if [ "$GRASS_GUI" = "text" ] && [ "$x11" = "tig" ] ; then
diff -ruN grass-6.4.1-orig/macosx/app/python_wrapper grass-6.4.1/macosx/app/python_wrapper
--- grass-6.4.1-orig/macosx/app/python_wrapper 2011-05-23 20:38:04.000000000 +0900
+++ grass-6.4.1/macosx/app/python_wrapper 2011-05-23 21:37:19.000000000 +0900
@@ -29,9 +29,7 @@
SYSARCH=`uname -p`
SYSVER=`uname -r | cut -d . -f 1`

-if [ ! "$GRASS_PYTHONWX" ] ; then
- GRASS_PYTHONWX="pythonw"
-fi
+GRASS_PYTHONWX="python"
# can't run python 64bit if wx not 64bit, assume OSX 10.5+ possible 64bit
if [ $(($SYSVER)) -gt 5 ] && [ "$GRASS_WX64BIT" = "0" ] ; then
case $SYSARCH in
diff -ruN grass-6.4.1-orig/macosx/modbuild/Makefile grass-6.4.1/macosx/modbuild/Makefile
--- grass-6.4.1-orig/macosx/modbuild/Makefile 2011-05-23 20:38:04.000000000 +0900
+++ grass-6.4.1/macosx/modbuild/Makefile 2011-05-24 07:29:31.000000000 +0900
@@ -9,7 +9,7 @@
MACOSX_APP_NAME = GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app
endif
MACOSX_APPDIR = ${MACOSX_APP_NAME}/Contents/MacOS
-INST_DIR_MACOSX = ${prefix}/${MACOSX_APPDIR}
+INST_DIR_MACOSX = ${INST_DIR}/Applications/${MACOSX_APPDIR}

default: modbuild

@@ -19,7 +19,7 @@
-cp -f ReadMe.rtf $(ARCH_DISTDIR)/modbuild/
mkdir -p $(ARCH_DISTDIR)/modbuild/dist.$(ARCH)
-cp -rf $(ARCH_DISTDIR)/demolocation $(ARCH_DISTDIR)/modbuild/dist.$(ARCH)/
- -sed -e 's,^GISDBASE.*,GISDBASE = /Library/GRASS/$(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR)/modbuild/dist.$(ARCH),g' $(ARCH_DISTDIR)/demolocation/.grassrc$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR) > $(ARCH_DISTDIR)/modbuild/dist.$(ARCH)/demolocation/.grassrc$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR)
+ -sed -e 's,^GISDBASE.*,GISDBASE = @PREFIX@/lib/GRASS/$(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR)/modbuild/dist.$(ARCH),g' $(ARCH_DISTDIR)/demolocation/.grassrc$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR) > $(ARCH_DISTDIR)/modbuild/dist.$(ARCH)/demolocation/.grassrc$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR)
mkdir -p $(ARCH_DISTDIR)/modbuild/module
mkdir -p $(ARCH_DISTDIR)/modbuild/include/Make
-cp $(MODULE_TOPDIR)/include/Make/Dir.make $(ARCH_DISTDIR)/modbuild/include/Make/
@@ -44,7 +44,7 @@
@#GISBASE = $(INST_DIR_MACOSX)\
@#endif#g'
@# html.make needs a little change
- sed -e 's,GISRC=$$(RUN_GISBASE),GISRC=/Library/GRASS/$(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR)/modbuild/dist.$$(ARCH),g' $(MODULE_TOPDIR)/include/Make/Html.make > $(ARCH_DISTDIR)/modbuild/include/Make/Html.make
+ sed -e 's,GISRC=$$(RUN_GISBASE),GISRC=@PREFIX@/lib/GRASS/$(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR)/modbuild/dist.$$(ARCH),g' $(MODULE_TOPDIR)/include/Make/Html.make > $(ARCH_DISTDIR)/modbuild/include/Make/Html.make
-cp $(MODULE_TOPDIR)/include/Make/Lib.make $(ARCH_DISTDIR)/modbuild/include/Make/
-cp $(MODULE_TOPDIR)/include/Make/Man.make $(ARCH_DISTDIR)/modbuild/include/Make/
sed -e 's,$$(DEPENDENCIES),,g' $(MODULE_TOPDIR)/include/Make/Module.make > $(ARCH_DISTDIR)/modbuild/include/Make/Module.make

grass64 _unstable_ port .patch